Class IncentiveRoute
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.tactical.lmrs.IncentiveRoute
-
- All Implemented Interfaces:
Incentive
,MandatoryIncentive
public class IncentiveRoute extends Object implements MandatoryIncentive
Determines desire by assessing the number of required lane change to be performed and the distance within which these have to be performed. Desire starts to increase from 0 linearly over a distance of x0 per required lane change, or per v*t0 per required lane change. For v>x0/t0 this gives that remaining time is critical, while for v<x0/t0 remaining space is critical. The desire is set towards the adjacent lane with a better situation. Negative desire towards the other lane, the extent of which pertains to the other adjacent lane, is also set.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version Apr 13, 2016
- Author:
- Wouter Schakel
-
-
Field Summary
Fields Modifier and Type Field Description protected static ParameterTypeLength
LOOKAHEAD
Look ahead parameter type.static ParameterTypeDuration
T0
Look-ahead time for mandatory lane changes parameter type.
-
Constructor Summary
Constructors Constructor Description IncentiveRoute()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Desire
determineDesire(Parameters parameters, LanePerception perception, CarFollowingModel carFollowingModel, Desire mandatoryDesire)
Determines level of lane change desire for a lane change incentive.static double
getDesireToLeave(Parameters params, Length x, int n, Speed v)
Calculates desire to leave a lane for a single infrastructure info.String
toString()
-
-
-
Field Detail
-
LOOKAHEAD
protected static final ParameterTypeLength LOOKAHEAD
Look ahead parameter type.
-
T0
public static final ParameterTypeDuration T0
Look-ahead time for mandatory lane changes parameter type.
-
-
Method Detail
-
determineDesire
public final Desire determineDesire(Parameters parameters, LanePerception perception, CarFollowingModel carFollowingModel, Desire mandatoryDesire) throws ParameterException, OperationalPlanException
Determines level of lane change desire for a lane change incentive.- Specified by:
determineDesire
in interfaceMandatoryIncentive
- Parameters:
parameters
- Parameters; parametersperception
- LanePerception; perceptioncarFollowingModel
- CarFollowingModel; car-following modelmandatoryDesire
- Desire; level of mandatory desire at current time- Returns:
- level of lane change desire for this incentive
- Throws:
ParameterException
- if a parameter is not given or out of boundsOperationalPlanException
- in case of a perception exception
-
getDesireToLeave
public static double getDesireToLeave(Parameters params, Length x, int n, Speed v) throws ParameterException
Calculates desire to leave a lane for a single infrastructure info.- Parameters:
params
- Parameters; parametersx
- Length; remaining distance for lane changesn
- int; number of required lane changesv
- Speed; current speed- Returns:
- desire to leave a lane for a single infrastructure info
- Throws:
ParameterException
- in case of a parameter exception
-
-