Class IncentiveKeep
java.lang.Object
org.opentrafficsim.road.gtu.lane.tactical.lmrs.IncentiveKeep
- All Implemented Interfaces:
Supplier<IncentiveKeep>,Stateless<IncentiveKeep>,Incentive,VoluntaryIncentive
public final class IncentiveKeep
extends Object
implements VoluntaryIncentive, Stateless<IncentiveKeep>
Determines lane change desire in order to adhere to keeping right or left. Such desire only exists if the route and speed
(considered within an anticipation distance) are not affected on the adjacent lane. The level of lane change desire is only
sufficient to overcome the lowest threshold for free lane changes.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ParameterTypeDoubleFree lane change threshold parameter type.static final IncentiveKeepSingleton instance. -
Method Summary
Modifier and TypeMethodDescriptiondetermineDesire(Parameters parameters, LanePerception perception, CarFollowingModel carFollowingModel, Desire mandatoryDesire, Desire voluntaryDesire) Determines level of lane change desire for a lane change incentive.get()toString()
-
Field Details
-
DFREE
Free lane change threshold parameter type. -
SINGLETON
Singleton instance.
-
-
Method Details
-
get
- Specified by:
getin interfaceStateless<IncentiveKeep>- Specified by:
getin interfaceSupplier<IncentiveKeep>
-
determineDesire
public Desire determineDesire(Parameters parameters, LanePerception perception, CarFollowingModel carFollowingModel, Desire mandatoryDesire, Desire voluntaryDesire) throws ParameterException, OperationalPlanException Description copied from interface:VoluntaryIncentiveDetermines level of lane change desire for a lane change incentive.- Specified by:
determineDesirein interfaceVoluntaryIncentive- Parameters:
parameters- parametersperception- perceptioncarFollowingModel- car-following modelmandatoryDesire- level of mandatory desire at current timevoluntaryDesire- level of voluntary desire at current time, of voluntary incentives calculated before- 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
-
toString
-