Class HistoryManagerDEVS
- java.lang.Object
-
- org.opentrafficsim.core.perception.HistoryManager
-
- org.opentrafficsim.core.perception.HistoryManagerDEVS
-
- All Implemented Interfaces:
Serializable
,EventListener
,EventListenerInterface
public class HistoryManagerDEVS extends HistoryManager implements EventListenerInterface
History manager that uses anOTSSimulatorInterface
.Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 5 jan. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opentrafficsim.core.perception.HistoryManager
HistoryManager.HistoricalElement
-
-
Constructor Summary
Constructors Constructor Description HistoryManagerDEVS(OTSSimulatorInterface simulator, Duration history, Duration cleanUpInterval)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cleanUpHistory()
Cleans up the history of all registeredHistoricals
.void
notify(EventInterface event)
Time
now()
Returns the current simulation time.String
toString()
-
Methods inherited from class org.opentrafficsim.core.perception.HistoryManager
endOfSimulation, getHistoricals, registerHistorical
-
-
-
-
Constructor Detail
-
HistoryManagerDEVS
public HistoryManagerDEVS(OTSSimulatorInterface simulator, Duration history, Duration cleanUpInterval)
Constructor.- Parameters:
simulator
- OTSSimulatorInterface; simulatorhistory
- Duration; time over which history is guaranteedcleanUpInterval
- Duration; clean-up interval
-
-
Method Detail
-
now
public Time now()
Returns the current simulation time. This is used by historicals to time-stamp state changes.- Specified by:
now
in classHistoryManager
- Returns:
- Time; current simulation time.
-
cleanUpHistory
protected final void cleanUpHistory()
Cleans up the history of all registeredHistoricals
.
-
notify
public void notify(EventInterface event) throws RemoteException
- Specified by:
notify
in interfaceEventListenerInterface
- Throws:
RemoteException
-
-