public abstract class Sampler extends Object
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 |
---|
Sampler() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(KpiLaneDirection kpiLaneDirection)
Returns whether there is data for the give lane direction.
|
boolean |
equals(Object obj) |
abstract void |
finalizeRecording(KpiLaneDirection kpiLaneDirection)
Remove listeners to stop recording.
|
TrajectoryGroup |
getTrajectoryGroup(KpiLaneDirection kpiLaneDirection)
Returns the trajectory group of given lane direction.
|
int |
hashCode() |
abstract void |
initRecording(KpiLaneDirection kpiLaneDirection)
Adds listeners to start recording.
|
abstract org.djunits.value.vdouble.scalar.Time |
now()
Returns the current simulation time.
|
void |
processGtuAddEvent(KpiLaneDirection kpiLaneDirection,
org.djunits.value.vdouble.scalar.Length position,
org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Acceleration acceleration,
org.djunits.value.vdouble.scalar.Time time,
GtuDataInterface gtu)
Creates a trajectory with the current snapshot of a GTU.
|
void |
processGtuMoveEvent(KpiLaneDirection kpiLaneDirection,
org.djunits.value.vdouble.scalar.Length position,
org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Acceleration acceleration,
org.djunits.value.vdouble.scalar.Time time,
GtuDataInterface gtu)
Adds a new snapshot of a GTU to its recording trajectory, if recorded.
|
void |
processGtuRemoveEvent(KpiLaneDirection kpiLaneDirection,
GtuDataInterface gtu)
Finalizes a trajectory.
|
void |
processGtuRemoveEvent(KpiLaneDirection kpiLaneDirection,
org.djunits.value.vdouble.scalar.Length position,
org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Acceleration acceleration,
org.djunits.value.vdouble.scalar.Time time,
GtuDataInterface gtu)
Finalizes a trajectory with the current snapshot of a GTU.
|
void |
registerExtendedDataType(ExtendedDataType<?> extendedDataType)
Registers extended data type that will be stored with the trajectories.
|
void |
registerMetaDataTypes(Set<MetaDataType<?>> metaDataTypes)
Registers meta data types that will be stored with the trajectories.
|
void |
registerSpaceTimeRegion(SpaceTimeRegion spaceTimeRegion) |
abstract void |
scheduleStartRecording(org.djunits.value.vdouble.scalar.Time time,
KpiLaneDirection kpiLaneDirection)
Schedules the start of recording for a given lane-direction.
|
abstract void |
scheduleStopRecording(org.djunits.value.vdouble.scalar.Time time,
KpiLaneDirection kpiLaneDirection)
Schedules the stop of recording for a given lane-direction.
|
void |
startRecording(KpiLaneDirection kpiLaneDirection)
Start recording at the given time (which should be the current time) on the given lane direction.
|
void |
stopRecording(KpiLaneDirection kpiLaneDirection)
Stop recording at given lane direction.
|
public final void registerSpaceTimeRegion(SpaceTimeRegion spaceTimeRegion)
spaceTimeRegion
- space-time regionIllegalStateException
- if data is not available from the requested start timepublic abstract org.djunits.value.vdouble.scalar.Time now()
public abstract void scheduleStartRecording(org.djunits.value.vdouble.scalar.Time time, KpiLaneDirection kpiLaneDirection)
time
- time to start recordingkpiLaneDirection
- lane-direction to start recordingpublic abstract void scheduleStopRecording(org.djunits.value.vdouble.scalar.Time time, KpiLaneDirection kpiLaneDirection)
time
- time to stop recordingkpiLaneDirection
- lane-direction to stop recordingpublic final void registerMetaDataTypes(Set<MetaDataType<?>> metaDataTypes)
metaDataTypes
- meta data types to registerpublic final void registerExtendedDataType(ExtendedDataType<?> extendedDataType)
extendedDataType
- extended data type to registerpublic final void startRecording(KpiLaneDirection kpiLaneDirection)
kpiLaneDirection
- lane directionpublic abstract void initRecording(KpiLaneDirection kpiLaneDirection)
kpiLaneDirection
- lane direction to initialize recording forpublic final void stopRecording(KpiLaneDirection kpiLaneDirection)
kpiLaneDirection
- lane directionpublic abstract void finalizeRecording(KpiLaneDirection kpiLaneDirection)
kpiLaneDirection
- lane direction to finalize recording forpublic final void processGtuAddEvent(KpiLaneDirection kpiLaneDirection, org.djunits.value.vdouble.scalar.Length position, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Time time, GtuDataInterface gtu)
kpiLaneDirection
- lane direction the gtu is atposition
- position of the gtu on the lanespeed
- speed of the gtuacceleration
- acceleration of the gtutime
- current timegtu
- gtupublic final void processGtuMoveEvent(KpiLaneDirection kpiLaneDirection, org.djunits.value.vdouble.scalar.Length position, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Time time, GtuDataInterface gtu)
kpiLaneDirection
- lane direction the gtu is atposition
- position of the gtu on the lanespeed
- speed of the gtuacceleration
- acceleration of the gtutime
- current timegtu
- gtupublic final void processGtuRemoveEvent(KpiLaneDirection kpiLaneDirection, org.djunits.value.vdouble.scalar.Length position, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Time time, GtuDataInterface gtu)
kpiLaneDirection
- lane direction the gtu is atposition
- position of the gtu on the lanespeed
- speed of the gtuacceleration
- acceleration of the gtutime
- current timegtu
- gtupublic final void processGtuRemoveEvent(KpiLaneDirection kpiLaneDirection, GtuDataInterface gtu)
kpiLaneDirection
- lane direction the gtu is atgtu
- gtupublic final boolean contains(KpiLaneDirection kpiLaneDirection)
kpiLaneDirection
- lane directionpublic final TrajectoryGroup getTrajectoryGroup(KpiLaneDirection kpiLaneDirection)
kpiLaneDirection
- lane directionnull
if noneCopyright © 2014–2016 Delft University of Technology. All rights reserved.