se.liu.ida.critiquer.resources
Interface AgentSimulationState

All Superinterfaces:
SimulationElement

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
 Agent getAgent()
           
<C> C
getProperty(java.lang.String name, java.lang.Class<C> type)
          There may be a number of properties associated with a state of an agent during a simulation.
 void renderState(SimulationView view, java.awt.Graphics2D g2)
          Render a visual representation of this agent state in the simulation view.
 void setPropertyMap(java.util.HashMap<java.lang.String,?> propertyMap)
          Create the property map used during the simulation.
 
Methods inherited from interface se.liu.ida.critiquer.simulation.SimulationElement
initSimulation, stepBackward, stepForward
 

Method Detail

setPropertyMap

void setPropertyMap(java.util.HashMap<java.lang.String,?> propertyMap)
Create the property map used during the simulation.

Parameters:
propertyMap -

getProperty

<C> C getProperty(java.lang.String name,
                  java.lang.Class<C> type)
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.

Type Parameters:
C - - The class of the value this property represents
Parameters:
name - of the property
type - of the property
Returns:
the value of property name, null if not available.

renderState

void renderState(SimulationView view,
                 java.awt.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()