Package org.opentrafficsim.core.dsol
Class AbstractOTSModel
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- nl.tudelft.simulation.dsol.model.AbstractDSOLModel<Duration,OTSSimulatorInterface>
-
- org.opentrafficsim.core.dsol.AbstractOTSModel
-
- All Implemented Interfaces:
Serializable
,DSOLModel<Duration,OTSSimulatorInterface>
,EventProducerInterface
,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) 2003-2022 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class nl.tudelft.simulation.dsol.model.AbstractDSOLModel
inputParameterMap, outputStatistics, simulator, streamInformation
-
Fields inherited from class org.djutils.event.EventProducer
eventProducerImpl
-
Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
-
Constructor Summary
Constructors Constructor Description AbstractOTSModel(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
Return a description of the simulation (HTML formatted).String
getShortName()
Return a very short description of the simulation.void
setDescription(String description)
static StreamInformation
setInitialStreams()
Create the default initial streams.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.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventTypesWithListeners, getListenerReferences, getSourceId, 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 Detail
-
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 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 Detail
-
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 interfaceOTSModelInterface
- 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 interfaceOTSModelInterface
- Returns:
- String; HTML text describing the simulation
-
setDescription
public final void setDescription(String description)
- Parameters:
description
- String; set description
-
-