Class AbstractProbe

    • Constructor Detail

      • AbstractProbe

        public AbstractProbe()
    • Method Detail

      • prepareObservation

        public void prepareObservation()
        Prepares the observation of a simulation.

        This method is defined to open the streams or the other resources used during the observation of one simulation.

        Specified by:
        prepareObservation in interface IProbe
      • observeAtInitialTimes

        public void observeAtInitialTimes​(SimulationTimeStamp initialTimestamp,
                                          ISimulationEngine simulationEngine)
        Observes the state of the simulation when the initial time stamp is reached.
        Specified by:
        observeAtInitialTimes in interface IProbe
        Parameters:
        initialTimestamp - The initial time stamp of the simulation.
        simulationEngine - The simulation engine embedding the currently running simulation and the current dynamic state of the various levels of the simulation.
      • observeAtPartialConsistentTime

        public void observeAtPartialConsistentTime​(SimulationTimeStamp timestamp,
                                                   ISimulationEngine simulationEngine)
        Observes the state of the simulation when at least one level is in a consistent state.
        Specified by:
        observeAtPartialConsistentTime in interface IProbe
        Parameters:
        timestamp - The time stamp for which at least one level of the simulation is a consistent state.
        simulationEngine - The simulation engine embedding the currently running simulation and the current dynamic state of the various levels of the simulation.
      • observeAtFinalTime

        public void observeAtFinalTime​(SimulationTimeStamp finalTimestamp,
                                       ISimulationEngine simulationEngine)
        Observes the state of the simulation when the final time stamp of the simulation is reached.
        Specified by:
        observeAtFinalTime in interface IProbe
        Parameters:
        finalTimestamp - The final time stamp of the simulation.
        simulationEngine - The simulation engine embedding the currently running simulation and the current dynamic state of the various levels of the simulation.
      • reactToError

        public void reactToError​(String errorMessage,
                                 Throwable cause)
        Reacts to an error thrown by the simulation engine.
        Specified by:
        reactToError in interface IProbe
        cause - The cause of the error.
      • reactToAbortion

        public void reactToAbortion​(SimulationTimeStamp timestamp,
                                    ISimulationEngine simulationEngine)
        Reacts to the abortion of a currently running simulation.
        Specified by:
        reactToAbortion in interface IProbe
        Parameters:
        timestamp - The time stamp reached right after the moment when the abortion was requested.
        simulationEngine - The simulation engine embedding the aborted simulation and the dynamic state of the various levels of the simulation after abortion.
      • endObservation

        public void endObservation()
        Ends the observation of a simulation.

        This method is defined to close the streams or the other resources used during the observation of one simulation.

        Specified by:
        endObservation in interface IProbe