Subject: RE: [jade-develop] FSMBehavior - retry
From: Caire Giovanni (Giovanni.Caire@TILAB.COM)
Date: Tue Nov 19 2002 - 10:32:24 MET
Hi,
Is Create_route a CyclicBehaviour? As you said a CyclicBehaviour never ends --> its onEnd() method is never called.
If this is not the case I suggest using the introspector agent (in slow mode or step-by-step mode) to view how your behaviours are executed.
Bye
Giovanni
-----Original Message-----
From: Vadim K. [mailto:mogikan@pisem.net]
Sent: lunedi 18 novembre 2002 17.45
To: JADE
Subject: [jade-develop] FSMBehavior - retry
People, who deals with subj., please help!!
I have 2 behaviours("search" and "return_home"). They must be executed one after the other. So I wrote:
FSMBehaviour Worker_LifeCycle = new FSMBehaviour(this);
Worker_LifeCycle.registerFirstState(new Create_Route(this),"search");
Worker_LifeCycle.registerLastState(new Ret_Nest(this),"return_home");
Worker_LifeCycle.registerTransition("search","return_home",2); (meaning that OnEnd() returns "2")
addBehaviour(Worker_LifeCycle);
But Agent, containing this code, executes this 2 Behaviours simulationtly. And don't care about "registerTransaction" at all. (I commented this string out and all works the same).
Create_Route() & Ret_Nest() are SimpleBehaviours (cyclic like in PingAgent example).
How to do it right?????
Thanks,
Vadim.
P.S. Well I nocied that in my cyclic behavior Agents (when done() returns false) never calls OnEnd() even when I put removeBehaviour(this) under some circumstances.
How to interrupt it and correctly return OnEnd()?
-----Original Message-----
From: Vadim K. [mailto:mogikan@pisem.net]
Sent: lunedì 18 novembre 2002 17.45
To: JADE
Subject: [jade-develop] FSMBehavior - retryPeople, who deals with subj., please help!!I have 2 behaviours("search" and "return_home"). They must be executed one after the other. So I wrote:FSMBehaviour Worker_LifeCycle = new FSMBehaviour(this);
Worker_LifeCycle.registerFirstState(new Create_Route(this),"search");
Worker_LifeCycle.registerLastState(new Ret_Nest(this),"return_home");
Worker_LifeCycle.registerTransition("search","return_home",2); (meaning that OnEnd() returns "2")
addBehaviour(Worker_LifeCycle);But Agent, containing this code, executes this 2 Behaviours simulationtly. And don't care about "registerTransaction" at all. (I commented this string out and all works the same).Create_Route() & Ret_Nest() are SimpleBehaviours (cyclic like in PingAgent example).How to do it right?????Thanks,Vadim.P.S. Well I nocied that in my cyclic behavior Agents (when done() returns false) never calls OnEnd() even when I put removeBehaviour(this) under some circumstances.How to interrupt it and correctly return OnEnd()?
This archive was generated by hypermail 2a22 : Tue Nov 19 2002 - 10:32:26 MET