public class AsyncAntExample extends Agent<AsyncAntsAMASExample,AsyncWorldExample>
Agent.Phase
Modifier and Type | Field and Description |
---|---|
double |
dx
X coordinate of the ant in the world
|
double |
dy
Y coordinate of the ant in the world
|
amas, criticalities, currentPhase, neighborhood, params
Constructor and Description |
---|
AsyncAntExample(AsyncAntsAMASExample amas,
double startX,
double startY)
Constructor of the ant
|
Modifier and Type | Method and Description |
---|---|
protected void |
onDecideAndAct()
Move in a random direction
|
protected void |
onInitialization()
Called before all agents are created
|
protected void |
onRenderingInitialization()
Called to initialize the rendering of the agent
|
protected void |
onUpdateRender()
This method should be used to update the representation of the agent for
example in a VUI
|
_computeExecutionOrder, _onBeforeReady, addNeighbor, computeCriticality, computeExecutionOrderLayer, destroy, getAmas, getCurrentPhase, getEnvironment, getExecutionOrder, getId, getMostCriticalNeighbor, isSynchronous, onAct, onAgentCycleBegin, onAgentCycleEnd, onDecide, onDraw, onePhaseCycle, onExpose, onInitialize, onPerceive, onReady, onSystemCycleBegin, onSystemCycleEnd, phase1, phase2, run, setAsynchronous, toString
public double dx
public double dy
public AsyncAntExample(AsyncAntsAMASExample amas, double startX, double startY)
env
- The environment of the agentstartX
- Initial X coordinatestartY
- Initial Y coordinateprotected void onInitialization()
Agent
onInitialization
in class Agent<AsyncAntsAMASExample,AsyncWorldExample>
protected void onRenderingInitialization()
Agent
onRenderingInitialization
in class Agent<AsyncAntsAMASExample,AsyncWorldExample>
protected void onDecideAndAct()
onDecideAndAct
in class Agent<AsyncAntsAMASExample,AsyncWorldExample>
protected void onUpdateRender()
Agent
onUpdateRender
in class Agent<AsyncAntsAMASExample,AsyncWorldExample>