|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectsema.Agent.Action
modelling.ActToSatisfaction
A generalist Action which try to satisfy a satisfator using an action. When it has succed, it stops the action and starts the futur before ending. If paused, it also pauses its changFor action. Every given action can be null, it means it does nothing.
| Constructor Summary | |
ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition)
|
|
ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition,
Agent.Action succes)
|
|
ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition,
Agent.Action succes,
Agent.Action failure)
|
|
ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition,
float verifyDelay)
|
|
ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition,
float verifyDelay,
Agent.Action succes)
|
|
ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition,
float verifyDelay,
Agent.Action succes,
Agent.Action failure)
Constructs the action. |
|
ActToSatisfaction(Agent a,
Satisfactor endCondition)
|
|
ActToSatisfaction(Agent a,
Satisfactor endCondition,
float verifyDelay)
|
|
| Method Summary | |
void |
close()
Closing method, always executed as the last code of an action that has begun. |
float |
firstStep()
Called at the begin of the action. |
float |
step()
Body of the action. |
void |
whenEnd()
Called when a negative value has been returned by one of the step methods. |
void |
whenPaused()
Called when the action is paused. |
| Methods inherited from class sema.Agent.Action |
hasBegun, isDisabled, isPaused, pause, pause, resume, resumedStep, start, start, stop, whenRefused, whenStartInPause, whenStopped |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ActToSatisfaction(Agent a,
Satisfactor endCondition)
ActToSatisfaction(sema.Agent a, sema.Agent.Action action, modelling.Satisfactor endCondition, float verifyDelay, sema.Agent.Action succes, sema.Agent.Action failure)
public ActToSatisfaction(Agent a,
Satisfactor endCondition,
float verifyDelay)
ActToSatisfaction(sema.Agent a, sema.Agent.Action action, modelling.Satisfactor endCondition, float verifyDelay, sema.Agent.Action succes, sema.Agent.Action failure)
public ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition)
ActToSatisfaction(sema.Agent a, sema.Agent.Action action, modelling.Satisfactor endCondition, float verifyDelay, sema.Agent.Action succes, sema.Agent.Action failure)
public ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition,
float verifyDelay)
ActToSatisfaction(sema.Agent a, sema.Agent.Action action, modelling.Satisfactor endCondition, float verifyDelay, sema.Agent.Action succes, sema.Agent.Action failure)
public ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition,
Agent.Action succes)
ActToSatisfaction(sema.Agent a, sema.Agent.Action action, modelling.Satisfactor endCondition, float verifyDelay, sema.Agent.Action succes, sema.Agent.Action failure)
public ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition,
float verifyDelay,
Agent.Action succes)
ActToSatisfaction(sema.Agent a, sema.Agent.Action action, modelling.Satisfactor endCondition, float verifyDelay, sema.Agent.Action succes, sema.Agent.Action failure)
public ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition,
Agent.Action succes,
Agent.Action failure)
ActToSatisfaction(sema.Agent a, sema.Agent.Action action, modelling.Satisfactor endCondition, float verifyDelay, sema.Agent.Action succes, sema.Agent.Action failure)
public ActToSatisfaction(Agent a,
Agent.Action action,
Satisfactor endCondition,
float verifyDelay,
Agent.Action succes,
Agent.Action failure)
a - the agent to which this action will register.action - the action to execute when waiting for the endCondition to be satisfiyed.endCondition - the condition saying whether we reach our goalverifyDelay - the delay of refresshing of the stat of the condition : every verifydelay secondes we call the isSatisfied of the endCondition.succes - the action to execute when we succed to satisfy the endConditionfailure - the action to execute when we don't succed to satisfy the endCondition| Method Detail |
public float firstStep()
Agent.ActionAgent.Action.step().
firstStep in class Agent.Actionpublic float step()
Agent.ActionTypically, a moving agent that is walking would make a step towards a direction then another, and theses steps would be differents calls to step(). Internal variables should be stocked in the action to allow a good step by step execution.
step in class Agent.Actionpublic void whenPaused()
Agent.Action
whenPaused in class Agent.Actionpublic void whenEnd()
Agent.Action
whenEnd in class Agent.Actionpublic void close()
Agent.Action
close in class Agent.Action
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||