1 package org.opentrafficsim.road.gtu.tactical;
2
3 import java.util.Optional;
4
5 import org.djunits.value.vdouble.scalar.Acceleration;
6 import org.djunits.value.vdouble.scalar.Length;
7 import org.djunits.value.vdouble.scalar.Speed;
8 import org.djutils.base.Identifiable;
9 import org.opentrafficsim.base.parameters.ParameterException;
10 import org.opentrafficsim.base.parameters.Parameters;
11 import org.opentrafficsim.core.gtu.GtuType;
12 import org.opentrafficsim.core.network.LateralDirectionality;
13 import org.opentrafficsim.core.network.route.Route;
14 import org.opentrafficsim.road.gtu.tactical.following.CarFollowingModel;
15 import org.opentrafficsim.road.network.speed.SpeedLimits;
16
17 /**
18 * Provides bundled and easy-access information that tactical models and their components need regarding the ego-vehicle or a
19 * perceived GTU.
20 * <p>
21 * Copyright (c) 2026-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
22 * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
23 * </p>
24 * @author Wouter Schakel
25 */
26 public interface TacticalContext extends Identifiable
27 {
28
29 /**
30 * Returns the GTU type.
31 * @return GTU type
32 */
33 GtuType getGtuType();
34
35 /**
36 * Returns the parameters.
37 * @return parameters
38 */
39 Parameters getParameters();
40
41 /**
42 * Returns the car-following model.
43 * @return car-following model
44 */
45 CarFollowingModel getCarFollowingModel();
46
47 /**
48 * Returns the speed limits at the current location.
49 * @return speed limits
50 */
51 SpeedLimits getSpeedLimits();
52
53 /**
54 * Returns the desired speed from the car-following model.
55 * @return desired speed from the car-following model
56 * @throws ParameterException if a parameter is not present
57 */
58 Speed getDesiredSpeed() throws ParameterException;
59
60 /**
61 * Returns the route.
62 * @return route
63 */
64 Optional<Route> getRoute();
65
66 /**
67 * Returns the lane change direction.
68 * @return lane change direction
69 */
70 LateralDirectionality getLaneChangeDirection();
71
72 /**
73 * Return ego length.
74 * @return ego length
75 */
76 Length getLength();
77
78 /**
79 * Return ego width.
80 * @return ego width
81 */
82 Length getWidth();
83
84 /**
85 * Return ego speed.
86 * @return ego speed
87 */
88 Speed getSpeed();
89
90 /**
91 * Returns the maximum seed.
92 * @return maximum speed
93 */
94 Speed getMaximumSpeed();
95
96 /**
97 * Return ego acceleration.
98 * @return ego acceleration
99 */
100 Acceleration getAcceleration();
101
102 }