public class OperationalPlan extends Object implements Serializable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier and Type | Class and Description |
|---|---|
static class |
OperationalPlan.AccelerationSegment
The segment of an operational plan in which the acceleration is constant.
|
static class |
OperationalPlan.Segment
The segment of an operational plan contains a part of the speed profile of a movement in which some of the variables
determining movement (speed, acceleration) are constant.
|
static class |
OperationalPlan.SpeedSegment
The segment of an operational plan in which the speed is constant.
|
| Modifier and Type | Field and Description |
|---|---|
static double |
DRIFTING_SPEED_SI
The drifting speed.
|
| Constructor and Description |
|---|
OperationalPlan(GTU gtu,
DirectedPoint waitPoint,
Time startTime,
Duration duration)
Build a plan where the GTU will wait for a certain time.
|
OperationalPlan(GTU gtu,
OTSLine3D path,
Time startTime,
Speed startSpeed,
List<OperationalPlan.Segment> operationalPlanSegmentList)
Construct an operational plan.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Acceleration |
getAcceleration(Duration time)
Calculate the acceleration of the GTU after the given duration since the start of the plan.
|
Acceleration |
getAcceleration(Time time)
Calculate the acceleration of the GTU at the given time.
|
DirectedPoint |
getEndLocation()
Provide the end location of this operational plan as a DirectedPoint.
|
Speed |
getEndSpeed() |
Time |
getEndTime()
Return the time it will take to complete the entire operational plan.
|
DirectedPoint |
getLocation(Duration time)
Calculate the location after the given duration since the start of the plan.
|
DirectedPoint |
getLocation(Time time)
Calculate the location at the given time.
|
DirectedPoint |
getLocation(Time time,
RelativePosition pos)
Calculate the location after the given duration since the start of the plan.
|
List<OperationalPlan.Segment> |
getOperationalPlanSegmentList()
Return the segments (parts with constant speed, acceleration or deceleration) of the operational plan.
|
OTSLine3D |
getPath()
Return the path that will be traveled.
|
Speed |
getSpeed(Duration time)
Calculate the speed of the GTU after the given duration since the start of the plan.
|
Speed |
getSpeed(Time time)
Calculate the speed of the GTU at the given time.
|
Speed |
getStartSpeed()
Return the start speed of the entire plan.
|
Time |
getStartTime()
Return the (absolute) start time of the operational plan.
|
Duration |
getTotalDuration()
Return the time it will take to complete the entire operational plan.
|
Length |
getTotalLength()
Return the distance the entire operational plan will cover.
|
Length |
getTraveledDistance(Duration duration)
Calculate the distance traveled as part of this plan after the given duration since the start of the plan.
|
Length |
getTraveledDistance(Time time)
Calculate the distance traveled as part of this plan at the given absolute time.
|
double |
getTraveledDistanceSI(Duration duration)
Calculate the distance traveled as part of this plan after the given duration since the start of the plan.
|
double |
getTraveledDistanceSI(Time time)
Calculate the distance traveled as part of this plan at the given absolute time.
|
int |
hashCode() |
Time |
timeAtDistance(Length distance)
Return the time when the GTU will reach the given distance.
|
Time |
timeAtPoint(DirectedPoint point,
boolean upstream)
Calculates when the GTU will be at the given point.
|
String |
toString() |
public static final double DRIFTING_SPEED_SI
public OperationalPlan(GTU gtu, OTSLine3D path, Time startTime, Speed startSpeed, List<OperationalPlan.Segment> operationalPlanSegmentList) throws OperationalPlanException
gtu - GTU; the GTU for debugging purposespath - OTSLine3D; the path to follow from a certain time till a certain time. The path should have <i>at
least</i> the lengthstartTime - Time; the absolute start time when we start executing the pathstartSpeed - Speed; the GTU speed when we start executing the pathoperationalPlanSegmentList - List<Segment>; the segments that make up the path with an acceleration, constant
speed or deceleration profileOperationalPlanException - when the path is too short for the operationpublic OperationalPlan(GTU gtu, DirectedPoint waitPoint, Time startTime, Duration duration) throws OperationalPlanException
gtu - GTU; the GTU for debugging purposeswaitPoint - DirectedPoint; the point at which the GTU will waitstartTime - Time; the current time or a time in the future when the plan should startduration - Duration; the waiting timeOperationalPlanException - when construction of a waiting path failspublic final OTSLine3D getPath()
public final Time getStartTime()
public final Speed getStartSpeed()
public final Speed getEndSpeed()
public final List<OperationalPlan.Segment> getOperationalPlanSegmentList()
public final Duration getTotalDuration()
public final Length getTotalLength()
public final Time getEndTime()
public final DirectedPoint getEndLocation()
public final Time timeAtDistance(Length distance)
distance - Length; the distance to calculate the time forpublic final DirectedPoint getLocation(Time time) throws OperationalPlanException
time - Time; the absolute time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final Speed getSpeed(Duration time) throws OperationalPlanException
time - Duration; the relative time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final Speed getSpeed(Time time) throws OperationalPlanException
time - Time; the absolute time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final Acceleration getAcceleration(Duration time) throws OperationalPlanException
time - Duration; the relative time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final Acceleration getAcceleration(Time time) throws OperationalPlanException
time - Time; the absolute time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final DirectedPoint getLocation(Duration time) throws OperationalPlanException
time - Duration; the relative time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final DirectedPoint getLocation(Time time, RelativePosition pos) throws OperationalPlanException
time - Time; the relative time to look for a locationpos - RelativePosition; relative positionOperationalPlanException - when the time is after the validity of the operational planpublic final double getTraveledDistanceSI(Duration duration) throws OperationalPlanException
duration - Duration; the relative time to calculate the traveled distanceOperationalPlanException - when the time is after the validity of the operational planpublic final Length getTraveledDistance(Duration duration) throws OperationalPlanException
duration - Duration; the relative time to calculate the traveled distanceOperationalPlanException - when the time is after the validity of the operational planpublic final double getTraveledDistanceSI(Time time) throws OperationalPlanException
time - Time; the absolute time to calculate the traveled distance for as part of this planOperationalPlanException - when the time is after the validity of the operational planpublic final Time timeAtPoint(DirectedPoint point, boolean upstream)
point - DirectedPoint; point with angle, which will be projected to the path at 90 degreesupstream - boolean; true if the point is upstream of the pathpublic final Length getTraveledDistance(Time time) throws OperationalPlanException
time - Time; the absolute time to calculate the traveled distance for as part of this planOperationalPlanException - when the time is after the validity of the operational planCopyright © 2014–2019 Delft University of Technology. All rights reserved.