Class AbstractOtsModel

java.lang.Object
org.djutils.event.LocalEventProducer
nl.tudelft.simulation.dsol.model.AbstractDsolModel<org.djunits.value.vdouble.scalar.Duration,OtsSimulatorInterface>
org.opentrafficsim.core.dsol.AbstractOtsModel
All Implemented Interfaces:
Serializable, Remote, nl.tudelft.simulation.dsol.model.DsolModel<org.djunits.value.vdouble.scalar.Duration,OtsSimulatorInterface>, org.djutils.event.EventProducer, OtsModelInterface

public abstract class AbstractOtsModel extends nl.tudelft.simulation.dsol.model.AbstractDsolModel<org.djunits.value.vdouble.scalar.Duration,OtsSimulatorInterface> implements OtsModelInterface
AbstractOtsModel is the base class for a model that runs on an OtsSimulator.

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

Author:
Alexander Verbraeck
See Also:
  • Field Summary

    Fields inherited from class nl.tudelft.simulation.dsol.model.AbstractDsolModel

    inputParameterMap, outputStatistics, simulator, streamInformation

    Fields inherited from interface org.djutils.event.EventProducer

    FIRST_POSITION, LAST_POSITION
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiate an abstract OtsModel.
    AbstractOtsModel(OtsSimulatorInterface simulator, String shortName, String description)
    Instantiate an abstract OtsModel.
    AbstractOtsModel(OtsSimulatorInterface simulator, String shortName, String description, nl.tudelft.simulation.dsol.experiment.StreamInformation streamInformation)
    Instantiate an abstract OtsModel with an initial set of streams (e.g., with seed management).
  • Method Summary

    Modifier and Type
    Method
    Description
    final String
    Return a description of the simulation (HTML formatted).
    final String
    Return a very short description of the simulation.
    final void
    setDescription(String description)
     
    static nl.tudelft.simulation.dsol.experiment.StreamInformation
    Create the default initial streams.
    final void
    setShortName(String shortName)
     

    Methods inherited from class nl.tudelft.simulation.dsol.model.AbstractDsolModel

    addInputParameter, getInputParameter, getInputParameterMap, getOutputStatistics, getSimulator, getStreamInformation, setStreamInformation

    Methods inherited from class org.djutils.event.LocalEventProducer

    addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventListenerMap, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface nl.tudelft.simulation.dsol.model.DsolModel

    constructModel, getDefaultStream, getInputParameterMap, getOutputStatistics, getSimulator, getStream, getStreamInformation, getStreams, resetStreams, setStreamInformation

    Methods inherited from interface org.opentrafficsim.core.dsol.OtsModelInterface

    getNetwork
  • Constructor Details

    • AbstractOtsModel

      public AbstractOtsModel(OtsSimulatorInterface simulator)
      Instantiate an abstract OtsModel. The name and description will be set as the class name.
      Parameters:
      simulator - OtsSimulatorInterface; the simulator to use
    • AbstractOtsModel

      public AbstractOtsModel(OtsSimulatorInterface simulator, String shortName, String description)
      Instantiate an abstract OtsModel.
      Parameters:
      simulator - OtsSimulatorInterface; the simulator to use
      shortName - String; a very short description of the simulation
      description - String; a description of the simulation (HTML formatted)
    • AbstractOtsModel

      public AbstractOtsModel(OtsSimulatorInterface simulator, String shortName, String description, nl.tudelft.simulation.dsol.experiment.StreamInformation streamInformation)
      Instantiate an abstract OtsModel with an initial set of streams (e.g., with seed management).
      Parameters:
      simulator - OtsSimulatorInterface; the simulator to use
      shortName - String; a very short description of the simulation
      description - String; a description of the simulation (HTML formatted)
      streamInformation - StreamInformation; the initial set of streams (e.g., with seed management)
  • Method Details

    • setInitialStreams

      public static nl.tudelft.simulation.dsol.experiment.StreamInformation setInitialStreams()
      Create the default initial streams.
      Returns:
      StreamInformation; the default initial streams
    • getShortName

      public final String getShortName()
      Return a very short description of the simulation.
      Specified by:
      getShortName in interface OtsModelInterface
      Returns:
      String; short description of the simulation
    • setShortName

      public final void setShortName(String shortName)
      Parameters:
      shortName - String; set shortName
    • getDescription

      public final String getDescription()
      Return a description of the simulation (HTML formatted).
      Specified by:
      getDescription in interface OtsModelInterface
      Returns:
      String; HTML text describing the simulation
    • setDescription

      public final void setDescription(String description)
      Parameters:
      description - String; set description