communication between Agents problem!

17 views
Skip to first unread message

n.a.s

unread,
Feb 22, 2015, 6:11:33 PM2/22/15
to jad...@googlegroups.com
Hi,

I have a problem between two agents (sender,receiver) - the program is simple

One Agent sends a value to another Agent. The problem that the message doesn't received to the receiver Agent.

Can any one suggest me what to do?

Thanks


//sender Agent 

protected void onTick() {
                        int ip=(int)(Math.random()*1000+1);
               
                        ACLMessage msg=new ACLMessage(ACLMessage.INFORM);
                      msg.addReceiver(new AID("receiverAgentt",AID.ISLOCALNAME));
                     msg.setContent(String.valueOf(i))
                      this.myAgent.send(msg);




//receiver Agent

public void action() {
// TODO Auto-generated method stub
int i
ACLMessage msg=receive();
if(msg!=null){
 String s=msg.getContent();
  iInteger.parseInt(s);
 System.out.println(i;


Marcel Miranda

unread,
Feb 22, 2015, 6:13:24 PM2/22/15
to jad...@googlegroups.com, jad...@googlegroups.com
Wrong mailing list.


m


--
You received this message because you are subscribed to the Google Groups "Jade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jadejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

stanele...@gmail.com

unread,
Feb 22, 2018, 11:56:00 AM2/22/18
to Jade
Reply all
Reply to author
Forward
0 new messages