Class AbstractOtsModel

java.lang.Object
org.djutils.event.LocalEventProducer
All Implemented Interfaces:
Serializable, Remote, DSOLModel<Duration,OtsSimulatorInterface>, org.djutils.event.EventProducer, OtsModelInterface

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

Copyright (c) 2013-2023 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:
  • 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, 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 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