1 package org.opentrafficsim.road.gtu.lane.tactical.lmrs;
2
3 import org.opentrafficsim.base.parameters.ParameterException;
4 import org.opentrafficsim.base.parameters.Parameters;
5 import org.opentrafficsim.core.gtu.Stateless;
6 import org.opentrafficsim.road.gtu.lane.perception.LanePerception;
7 import org.opentrafficsim.road.gtu.lane.tactical.following.CarFollowingModel;
8 import org.opentrafficsim.road.gtu.lane.tactical.util.lmrs.Desire;
9 import org.opentrafficsim.road.gtu.lane.tactical.util.lmrs.VoluntaryIncentive;
10
11 /**
12 * Determines lane change desire for speed, where the slowest vehicle in the current and adjacent lanes are assessed. The larger
13 * the speed differences between these vehicles, the larger the desire. Negative speed differences result in negative lane
14 * change desire. Only vehicles within a limited anticipation range are considered. The considered speed difference with an
15 * adjacent lane is reduced as the slowest leader in the adjacent lane is further ahead. The desire for speed is reduced as
16 * acceleration is larger, preventing over-assertive lane changes as acceleration out of congestion in the adjacent lane has
17 * progressed more.
18 * <p>
19 * Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
20 * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
21 * </p>
22 * @author <a href="https://github.com/wjschakel">Wouter Schakel</a>
23 */
24 public final class IncentiveSpeed implements VoluntaryIncentive, Stateless<IncentiveSpeed>
25 {
26
27 /** Singleton instance. */
28 public static final IncentiveSpeed SINGLETON = new IncentiveSpeed();
29
30 @Override
31 public IncentiveSpeed get()
32 {
33 return SINGLETON;
34 }
35
36 /**
37 * Constructor.
38 */
39 private IncentiveSpeed()
40 {
41 //
42 }
43
44 @Override
45 public Desire determineDesire(final Parameters parameters, final LanePerception perception,
46 final CarFollowingModel carFollowingModel, final Desire mandatoryDesire, final Desire voluntaryDesire)
47 throws ParameterException
48 {
49 // TODO: SpeedWithCourtesy now uses TrafficPerception, which embeds the courtesy part. How to do this?
50 return new Desire(0, 0);
51 }
52
53 @Override
54 public String toString()
55 {
56 return "IncentiveSpeed []";
57 }
58
59 }