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