Class LaneOperationalPlanBuilder

java.lang.Object
org.opentrafficsim.road.gtu.lane.plan.operational.LaneOperationalPlanBuilder

public final class LaneOperationalPlanBuilder extends Object
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-2024 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 Details

    • buildRoamingPlan

      public static LaneBasedOperationalPlan buildRoamingPlan(LaneBasedGtu gtu, Acceleration acceleration, Duration duration, Duration tManeuver)
      Builds a plan from any position not on a lane, towards a reasonable location on a lane on the route.
      Parameters:
      gtu - GTU
      acceleration - acceleration
      duration - time step
      tManeuver - 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, Duration tManeuver)
      Build operational plan from a simple plan. Sets or resets the GTU lane change direction.
      Parameters:
      gtu - GTU
      simplePlan - simple operational plan
      tManeuver - maneuver time, e.g. lane change
      Returns:
      plan from position on a lane
      Throws:
      IllegalStateException - if the GTU is not on a lane