|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.liu.ida.critiquer.simulation.DefaultAgentSimulationState
public class DefaultAgentSimulationState
Field Summary | |
---|---|
static String |
FUEL_LEVEL
|
Constructor Summary | |
---|---|
DefaultAgentSimulationState(Agent agent)
|
Method Summary | |
---|---|
void |
consumeActivity(Activity activity)
When activity has finished, calculate how properties of
the agent are modified |
Agent |
getAgent()
|
Object |
getProperty(String name)
There may be a number of properties associated with a state of an agent during a simulation. |
void |
initSimulation(SimulationEngine engine)
Called every time the simulation engine starts a simulation. |
void |
renderState(GeoView view,
Graphics2D g2)
Render a visual representation of this agent state in the simulation view. |
protected void |
setProperties()
Set the properties that define this state. |
void |
setProperty(String key,
Object value)
Enter property values to be used during the simulation |
void |
stepBackward(int step)
Called by the simulation engine when the time is decreased in the simulation. |
void |
stepForward(int step)
Move forward in the simulation with the agent |
void |
stepTo(Calendar time)
Step forward or backwards in time to the absolute time time |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String FUEL_LEVEL
Constructor Detail |
---|
public DefaultAgentSimulationState(Agent agent)
Method Detail |
---|
public void setProperty(String key, Object value)
AgentSimulationState
setProperty
in interface AgentSimulationState
key
- identifying this propertyvalue
- the valuepublic Object getProperty(String name)
AgentSimulationState
getProperty
in interface AgentSimulationState
name
- of the property
name
, null
if not available.public void renderState(GeoView view, Graphics2D g2)
AgentSimulationState
renderState
in interface AgentSimulationState
public Agent getAgent()
getAgent
in interface AgentSimulationState
AgentSimulationState.getAgent()
public void initSimulation(SimulationEngine engine)
initSimulation
in interface SimulationElement
se.liu.ida.critiquer.simulation.SimulationElement#initSimulation()
public void stepTo(Calendar time)
time
stepTo
in interface SimulationElement
time
- the destination timepublic void stepForward(int step)
stepForward
in interface SimulationElement
step
- in minutes forwardSimulationElement.stepForward(int)
protected void setProperties()
public void consumeActivity(Activity activity)
activity
has finished, calculate how properties of
the agent are modified
consumeActivity
in interface AgentSimulationState
activity
- public void stepBackward(int step)
SimulationElement
stepBackward
in interface SimulationElement
step
- in minutes backwardsSimulationElement.stepBackward(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |