teamSpace.agent
Class TeamSpacePSBehaviour

java.lang.Object
  extended byFSMBehaviour
      extended byteamSpace.agent.TeamSpacePSBehaviour

public class TeamSpacePSBehaviour
extends FSMBehaviour

This class represents the final-state-machine behaviour that encapsulates the core behaviour of the TeamSpaceAgent. The different states are implemented as behaviours. The first state is CheckForActionsBehaviour, if the output of this state is SUCCESS it transits to HandleActionsBehaviour, if the output is NO_MORE_ACTIONS it transits to EndProblemSolvingBehaviour. If the output of the state HandleActionsBehaviour is SUCCESS it transits back to the CheckForActionsBehaviour. If the output of the state EndProblemSolvingBehaviour is SUCCESS it transits to the state PrepareResultBehaviour. If any of these states transits with a corresponding failure-value CHECK_FOR_ACTIONS_FAILED, HANDLE_ACTIONS_FAILED, END_PROLEM_SOLVING_FAILED or PREPARERESULT_BEHAVIOUR_FAILED, the final state will be the FailureBehaviour. Else the final state will be the state PrepareResultBehaviour.

See Also:
Serialized Form

Field Summary
static int CHECK_FOR_ACTIONS_FAILED
           
static int END_PROBLEM_SOLVING_FAILED
           
static int HANDLE_ACTIONS_FAILED
           
static int NO_MORE_ACTIONS
           
static int PREPARERESULT_BEHAVIOUR_FAILED
           
static int SUCCESS
           
 
Constructor Summary
TeamSpacePSBehaviour(Agent agent, java.lang.String teamID)
          The constructor calls the super-constructor.
 
Method Summary
 int onEnd()
          The method resets this behaviour and returns the transition from this state (behaviour).
 void onStart()
          The method initializes the FSM-behaviour and the different transitions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUCCESS

public static final int SUCCESS
See Also:
Constant Field Values

CHECK_FOR_ACTIONS_FAILED

public static final int CHECK_FOR_ACTIONS_FAILED
See Also:
Constant Field Values

HANDLE_ACTIONS_FAILED

public static final int HANDLE_ACTIONS_FAILED
See Also:
Constant Field Values

END_PROBLEM_SOLVING_FAILED

public static final int END_PROBLEM_SOLVING_FAILED
See Also:
Constant Field Values

PREPARERESULT_BEHAVIOUR_FAILED

public static final int PREPARERESULT_BEHAVIOUR_FAILED
See Also:
Constant Field Values

NO_MORE_ACTIONS

public static final int NO_MORE_ACTIONS
See Also:
Constant Field Values
Constructor Detail

TeamSpacePSBehaviour

public TeamSpacePSBehaviour(Agent agent,
                            java.lang.String teamID)
The constructor calls the super-constructor.

Parameters:
agent - The owner agent of this behaviour
Method Detail

onStart

public void onStart()
The method initializes the FSM-behaviour and the different transitions


onEnd

public int onEnd()
The method resets this behaviour and returns the transition from this state (behaviour).

Returns:
The transition value