public abstract class AbstractSimulation extends DefaultSimulation
Constructor and Description |
---|
AbstractSimulation() |
Modifier and Type | Method and Description |
---|---|
void |
configureSimulation(SimulationConfiguration config)
This method can be used by simulation managers to configure a simulation.
|
String |
endSimulation()
This method will be automatically called once when the simulation has been started and it
is to end.
|
abstract String |
finalizeSimpleSimulation()
This method is supposed to make final actions before the simulation is shut down.
|
SimulationAgent[] |
getAgents()
Retrieves an array of SimulationAgent objects that participate in this simulation.
|
abstract WorldState |
getSimpleSimulationState()
This method is supposed to return the state of the world, excluding agents.
|
SimulationState |
getSimulationState()
This method will retrieve the whole simulation state.
|
int |
getSteps()
Retrieves the number of the steps that have been started to process in this simulation run.
|
abstract void |
initializeSimpleSimulation()
This method is supposed to initialize a simulation.
|
abstract 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.
|
abstract void |
preSimulationStep()
This method is supposed to make necessary changes to the world that must occur before
agents act in that step.
|
abstract void |
runAgents()
This method is supposed to let agents act.
|
abstract void |
runFinalAgents() |
abstract void |
runInitAgents() |
void |
setSteps(int steps)
Set number of the step. this is important when the server is started with recovery mode
In recovery mode a simulation will run continuously at the step where he was stopped
|
abstract void |
simulationStep() |
void |
startSimulation()
This method will be automatically called when the simulation starts.
|
void |
stepSimulation()
This method will be automatically called when the simulation is supposed
to do a simulation step.
|
concurrentCreateAgent, concurrentGetAction, createAgent, getAction, getAgentManager, getController, removeAgent, removeAllAgents, setAgentManager, setController, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isFinished
public void startSimulation()
Simulation
public void stepSimulation()
Simulation
public SimulationState getSimulationState()
Simulation
public void configureSimulation(SimulationConfiguration config)
DefaultSimulation
configureSimulation
in interface Simulation
configureSimulation
in class DefaultSimulation
config
- configuration messagepublic abstract WorldState getSimpleSimulationState()
public abstract void initializeSimpleSimulation()
public SimulationAgent[] getAgents()
public int getSteps()
public void setSteps(int steps)
steps
- public abstract void preSimulationStep()
public abstract void postSimulationStep()
public abstract void runAgents()
public abstract void simulationStep()
public abstract void runInitAgents()
public abstract void runFinalAgents()
public abstract String finalizeSimpleSimulation()
public String endSimulation()
Simulation
Copyright © 2013. All Rights Reserved.