Class LaneOperationalPlanBuilder
java.lang.Object
org.opentrafficsim.road.gtu.operational.LaneOperationalPlanBuilder
Builder for several often used operational plans. E.g., decelerate to come to a full stop at the end of a shape; accelerate
to reach a certain speed at the end of a curve; drive constant on a curve; decelerate or accelerate to reach a given end
speed at the end of a curve, etc.
Copyright (c) 2013-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Method Summary
Modifier and TypeMethodDescriptionstatic OtsLine2dbezierToTarget(DirectedPoint2d from, DirectedPoint2d target) Create Bezier path from one location to a target point.static LaneBasedOperationalPlanbuildPlanFromSimplePlan(LaneBasedGtu gtu, SimpleOperationalPlan simplePlan, org.djunits.value.vdouble.scalar.Duration tManeuver, DistancedObject<org.djunits.value.vdouble.scalar.Length> deviation) Build operational plan from a simple plan.static LaneBasedOperationalPlanbuildRoamingPlan(LaneBasedGtu gtu, org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration duration, org.djunits.value.vdouble.scalar.Duration tManeuver) Builds a plan from any position not on a lane, towards a reasonable location on a lane on the route.
-
Method Details
-
buildRoamingPlan
public static LaneBasedOperationalPlan buildRoamingPlan(LaneBasedGtu gtu, org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration duration, org.djunits.value.vdouble.scalar.Duration tManeuver) Builds a plan from any position not on a lane, towards a reasonable location on a lane on the route.- Parameters:
gtu- GTUacceleration- accelerationduration- time steptManeuver- maneuver time, e.g. lane change- Returns:
- plan from any position not on a lane, to a reasonable location on a lane on the route
- Throws:
IllegalStateException- if the GTU is on a lane
-
buildPlanFromSimplePlan
public static LaneBasedOperationalPlan buildPlanFromSimplePlan(LaneBasedGtu gtu, SimpleOperationalPlan simplePlan, org.djunits.value.vdouble.scalar.Duration tManeuver, DistancedObject<org.djunits.value.vdouble.scalar.Length> deviation) Build operational plan from a simple plan. Sets or resets the GTU lane change direction. Deviation is applied if it is within a reasonable maneuver range.- Parameters:
gtu- GTUsimplePlan- simple operational plantManeuver- maneuver time, e.g. lane changedeviation- desired lateral deviation- Returns:
- plan from position on a lane
- Throws:
IllegalStateException- if the GTU is not on a lane
-
bezierToTarget
Create Bezier path from one location to a target point. The path is flattened with a default flattener using a maximum deviation of 0.1m and maximum angle 0.5 degrees.- Parameters:
from- from pointtarget- target point- Returns:
- Bezier path from current location of the GTU towards the target point
-