class TrajectoryPlot.Trajectory extends Object implements Serializable
| Constructor and Description |
|---|
Trajectory(Object id)
Construct a Trajectory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSegment(LaneBasedGTU gtu,
Lane lane,
double positionOffset,
double posOnLane)
Add a trajectory segment and update the currentEndTime and currentEndPosition.
|
org.djunits.value.vdouble.scalar.Time |
getCurrentEndTime()
Retrieve the last registered time of this Trajectory.
|
double |
getDistance(int item) |
Object |
getId()
Retrieve the id of this Trajectory.
|
Double |
getLastPosition()
Retrieve the current end position of this Trajectory.
|
double |
getTime(int item) |
int |
size()
Retrieve the number of samples in this Trajectory.
|
String |
toString() |
Trajectory(Object id)
id - Object; Id of the new Trajectorypublic final org.djunits.value.vdouble.scalar.Time getCurrentEndTime()
public final Double getLastPosition()
public final Object getId()
public final void addSegment(LaneBasedGTU gtu, Lane lane, double positionOffset, double posOnLane) 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 forpositionOffset - double; offset needed to convert the position in the current Lane to a position on the
trajectoryposOnLane - the position on the lane in meters (si)org.opentrafficsim.core.network.NetworkException - when car is not on lane anymoreorg.opentrafficsim.core.gtu.GTUException - on problems obtaining data from the GTUpublic int size()
public double getTime(int item)
item - Integer; the sample numberpublic double getDistance(int item)
item - Integer; the sample numberCopyright © 2014–2016 Delft University of Technology. All rights reserved.