se.liu.ida.critiquer.simulation
Interface AgentSimulationState

All Superinterfaces:
Serializable, SimulationElement
All Known Implementing Classes:
DefaultAgentSimulationState

public interface AgentSimulationState
extends SimulationElement

When performing a simulation, each agent uses a state that represents the current state of the agent at the time indicated by the simulation environment.

There is also a special breed of constraints (SimulationCritic) that react to simulation changes and display critiquing information during the simulation.

These constraints as well as agent states share a common interface SimulationElement that the simulation engine uses when initializing the simulaiton and stepping forward and backward in time

Author:
olale

Method Summary
 void consumeActivity(Activity activity)
          It can be useful to simulate only isolated activities, in which case this method can be used.
 Agent getAgent()
           
 Object getProperty(String name)
          There may be a number of properties associated with a state of an agent during a simulation.
 void renderState(GeoView view, Graphics2D g2)
          Render a visual representation of this agent state in the simulation view.
 void setProperty(String key, Object value)
          Enter property values to be used during the simulation
 
Methods inherited from interface se.liu.ida.critiquer.simulation.SimulationElement
initSimulation, stepBackward, stepForward, stepTo
 

Method Detail

setProperty

void setProperty(String key,
                 Object value)
Enter property values to be used during the simulation

Parameters:
key - identifying this property
value - the value

getProperty

Object getProperty(String name)
There may be a number of properties associated with a state of an agent during a simulation. This method returns one based on the name and type of the property. Properties may be fuel level, current radar coverage or other information.

Parameters:
name - of the property
Returns:
the value of property name, null if not available.

consumeActivity

void consumeActivity(Activity activity)
It can be useful to simulate only isolated activities, in which case this method can be used.

Parameters:
activity -

renderState

void renderState(GeoView view,
                 Graphics2D g2)
Render a visual representation of this agent state in the simulation view. This is one of the main purposes of a simulation: To see what the allocated resources will do over time during the simulation.

Parameters:
view -
g2 -

getAgent

Agent getAgent()