Class SimTally<T extends Number & Comparable<T>>
- java.lang.Object
-
- org.djutils.stats.summarizers.Tally
-
- org.djutils.stats.summarizers.event.EventBasedTally
-
- nl.tudelft.simulation.dsol.statistics.SimTally<T>
-
- Type Parameters:
T- the absolute simulation time to use in the warmup event
- All Implemented Interfaces:
Serializable,Remote,EventListener,SimulationStatistic<T>,EventListener,EventProducer,Statistic,TallyStatistic
public class SimTally<T extends Number & Comparable<T>> extends EventBasedTally implements SimulationStatistic<T>
The simulator aware Tally extends the djutils event-based tally and links it to the dsol framework.Copyright (c) 2002-2023 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Author:
- Peter Jacobs
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static EventTypeTIMED_INITIALIZED_EVENTINITIALIZED_EVENT is fired whenever a Tally is (re-)initialized.static EventTypeTIMED_OBSERVATION_ADDED_EVENTOBSERVATION_ADDED_EVENT is fired whenever an observation is processed.-
Fields inherited from interface org.djutils.event.EventProducer
FIRST_POSITION, LAST_POSITION
-
-
Constructor Summary
Constructors Constructor Description SimTally(String description, DsolModel<T,? extends SimulatorInterface<T>> model)constructs a new SimTally.SimTally(String description, DsolModel<T,? extends SimulatorInterface<T>> model, EventProducer target, EventType eventType)constructs a new SimTally based on an eventType for which statistics are sampled.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimulatorInterface<T>getSimulator()Return the simulator.voidinitialize()voidnotify(Event event)doubleregister(double value)-
Methods inherited from class org.djutils.stats.summarizers.event.EventBasedTally
fireEvents, getEventListenerMap, toString
-
Methods inherited from class org.djutils.stats.summarizers.Tally
getConfidenceInterval, getConfidenceInterval, getCumulativeProbability, getDescription, getMax, getMin, getN, getPopulationExcessKurtosis, getPopulationKurtosis, getPopulationMean, getPopulationSkewness, getPopulationStDev, getPopulationVariance, getQuantile, getSampleExcessKurtosis, getSampleKurtosis, getSampleMean, getSampleSkewness, getSampleStDev, getSampleVariance, getSum, register, reportFooter, reportHeader, reportLine
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
Methods inherited from interface nl.tudelft.simulation.dsol.statistics.SimulationStatistic
getDescription, getN
-
Methods inherited from interface org.djutils.stats.summarizers.Statistic
formatFixed
-
-
-
-
Field Detail
-
TIMED_OBSERVATION_ADDED_EVENT
public static final EventType TIMED_OBSERVATION_ADDED_EVENT
OBSERVATION_ADDED_EVENT is fired whenever an observation is processed.
-
TIMED_INITIALIZED_EVENT
public static final EventType TIMED_INITIALIZED_EVENT
INITIALIZED_EVENT is fired whenever a Tally is (re-)initialized.
-
-
Constructor Detail
-
SimTally
public SimTally(String description, DsolModel<T,? extends SimulatorInterface<T>> model)
constructs a new SimTally.- Parameters:
description- String; refers to the description of this Tally.model- DsolModel<T, SimulatorInterface<T>>; the model
-
SimTally
public SimTally(String description, DsolModel<T,? extends SimulatorInterface<T>> model, EventProducer target, EventType eventType)
constructs a new SimTally based on an eventType for which statistics are sampled.- Parameters:
description- String; the description of this tally.model- DsolModel<T, SimulatorInterface<T>>; the modeltarget- EventProducer; the target on which to subscribeeventType- EventType; the eventType for which statistics are sampled
-
-
Method Detail
-
initialize
public void initialize()
- Specified by:
initializein interfaceStatistic- Overrides:
initializein classEventBasedTally
-
notify
public void notify(Event event)
- Specified by:
notifyin interfaceEventListener- Overrides:
notifyin classEventBasedTally
-
register
public double register(double value)
- Overrides:
registerin classEventBasedTally
-
getSimulator
public SimulatorInterface<T> getSimulator()
Return the simulator.- Specified by:
getSimulatorin interfaceSimulationStatistic<T extends Number & Comparable<T>>- Returns:
- SimulatorInterface; the simulator for this dsol statistic
-
-