public static class OvertakingConditions.LeftSet extends Object implements OvertakingConditions, Serializable
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Sep 13, 2015OvertakingConditions.LeftAlwaysRightSpeed, OvertakingConditions.LeftAndRight, OvertakingConditions.LeftOnly, OvertakingConditions.LeftSet, OvertakingConditions.LeftSetRightSpeed, OvertakingConditions.None, OvertakingConditions.RightAlwaysLeftSpeed, OvertakingConditions.RightOnly, OvertakingConditions.RightSet, OvertakingConditions.RightSetLeftSpeed, OvertakingConditions.SameLaneBoth, OvertakingConditions.SameLaneLeft, OvertakingConditions.SameLaneRight
Constructor and Description |
---|
LeftSet(Collection<org.opentrafficsim.core.gtu.GTUType> overtakingGTUs,
Collection<org.opentrafficsim.core.gtu.GTUType> overtakenGTUs)
Provide a collection of GTUs that can overtake another collection of GTUs on the left, but not vice versa.
|
Modifier and Type | Method and Description |
---|---|
OvertakingDirection |
checkOvertaking(Lane lane,
LaneBasedGTU gtu,
LaneBasedGTU predecessorGTU)
Implementation of the overtaking conditions.
|
String |
toString() |
public LeftSet(Collection<org.opentrafficsim.core.gtu.GTUType> overtakingGTUs, Collection<org.opentrafficsim.core.gtu.GTUType> overtakenGTUs)
overtakingGTUs
- the GTUs that can overtake a set of other GTUs, e.g., CAR, TRUCK. If overtakingGTUs contains
GTUType.ALL, all GTUs can overtake.overtakenGTUs
- the GTUs that can be overtaken, e.g., BICYCLE, SCOOTER. If overtakenGTUs contains GTUType.ALL,
all GTUs can be overtaken.public final OvertakingDirection checkOvertaking(Lane lane, LaneBasedGTU gtu, LaneBasedGTU predecessorGTU)
checkOvertaking
in interface OvertakingConditions
lane
- the lane for which to evaluate the overtaking conditionsgtu
- the GTU that might overtake another GTUpredecessorGTU
- the GTU in front of the GTU that might want to overtakeCopyright © 2014–2016 Delft University of Technology. All rights reserved.