massim.competition2012
Class GraphSimulation

java.lang.Object
  extended by massim.framework.DefaultSimulation
      extended by massim.framework.simulation.AbstractSimulation
          extended by massim.competition2012.GraphSimulation
All Implemented Interfaces:
Component, Simulation

public class GraphSimulation
extends AbstractSimulation

This is the main class for the GraphSimulation (2012 Mars Scenario).


Constructor Summary
GraphSimulation()
           
 
Method Summary
 void configureSimulation(SimulationConfiguration c)
          This method can be used by simulation managers to configure a simulation.
 java.lang.String finalizeSimpleSimulation()
          This method is supposed to make final actions before the simulation is shut down.
 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.
 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 runFinalAgents()
          This method prepares and sends the final perceptions to the agents when the simulation is finished
 void runInitAgents()
          This method prepares and sends the initial perceptions to the agents for starting the simulation
 void simulationStep()
           
 
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

GraphSimulation

public GraphSimulation()
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

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

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

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

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

runAgents

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

Specified by:
runAgents in class AbstractSimulation

simulationStep

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

runInitAgents

public void runInitAgents()
This method prepares and sends the initial perceptions to the agents for starting the simulation

Specified by:
runInitAgents in class AbstractSimulation

runFinalAgents

public void runFinalAgents()
This method prepares and sends the final perceptions to the agents when the simulation is finished

Specified by:
runFinalAgents 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


Copyright © 2012. All Rights Reserved.