Class FactorAdaptation
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.mental.FactorAdaptation
- All Implemented Interfaces:
BehavioralAdaptation
- Direct Known Subclasses:
AdaptationHeadway,AdaptationLaneChangeDesire,AdaptationSpeedChannel
Super class for behavioral adaptations using a factor based task saturation. The factor is defined as max(1, 1 + beta * (ts -
tsCrit)), where beta is the behavioral adaptation scaling, ts is task saturation, and tsCrit is the critical task saturation.
The latter does not need to be specified, in which case a value of 1 is used.
Copyright (c) 2024-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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doublegetFactor(Parameters parameters, ParameterTypeDouble beta) Returns factor for behavioral adaptation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opentrafficsim.road.gtu.lane.perception.mental.BehavioralAdaptation
adapt
-
Constructor Details
-
FactorAdaptation
public FactorAdaptation()
-
-
Method Details
-
getFactor
protected double getFactor(Parameters parameters, ParameterTypeDouble beta) throws ParameterException Returns factor for behavioral adaptation. This is given by factor = max(1, 1 + beta * (ts - tsCrit)), where ts is the task saturation and tsCrit is the critical task saturation (assumed 1.0 if not given in the parameters). For behavioral adaptations that reduce something the effective factor can be used as 1.0 / factor.- Parameters:
parameters- parametersbeta- behavioral adaptation scaling parameter, assumed non-negative- Returns:
- factor for behavioral adaptation
- Throws:
ParameterException- if a used parameter (other than tsCrit) is not given
-