public final class OperationalPlanBuilder extends Object
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 | Method and Description |
|---|---|
static OperationalPlan |
buildConstantSpeedPlan(GTU gtu,
OTSLine3D path,
Time startTime,
Speed speed)
Build a plan with a path and a given speed.
|
static OperationalPlan |
buildGradualAccelerationPlan(GTU gtu,
OTSLine3D path,
Time startTime,
Speed startSpeed,
Speed endSpeed)
Build a plan with a path and a given start speed to reach a provided end speed, exactly at the end of the curve.
|
static OperationalPlan |
buildGradualAccelerationPlan(GTU gtu,
OTSLine3D path,
Time startTime,
Speed startSpeed,
Speed endSpeed,
Acceleration maxAcceleration,
Acceleration maxDeceleration)
Build a plan with a path and a given start speed to try to reach a provided end speed, exactly at the end of the curve.
|
static OperationalPlan |
buildMaximumAccelerationPlan(GTU gtu,
OTSLine3D path,
Time startTime,
Speed startSpeed,
Speed endSpeed,
Acceleration acceleration,
Acceleration deceleration)
Build a plan with a path and a given start speed to try to reach a provided end speed.
|
static OperationalPlan |
buildStopPlan(GTU gtu,
OTSLine3D path,
Time startTime,
Speed startSpeed,
Acceleration deceleration)
Build a plan with a path and a given start speed to try to come to a stop with a given deceleration.
|
static void |
main(String[] args)
Test.
|
public static OperationalPlan buildConstantSpeedPlan(GTU gtu, OTSLine3D path, Time startTime, Speed speed) throws OperationalPlanException
gtu - GTU; the GTU for debugging purposespath - OTSLine3D; the path to drive (provides the length)startTime - Time; the current time or a time in the future when the plan should startspeed - Speed; the speed at the start of the pathOperationalPlanException - when the length of the path and the calculated driven distance implied by the
constructed segment list differ more than a given thresholdpublic static OperationalPlan buildGradualAccelerationPlan(GTU gtu, OTSLine3D path, Time startTime, Speed startSpeed, Speed endSpeed, Acceleration maxAcceleration, Acceleration maxDeceleration) throws OperationalPlanException
gtu - GTU; the GTU for debugging purposespath - OTSLine3D; the path to drive (provides the length)startTime - Time; the current time or a time in the future when the plan should startstartSpeed - Speed; the speed at the start of the pathendSpeed - Speed; the required end speedmaxAcceleration - Acceleration; the maximum acceleration that can be applied, provided as a POSITIVE numbermaxDeceleration - Acceleration; the maximum deceleration that can be applied, provided as a NEGATIVE numberOperationalPlanException - when the length of the path and the calculated driven distance implied by the
constructed segment list differ more than a given thresholdpublic static OperationalPlan buildGradualAccelerationPlan(GTU gtu, OTSLine3D path, Time startTime, Speed startSpeed, Speed endSpeed) throws OperationalPlanException
gtu - GTU; the GTU for debugging purposespath - OTSLine3D; the path to drive (provides the length)startTime - Time; the current time or a time in the future when the plan should startstartSpeed - Speed; the speed at the start of the pathendSpeed - Speed; the required end speedOperationalPlanException - when the length of the path and the calculated driven distance implied by the
constructed segment list differ more than a given thresholdpublic static OperationalPlan buildMaximumAccelerationPlan(GTU gtu, OTSLine3D path, Time startTime, Speed startSpeed, Speed endSpeed, Acceleration acceleration, Acceleration deceleration) throws OperationalPlanException
gtu - GTU; the GTU for debugging purposespath - OTSLine3D; the path to drive (provides the length)startTime - Time; the current time or a time in the future when the plan should startstartSpeed - Speed; the speed at the start of the pathendSpeed - Speed; the required end speedacceleration - Acceleration; the acceleration to use if endSpeed > startSpeed, provided as a POSITIVE numberdeceleration - Acceleration; the deceleration to use if endSpeed < startSpeed, provided as a NEGATIVE numberOperationalPlanException - when the length of the path and the calculated driven distance implied by the
constructed segment list differ more than a given thresholdpublic static OperationalPlan buildStopPlan(GTU gtu, OTSLine3D path, Time startTime, Speed startSpeed, Acceleration deceleration) throws OperationalPlanException
gtu - GTU; the GTU for debugging purposespath - OTSLine3D; the path to drive (provides the length)startTime - Time; the current time or a time in the future when the plan should startstartSpeed - Speed; the speed at the start of the pathdeceleration - Acceleration; the deceleration to use if endSpeed < startSpeed, provided as a NEGATIVE numberOperationalPlanException - when the length of the path and the calculated driven distance implied by the
constructed segment list differ more than a given thresholdpublic static void main(String[] args) throws OperationalPlanException, OTSGeometryException
args - String[]; args for mainOperationalPlanException - on errorOTSGeometryException - on errorCopyright © 2014–2019 Delft University of Technology. All rights reserved.