RE: [jade-develop] Ordered Sequence of Agents and their behaviours


Subject: RE: [jade-develop] Ordered Sequence of Agents and their behaviours
From: David (amdawong@cyberway.com.sg)
Date: Mon Mar 03 2003 - 13:08:29 MET


Dear Fabio,
 
Many thanks for your feedback.
 
However that spins off another question.
 
I have say 4 other behaviours associated with A. They are behaviour 1,
2, 3, 4 and to be executed in that order.
I believe I can use the sequential behaviour to schedule this sequence.

 
Suppose I do it your way and I implement the last part of your solution
( ie - R informs A when all the 20 agents are ready by sending a message
again.) as a separate behaviour ( ie behaviour 0). Thus I will have
total of 5 behaviours namely behaviour 0,1,2,3,4 to be implemented in
that order. That is, no other behaviours will start until behaviour 0 (
ie the one that R informs A) completes.
 
Question: The programmers guider mentioned that executes its behaviours
sequentially. If a particular behaviour is blocked (ie the behaviour 0
is still waiting for R to inform it that all the other 20 agents are
ready), does SequentialBehaviour schedules the next behaviour ( ie
behaviour 1) to start executing ?
 
Question: SequentialBehaviour allows behaviours to be schedule is a
fashion which the programmer wants it to run. That is, the
SequentialBehaviour allows behaviours to be run in an order after the
preceding one has completed. What defines as a behaviour has completed ?
Does it
 
1. blocked ?
2. completed action() method of the behaviour.
3. if 2 is true, I suppose return; will mean completion as well.
 
Many thanks for your time and attention. I am in the rush to complete a
project. I look forward to your reply.
 
Warmest regards
David
 
 
 
-----Original Message-----
From: jade-develop-bounces@sharon.cselt.it
[mailto:jade-develop-bounces@sharon.cselt.it] On Behalf Of Bellifemine
Fabio
Sent: Monday, March 03, 2003 7:44 PM
To: Ignazio Palmisano; jade-develop@sharon.cselt.it
Subject: RE: [jade-develop] Ordered Sequence of Agents and their
behaviours
 
Hi there,
in my opinion using timers, wakerbehaviours, ... is not a solution. This
is a typical synchronization problem between 21 threads where you want 1
agent A to synchronize with 20 other agents, i.e. A cannot start its
execution until the remaining 20 agents have completed some activity (in
this specific case registering with the DF).
The only way to solve this typical problem is that you use a kind of
rendez-vous agent R where
- A asks R to be informed as soon as the 20 agents have completed their
activity; and then A blocks until R informs A
- the 20 agents inform R that they have completed their activity by
simply sending a message
- R informs A when all the 20 agents are ready by sending a message
again.
 
Fabio.

Dear Fabio,

 

Many thanks for your feedback.

 

However that spins off another question.

 

I have say 4 other behaviours associated with A. They are behaviour 1, 2, 3, 4 and to be executed in that order.

I believe I can use the sequential behaviour  to schedule this sequence.

 

Suppose I do it your way and I implement the last part of your solution ( ie - R informs A when all the 20 agents are ready by sending a message again.) as a separate behaviour  ( ie behaviour 0). Thus I will have total of 5 behaviours namely behaviour 0,1,2,3,4 to be implemented in that order. That is, no other behaviours will start until behaviour 0 ( ie the one that R informs A) completes.

 

Question: The programmers guider mentioned that executes its behaviours sequentially. If a particular behaviour is blocked (ie the behaviour 0 is still waiting for R to inform it that all the other 20 agents are ready), does SequentialBehaviour schedules the next behaviour ( ie behaviour 1) to start executing ?

 

Question: SequentialBehaviour allows behaviours to be schedule is a fashion which the programmer wants it to run. That is, the SequentialBehaviour allows behaviours to be run in an order after the preceding one has completed. What defines as a behaviour has completed ? Does it

 

1.      blocked ?

2.      completed action() method of the behaviour.

3.      if 2 is true, I suppose return; will mean completion as well.

 

Many thanks for your time and attention. I am in the rush to complete a project. I look forward to your reply.

 

Warmest regards

David

 

 

 

-----Original Message-----
From: jade-develop-bounces@sharon.cselt.it [mailto:jade-develop-bounces@sharon.cselt.it] On Behalf Of Bellifemine Fabio
Sent:
Monday, March 03, 2003 7:44 PM
To: Ignazio Palmisano; jade-develop@sharon.cselt.it
Subject: RE: [jade-develop] Ordered Sequence of Agents and their behaviours

 

Hi there,

in my opinion using timers, wakerbehaviours, ... is not a solution. This is a typical synchronization problem between 21 threads where you want 1 agent A to synchronize with 20 other agents, i.e. A cannot start its execution until the remaining 20 agents have completed some activity (in this specific case registering with the DF).

The only way to solve this typical problem is that you use a kind of rendez-vous agent R where

- A asks R to be informed as soon as the 20 agents have completed their activity; and then A blocks until R informs A

- the 20 agents inform R that they have completed their activity by simply sending a message

- R informs A when all the 20 agents are ready by sending a message again.

 

Fabio.

_______________________________________________
jade-develop mailing list
jade-develop@sharon.cselt.it
http://sharon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT http://jade.cselt.it/mailing.htm#unsubscribe



This archive was generated by hypermail 2a22 : Mon Mar 03 2003 - 13:09:35 MET