teamSpace.agent
Class EndProblemSolvingBehaviour

java.lang.Object
  extended byOneShotBehaviour
      extended byteamSpace.agent.EndProblemSolvingBehaviour

public class EndProblemSolvingBehaviour
extends OneShotBehaviour

This behaviour is a behaviour (state) in the FSMBehaviour (final-state-machine) described by the class TeamSpacePSBehaviour. When we are in this state, there are no more actions or PSMs that are ready to be executed or composed. If there are a solution to the initial problem now, we transit to the state PrepareResultBehaviour. If there are no solution to the initial problem, something went wrong and we transit to the state FailureBehaviour.

See Also:
Serialized Form

Constructor Summary
EndProblemSolvingBehaviour(Agent a, java.lang.String teamID)
          The constructor only calls the super-constructor.
 
Method Summary
 void action()
          The action method find out if the problem solving process is successful (sets the transition to SUCCESS) or if it is not complete or something are wrong (sets the transition END_PROBLEM_SOLVING_FAILED).
 int onEnd()
          The method resets this behaviour and returns the transition (for the FSM)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndProblemSolvingBehaviour

public EndProblemSolvingBehaviour(Agent a,
                                  java.lang.String teamID)
The constructor only calls the super-constructor.

Parameters:
a - The agent which gets this behaviour
Method Detail

action

public void action()
The action method find out if the problem solving process is successful (sets the transition to SUCCESS) or if it is not complete or something are wrong (sets the transition END_PROBLEM_SOLVING_FAILED). The problem solving process is successful if there is a solution to the problem.


onEnd

public int onEnd()
The method resets this behaviour and returns the transition (for the FSM)

Returns:
The transition/result from this behaviour (state)