Interface OtsSimulatorInterface

All Superinterfaces:
nl.tudelft.simulation.naming.context.Contextualized, DevsSimulatorInterface<org.djunits.value.vdouble.scalar.Duration>, EventProducer, Remote, SimulatorInterface<org.djunits.value.vdouble.scalar.Duration>
All Known Implementing Classes:
OtsAnimator, OtsSimulator

public interface OtsSimulatorInterface extends DevsSimulatorInterface<org.djunits.value.vdouble.scalar.Duration>, nl.tudelft.simulation.naming.context.Contextualized
Interface for simulators within OTS.

Copyright (c) 2013-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

$LastChangedDate$, @version $Revision$, by $Author$, initial version 11 mei 2015

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Method Details

    • initialize

      void initialize(OtsModelInterface model, OtsReplication replication) throws SimRuntimeException
      Initialize a simulation engine without animation; the easy way. PauseOnError is set to true;
      Parameters:
      model - the simulation to execute
      replication - the replication with the run control parameters
      Throws:
      SimRuntimeException - when e.g., warmupPeriod is larger than runLength
    • initialize

      void initialize(org.djunits.value.vdouble.scalar.Duration startTimeOfDay, org.djunits.value.vdouble.scalar.Duration warmupPeriod, org.djunits.value.vdouble.scalar.Duration runLength, OtsModelInterface model, HistoryManager historyManager) throws SimRuntimeException, NamingException
      Initialize a simulation engine without animation; the easy way. PauseOnError is set to true;
      Parameters:
      startTimeOfDay - the start time of the simulation
      warmupPeriod - the warm up period of the simulation (use Duration.ZERO if you don't know what this is)
      runLength - the duration of the simulation
      model - the simulation to execute
      historyManager - history manager
      Throws:
      SimRuntimeException - when e.g., warmupPeriod is larger than runLength
      NamingException - when the context for the replication cannot be created
    • initialize

      void initialize(org.djunits.value.vdouble.scalar.Duration startTimeOfDay, org.djunits.value.vdouble.scalar.Duration warmupPeriod, org.djunits.value.vdouble.scalar.Duration runLength, OtsModelInterface model, HistoryManager historyManager, int replicationNr) throws SimRuntimeException, NamingException
      Initialize a simulation engine without animation and prescribed replication number; the easy way. PauseOnError is set to true;
      Parameters:
      startTimeOfDay - the start time of the simulation
      warmupPeriod - the warm up period of the simulation (use Duration.ZERO if you don't know what this is)
      runLength - the duration of the simulation
      model - the simulation to execute
      historyManager - history manager
      replicationNr - the replication number
      Throws:
      SimRuntimeException - when e.g., warmupPeriod is larger than runLength
      NamingException - when context for the animation cannot be created
    • getReplication

      OtsReplication getReplication()
      Specified by:
      getReplication in interface SimulatorInterface<org.djunits.value.vdouble.scalar.Duration>
    • getContext

      default nl.tudelft.simulation.naming.context.ContextInterface getContext()
      Specified by:
      getContext in interface nl.tudelft.simulation.naming.context.Contextualized
    • getTimeOfDay

      default org.djunits.value.vdouble.scalar.Duration getTimeOfDay()
      Returns the current time-of-day, a value in the range [0 24)h.
      Returns:
      current time-of-day