public abstract class AbstractLaneBasedRouteNavigator extends Object implements LaneBasedRouteNavigator, Serializable
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-07-16 10:20:53 +0200 (Thu, 16 Jul 2015) $, @version $Revision: 1124 $, by $Author: pknoppers $,
initial version Jul 22, 2015
Modifier and Type | Field and Description |
---|---|
static org.djunits.value.vdouble.scalar.Length.Rel |
GETOFFTHISLANENOW
Return value of suitability when a lane change is required right now.
|
static org.djunits.value.vdouble.scalar.Length.Rel |
NOLANECHANGENEEDED
Return value of suitability when no lane change is required withing the time horizon.
|
Constructor and Description |
---|
AbstractLaneBasedRouteNavigator() |
Modifier and Type | Method and Description |
---|---|
protected org.djunits.value.vdouble.scalar.Length.Rel |
computeSuitabilityWithLaneChanges(Lane startLane,
double remainingDistance,
Map<Lane,org.djunits.value.vdouble.scalar.Length.Rel> suitabilities,
int totalLanes,
org.opentrafficsim.core.network.LateralDirectionality direction,
org.opentrafficsim.core.gtu.GTUType gtuType)
Compute the suitability of a lane from which lane changes are required to get to the next point on the Route.
This method weighs the suitability of the nearest suitable lane by (m - n) / m where n is the number of lane changes required and m is the total number of lanes in the CrossSectionLink. |
protected int |
countCompatibleLanes(CrossSectionLink link,
org.opentrafficsim.core.gtu.GTUType gtuType)
Determine how many lanes on a CrossSectionLink are compatible with a particular GTU type.
TODO: this method should probably be moved into the CrossSectionLink class |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
suitability
public static final org.djunits.value.vdouble.scalar.Length.Rel NOLANECHANGENEEDED
public static final org.djunits.value.vdouble.scalar.Length.Rel GETOFFTHISLANENOW
protected final org.djunits.value.vdouble.scalar.Length.Rel computeSuitabilityWithLaneChanges(Lane startLane, double remainingDistance, Map<Lane,org.djunits.value.vdouble.scalar.Length.Rel> suitabilities, int totalLanes, org.opentrafficsim.core.network.LateralDirectionality direction, org.opentrafficsim.core.gtu.GTUType gtuType)
startLane
- Lane; the current lane of the GTUremainingDistance
- double; distance in m of GTU to first branchsuitabilities
- Map<Lane, Double>; the set of suitable lanes and their suitabilitytotalLanes
- integer; total number of lanes compatible with the GTU typedirection
- LateralDirectionality; the direction of the lane changes to attemptgtuType
- GTUType; the type of the GTUprotected final int countCompatibleLanes(CrossSectionLink link, org.opentrafficsim.core.gtu.GTUType gtuType)
link
- CrossSectionLink; the linkgtuType
- GTUType; the GTU typeCopyright © 2014–2015 Delft University of Technology. All rights reserved.