Class AbstractOtsModel

All Implemented Interfaces:
DsolModel<Duration,OtsSimulatorInterface>, EventProducer, OtsModelInterface

public abstract class AbstractOtsModel extends AbstractDsolModel<Duration,OtsSimulatorInterface> implements OtsModelInterface
AbstractOtsModel is the base class for a model that runs on an OtsSimulatorInterface.

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
  • Constructor Details

    • AbstractOtsModel

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

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

    • defaultInitialStreams

      public static StreamInformation defaultInitialStreams()
      Create the default initial streams.
      Returns:
      the default initial streams
    • getShortName

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

      public final void setShortName(String shortName)
      Set short name.
      Parameters:
      shortName - set shortName
    • getDescription

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

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