Class DevsRealTimeAnimator.TimeDouble

All Implemented Interfaces:
Serializable, Runnable, Remote, AnimatorInterface, DevsSimulatorInterface<Double>, SimulatorInterface<Double>, org.djutils.event.EventProducer
Enclosing class:
DevsRealTimeAnimator<T extends Number & Comparable<T>>

public static class DevsRealTimeAnimator.TimeDouble extends DevsRealTimeAnimator<Double> implements DevsSimulatorInterface<Double>
Easy access class RealTimeClock<Double>.
See Also:
  • Constructor Details

    • TimeDouble

      public TimeDouble(Serializable id, double msecWallClockToSimTimeUnit)
      Construct a DevsRealTimeClock<Double>.
      Parameters:
      id - the id of the simulator, used in logging and firing of events.
      msecWallClockToSimTimeUnit - double; the translation between a millisecond on the clock and '1.0' in the simulation time.
  • Method Details

    • simulatorTimeForWallClockMillis

      public Double simulatorTimeForWallClockMillis(double wallMilliseconds)
      Calculate the how much simulation duration corresponds to the number of wall clock milliseconds indicated in the parameter. When the DevsRealTimeClock works with djunits Time or Duration, and the simulation is scaled to milliseconds, the simulatorTimeForWallClockMillis of a millisecond is a Duration of 1 millisecond. When 1 simulated time unit stands for a second, the simulatorTimeForWallClockMillis is 0.001.
      Specified by:
      simulatorTimeForWallClockMillis in class DevsRealTimeAnimator<Double>
      Parameters:
      wallMilliseconds - double; the number of milliseconds to calculate the corresponding simulation time for
      Returns:
      the relative time step.