26 #ifndef AGENT_MODEL_INTERFACE_H 27 #define AGENT_MODEL_INTERFACE_H 32 static const unsigned int NOT = 32;
33 static const unsigned int NOL = 32;
34 static const unsigned int NOS = 32;
35 static const unsigned int NOH = 32;
36 static const unsigned int NORP = 2;
37 static const unsigned int NOCP = 3;
38 static const unsigned int NOA = 32;
40 static const unsigned int NOTL = 32;
44 enum Accessibility { ACC_NOT_SET, ACC_ACCESSIBLE, ACC_NOT_ALLOWED, ACC_NOT_ACCESSIBLE };
47 enum DrivingDirection { DD_FORWARDS, DD_BACKWARDS, DD_BOTH, DD_NONE, DD_NOT_SET };
50 enum SignalType { SIGNAL_NOT_SET, SIGNAL_STOP, SIGNAL_TLS, SIGNAL_SPEED_LIMIT, SIGNAL_YIELD, SIGNAL_PRIORITY };
53 enum TrafficLightColor { COLOR_RED, COLOR_YELLOW, COLOR_GREEN };
56 enum TrafficLightIcon { ICON_OTHER, ICON_NONE, ICON_ARROW_STRAIGHT_AHEAD, ICON_ARROW_LEFT, ICON_ARROW_RIGHT };
59 enum TargetPriority { TARGET_ON_PRIORITY_LANE, TARGET_ON_GIVE_WAY_LANE, TARGET_PRIORITY_NOT_SET };
62 enum TargetPosition { TARGET_NOT_RELEVANT, TARGET_ON_PATH, TARGET_ON_INTERSECTION, TARGET_ON_OPPOSITE, TARGET_ON_RIGHT, TARGET_ON_LEFT };
65 enum Maneuver { STRAIGHT, TURN_LEFT, TURN_RIGHT };
74 Position(
double pX,
double pY) :
x(pX),
y(pY) {}
76 bool operator==(
const Position& other)
78 return x == other.
x && y == other.
y;
127 double egoLaneWidth[NOH];
128 double rightLaneOffset[NOH];
129 double leftLaneOffset[NOH];
466 #endif // AGENT_MODEL_INTERFACE_H double dPsi
Desired yaw rate. (in rad/s)
Definition: Interface.h:247
double time
Time to perform a lane change.
Definition: Interface.h:323
Parameters * getParameters()
Definition: Interface.h:448
Dimensions size
Size of the ego vehicle.
Definition: Interface.h:295
Definition: Interface.h:177
double velocity
The absolute velocity of the target to be followed. (in m/s)
Definition: Interface.h:160
double a
Desired acceleration. (in m/s^2)
Definition: Interface.h:246
DecisionStopping signal
The decision information caused by a signal.
Definition: Interface.h:204
double thwMax
The time headway the driver shall earliest react to follow (in s)
Definition: Interface.h:290
Definition: Interface.h:156
State * getState()
Definition: Interface.h:414
Accessibility access
The accessibility of the lane from the ego lane. - true if type driving.
Definition: Interface.h:140
int lane
Lane ID of the actual lane of the target relative to driver's lane.
Definition: Interface.h:185
const Memory * getMemory() const
Definition: Interface.h:439
Definition: Interface.h:232
double factor
The influence of the target.
Definition: Interface.h:157
double d
Lateral offset of the target in its corresponding lane. (in m)
Definition: Interface.h:183
double a
The acceleration of the vehicle in x direction. (in m/s^2)
Definition: Interface.h:108
Definition: Interface.h:193
double offset
The offset to be reached.
Definition: Interface.h:264
bool standing
A flag to define whether the driver wants to keep the vehicle in standstill.
Definition: Interface.h:228
SignalType type
Type of the signal.
Definition: Interface.h:167
Conscious conscious
Conscious states.
Definition: Interface.h:339
TrafficLightIcon icon
Icon/Shape of the traffic light.
Definition: Interface.h:170
double offset
The lateral offset from the reference line to be controlled to. (in m)
Definition: Interface.h:150
Definition: Interface.h:319
Definition: Interface.h:134
double standingTime
The time, the driver shall stand at the stop.
Definition: Interface.h:196
Definition: Interface.h:287
double simulationTime
The actual simulation time.
Definition: Interface.h:337
ParameterFollowing follow
Parameters for follow components.
Definition: Interface.h:358
double position
The absolute longitudinal position of the stop.
Definition: Interface.h:195
double bSafe
A safe deceleration.
Definition: Interface.h:320
int decision
The decisions to which lane the driver wants to change to.
Definition: Interface.h:270
double s
Absolute travelled distance since the last reset. (in m)
Definition: Interface.h:255
double startTime
The start time of the lateral motion.
Definition: Interface.h:261
const Parameters * getParameters() const
Definition: Interface.h:456
Definition: Interface.h:226
bool sign_is_in_use
indicates that subsign is in use (all paired TLS signals are out of service)
Definition: Interface.h:172
double ayMax
Maximum lateral acceleration (in m/s^2)
Definition: Interface.h:282
double time
The time to reach the lateral offset.
Definition: Interface.h:260
Definition: Interface.h:106
Maneuver maneuver
The general classification of the vehicle's path during the scenario.
Definition: Interface.h:115
double a
Absolute acceleration of the target. (in m/s^2)
Definition: Interface.h:182
double pedalDuringStanding
The pedal value, the driver controls during standing.
Definition: Interface.h:315
double vComfort
Maximum personal comfortable velocity (in m/s)
Definition: Interface.h:283
Definition: Interface.h:100
Definition: Interface.h:149
const Input * getInput() const
Definition: Interface.h:405
double steering
Desired steering angle.
Definition: Interface.h:250
double y
The y ordinate. (in m)
Definition: Interface.h:87
double v
The velocity of the vehicle in x direction. (in m/s)
Definition: Interface.h:107
Memory * getMemory()
Definition: Interface.h:431
double local
The local velocity. (in m/s)
Definition: Interface.h:212
double x
The x ordinate. (in m)
Definition: Interface.h:71
double velocity
The local maximum velocity. (in m/s)
Definition: Interface.h:347
bool priority
A flag to define if the driver drives on a priority lane.
Definition: Interface.h:221
ConsciousLateral lateral
A class to store the internal state for the conscious/lateral component.
Definition: Interface.h:241
unsigned int id
Unique ID of the target. id=0 indicates that the target is not defined in the array position...
Definition: Interface.h:178
double route
Distance on the lane until the lane splits from the current route. (in m) -1 if not set...
Definition: Interface.h:137
double steering
The actual steering value [-1..1]. Negative values define left turns.
Definition: Interface.h:114
ParameterStopping stop
Parameters for stop components.
Definition: Interface.h:356
Definition: Interface.h:353
Subconscious subconscious
Subconscious states.
Definition: Interface.h:340
double dy
The derivative of the y component. (in m/s)
Definition: Interface.h:89
double x
The x ordinate. (in m)
Definition: Interface.h:86
double y
The y ordinate. (in m)
Definition: Interface.h:72
double closed
Distance on the lane until the lane is closed. (in m) -1 if not set.
Definition: Interface.h:138
Definition: Interface.h:245
Position xy
Relative position of the target relative to the driver position and heading.
Definition: Interface.h:180
double distance
The distance to the target to be followed. (in m)
Definition: Interface.h:159
double b
The maximum deceleration (in m/s^2)
Definition: Interface.h:280
double dsMax
Maximum distance to react for stopping.
Definition: Interface.h:311
double dsIntersection
Distance along s to the intersection (if target is approaching an intersection)
Definition: Interface.h:187
The agent model interface. The class implements the data structure of the agent model, consisting of input, state, memory and parameters.
Definition: Interface.h:367
TargetPriority priority
Priority of the target's lane. Used to determine right of way.
Definition: Interface.h:188
double dx
The derivative of the x component. (in m/s)
Definition: Interface.h:88
Definition: Interface.h:164
Definition: Interface.h:200
double psi
The yaw angle of the vehicle which is the angle between the vehicle x axis and heading of the current...
Definition: Interface.h:109
double dsIntersection
Distance along s to the intersection (if ego is approaching an intersection)
Definition: Interface.h:116
double prediction
The prediction mean velocity. (in m/s)
Definition: Interface.h:213
bool give_way
A flag to define if the driver drives on a give way lane.
Definition: Interface.h:222
Definition: Interface.h:121
Definition: Interface.h:336
double length
The length of an object. (in m)
Definition: Interface.h:102
int id
Unique ID of the signal. The id is not just an identifier but also specifies the position of the lane...
Definition: Interface.h:135
int switchLane
The lane to be switched to.
Definition: Interface.h:269
const State * getState() const
Definition: Interface.h:422
Definition: Interface.h:254
ParameterVelocityControl velocity
Parameters for velocity components.
Definition: Interface.h:357
DecisionStopping lane
The decision information caused by a lane change.
Definition: Interface.h:207
Definition: Interface.h:300
double time
The relative time at which the value applies. (in s)
Definition: Interface.h:95
TargetPosition position
Area in junction of target. Used to determine right of way.
Definition: Interface.h:189
DrivingDirection dir
The driving direction of the lane related to the ego direction.
Definition: Interface.h:139
MemoryLaneChange laneChange
The memory for lane change components.
Definition: Interface.h:349
double value
The value of the point.
Definition: Interface.h:96
double destinationPoint
s coordinate of destination point (in m) -1 if not set
Definition: Interface.h:130
int lane_change
Flag if lane change is.
Definition: Interface.h:141
Definition: Interface.h:259
MemoryLateral lateral
The memory for lateral control components.
Definition: Interface.h:348
double factor
A factor to describe the influence of the point.
Definition: Interface.h:151
double pedal
Desired pedal value.
Definition: Interface.h:249
double distance
The distance at which the value applies. (in m)
Definition: Interface.h:94
Definition: DistanceTimeInterval.h:33
double deltaPred
The power for the predictive speed reaction.
Definition: Interface.h:278
double s
The distance, the vehicle travelled since the last reset. (in m)
Definition: Interface.h:111
double ds
Distance to the sign from the current position along the reference line. (in m)
Definition: Interface.h:166
ConsciousStop stop
A class to store the internal state for the conscious/stop component.
Definition: Interface.h:239
double dsGap
The gap between vehicle front and stop sign during a stop.
Definition: Interface.h:309
double psi
Relative yaw angle of the target vehicle to the ego yaw angle. (in rad)
Definition: Interface.h:184
double vScale
A scale factor to scale up or down the speed limit.
Definition: Interface.h:281
Definition: Interface.h:237
Input * getInput()
Definition: Interface.h:397
double startTime
The start time of the lane change. (in s)
Definition: Interface.h:271
double pedal
The actual pedal value [-1..1]. Negative values define a brake pedal.
Definition: Interface.h:113
Definition: Interface.h:85
Definition: Interface.h:70
Definition: Interface.h:308
double vStopped
The velocity at which the driver expects the vehicle to have stopped.
Definition: Interface.h:314
bool subsignal
if true sign is subsignal to TLS and only valid in certain situations
Definition: Interface.h:171
double width
Width of the lane (in m) -1 if not set.
Definition: Interface.h:136
double dsMax
The reference distance at which the driver decides to stop (in m)
Definition: Interface.h:219
Definition: Interface.h:217
double timeHeadway
The time headway the driver tries to reach during following (in s)
Definition: Interface.h:288
double startDistance
The start distance of the lateral motion.
Definition: Interface.h:263
unsigned int id
The ID of the stop.
Definition: Interface.h:194
double thwMax
The maximum time headway the driver starts to react (in s)
Definition: Interface.h:276
Definition: Interface.h:268
double d
The lateral offset of the vehicle to the current reference line of the track (e.g. lane center). (in m)
Definition: Interface.h:112
Dimensions size
Width and length of the target.
Definition: Interface.h:186
DecisionStopping target
The decision information caused by a target.
Definition: Interface.h:205
double TMax
Maximum time headway to react for stopping.
Definition: Interface.h:310
double ds
Distance along s to the target center point from the ego driver position. (in m)
Definition: Interface.h:179
double ds
The actual distance to the stop point. (in m)
Definition: Interface.h:218
ConsciousFollow follow
A class to store the internal state for the conscious/follow component.
Definition: Interface.h:240
Decisions decisions
Decision states.
Definition: Interface.h:338
double v
Absolute velocity of the target. (in m/s)
Definition: Interface.h:181
Position pos
The driver's position referenced to the center of the vehicle box defined by size ...
Definition: Interface.h:296
Definition: Interface.h:294
ParameterVehicle vehicle
Parameters for velocity components.
Definition: Interface.h:354
MemoryVehicle vehicle
The memory for vehicle states.
Definition: Interface.h:346
unsigned int id
Unique ID of the signal.
Definition: Interface.h:165
double delta
The power for the local speed reaction (see delta in IDM: https://en.wikipedia.org/wiki/Intelligent_d...
Definition: Interface.h:277
double kappa
Desired curvature. (in 1/m)
Definition: Interface.h:248
int laneChangeInt
The intention to perform a lane change. The sign defines the direction. The value defines the number ...
Definition: Interface.h:201
double T
A time headway to parameterize the dynamics of the approaching.
Definition: Interface.h:312
Definition: Interface.h:93
TrafficLightColor color
Color of the light bulb.
Definition: Interface.h:169
ParameterSteering steering
Parameters for steering components.
Definition: Interface.h:359
int laneChangeDec
The decision to perform a lane change. The sign defines the direction. The value defines the number o...
Definition: Interface.h:202
double tSign
The time the driver stop at a stop sign.
Definition: Interface.h:313
Point lateral
The decision to move to a defined lateral offset within a defined distance or time (mode=0: distance...
Definition: Interface.h:203
double aThreshold
Acceleration threshold.
Definition: Interface.h:321
double distance
The distance to reach the lateral offset.
Definition: Interface.h:262
double width
The width of an object. (in m)
Definition: Interface.h:101
Definition: Interface.h:211
double a
The maximum acceleration (in m/s^2)
Definition: Interface.h:279
double lane
Lane ID of the actual lane of the target relative to driver's lane.
Definition: Interface.h:158
double politenessFactor
Politeness factor.
Definition: Interface.h:322
ConsciousVelocity velocity
A class to store the internal state for the conscious/velocity component.
Definition: Interface.h:238
bool standing
A flag to define if the driver has stopped for the desired stop.
Definition: Interface.h:220
Definition: Interface.h:345
DecisionStopping destination
The decision information caused by a destination.
Definition: Interface.h:206
double value
Value of the signal.
Definition: Interface.h:168
Definition: Interface.h:275
ParameterLaneChange laneChange
Parameters for lane change components.
Definition: Interface.h:355
double dsStopped
The distance to the controlled target when stopped.
Definition: Interface.h:289
double dPsi
The time derivative of the yaw angle (yaw rate). (in rad/s)
Definition: Interface.h:110