public class LaneBasedCFLCTacticalPlanner extends AbstractLaneBasedTacticalPlanner
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Field and Description |
---|---|
static Length |
GETOFFTHISLANENOW
Return value of suitability when a lane change is required right now.
|
protected static ParameterTypeLength |
LOOKBACKOLD
Look back parameter type.
|
static Length |
NOLANECHANGENEEDED
Return value of suitability when no lane change is required within the time horizon.
|
DT, LOOKAHEAD, TACTICAL_PLANNER
Constructor and Description |
---|
LaneBasedCFLCTacticalPlanner(GTUFollowingModelOld carFollowingModel,
LaneChangeModel laneChangeModel,
LaneBasedGTU gtu)
Instantiated a tactical planner with GTU following and lane change behavior.
|
Modifier and Type | Method and Description |
---|---|
protected Length |
computeSuitabilityWithLaneChanges(Lane startLane,
double remainingDistance,
Map<Lane,Length> suitabilities,
int totalLanes,
LateralDirectionality direction,
GTUType gtuType,
GTUDirectionality drivingDirection)
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,
GTUType gtuType,
GTUDirectionality drivingDirection)
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 |
OperationalPlan |
generateOperationalPlan(Time startTime,
DirectedPoint locationAtStartTime) |
String |
toString() |
buildLanePathInfo, buildLanePathInfo, buildLinkListForward, concatenateNull, connectsToPath, determineNextSplit, getCarFollowingModel, getGtu, getPerception, noLaneDrop, setCarFollowingModel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
chooseLaneAtSplit, okDistance, rightMost
protected static final ParameterTypeLength LOOKBACKOLD
public static final Length NOLANECHANGENEEDED
public static final Length GETOFFTHISLANENOW
public LaneBasedCFLCTacticalPlanner(GTUFollowingModelOld carFollowingModel, LaneChangeModel laneChangeModel, LaneBasedGTU gtu)
carFollowingModel
- GTUFollowingModelOld; Car-following model.laneChangeModel
- LaneChangeModel; Lane change model.gtu
- LaneBasedGTU; GTUpublic final OperationalPlan generateOperationalPlan(Time startTime, DirectedPoint locationAtStartTime) throws OperationalPlanException, NetworkException, GTUException, ParameterException
protected final Length computeSuitabilityWithLaneChanges(Lane startLane, double remainingDistance, Map<Lane,Length> suitabilities, int totalLanes, LateralDirectionality direction, GTUType gtuType, GTUDirectionality drivingDirection)
startLane
- Lane; the current lane of the GTUremainingDistance
- double; distance in m of GTU to first branchsuitabilities
- Map<Lane, Length>; the set of suitable lanes and their suitabilitytotalLanes
- int; total number of lanes compatible with the GTU typedirection
- LateralDirectionality; the direction of the lane changes to attemptgtuType
- GTUType; the type of the GTUdrivingDirection
- GTUDirectionality; the driving direction of the GTUprotected final int countCompatibleLanes(CrossSectionLink link, GTUType gtuType, GTUDirectionality drivingDirection)
link
- CrossSectionLink; the linkgtuType
- GTUType; the GTU typedrivingDirection
- GTUDirectionality; the driving direction on the linkCopyright © 2014–2019 Delft University of Technology. All rights reserved.