modelling
Class NewAgent.NewAction

java.lang.Object
  extended bysema.Agent.Action
      extended bymodelling.NewAgent.NewAction
Enclosing class:
NewAgent

protected class NewAgent.NewAction
extends Agent.Action

Nouvelles actions, généralement définies en protected


Constructor Summary
NewAgent.NewAction(double t)
           
 
Method Summary
 float step()
          Body of the action.
 
Methods inherited from class sema.Agent.Action
close, firstStep, hasBegun, isDisabled, isPaused, pause, pause, resume, resumedStep, start, start, stop, whenEnd, whenPaused, whenRefused, whenStartInPause, whenStopped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewAgent.NewAction

public NewAgent.NewAction(double t)
Method Detail

step

public float step()
Description copied from class: Agent.Action
Body of the action. This is the main code to execute. The value returned is the time (in simulated units) to wait before the next call to the body. A negative value means that the action must end. The main idea of this function is that its execution is intended to be spread on a time that should be coherent with the simulation.

Typically, 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.

Overrides:
step in class Agent.Action