1 package org.opentrafficsim.road.gtu.tactical.util.lmrs;
2
3 import org.djutils.immutablecollections.ImmutableLinkedHashMap;
4 import org.opentrafficsim.base.parameters.ParameterException;
5 import org.opentrafficsim.core.gtu.plan.operational.OperationalPlanException;
6 import org.opentrafficsim.road.gtu.tactical.TacticalContextEgo;
7
8 /**
9 * Interface for voluntary incentives.
10 * <p>
11 * Copyright (c) 2013-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
12 * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
13 * </p>
14 * @author Alexander Verbraeck
15 * @author Peter Knoppers
16 * @author Wouter Schakel
17 */
18 public interface VoluntaryIncentive extends Incentive
19 {
20
21 /**
22 * Determines level of lane change desire for a lane change incentive.
23 * @param context tactical information such as parameters and car-following model
24 * @param mandatoryDesire level of mandatory desire at current time
25 * @param voluntaryDesire level of voluntary desire at current time, of voluntary incentives calculated before
26 * @return level of lane change desire for this incentive
27 * @throws ParameterException if a parameter is not given or out of bounds
28 * @throws OperationalPlanException in case of a perception exception
29 */
30 Desire determineDesire(TacticalContextEgo context, Desire mandatoryDesire,
31 ImmutableLinkedHashMap<Class<? extends VoluntaryIncentive>, Desire> voluntaryDesire)
32 throws ParameterException, OperationalPlanException;
33
34 }