Class OvertakingConditions.LeftSetRightSpeed

java.lang.Object
org.opentrafficsim.road.network.lane.changing.OvertakingConditions.LeftSetRightSpeed
All Implemented Interfaces:
Serializable, OvertakingConditions
Enclosing interface:
OvertakingConditions

public static class OvertakingConditions.LeftSetRightSpeed extends Object implements OvertakingConditions, Serializable
Provide a collection of GTUs that can overtake another collection of GTUs on the left side, but not vice versa. Example: {CAR, TRUCK, BUS} can overtake {BICYCLE, SCOOTER}, or {CAR, TRUCK, BUS} can overtake {CAR, TRUCK, BUS, BICYCLE, SCOOTER}. In the latter case, cars, trucks and busses can overtake all other GTUs, but bicycles and scooters cannot overtake cars, trucks or busses. Another example is a lane where cars and motors can overtake all other road users, but trucks are not allowed to overtake. In that case, we would allow {CAR, MOTOR} to overtake {ALL} or {CAR, MOTOR} to overtake {CAR, MOTOR, TRUCK} in that lane. In addition, overtaking on the other side is allowed under a given driving speed.

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
See Also:
  • Constructor Details

    • LeftSetRightSpeed

      public LeftSetRightSpeed(Collection<GtuType> overtakingGTUs, Collection<GtuType> overtakenGTUs, org.djunits.value.vdouble.scalar.Speed rightOvertakingSpeedMax)
      Provide a collection of GTUs that can overtake another collection of GTUs on the left, but not vice versa. Example: {CAR, TRUCK, BUS} can overtake {BICYCLE, SCOOTER}, or {CAR, TRUCK, BUS} can overtake {CAR, TRUCK, BUS, BICYCLE, SCOOTER}, or {CAR, TRUCK, BUS} can overtake {TRACTOR}. In addition, overtaking on the other side is allowed under a given driving speed.
      Parameters:
      overtakingGTUs - Collection<GtuType>; the GTUs that can overtake a set of other GTUs, e.g., CAR, TRUCK.
      overtakenGTUs - Collection<GtuType>; the GTUs that can be overtaken, e.g., BICYCLE, SCOOTER.
      rightOvertakingSpeedMax - Speed; the speed under which overtaking on the "wrong" side is allowed
  • Method Details