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 mandatory 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 MandatoryIncentive 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 * @return level of lane change desire for this incentive
26 * @throws ParameterException if a parameter is not given or out of bounds
27 * @throws OperationalPlanException in case of a perception exception
28 */
29 Desire determineDesire(TacticalContextEgo context,
30 ImmutableLinkedHashMap<Class<? extends MandatoryIncentive>, Desire> mandatoryDesire)
31 throws ParameterException, OperationalPlanException;
32
33 }