Class FixedLaneChangeModel

java.lang.Object
org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.FixedLaneChangeModel
All Implemented Interfaces:
Serializable, LaneChangeModel

public class FixedLaneChangeModel extends Object implements LaneChangeModel, Serializable
Dummy lane change model with totally predictable results (used for testing).

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:
Peter Knoppers
See Also:
  • Field Details

    • LOOKAHEAD

      protected static final org.opentrafficsim.base.parameters.ParameterTypeLength LOOKAHEAD
      Look ahead parameter type.
  • Constructor Details

    • FixedLaneChangeModel

      public FixedLaneChangeModel(LateralDirectionality laneChange)
      Construct a FixedLaneChangeModel.
      Parameters:
      laneChange - the lane change that (always) be returned by this FixedLaneChangeModel.
  • Method Details

    • computeLaneChangeAndAcceleration

      public final LaneMovementStep computeLaneChangeAndAcceleration(LaneBasedGtu gtu, Collection<Headway> sameLaneTraffic, Collection<Headway> rightLaneTraffic, Collection<Headway> leftLaneTraffic, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Acceleration preferredLaneRouteIncentive, org.djunits.value.vdouble.scalar.Acceleration laneChangeThreshold, org.djunits.value.vdouble.scalar.Acceleration nonPreferredLaneRouteIncentive) throws GtuException, org.opentrafficsim.base.parameters.ParameterException
      Description copied from interface: LaneChangeModel
      Compute the acceleration and lane change.
      Specified by:
      computeLaneChangeAndAcceleration in interface LaneChangeModel
      Parameters:
      gtu - the GTU for which the acceleration and lane change is computed
      sameLaneTraffic - the set of observable GTUs in the current lane (can not be null and may include the gtu)
      rightLaneTraffic - the set of observable GTUs in the adjacent lane where GTUs should drive in the absence of other traffic (must be null if there is no such lane)
      leftLaneTraffic - the set of observable GTUs in the adjacent lane into which GTUs should merge to overtake other traffic (must be null if there is no such lane)
      speedLimit - the local speed limit
      preferredLaneRouteIncentive - route incentive to merge to the adjacent lane where GTUs should drive in the absence of other traffic
      laneChangeThreshold - threshold that prevents lane changes that have very little benefit
      nonPreferredLaneRouteIncentive - route incentive to merge to the adjacent lane into which GTUs should merge to overtake other traffic
      Returns:
      the result of the lane change and GTU following model
      Throws:
      GtuException - when the speed of the GTU can not be determined
      org.opentrafficsim.base.parameters.ParameterException - in case of a parameter problem.
    • getName

      public final String getName()
      Description copied from interface: LaneChangeModel
      Return the name of this GTU following model.
      Specified by:
      getName in interface LaneChangeModel
      Returns:
      just the name of the GTU following model
    • getLongName

      public final String getLongName()
      Description copied from interface: LaneChangeModel
      Return complete textual information about this instantiation of this GTU following model.
      Specified by:
      getLongName in interface LaneChangeModel
      Returns:
      the name and parameter values of the GTU following model
    • toString

      public final String toString()
      Overrides:
      toString in class Object