Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
CC_VehicleVariables.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/****************************************************************************/
19#pragma once
20#include <config.h>
21
22#include "CC_Const.h"
24#include <utils/geom/Position.h>
25#include <string.h>
26#include <string>
27#include <map>
28
34public:
35
61
65 const static int defaultL[MAX_N_CARS][MAX_N_CARS];
66
70 const static double defaultK[MAX_N_CARS][MAX_N_CARS];
71
75 const static double defaultB[];
76
80 const static double defaultH[];
81
84
87
89 double frontSpeed;
104
110 std::string leaderVehicleId;
114 std::string frontVehicleId;
118
121 double accLambda;
122
143
144 //enable/disable the use of a constant, user defined acceleration instead of the one computed by the controller
146 //fixed acceleration to use
148
149 //car collided in the last timestep
151
154 double ccKp;
157
160
166 double b[MAX_N_CARS];
168 double h[MAX_N_CARS];
169
179 int nCars;
180
182 double caccXi;
184 double caccC1;
188 double engineTau;
190 double uMin, uMax;
191 double ploegH;
192 double ploegKp;
193 double ploegKd;
194 double flatbedKa;
195 double flatbedKv;
196 double flatbedKp;
197 double flatbedD;
198 double flatbedH;
199
204
207
209 std::map<int, std::string> members;
210
213
216
219
222
225
226};
#define MAX_N_CARS
Definition CC_Const.h:77
long long int SUMOTime
Definition GUI.h:36
int nInitialized
count of initialized vehicles
int platoonFixedLane
whole platoon lane change (not automatic). -1 indicates no need to change lane (mechanism disabled)
bool autoFeed
determines whether CACC should automatically fetch data about other vehicles
bool commitToLaneChange
when followers asks whether to actually change lane or not, what should the leader tell them?...
struct FAKE_CONTROLLER_DATA fakeData
fake controller data.
MSVehicle * frontVehicle
front sumo id, used for auto feeding
double accHeadwayTime
headway time for ACC
bool initialized[MAX_N_CARS]
tells whether data about a certain vehicle has been initialized
double frontSpeed
current front vehicle speed
double K[MAX_N_CARS][MAX_N_CARS]
K matrix.
struct Plexe::VEHICLE_DATA vehicles[MAX_N_CARS]
data about vehicles in the platoon
int position
my position within the platoon (0 = first car)
double frontAcceleration
current front vehicle acceleration (used by CACC)
bool frontInitialized
@did we receive at least one packet?
double leaderDataReadTime
when leader data has been readed from GPS
bool usePrediction
enable/disable data prediction (interpolation) for missing data
std::map< int, std::string > members
list of members belonging to my platoon
double leaderControllerAcceleration
platoon's leader controller acceleration (used by CACC)
double controllerAcceleration
acceleration as computed by the controller, to be sent to other vehicles
int L[MAX_N_CARS][MAX_N_CARS]
L matrix.
double caccXi
controller related parameters
static const double defaultH[]
double frontControllerAcceleration
front vehicle controller acceleration (used by CACC)
static const double defaultB[]
double b[MAX_N_CARS]
vector of damping ratios b
GenericEngineModel * engine
engine model employed by this car
int nCars
number of cars in the platoon
double leaderSpeed
platoon's leader speed (used by CACC)
double leaderAngle
platoon's leader angle in radians
enum Plexe::ACTIVE_CONTROLLER activeController
currently active controller
bool leaderInitialized
@did we receive at least one packet?
double caccSpacing
fixed spacing for CACC
Position frontVelocity
front vehicle velocity vector
double uMin
limits for u
double ccDesiredSpeed
CC desired speed.
double h[MAX_N_CARS]
vector of time headways h
std::string frontVehicleId
sumo id of the front vehicle
Position frontPosition
current front vehicle position
bool isLeader
whether this vehicle is leader of a platoon or not. This is mainly used by the lane change logic....
double leaderAcceleration
platoon's leader acceleration (used by CACC)
static const double defaultK[MAX_N_CARS][MAX_N_CARS]
int noCommitReason
if a follower asks and we don't commit, what should be the blocked state to return?
std::string leaderVehicleId
sumo id of the leader vehicle
static const int defaultL[MAX_N_CARS][MAX_N_CARS]
bool autoLaneChange
automatic whole platoon lane change
Position leaderVelocity
platoon's leader velocity vector
SUMOTime laneChangeCommitTime
timestep for which the above commit is valid¬
double frontAngle
front vehicle angle in radians
double frontDataReadTime
when front vehicle data has been readed from GPS
int engineModel
numeric value indicating the employed model
MSVehicle * leaderVehicle
leader vehicle, used for auto feeding
Position leaderPosition
platoon's leader position
bool useControllerAcceleration
determines whether PATH's CACC should use the real vehicle acceleration or the controller computed on...
Representation of a vehicle in the micro simulation.
Definition MSVehicle.h:77
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
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
represent the set of fake data which is sent to the controller in order to automatically make the car...