Communication

36 views
Skip to first unread message

Jacopo Pellegrino

unread,
Mar 17, 2014, 7:25:14 AM3/17/14
to gama-p...@googlegroups.com
Hello everyone,

I would like to know if it would be possible to have further explanation about the communication between agents. I looked at the FIPA Skills examples but they are quite simple.

For example I would like to understand how to deal with multiple incoming message with the same performative:
suppose that a species has two actions to send 'inform messages' under certain condition. When I have to receive them, how can I distinguish between them and thus perform a different action for each one?

Another question regards the use of 'protocol'? By default it is set to 'no-protocol' but if I try with:

do send with: [ receivers :: recv, protocol :: 'my-protocol', performative :: 'inform', content :: msg_string];

and then 

write '\t protocol: ' + i.protocol + ' content: ' + i.content;

when looping over informs, i still get the following result:


institution2 received the following informs: 

protocol: no-protocol content: [ciao!!]


So how should I use 'protocol'?
  
Thanks a lot for your help

Jacopo

Duc An Vo

unread,
Mar 17, 2014, 11:33:38 AM3/17/14
to gama-p...@googlegroups.com
Hello Jacopo,

A simple way to let an agent execute different actions basing on some criteria (in the context of FIPA communication) is to use the message content as an indication.

'no-protocol' is a "freestyle" protocol. Its advantage is that the modeller can send whatever message in the corresponding conversation but it 's the responsibility of the modeller to explicitly finish the conversation (i.e., send an 'end_conversation' message to mark the end of the conversation).

Please find in the attach file a simple model that fulfills your requirement.

Cheers,
An.


--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
To post to this group, send email to gama-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/gama-platform.
For more options, visit https://groups.google.com/d/optout.

fipa_test_1.gaml

Jacopo Pellegrino

unread,
Mar 25, 2014, 10:53:10 AM3/25/14
to gama-p...@googlegroups.com
Ok I'll look at the example, thanks a lot!!
Reply all
Reply to author
Forward
0 new messages