Package org.opentrafficsim.draw.graphs
Class AbstractSamplerPlot
- java.lang.Object
 - 
- org.opentrafficsim.draw.graphs.AbstractPlot
 - 
- org.opentrafficsim.draw.graphs.AbstractBoundedPlot
 - 
- org.opentrafficsim.draw.graphs.AbstractSpaceTimePlot
 - 
- org.opentrafficsim.draw.graphs.AbstractSamplerPlot
 
 
 
 
 
- 
- All Implemented Interfaces:
 Dataset,org.opentrafficsim.base.Identifiable
- Direct Known Subclasses:
 AbstractContourPlot,TrajectoryPlot
public abstract class AbstractSamplerPlot extends AbstractSpaceTimePlot
Super class for plots that use sampler data. Sub classes may obtain trajectories usinggetTrajectories(), or alternatively maintain some other -possibly more efficient- connection to the sampler. This class also connects the plot to a path, consisting of a list of lanes. Start distance along the path for each lane is provided to sub classes usinggetStartDistance(KpiLaneDirection). Total length is obtained usinggetEndLocation().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 4 okt. 2018 
 - Author:
 - Alexander Verbraeck, Peter Knoppers, Wouter Schakel
 
 
- 
- 
Field Summary
- 
Fields inherited from class org.opentrafficsim.draw.graphs.AbstractPlot
DEFAULT_INITIAL_UPPER_TIME_BOUND, GRAPH_ADD_EVENT, GRAPH_REMOVE_EVENT 
 - 
 
- 
Constructor Summary
Constructors Constructor Description AbstractSamplerPlot(String caption, Duration updateInterval, org.opentrafficsim.core.dsol.OTSSimulatorInterface simulator, org.opentrafficsim.kpi.sampling.SamplerData<?> samplerData, GraphPath<org.opentrafficsim.kpi.sampling.KpiLaneDirection> path, Duration delay)Constructor. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected LengthgetEndLocation()Returns the total path length.GraphPath<org.opentrafficsim.kpi.sampling.KpiLaneDirection>getPath()Returns the path.protected org.opentrafficsim.kpi.sampling.SamplerData<?>getSamplerData()Returns the sampler data.protected List<org.opentrafficsim.kpi.sampling.TrajectoryGroup<?>>getTrajectories(int series)Returns all trajectories for the series, in order of the path.- 
Methods inherited from class org.opentrafficsim.draw.graphs.AbstractSpaceTimePlot
setAutoBoundDomain, setAutoBoundRange, setChart, update, updateFixedDomainRange 
- 
Methods inherited from class org.opentrafficsim.draw.graphs.AbstractBoundedPlot
setLowerDomainBound, setLowerRangeBound, setUpperDomainBound, setUpperRangeBound 
- 
Methods inherited from class org.opentrafficsim.draw.graphs.AbstractPlot
addChangeListener, encodeAsPng, getCaption, getChart, getGraphType, getGroup, getId, getSimulator, getStatusLabel, getUpdateTime, increaseTime, notifyPlotChange, removeChangeListener, setGroup, setUpdateInterval 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
AbstractSamplerPlot
public AbstractSamplerPlot(String caption, Duration updateInterval, org.opentrafficsim.core.dsol.OTSSimulatorInterface simulator, org.opentrafficsim.kpi.sampling.SamplerData<?> samplerData, GraphPath<org.opentrafficsim.kpi.sampling.KpiLaneDirection> path, Duration delay)
Constructor.- Parameters:
 caption- String; captionupdateInterval- Duration; regular update interval (simulation time)simulator- OTSSimulatorInterface; simulatorsamplerData- SamplerData<?>; sampler datapath- GraphPath<KpiLaneDirection>; pathdelay- Duration; amount of time that chart runs behind simulation to prevent gaps in the charted data
 
 - 
 
- 
Method Detail
- 
getTrajectories
protected List<org.opentrafficsim.kpi.sampling.TrajectoryGroup<?>> getTrajectories(int series)
Returns all trajectories for the series, in order of the path.- Parameters:
 series- int; series number- Returns:
 - List<TrajectoryGroup>; the trajectories
 
 
- 
getPath
public final GraphPath<org.opentrafficsim.kpi.sampling.KpiLaneDirection> getPath()
Returns the path.- Returns:
 - GraphPath<KpiLaneDirection>; the path
 
 
- 
getEndLocation
protected final Length getEndLocation()
Returns the total path length.- Specified by:
 getEndLocationin classAbstractSpaceTimePlot- Returns:
 - Length; total path length
 
 
- 
getSamplerData
protected final org.opentrafficsim.kpi.sampling.SamplerData<?> getSamplerData()
Returns the sampler data.- Returns:
 - SamplerData<?>; sampler.
 
 
 - 
 
 -