massim.gridsimulations
Class AbstractGridSimulation

java.lang.Object
  extended by massim.framework.DefaultSimulation
      extended by massim.framework.simulation.AbstractSimulation
          extended by massim.framework.simulation.ParallelizedRandomOrderSimulation
              extended by massim.gridsimulations.AbstractGridSimulation
All Implemented Interfaces:
Component, Simulation
Direct Known Subclasses:
GridSimulation, GridSimulation, GridSimulation, GridSimulation, GridSimulation

public abstract class AbstractGridSimulation
extends ParallelizedRandomOrderSimulation

This class is the mainclass of the GridSimulation. It provides methods to handle the initialization, configuration, presimulationstep and postsimulationstep.


Constructor Summary
AbstractGridSimulation()
           
 
Method Summary
 java.lang.String finalizeSimpleSimulation()
          This method is supposed to make final actions before the simulation is shut down.
 void preSimulationStep()
          This method is supposed to make necessary changes to the world that must occur before agents act in that step.
 void runAgents()
          This method is supposed to let agents act.
 void simulationStep()
           
protected  org.w3c.dom.Document updateAgentPosition(org.w3c.dom.Document doc)
           
 
Methods inherited from class massim.framework.simulation.ParallelizedRandomOrderSimulation
runFinalAgents, runInitAgents
 
Methods inherited from class massim.framework.simulation.AbstractSimulation
configureSimulation, endSimulation, getAgents, getSimpleSimulationState, getSimulationState, getSteps, initializeSimpleSimulation, postSimulationStep, setSteps, startSimulation, stepSimulation
 
Methods inherited from class massim.framework.DefaultSimulation
concurrentCreateAgent, concurrentGetAction, createAgent, getAction, getAgentManager, getController, removeAgent, removeAllAgents, setAgentManager, setController, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface massim.framework.Simulation
isFinished
 

Constructor Detail

AbstractGridSimulation

public AbstractGridSimulation()
Method Detail

preSimulationStep

public void preSimulationStep()
Description copied from class: AbstractSimulation
This method is supposed to make necessary changes to the world that must occur before agents act in that step.

Specified by:
preSimulationStep in class AbstractSimulation

runAgents

public void runAgents()
Description copied from class: AbstractSimulation
This method is supposed to let agents act.

Overrides:
runAgents in class ParallelizedRandomOrderSimulation

simulationStep

public void simulationStep()
Specified by:
simulationStep in class AbstractSimulation

finalizeSimpleSimulation

public java.lang.String finalizeSimpleSimulation()
Description copied from class: AbstractSimulation
This method is supposed to make final actions before the simulation is shut down. Agents are still available in this method.

Specified by:
finalizeSimpleSimulation in class AbstractSimulation

updateAgentPosition

protected org.w3c.dom.Document updateAgentPosition(org.w3c.dom.Document doc)


Copyright © 2011. All Rights Reserved.