Class HistoryManager

  • Direct Known Subclasses:
    HistoryManagerDEVS

    public abstract class HistoryManager
    extends Object
    History manager with automatic garbage collection by the java garbage collector using weak references to the Historicals.

    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 18 jan. 2018
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    • Constructor Detail

      • HistoryManager

        public HistoryManager()
    • Method Detail

      • registerHistorical

        public void registerHistorical​(HistoryManager.HistoricalElement historical)
        Registers a historical.
        Parameters:
        historical - HistoricalElement; historical to register.
      • now

        abstract Time now()
        Returns the current simulation time. This is used by historicals to time-stamp state changes.
        Returns:
        Time; current simulation time.
      • endOfSimulation

        protected final void endOfSimulation()
        Method that clears the entire memory at simulation end.