Subject: Re: [jade-develop] Behaviour scheduling in an multi-agent system
From: Silvio Macedo (smacedo@ic.ac.uk)
Date: Tue Dec 03 2002 - 17:08:13 MET
Hi!
Without knowing more it's hard to say, but my guess is that you are doing
something that takes long in the setup method of the agents that get
created, or in the contructors of the behaviours that your are adding.
Make sure that the setup method returns quickly and make sure you don't do
synchronous operations either in the constructor of the agents, or in the
constructors of the behaviours you are adding in the setup method.
If you need "initialization" synchronous operations in the behaviours, use
onStart() or in the start() with a flag..not the constructor of the
behaviour.
I'm also learning jade and I found myself doing that very often - not
anymore :)
Silvio
On Tue, 3 Dec 2002, David wrote:
> Hi Jaders,
>
> It says in the programmer's guide that the behaviours added to an agent
> are scheduled in a round robin manner.
>
> I have an question: What if I have one main agent A creating several
> other agents say agent B and agent C.
>
> Agent B and C are created in agent A via the creatNewAgent(...) method
> (in Agent A itself).
> Agent B and C are made to called the start() method.
>
> In Agent B and C, I each added some behaviours to it in their respective
> setup();.
>
> PROBLEM: Only behaviours in Agent A are executed. Behaviours in B & C
> never got executed. Why ?
> Is there something with the way I am programming my agents ?
> Am I allowed to create agents in another agents ? Or should I always run
> each agent as in separate JVM( that is
> run from command prompt as different command window, thus different JVM)
> ??
>
> I look forward to your help and assistance ( clarifications if my
> concepts of agents are wrong altogether!!)
>
> Regards
> David
>
-- http://www.iis.ee.ic.ac.uk/smacedo Intelligent and Interactive Systems, Imperial College London
This archive was generated by hypermail 2a22 : Tue Dec 03 2002 - 17:07:27 MET