public final class LaneOperationalPlanBuilder extends Object
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 |
LaneOperationalPlanBuilder.LaneChange
Lane change status across operational plans.
|
Modifier and Type | Method and Description |
---|---|
static LaneBasedOperationalPlan |
buildAccelerationLaneChangePlan(LaneBasedGTU gtu,
List<Lane> fromLanes,
org.opentrafficsim.core.network.LateralDirectionality laneChangeDirectionality,
nl.tudelft.simulation.language.d3.DirectedPoint startPosition,
org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Speed startSpeed,
org.djunits.value.vdouble.scalar.Acceleration acceleration,
org.djunits.value.vdouble.scalar.Duration timeStep,
LaneOperationalPlanBuilder.LaneChange laneChange)
Build a plan with a path and a given start speed to try to reach a provided end speed.
|
static LaneBasedOperationalPlan |
buildAccelerationPlan(LaneBasedGTU gtu,
List<Lane> lanes,
org.djunits.value.vdouble.scalar.Length firstLanePosition,
org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Speed startSpeed,
org.djunits.value.vdouble.scalar.Acceleration acceleration,
org.djunits.value.vdouble.scalar.Duration timeStep)
Build a plan with a path and a given start speed to try to reach a provided end speed.
|
static LaneBasedOperationalPlan |
buildGradualAccelerationPlan(LaneBasedGTU gtu,
List<Lane> lanes,
org.djunits.value.vdouble.scalar.Length firstLanePosition,
org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Speed startSpeed,
org.djunits.value.vdouble.scalar.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 LaneBasedOperationalPlan |
buildGradualAccelerationPlan(LaneBasedGTU gtu,
List<Lane> lanes,
org.djunits.value.vdouble.scalar.Length firstLanePosition,
org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Speed startSpeed,
org.djunits.value.vdouble.scalar.Speed endSpeed,
org.djunits.value.vdouble.scalar.Acceleration maxAcceleration,
org.djunits.value.vdouble.scalar.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 LaneBasedOperationalPlan |
buildMaximumAccelerationPlan(LaneBasedGTU gtu,
List<Lane> lanes,
org.djunits.value.vdouble.scalar.Length firstLanePosition,
org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Speed startSpeed,
org.djunits.value.vdouble.scalar.Speed endSpeed,
org.djunits.value.vdouble.scalar.Acceleration acceleration,
org.djunits.value.vdouble.scalar.Acceleration deceleration)
Build a plan with a path and a given start speed to try to reach a provided end speed.
|
static LaneBasedOperationalPlan |
buildStopPlan(LaneBasedGTU gtu,
List<Lane> lanes,
org.djunits.value.vdouble.scalar.Length firstLanePosition,
org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Speed startSpeed,
org.djunits.value.vdouble.scalar.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 org.opentrafficsim.core.geometry.OTSLine3D |
concatenateNull(org.opentrafficsim.core.geometry.OTSLine3D path,
org.opentrafficsim.core.geometry.OTSLine3D centerLine)
Concatenate two paths, where the first may be
null . |
static org.opentrafficsim.core.geometry.OTSLine3D |
makePath(List<Lane> lanes,
org.djunits.value.vdouble.scalar.Length firstLanePosition,
org.djunits.value.vdouble.scalar.Length distance)
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.
|
public static LaneBasedOperationalPlan buildGradualAccelerationPlan(LaneBasedGTU gtu, List<Lane> lanes, org.djunits.value.vdouble.scalar.Length firstLanePosition, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Speed startSpeed, org.djunits.value.vdouble.scalar.Speed endSpeed, org.djunits.value.vdouble.scalar.Acceleration maxAcceleration, org.djunits.value.vdouble.scalar.Acceleration maxDeceleration) throws org.opentrafficsim.core.gtu.plan.operational.OperationalPlanException, org.opentrafficsim.core.geometry.OTSGeometryException
gtu
- the GTU for debugging purposeslanes
- a list of connected Lanes to do the driving onfirstLanePosition
- position on the first lane with the reference point of the GTUdistance
- distance to drive for reaching the end speedstartTime
- the current time or a time in the future when the plan should startstartSpeed
- the speed at the start of the pathendSpeed
- the required end speedmaxAcceleration
- the maximum acceleration that can be applied, provided as a POSITIVE numbermaxDeceleration
- the maximum deceleration that can be applied, provided as a NEGATIVE numberorg.opentrafficsim.core.gtu.plan.operational.OperationalPlanException
- when the plan cannot be generated, e.g. because of a path that is too shortorg.opentrafficsim.core.gtu.plan.operational.OperationalPlanException
- when the length of the path and the calculated driven distance implied by the
constructed segment list differ more than a given thresholdorg.opentrafficsim.core.geometry.OTSGeometryException
- in case the lanes are not connected or firstLanePosition is larger than the length of the
first lanepublic static org.opentrafficsim.core.geometry.OTSLine3D makePath(List<Lane> lanes, org.djunits.value.vdouble.scalar.Length firstLanePosition, org.djunits.value.vdouble.scalar.Length distance) throws org.opentrafficsim.core.gtu.plan.operational.OperationalPlanException, org.opentrafficsim.core.geometry.OTSGeometryException
lanes
- a list of connected Lanes to do the driving onfirstLanePosition
- position on the first lane with the reference point of the GTUdistance
- distance to drive for reaching the end speedorg.opentrafficsim.core.gtu.plan.operational.OperationalPlanException
- when the length of the lanes is less than the distance when we start at the
firstLanePosition on the first lane, or when the lanes list contains no elementsorg.opentrafficsim.core.geometry.OTSGeometryException
- in case the lanes are not connected or firstLanePosition is larger than the length of the
first lanepublic static org.opentrafficsim.core.geometry.OTSLine3D concatenateNull(org.opentrafficsim.core.geometry.OTSLine3D path, org.opentrafficsim.core.geometry.OTSLine3D centerLine) throws org.opentrafficsim.core.geometry.OTSGeometryException
null
.path
- path, may be null
centerLine
- center line of lane to addorg.opentrafficsim.core.geometry.OTSGeometryException
- when lines are degenerate or too distantpublic static LaneBasedOperationalPlan buildGradualAccelerationPlan(LaneBasedGTU gtu, List<Lane> lanes, org.djunits.value.vdouble.scalar.Length firstLanePosition, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Speed startSpeed, org.djunits.value.vdouble.scalar.Speed endSpeed) throws org.opentrafficsim.core.gtu.plan.operational.OperationalPlanException, org.opentrafficsim.core.geometry.OTSGeometryException
gtu
- the GTU for debugging purposeslanes
- a list of connected Lanes to do the driving onfirstLanePosition
- position on the first lane with the reference point of the GTUdistance
- distance to drive for reaching the end speedstartTime
- the current time or a time in the future when the plan should startstartSpeed
- the speed at the start of the pathendSpeed
- the required end speedorg.opentrafficsim.core.gtu.plan.operational.OperationalPlanException
- when the length of the path and the calculated driven distance implied by the
constructed segment list differ more than a given thresholdorg.opentrafficsim.core.geometry.OTSGeometryException
- in case the lanes are not connected or firstLanePositiion is larger than the length of the
first lanepublic static LaneBasedOperationalPlan buildMaximumAccelerationPlan(LaneBasedGTU gtu, List<Lane> lanes, org.djunits.value.vdouble.scalar.Length firstLanePosition, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Speed startSpeed, org.djunits.value.vdouble.scalar.Speed endSpeed, org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Acceleration deceleration) throws org.opentrafficsim.core.gtu.plan.operational.OperationalPlanException, org.opentrafficsim.core.geometry.OTSGeometryException
gtu
- the GTU for debugging purposeslanes
- a list of connected Lanes to do the driving onfirstLanePosition
- position on the first lane with the reference point of the GTUdistance
- distance to drive for reaching the end speedstartTime
- the current time or a time in the future when the plan should startstartSpeed
- the speed at the start of the pathendSpeed
- the required end speedacceleration
- the acceleration to use if endSpeed > startSpeed, provided as a POSITIVE numberdeceleration
- the deceleration to use if endSpeed < startSpeed, provided as a NEGATIVE numberorg.opentrafficsim.core.gtu.plan.operational.OperationalPlanException
- when the construction of the operational path failsorg.opentrafficsim.core.geometry.OTSGeometryException
- in case the lanes are not connected or firstLanePositiion is larger than the length of the
first lanepublic static LaneBasedOperationalPlan buildAccelerationPlan(LaneBasedGTU gtu, List<Lane> lanes, org.djunits.value.vdouble.scalar.Length firstLanePosition, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Speed startSpeed, org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration timeStep) throws org.opentrafficsim.core.gtu.plan.operational.OperationalPlanException, org.opentrafficsim.core.geometry.OTSGeometryException
gtu
- the GTU for debugging purposeslanes
- a list of connected Lanes to do the driving onfirstLanePosition
- position on the first lane with the reference point of the GTUstartTime
- the current time or a time in the future when the plan should startstartSpeed
- the speed at the start of the pathacceleration
- the acceleration to usetimeStep
- time step for the planorg.opentrafficsim.core.gtu.plan.operational.OperationalPlanException
- when the construction of the operational path failsorg.opentrafficsim.core.geometry.OTSGeometryException
- in case the lanes are not connected or firstLanePositiion is larger than the length of the
first lanepublic static LaneBasedOperationalPlan buildAccelerationLaneChangePlan(LaneBasedGTU gtu, List<Lane> fromLanes, org.opentrafficsim.core.network.LateralDirectionality laneChangeDirectionality, nl.tudelft.simulation.language.d3.DirectedPoint startPosition, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Speed startSpeed, org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration timeStep, LaneOperationalPlanBuilder.LaneChange laneChange) throws org.opentrafficsim.core.gtu.plan.operational.OperationalPlanException, org.opentrafficsim.core.geometry.OTSGeometryException
gtu
- the GTU for debugging purposesfromLanes
- lanes where the GTU changes fromlaneChangeDirectionality
- direction of lane changestartPosition
- current positionstartTime
- the current time or a time in the future when the plan should startstartSpeed
- the speed at the start of the pathacceleration
- the acceleration to usetimeStep
- time step for the planlaneChange
- lane change statusorg.opentrafficsim.core.gtu.plan.operational.OperationalPlanException
- when the construction of the operational path failsorg.opentrafficsim.core.geometry.OTSGeometryException
- in case the lanes are not connected or firstLanePositiion is larger than the length of the
first lanepublic static LaneBasedOperationalPlan buildStopPlan(LaneBasedGTU gtu, List<Lane> lanes, org.djunits.value.vdouble.scalar.Length firstLanePosition, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Time startTime, org.djunits.value.vdouble.scalar.Speed startSpeed, org.djunits.value.vdouble.scalar.Acceleration deceleration) throws org.opentrafficsim.core.gtu.plan.operational.OperationalPlanException, org.opentrafficsim.core.geometry.OTSGeometryException
gtu
- the GTU for debugging purposeslanes
- a list of connected Lanes to do the driving onfirstLanePosition
- position on the first lane with the reference point of the GTUdistance
- distance to drive for reaching the end speedstartTime
- the current time or a time in the future when the plan should startstartSpeed
- the speed at the start of the pathdeceleration
- the deceleration to use if endSpeed < startSpeed, provided as a NEGATIVE numberorg.opentrafficsim.core.gtu.plan.operational.OperationalPlanException
- when construction of the operational path failsorg.opentrafficsim.core.geometry.OTSGeometryException
- in case the lanes are not connected or firstLanePositiion is larger than the length of the
first laneCopyright © 2014–2017 Delft University of Technology. All rights reserved.