Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
CC_Const.h
Go to the documentation of this file.
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4
// This program and the accompanying materials are made available under the
5
// terms of the Eclipse Public License 2.0 which is available at
6
// https://www.eclipse.org/legal/epl-2.0/
7
// This Source Code may also be made available under the following Secondary
8
// Licenses when the conditions for such availability set forth in the Eclipse
9
// Public License 2.0 are satisfied: GNU General Public License, version 2
10
// or later which is available at
11
// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
/****************************************************************************/
18
// File defining constants, structs, and enums for cruise controllers
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include <string>
24
#include <sstream>
25
26
namespace
Plexe
{
27
31
enum
PLATOONING_LANE_CHANGE_ACTION
{
32
DRIVER_CHOICE
= 0,
//the platooning management is not active, so just let the driver choose the lane
33
STAY_IN_CURRENT_LANE
= 3,
//the car is part of a platoon, so it has to stay on the dedicated platooning lane
34
MOVE_TO_FIXED_LANE
= 4
//move the car to a specific lane
35
};
36
40
#define FIX_LC 0b1000000000
41
#define DEFAULT_NOTRACI_LC 0b1010101010
42
48
enum
ACTIVE_CONTROLLER
49
{
DRIVER
= 0,
ACC
= 1,
CACC
= 2,
FAKED_CACC
= 3,
PLOEG
= 4,
CONSENSUS
= 5,
FLATBED
= 6};
50
55
struct
CCDataHeader
{
56
int
type
;
//type of message. indicates what comes after the header
57
int
size
;
//size of message. indicates how many bytes comes after the header
58
};
59
63
struct
VEHICLE_DATA
{
64
int
index
;
//position in the platoon (0 = first)
65
double
speed
;
//vehicle speed
66
double
acceleration
;
//vehicle acceleration
67
double
positionX
;
//position of the vehicle in the simulation
68
double
positionY
;
//position of the vehicle in the simulation
69
double
time
;
//time at which such information was read from vehicle's sensors
70
double
length
;
//vehicle length
71
double
u
;
//controller acceleration
72
double
speedX
;
//vehicle speed on the X axis
73
double
speedY
;
//vehicle speed on the Y axis
74
double
angle
;
//vehicle angle in radians
75
};
76
77
#define MAX_N_CARS 8
78
79
#define CC_ENGINE_MODEL_FOLM 0x00
//first order lag model
80
#define CC_ENGINE_MODEL_REALISTIC 0x01
//the detailed and realistic engine model
81
82
//parameter names for engine models
83
#define FOLM_PAR_TAU "tau_s"
84
#define FOLM_PAR_DT "dt_s"
85
86
#define ENGINE_PAR_VEHICLE "vehicle"
87
#define ENGINE_PAR_XMLFILE "xmlFile"
88
#define ENGINE_PAR_DT "dt_s"
89
90
#define CC_PAR_VEHICLE_DATA "ccvd"
//data about a vehicle, like position, speed, acceleration, etc
91
#define CC_PAR_VEHICLE_POSITION "ccvp"
//position of the vehicle in the platoon (0 based)
92
#define CC_PAR_PLATOON_SIZE "ccps"
//number of cars in the platoon
93
94
//set of controller-related constants
95
#define CC_PAR_CACC_XI "ccxi"
//xi
96
#define CC_PAR_CACC_OMEGA_N "ccon"
//omega_n
97
#define CC_PAR_CACC_C1 "ccc1"
//C1
98
#define CC_PAR_ENGINE_TAU "cctau"
//engine time constant
99
100
#define CC_PAR_UMIN "ccumin"
//lower saturation for u
101
#define CC_PAR_UMAX "ccumax"
//upper saturation for u
102
103
#define CC_PAR_PLOEG_H "ccph"
//time headway of ploeg's CACC
104
#define CC_PAR_PLOEG_KP "ccpkp"
//kp parameter of ploeg's CACC
105
#define CC_PAR_PLOEG_KD "ccpkd"
//kd parameter of ploeg's CACC
106
107
#define CC_PAR_FLATBED_KA "ccfka"
//ka parameter of flatbed CACC
108
#define CC_PAR_FLATBED_KV "ccfkv"
//kv parameter of flatbed CACC
109
#define CC_PAR_FLATBED_KP "ccfkp"
//kp parameter of flatbed CACC
110
#define CC_PAR_FLATBED_H "ccfh"
//h parameter of flatbed CACC
111
#define CC_PAR_FLATBED_D "ccfd"
//distance parameter of flatbed CACC
112
113
#define CC_PAR_VEHICLE_ENGINE_MODEL "ccem"
//set the engine model for a vehicle
114
115
#define CC_PAR_VEHICLE_MODEL "ccvm"
//set the vehicle model, i.e., engine characteristics
116
#define CC_PAR_VEHICLES_FILE "ccvf"
//set the location of the vehicle parameters file
117
118
// set CACC constant spacing
119
#define PAR_CACC_SPACING "ccsp"
120
121
// get ACC computed acceleration when faked CACC controller is enabled
122
#define PAR_ACC_ACCELERATION "ccacc"
123
124
// determine whether a vehicle has crashed or not
125
#define PAR_CRASHED "cccr"
126
127
// set a fixed acceleration to a vehicle controlled by CC/ACC/CACC
128
#define PAR_FIXED_ACCELERATION "ccfa"
129
130
// get vehicle speed and acceleration, needed for example by the platoon leader (get: vehicle)
131
#define PAR_SPEED_AND_ACCELERATION "ccsa"
132
133
// set speed and acceleration of the platoon leader
134
#define PAR_LEADER_SPEED_AND_ACCELERATION "cclsa"
135
136
// set whether CACCs should use real or controller acceleration
137
#define PAR_USE_CONTROLLER_ACCELERATION "ccca"
138
139
// get lane count for the street the vehicle is currently traveling
140
#define PAR_LANES_COUNT "cclc"
141
142
// set the cruise control desired speed
143
#define PAR_CC_DESIRED_SPEED "ccds"
144
145
// set the currently active vehicle controller which can be either the driver, or the ACC or the CACC
146
#define PAR_ACTIVE_CONTROLLER "ccac"
147
148
// get radar data from the car
149
#define PAR_RADAR_DATA "ccrd"
150
151
// communicate with the cruise control to give him fake indications. this can be useful when you want
152
// to advance a vehicle to a certain position, for example, for joining a platoon. clearly the ACC
153
// must always take into consideration both fake and real data
154
#define PAR_LEADER_FAKE_DATA "cclfd"
155
#define PAR_FRONT_FAKE_DATA "ccffd"
156
157
// get the distance that a car has to travel until it reaches the end of its route
158
#define PAR_DISTANCE_TO_END "ccdte"
159
160
// get the distance from the beginning of the route
161
#define PAR_DISTANCE_FROM_BEGIN "ccdfb"
162
163
// set speed and acceleration of preceding vehicle
164
#define PAR_PRECEDING_SPEED_AND_ACCELERATION "ccpsa"
165
166
// set ACC headway time
167
#define PAR_ACC_HEADWAY_TIME "ccaht"
168
169
// return engine information (for the realistic engine model)
170
#define PAR_ENGINE_DATA "cced"
171
172
// enabling/disabling auto feeding
173
#define PAR_USE_AUTO_FEEDING "ccaf"
174
175
// enabling/disabling data prediction
176
#define PAR_USE_PREDICTION "ccup"
177
178
// add/remove members from own platoon
179
#define PAR_ADD_MEMBER "ccam"
180
#define PAR_REMOVE_MEMBER "ccrm"
181
182
// let the leader automatically change lane for the whole platoon if there is a speed advantage
183
#define PAR_ENABLE_AUTO_LANE_CHANGE "ccalc"
184
185
// perform a lane change for a whole platoon
186
#define PAR_PLATOON_FIXED_LANE "ccpfl"
187
188
}
Plexe
Definition
CC_Const.h:26
Plexe::PLATOONING_LANE_CHANGE_ACTION
PLATOONING_LANE_CHANGE_ACTION
action that might be requested by the platooning management
Definition
CC_Const.h:31
Plexe::DRIVER_CHOICE
@ DRIVER_CHOICE
Definition
CC_Const.h:32
Plexe::STAY_IN_CURRENT_LANE
@ STAY_IN_CURRENT_LANE
Definition
CC_Const.h:33
Plexe::MOVE_TO_FIXED_LANE
@ MOVE_TO_FIXED_LANE
Definition
CC_Const.h:34
Plexe::ACTIVE_CONTROLLER
ACTIVE_CONTROLLER
Determines the currently active controller, i.e., ACC, CACC, or the driver. In future we might need t...
Definition
CC_Const.h:49
Plexe::DRIVER
@ DRIVER
Definition
CC_Const.h:49
Plexe::CONSENSUS
@ CONSENSUS
Definition
CC_Const.h:49
Plexe::FAKED_CACC
@ FAKED_CACC
Definition
CC_Const.h:49
Plexe::CACC
@ CACC
Definition
CC_Const.h:49
Plexe::PLOEG
@ PLOEG
Definition
CC_Const.h:49
Plexe::ACC
@ ACC
Definition
CC_Const.h:49
Plexe::FLATBED
@ FLATBED
Definition
CC_Const.h:49
Plexe::CCDataHeader
struct used as header for generic data passing to this model through traci
Definition
CC_Const.h:55
Plexe::CCDataHeader::size
int size
Definition
CC_Const.h:57
Plexe::CCDataHeader::type
int type
Definition
CC_Const.h:56
Plexe::VEHICLE_DATA
Definition
CC_Const.h:63
Plexe::VEHICLE_DATA::positionX
double positionX
Definition
CC_Const.h:67
Plexe::VEHICLE_DATA::time
double time
Definition
CC_Const.h:69
Plexe::VEHICLE_DATA::speed
double speed
Definition
CC_Const.h:65
Plexe::VEHICLE_DATA::speedY
double speedY
Definition
CC_Const.h:73
Plexe::VEHICLE_DATA::index
int index
Definition
CC_Const.h:64
Plexe::VEHICLE_DATA::length
double length
Definition
CC_Const.h:70
Plexe::VEHICLE_DATA::acceleration
double acceleration
Definition
CC_Const.h:66
Plexe::VEHICLE_DATA::u
double u
Definition
CC_Const.h:71
Plexe::VEHICLE_DATA::speedX
double speedX
Definition
CC_Const.h:72
Plexe::VEHICLE_DATA::angle
double angle
Definition
CC_Const.h:74
Plexe::VEHICLE_DATA::positionY
double positionY
Definition
CC_Const.h:68
src
microsim
cfmodels
CC_Const.h
Generated on Sat Nov 9 2024 00:10:24 for Eclipse SUMO - Simulation of Urban MObility by
1.9.8