public class RoadSampler
extends org.opentrafficsim.kpi.sampling.Sampler
implements nl.tudelft.simulation.event.EventListenerInterface
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
RoadSampler(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator)
Constructor which uses the operational plan updates of GTU's as sampling interval.
|
RoadSampler(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
org.djunits.value.vdouble.scalar.Frequency frequency)
Constructor which uses the given frequency to determine the sampling interval.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
void |
finalizeRecording(org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection) |
int |
hashCode() |
void |
initRecording(org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection) |
void |
notify(nl.tudelft.simulation.event.EventInterface event) |
void |
notifySample(LaneBasedGTU gtu,
LaneDirection laneDirection)
Samples a gtu and schedules the next sampling event.
|
org.djunits.value.vdouble.scalar.Time |
now() |
void |
scheduleStartRecording(org.djunits.value.vdouble.scalar.Time time,
org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection) |
void |
scheduleStopRecording(org.djunits.value.vdouble.scalar.Time time,
org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection) |
String |
toString() |
public RoadSampler(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator)
simulator
- simulatorNullPointerException
- if the simulator is null
public RoadSampler(org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, org.djunits.value.vdouble.scalar.Frequency frequency)
simulator
- simulatorfrequency
- sampling frequencyNullPointerException
- if an input is null
IllegalArgumentException
- if frequency is negative or zeropublic final org.djunits.value.vdouble.scalar.Time now()
now
in class org.opentrafficsim.kpi.sampling.Sampler
public final void scheduleStartRecording(org.djunits.value.vdouble.scalar.Time time, org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection)
scheduleStartRecording
in class org.opentrafficsim.kpi.sampling.Sampler
public final void scheduleStopRecording(org.djunits.value.vdouble.scalar.Time time, org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection)
scheduleStopRecording
in class org.opentrafficsim.kpi.sampling.Sampler
public final void initRecording(org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection)
initRecording
in class org.opentrafficsim.kpi.sampling.Sampler
public final void finalizeRecording(org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection)
finalizeRecording
in class org.opentrafficsim.kpi.sampling.Sampler
public final void notify(nl.tudelft.simulation.event.EventInterface event) throws RemoteException
notify
in interface nl.tudelft.simulation.event.EventListenerInterface
RemoteException
public final void notifySample(LaneBasedGTU gtu, LaneDirection laneDirection)
gtu
- gtu to samplelaneDirection
- lane direction where the gtu is atpublic final int hashCode()
hashCode
in class org.opentrafficsim.kpi.sampling.Sampler
public final boolean equals(Object obj)
equals
in class org.opentrafficsim.kpi.sampling.Sampler
Copyright © 2014–2016 Delft University of Technology. All rights reserved.