Queue of messages


Subject: Queue of messages
From: Juan C. Martinez (jumartin@etse.urv.es)
Date: Thu Nov 21 2002 - 12:44:14 MET


Hi jaders,

   I have an agent (ASSIGNER AGENT) with a behaviour that implements the
assignment of different tasks to other agents (A, B, C, etc.). I am
using the Request protocol to ask to the other agents that do something.

When the Assigner agent sends a Request message to the agent A, the
agent A do (or not) its task and answer with an Inform message. The
problem is when the agent A recives several requests (for example:
Request {Task 1}, Request {Task 2}., etc) I am doing several simulations
and some times the agent A answer to the Agent Assigner correctly
(Inform {done Task 1}, Inform {done Task 2}, etc). But some times when
the agent A recives more than three request messages, this agent answers
only the two first messages. I used de Sniffer agent to see the
messages, it appear that the Assigner Agent sends all the Request
messages before the agent A process the tasks and could answer.

The way to recieve the messages by the agent A is with a CyclicBehaviour
 that implements the follow code line:

     ACLMessage Ask =
receive(MessageTemplate.MatchPerformative(ACLMessage.REQUEST));

I understand that with the CyclicBehaviour the agent check if a new
message arrives, isn't it???

I am not sure if the problem is with the queue of messages of the agent
A, is there any way to access this queue to see if the messages are
saved correctlly in the queue??? Or maybe I am doing something wrong??

  thanks in advance,

   Juan.

-- 
____________________________________________________

Juan C. Martínez Miranda Departament d'Enginyeria Informàtica i Matemàtiques Escola Tècnica Superior d'Enginyeria Universitat Rovira i Virgili Campus Sescelades Avinguda dels Paìsos Catalans, 26 43007 Tarragona, Spain Tel. 977 55 85 16 Fax. 977 55 97 10 E-mail: jumartin@etse.urv.es



This archive was generated by hypermail 2a22 : Thu Nov 21 2002 - 13:48:36 MET