static interface TrajectoryPlot.Trajectory
Modifier and Type | Method and Description |
---|---|
void |
addSample(LaneBasedGTU gtu,
Lane lane,
double position)
Add a trajectory segment sample and update the currentEndTime and currentEndPosition.
|
org.djunits.value.vdouble.scalar.Time |
getCurrentEndTime()
Retrieve the time of the last stored event.
|
double |
getDistance(int item)
Return the distance of the Nth stored sample.
|
String |
getId()
Retrieve the id of this Trajectory.
|
Double |
getLastPosition()
Retrieve the last recorded non-null position, or null if no non-null positions have been recorded yet.
|
double |
getTime(int item)
Return the time of the Nth stored sample.
|
int |
size()
Retrieve the number of stored samples in this Trajectory.
|
org.djunits.value.vdouble.scalar.Time getCurrentEndTime()
Double getLastPosition()
String getId()
void addSample(LaneBasedGTU gtu, Lane lane, double position) throws org.opentrafficsim.core.network.NetworkException, org.opentrafficsim.core.gtu.GTUException
gtu
- AbstractLaneBasedGTU; the GTU whose currently committed trajectory segment must be addedlane
- Lane; the Lane that the positionOffset is valid forposition
- Double; distance in meters from the start of the trajectoryorg.opentrafficsim.core.network.NetworkException
- when car is not on lane anymoreorg.opentrafficsim.core.gtu.GTUException
- on problems obtaining data from the GTUint size()
double getTime(int item)
item
- int; the index of the sampledouble getDistance(int item)
item
- int; the index of the sampleCopyright © 2014–2017 Delft University of Technology. All rights reserved.