Class LaneBasedGTUFollowingDirectedChangeTacticalPlanner
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlanner
-
- org.opentrafficsim.road.gtu.lane.tactical.LaneBasedGTUFollowingDirectedChangeTacticalPlanner
-
- All Implemented Interfaces:
Serializable
,TacticalPlanner<LaneBasedGTU,LanePerception>
,LaneBasedTacticalPlanner
public class LaneBasedGTUFollowingDirectedChangeTacticalPlanner extends AbstractLaneBasedTacticalPlanner
Lane-based tactical planner that implements car following behavior and rule-based lane change. This tactical planner retrieves the car following model from the strategical planner and will generate an operational plan for the GTU.A lane change occurs when:
- The route indicates that the current lane does not lead to the destination; main choices are the time when the GTU switches to the "right" lane, and what should happen when the split gets closer and the lane change has failed. Observations indicate that vehicles if necessary stop in their current lane until they can go to the desired lane. A lane drop is automatically part of this implementation, because the lane with a lane drop will not lead to the GTU's destination.
- The desired speed of the vehicle is a particular delta-speed higher than its predecessor, the headway to the predecessor in the current lane has exceeded a certain value, it is allowed to change to the target lane, the target lane lies on the GTU's route, and the gap in the target lane is acceptable (including the evaluation of the perceived speed of a following GTU in the target lane).
- The current lane is not the optimum lane given the traffic rules (for example, to keep right), the headway to the predecessor on the target lane is greater than a certain value, the speed of the predecessor on the target lane is greater than or equal to our speed, the target lane is on the route, it is allowed to switch to the target lane, and the gap at the target lane is acceptable (including the perceived speed of any vehicle in front or behind on the target lane).
This lane-based tactical planner makes decisions based on headway (GTU following model). It can ask the strategic planner for assistance on the route to take when the network splits.
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 25, 2015
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck, Peter Knoppers
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static ParameterTypeAcceleration
A
Acceleration parameter type.protected static ParameterTypeAcceleration
B
Comfortable deceleration parameter type.protected static ParameterTypeDouble
FSPEED
Speed limit adherance factor parameter type.protected static ParameterTypeDuration
T
Desired headway parameter type.-
Fields inherited from class org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlanner
DT, LOOKAHEAD, TACTICAL_PLANNER
-
-
Constructor Summary
Constructors Constructor Description LaneBasedGTUFollowingDirectedChangeTacticalPlanner(GTUFollowingModelOld carFollowingModel, LaneBasedGTU gtu)
Instantiated a tactical planner with just GTU following behavior and no lane changes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperationalPlan
generateOperationalPlan(Time startTime, DirectedPoint locationAtStartTime)
GTUFollowingModelOld
getCarFollowingModelOld()
Returns the car-following model.protected Duration
getDurationInLaneAfterLaneChange()
Get the duration to stay in a Lane after a lane change.boolean
isDestroyGtuOnFailure()
void
setDestroyGtuOnFailure(boolean destroyGtuOnFailure)
When a failure in planning occurs, should we destroy the GTU to avoid halting of the model?protected void
setDurationInLaneAfterLaneChange(Duration durationInLaneAfterLaneChange)
Set the duration to stay in a Lane after a lane change.void
setNoLaneChange(Duration noLaneChangeDuration)
Indicate that no lane change should happen for the indicated duration.String
toString()
-
Methods inherited from class org.opentrafficsim.road.gtu.lane.tactical.AbstractLaneBasedTacticalPlanner
buildLanePathInfo, buildLanePathInfo, buildLinkListForward, concatenateNull, connectsToPath, determineNextSplit, getCarFollowingModel, getGtu, getPerception, noLaneDrop, setCarFollowingModel
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opentrafficsim.road.gtu.lane.tactical.LaneBasedTacticalPlanner
chooseLaneAtSplit, okDistance
-
-
-
-
Field Detail
-
A
protected static final ParameterTypeAcceleration A
Acceleration parameter type.
-
T
protected static final ParameterTypeDuration T
Desired headway parameter type.
-
FSPEED
protected static final ParameterTypeDouble FSPEED
Speed limit adherance factor parameter type.
-
B
protected static final ParameterTypeAcceleration B
Comfortable deceleration parameter type.
-
-
Constructor Detail
-
LaneBasedGTUFollowingDirectedChangeTacticalPlanner
public LaneBasedGTUFollowingDirectedChangeTacticalPlanner(GTUFollowingModelOld carFollowingModel, LaneBasedGTU gtu)
Instantiated a tactical planner with just GTU following behavior and no lane changes.- Parameters:
carFollowingModel
- GTUFollowingModelOld; Car-following model.gtu
- LaneBasedGTU; GTU
-
-
Method Detail
-
getCarFollowingModelOld
public final GTUFollowingModelOld getCarFollowingModelOld()
Returns the car-following model.- Returns:
- The car-following model.
-
setNoLaneChange
public final void setNoLaneChange(Duration noLaneChangeDuration)
Indicate that no lane change should happen for the indicated duration.- Parameters:
noLaneChangeDuration
- Duration; the duration for which no lane change should happen.
-
generateOperationalPlan
public final OperationalPlan generateOperationalPlan(Time startTime, DirectedPoint locationAtStartTime) throws OperationalPlanException, NetworkException, GTUException, ParameterException
-
isDestroyGtuOnFailure
public final boolean isDestroyGtuOnFailure()
- Returns:
- destroyGtuOnFailure, indicating when a failure in planning occurs, whether we should destroy the GTU to avoid halting of the model
-
setDestroyGtuOnFailure
public final void setDestroyGtuOnFailure(boolean destroyGtuOnFailure)
When a failure in planning occurs, should we destroy the GTU to avoid halting of the model?- Parameters:
destroyGtuOnFailure
- boolean; set destroyGtuOnFailure to true or false
-
getDurationInLaneAfterLaneChange
protected final Duration getDurationInLaneAfterLaneChange()
Get the duration to stay in a Lane after a lane change.- Returns:
- Duration; durationInLaneAfterLaneChange
-
setDurationInLaneAfterLaneChange
protected final void setDurationInLaneAfterLaneChange(Duration durationInLaneAfterLaneChange) throws GTUException
Set the duration to stay in a Lane after a lane change.- Parameters:
durationInLaneAfterLaneChange
- Duration; set duration to stay in a Lane after a lane change- Throws:
GTUException
- when durationInLaneAfterLaneChange less than zero
-
-