Package org.opentrafficsim.core.dsol
Class AbstractOtsModel
java.lang.Object
org.djutils.event.LocalEventProducer
nl.tudelft.simulation.dsol.model.AbstractDSOLModel<Duration,OtsSimulatorInterface>
org.opentrafficsim.core.dsol.AbstractOtsModel
- 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:
-
Field Summary
Fields inherited from class nl.tudelft.simulation.dsol.model.AbstractDSOLModel
inputParameterMap, outputStatistics, simulator, streamInformationFields inherited from interface org.djutils.event.EventProducer
FIRST_POSITION, LAST_POSITION -
Constructor Summary
ConstructorsConstructorDescriptionAbstractOtsModel(OtsSimulatorInterface simulator) Instantiate an abstract OtsModel.AbstractOtsModel(OtsSimulatorInterface simulator, String shortName, String description) Instantiate an abstract OtsModel.AbstractOtsModel(OtsSimulatorInterface simulator, String shortName, String description, StreamInformation streamInformation) Instantiate an abstract OtsModel with an initial set of streams (e.g., with seed management). -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturn a description of the simulation (HTML formatted).final StringReturn a very short description of the simulation.final voidsetDescription(String description) static StreamInformationCreate the default initial streams.final voidsetShortName(String shortName) Methods inherited from class nl.tudelft.simulation.dsol.model.AbstractDSOLModel
addInputParameter, getInputParameter, getInputParameterMap, getOutputStatistics, getSimulator, getStreamInformation, setStreamInformationMethods 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, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nl.tudelft.simulation.dsol.model.DSOLModel
constructModel, getDefaultStream, getInputParameterMap, getOutputStatistics, getSimulator, getStream, getStreamInformation, getStreams, resetStreams, setStreamInformationMethods inherited from interface org.opentrafficsim.core.dsol.OtsModelInterface
getNetwork
-
Constructor Details
-
AbstractOtsModel
Instantiate an abstract OtsModel. The name and description will be set as the class name.- Parameters:
simulator- OtsSimulatorInterface; the simulator to use
-
AbstractOtsModel
Instantiate an abstract OtsModel.- Parameters:
simulator- OtsSimulatorInterface; the simulator to useshortName- String; a very short description of the simulationdescription- 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 useshortName- String; a very short description of the simulationdescription- String; a description of the simulation (HTML formatted)streamInformation- StreamInformation; the initial set of streams (e.g., with seed management)
-
-
Method Details
-
setInitialStreams
Create the default initial streams.- Returns:
- StreamInformation; the default initial streams
-
getShortName
Return a very short description of the simulation.- Specified by:
getShortNamein interfaceOtsModelInterface- Returns:
- String; short description of the simulation
-
setShortName
- Parameters:
shortName- String; set shortName
-
getDescription
Return a description of the simulation (HTML formatted).- Specified by:
getDescriptionin interfaceOtsModelInterface- Returns:
- String; HTML text describing the simulation
-
setDescription
- Parameters:
description- String; set description
-