public class RoadSampler extends Sampler<GtuData> implements EventListenerInterface
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Sampler.CompressionMethod
Constructor and Description |
---|
RoadSampler(DEVSSimulatorInterface.TimeDoubleUnit simulator)
Constructor which uses the operational plan updates of GTU's as sampling interval.
|
RoadSampler(DEVSSimulatorInterface.TimeDoubleUnit simulator,
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(KpiLaneDirection kpiLaneDirection) |
int |
hashCode() |
void |
initRecording(KpiLaneDirection kpiLaneDirection) |
void |
notify(EventInterface event) |
void |
notifySample(LaneBasedGTU gtu,
LaneDirection laneDirection)
Samples a gtu and schedules the next sampling event.
|
Time |
now() |
void |
scheduleStartRecording(Time time,
KpiLaneDirection kpiLaneDirection) |
void |
scheduleStopRecording(Time time,
KpiLaneDirection kpiLaneDirection) |
String |
toString() |
contains, contains, getTrajectoryGroup, processGtuAddEvent, processGtuMoveEvent, processGtuRemoveEvent, processGtuRemoveEvent, registerExtendedDataType, registerMetaDataTypes, registerSpaceTimeRegion, startRecording, stopRecording, writeToFile, writeToFile
public RoadSampler(DEVSSimulatorInterface.TimeDoubleUnit simulator)
simulator
- simulatorNullPointerException
- if the simulator is null
public RoadSampler(DEVSSimulatorInterface.TimeDoubleUnit simulator, Frequency frequency)
simulator
- simulatorfrequency
- sampling frequencyNullPointerException
- if an input is null
IllegalArgumentException
- if frequency is negative or zeropublic final void scheduleStartRecording(Time time, KpiLaneDirection kpiLaneDirection)
scheduleStartRecording
in class Sampler<GtuData>
public final void scheduleStopRecording(Time time, KpiLaneDirection kpiLaneDirection)
scheduleStopRecording
in class Sampler<GtuData>
public final void initRecording(KpiLaneDirection kpiLaneDirection)
initRecording
in class Sampler<GtuData>
public final void finalizeRecording(KpiLaneDirection kpiLaneDirection)
finalizeRecording
in class Sampler<GtuData>
public final void notify(EventInterface event) throws RemoteException
notify
in interface EventListenerInterface
RemoteException
public final void notifySample(LaneBasedGTU gtu, LaneDirection laneDirection)
gtu
- gtu to samplelaneDirection
- lane direction where the gtu is atCopyright © 2014–2018 Delft University of Technology. All rights reserved.