public class OperationalPlan extends Object implements Serializable
Copyright (c) 2013-2017 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.
|
(package private) static double |
MAX_DELTA_SI
The maximum difference in the length of the path and the calculated driven distance implied by the segment list.
|
| Constructor and Description |
|---|
OperationalPlan(GTU gtu,
DirectedPoint waitPoint,
org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Duration duration)
Build a plan where the GTU will wait for a certain time.
|
OperationalPlan(GTU gtu,
OTSLine3D path,
org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Speed startSpeed,
List<OperationalPlan.Segment> operationalPlanSegmentList)
Construct an operational plan.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
org.djunits.value.vdouble.scalar.Acceleration |
getAcceleration(org.djunits.value.vdouble.scalar.Duration time)
Calculate the acceleration of the GTU after the given duration since the start of the plan.
|
org.djunits.value.vdouble.scalar.Acceleration |
getAcceleration(org.djunits.value.vdouble.scalar.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.
|
org.djunits.value.vdouble.scalar.Speed |
getEndSpeed() |
org.djunits.value.vdouble.scalar.Time |
getEndTime()
Return the time it will take to complete the entire operational plan.
|
DirectedPoint |
getLocation(org.djunits.value.vdouble.scalar.Duration time)
Calculate the location after the given duration since the start of the plan.
|
DirectedPoint |
getLocation(org.djunits.value.vdouble.scalar.Time time)
Calculate the location at the given time.
|
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.
|
org.djunits.value.vdouble.scalar.Speed |
getSpeed(org.djunits.value.vdouble.scalar.Duration time)
Calculate the speed of the GTU after the given duration since the start of the plan.
|
org.djunits.value.vdouble.scalar.Speed |
getSpeed(org.djunits.value.vdouble.scalar.Time time)
Calculate the speed of the GTU at the given time.
|
org.djunits.value.vdouble.scalar.Speed |
getStartSpeed()
Return the start speed of the entire plan.
|
org.djunits.value.vdouble.scalar.Time |
getStartTime()
Return the (absolute) start time of the operational plan.
|
org.djunits.value.vdouble.scalar.Duration |
getTotalDuration()
Return the time it will take to complete the entire operational plan.
|
org.djunits.value.vdouble.scalar.Length |
getTotalLength()
Return the distance the entire operational plan will cover.
|
org.djunits.value.vdouble.scalar.Length |
getTraveledDistance(org.djunits.value.vdouble.scalar.Duration duration)
Calculate the distance traveled as part of this plan after the given duration since the start of the plan.
|
org.djunits.value.vdouble.scalar.Length |
getTraveledDistance(org.djunits.value.vdouble.scalar.Time time)
Calculate the distance traveled as part of this plan at the given absolute time.
|
double |
getTraveledDistanceSI(org.djunits.value.vdouble.scalar.Duration duration)
Calculate the distance traveled as part of this plan after the given duration since the start of the plan.
|
double |
getTraveledDistanceSI(org.djunits.value.vdouble.scalar.Time time)
Calculate the distance traveled as part of this plan at the given absolute time.
|
int |
hashCode() |
org.djunits.value.vdouble.scalar.Time |
timeAtDistance(org.djunits.value.vdouble.scalar.Length distance)
Return the time when the GTU will reach the given distance.
|
String |
toString() |
static final double MAX_DELTA_SI
public static final double DRIFTING_SPEED_SI
public OperationalPlan(GTU gtu, OTSLine3D path, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Speed startSpeed, List<OperationalPlan.Segment> operationalPlanSegmentList) throws OperationalPlanException
gtu - the GTU for debugging purposespath - the path to follow from a certain time till a certain time. The path should have at least the lengthstartTime - the absolute start time when we start executing the pathstartSpeed - the GTU speed when we start executing the pathoperationalPlanSegmentList - 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, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Duration duration) throws OperationalPlanException
gtu - the GTU for debugging purposeswaitPoint - the point at which the GTU will waitstartTime - the current time or a time in the future when the plan should startduration - the waiting timeOperationalPlanException - when construction of a waiting path failspublic final OTSLine3D getPath()
public final org.djunits.value.vdouble.scalar.Time getStartTime()
public final org.djunits.value.vdouble.scalar.Speed getStartSpeed()
public final org.djunits.value.vdouble.scalar.Speed getEndSpeed()
public final List<OperationalPlan.Segment> getOperationalPlanSegmentList()
public final org.djunits.value.vdouble.scalar.Duration getTotalDuration()
public final org.djunits.value.vdouble.scalar.Length getTotalLength()
public final org.djunits.value.vdouble.scalar.Time getEndTime()
public final DirectedPoint getEndLocation()
public final org.djunits.value.vdouble.scalar.Time timeAtDistance(org.djunits.value.vdouble.scalar.Length distance)
distance - the distance to calculate the time forpublic final DirectedPoint getLocation(org.djunits.value.vdouble.scalar.Time time) throws OperationalPlanException
time - the absolute time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final org.djunits.value.vdouble.scalar.Speed getSpeed(org.djunits.value.vdouble.scalar.Duration time)
throws OperationalPlanException
time - the relative time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final org.djunits.value.vdouble.scalar.Speed getSpeed(org.djunits.value.vdouble.scalar.Time time)
throws OperationalPlanException
time - the absolute time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final org.djunits.value.vdouble.scalar.Acceleration getAcceleration(org.djunits.value.vdouble.scalar.Duration time)
throws OperationalPlanException
time - the relative time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final org.djunits.value.vdouble.scalar.Acceleration getAcceleration(org.djunits.value.vdouble.scalar.Time time)
throws OperationalPlanException
time - the absolute time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final DirectedPoint getLocation(org.djunits.value.vdouble.scalar.Duration time) throws OperationalPlanException
time - the relative time to look for a locationOperationalPlanException - when the time is after the validity of the operational planpublic final double getTraveledDistanceSI(org.djunits.value.vdouble.scalar.Duration duration)
throws OperationalPlanException
duration - the relative time to calculate the traveled distanceOperationalPlanException - when the time is after the validity of the operational planpublic final org.djunits.value.vdouble.scalar.Length getTraveledDistance(org.djunits.value.vdouble.scalar.Duration duration)
throws OperationalPlanException
duration - the relative time to calculate the traveled distanceOperationalPlanException - when the time is after the validity of the operational planpublic final double getTraveledDistanceSI(org.djunits.value.vdouble.scalar.Time time)
throws OperationalPlanException
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 org.djunits.value.vdouble.scalar.Length getTraveledDistance(org.djunits.value.vdouble.scalar.Time time)
throws OperationalPlanException
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–2017 Delft University of Technology. All rights reserved.