Quantcast

communication of multiple agents

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

communication of multiple agents

karandeep
Hi,

I am trying to implement a model in which I got to have multiple instances of one kind of agent, and multiple instances of second kind of agent ( say 3 each).
One type of agents communicate with second type of agents, and based on some decision rules, I have to update BB of both the agents.
My problem is, when first kind of agents send message to second kind, all the instances of first agent are sending message together to all instances of second kind.
Is this happening because all the agents are being executed simultaneously(in parallel manner) ? Can I somehow execute them in sequential manner ? ( like first instance of first kind of agent sends message first, then its second instance and so on..)

I have to take care of this as I have to update BB of both type of agents. The problem is, when second type of agent receives the message, it receives three messages at once ( am I right? ) from instances of first agent. I have used internal actions like drop_intentions to tackle multiple changes being made to the second agent's BB by messages of first type of agents. But I am unable to do so for first kind to agents.
The BB of first kind of agents is updated in some later cycles and their updated BB is not available for updated decision making for second type pf agents.
 
Roughly, agents look like this:

First Agent ( lets call it A)

!start.
+!start : true <-

.send([B1,B2, B3], achieve, sending(msg)).

+!update: true <- update BB.
------------------------------------------
Second agent (B)

+!sending(A) : true <- if (some condition){
update B's BB.
.send(A, achieve, update)


A's BB fails to update before it sends message to other agents, the problem occurs. If it is updated properly, it wont satisfy the if condition for other B type agents. I tried to use actions like .wait in A, but I was not successful.
How can I implement this.
Please help.
Kindly ask me if I am not clear in stating my problem.

Regards,
Karandeep
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: communication of multiple agents

Jomi Fred Hübner
Hi Karandeep,

If I well understood your problem, you can handle it in the receivers using atomic plans to handle incoming msgs in sequence.

e.g.

@prec[atomic]
+!sending(A) : <some condition>
   <- update B's BB.
        .send(A, achieve, update)
        ….
+!sending(_).

The atomic annotation guarantees that two intentions for +!sending will never be running

Another solution (more complex) is too coordinate the senders so that they produce messages in sequence. There is nothing ready for that in Jason. You need to send messages among them to achieve this coordination. Other tools could be used for easier coordination.

HTH,

Jomi



> On 04/06/2015, at 03:55, karandeep <[hidden email]> wrote:
>
> Hi,
>
> I am trying to implement a model in which I got to have multiple instances
> of one kind of agent, and multiple instances of second kind of agent ( say 3
> each).
> One type of agents communicate with second type of agents, and based on some
> decision rules, I have to update BB of both the agents.
> My problem is, when first kind of agents send message to second kind, all
> the instances of first agent are sending message together to all instances
> of second kind.
> Is this happening because all the agents are being executed
> simultaneously(in parallel manner) ? Can I somehow execute them in
> sequential manner ? ( like first instance of first kind of agent sends
> message first, then its second instance and so on..)
>
> I have to take care of this as I have to update BB of both type of agents.
> The problem is, when second type of agent receives the message, it receives
> three messages at once ( am I right? ) from instances of first agent. I have
> used internal actions like drop_intentions to tackle multiple changes being
> made to the second agent's BB by messages of first type of agents. But I am
> unable to do so for first kind to agents.
> The BB of first kind of agents is updated in some later cycles and their
> updated BB is not available for updated decision making for second type pf
> agents.
>
> Roughly, agents look like this:
>
> First Agent ( lets call it A)
>
> !start.
> +!start : true <-
>
> .send([B1,B2, B3], achieve, sending(msg)).
>
> +!update: true <- update BB.
> ------------------------------------------
> Second agent (B)
>
> +!sending(A) : true <- if (some condition){
> update B's BB.
> .send(A, achieve, update)
>
>
> A's BB fails to update before it sends message to other agents, the problem
> occurs. If it is updated properly, it wont satisfy the if condition for
> other B type agents. I tried to use actions like .wait in A, but I was not
> successful.
> How can I implement this.
> Please help.
> Kindly ask me if I am not clear in stating my problem.
>
> Regards,
> Karandeep
>
>
>
>
> --
> View this message in context: http://jason.2324890.n4.nabble.com/communication-of-multiple-agents-tp780.html
> Sent from the jason-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users

--
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florianópolis, SC
88040-900 Brazil
http://www.das.ufsc.br/~jomi


------------------------------------------------------------------------------
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: communication of multiple agents

karandeep
Hi,

The atomic plans and some other adjustment did the trick.
I think I am getting the desired output.
Thank you for your guidance.

Regards,
Karandeep
Loading...