edu.cmu.cs.coral.icf
Interface Agent


public abstract interface Agent

Represents an agent that can be used in a Simulator and controlled by a Controller.

Since:
ICF 0.0
Version:
$Id$

Method Summary
 void executeAction(Action act, Simulator sim)
          Execute an Action in the simulator.
 Action getAction(java.util.Date time)
          Gets the action that the Agent should be performing now.
 java.lang.String getName()
          Gets the name of the agent.
 void setActionStream(ActionStream act_stream)
          Set the action stream to use for control.
 

Method Detail

getName

public java.lang.String getName()
Gets the name of the agent. Names should be unique.
Returns:
the name of the agent
Since:
ICF 0.0

setActionStream

public void setActionStream(ActionStream act_stream)
Set the action stream to use for control.
Parameters:
act_stream - the ActionStream to use to control this Agent or null to remove control
Since:
ICF 0.0

getAction

public Action getAction(java.util.Date time)
Gets the action that the Agent should be performing now.
Parameters:
time - the current time in the simulation/world
Returns:
the action to execute now or null if no Action available
Since:
ICF 0.0

executeAction

public void executeAction(Action act,
                          Simulator sim)
Execute an Action in the simulator.
Parameters:
act - the Action to execute or null to do nothing
sim - the Simulator to execute the action in
Since:
ICF 0.0