Interface ISimulationModel
-
- All Known Implementing Classes:
AbstractExtendedSimulationModel
,AbstractSimulationModel
public interface ISimulationModel
Models a simulation that can be performed using a simulation engine.- Author:
- Yoann Kubera
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ISimulationModel.AgentInitializationData
Models the initialization data coming from the generation of the initial agents of the simulation.static class
ISimulationModel.EnvironmentInitializationData
Models the initialization data coming from the generation of the environment of the simulation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ISimulationModel.AgentInitializationData
generateAgents(SimulationTimeStamp initialTime, Map<LevelIdentifier,ILevel> levels)
Generates the agents of the simulation.ISimulationModel.EnvironmentInitializationData
generateEnvironment(SimulationTimeStamp initialTime, Map<LevelIdentifier,ILevel> levels)
Generates the environment of the simulation.List<ILevel>
generateLevels(SimulationTimeStamp initialTime)
Generates the bare levels of the simulation.SimulationTimeStamp
getInitialTime()
Gets the initial time of this time model.boolean
isFinalTimeOrAfter(SimulationTimeStamp currentTime, ISimulationEngine engine)
Tells if a time stamp is greater or equal to the final time stamp.
-
-
-
Method Detail
-
getInitialTime
SimulationTimeStamp getInitialTime()
Gets the initial time of this time model.- Returns:
- The initial time of this model.
-
isFinalTimeOrAfter
boolean isFinalTimeOrAfter(SimulationTimeStamp currentTime, ISimulationEngine engine)
Tells if a time stamp is greater or equal to the final time stamp.- Parameters:
currentTime
- The last time the dynamic state of the simulation was in a partly consistent state.engine
- The simulation engine containing information about the currently running simulation.- Returns:
true
if the final time of the level was reached.
-
generateLevels
List<ILevel> generateLevels(SimulationTimeStamp initialTime)
Generates the bare levels of the simulation. These levels contain no agents and define no environment.- Parameters:
initialTime
- The initial time of the simulation.- Returns:
- The bare levels of the simulation.
-
generateEnvironment
ISimulationModel.EnvironmentInitializationData generateEnvironment(SimulationTimeStamp initialTime, Map<LevelIdentifier,ILevel> levels)
Generates the environment of the simulation. At this stage, no agent are generated in the simulation.This method should set the public local state of the environment for each level of the simulation.
- Parameters:
initialTime
- The initial time of the simulation.levels
- The levels of the simulation.- Returns:
- The generated environment and the influences to put in the state dynamics of the initial dynamic state of the levels.
-
generateAgents
ISimulationModel.AgentInitializationData generateAgents(SimulationTimeStamp initialTime, Map<LevelIdentifier,ILevel> levels)
Generates the agents of the simulation.This method should only create the agents, without adding them in the levels. This task is performed by the simulation engine.
- Parameters:
initialTime
- The initial time of the simulationlevels
- The levels of the simulation.- Returns:
- The generated agents and the influences to put in the state dynamics of the initial dynamic state of the levels.
-
-