Interface ISimulationModel

    • 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 simulation
        levels - 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.