massim.competition2006
Class GridSimulation

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
                  extended by massim.competition2006.GridSimulation
All Implemented Interfaces:
Component, Simulation

public class GridSimulation
extends AbstractGridSimulation

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


Constructor Summary
GridSimulation()
           
 
Method Summary
 void configureSimulation(SimulationConfiguration c)
          This method can be used by simulation managers to configure a simulation.
 WorldState getSimpleSimulationState()
          This method is supposed to return the state of the world, excluding agents.
 void initializeSimpleSimulation()
          This method is supposed to initialize a simulation.
 boolean isFinished()
          This method returns true iff the simulation is in a final state.
 void postSimulationStep()
          This method is supposed to make necessary changes to the world that must occur after agent act in have acted in that step.
 
Methods inherited from class massim.gridsimulations.AbstractGridSimulation
finalizeSimpleSimulation, preSimulationStep, runAgents, simulationStep, updateAgentPosition
 
Methods inherited from class massim.framework.simulation.ParallelizedRandomOrderSimulation
runFinalAgents, runInitAgents
 
Methods inherited from class massim.framework.simulation.AbstractSimulation
endSimulation, getAgents, getSimulationState, getSteps, 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
 

Constructor Detail

GridSimulation

public GridSimulation()
Method Detail

configureSimulation

public void configureSimulation(SimulationConfiguration c)
Description copied from class: DefaultSimulation
This method can be used by simulation managers to configure a simulation.

Specified by:
configureSimulation in interface Simulation
Overrides:
configureSimulation in class AbstractSimulation
Parameters:
c - configuration message

getSimpleSimulationState

public WorldState getSimpleSimulationState()
Description copied from class: AbstractSimulation
This method is supposed to return the state of the world, excluding agents.

Specified by:
getSimpleSimulationState in class AbstractSimulation
Returns:
state of the world

initializeSimpleSimulation

public void initializeSimpleSimulation()
Description copied from class: AbstractSimulation
This method is supposed to initialize a simulation. It should setup a world state and make everything ready for the first step. When this method is called agents are already initialized and available. Possibly it will also have to initialize their states.

Specified by:
initializeSimpleSimulation in class AbstractSimulation

isFinished

public boolean isFinished()
Description copied from interface: Simulation
This method returns true iff the simulation is in a final state.

Returns:
true iff simulation is in final state

postSimulationStep

public void postSimulationStep()
Description copied from class: AbstractSimulation
This method is supposed to make necessary changes to the world that must occur after agent act in have acted in that step.

Specified by:
postSimulationStep in class AbstractSimulation


Copyright © 2011. All Rights Reserved.