Eclipse SUMO - Simulation of Urban MObility
CC_VehicleVariables.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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 /****************************************************************************/
16 #ifndef CC_VEHICLEVARIABLES_H
17 #define CC_VEHICLEVARIABLES_H
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include <config.h>
23 
24 #include "CC_Const.h"
26 #include <utils/geom/Position.h>
27 #include <string.h>
28 #include <string>
29 #include <map>
30 
34 
36 public:
37 
55  double frontDistance;
56  double frontSpeed;
59  double leaderSpeed;
62  };
63 
67  const static int defaultL[MAX_N_CARS][MAX_N_CARS];
68 
72  const static double defaultK[MAX_N_CARS][MAX_N_CARS];
73 
77  const static double defaultB[];
78 
82  const static double defaultH[];
83 
86 
89 
91  double frontSpeed;
103  double frontAngle;
106 
108  bool autoFeed;
113 
116  double accLambda;
117 
122  double leaderSpeed;
134  double leaderAngle;
138 
139  //enable/disable the use of a constant, user defined acceleration instead of the one computed by the controller
141  //fixed acceleration to use
143 
144  //car collided in the last timestep
145  bool crashed;
146 
149  double ccKp;
152 
155 
161  double b[MAX_N_CARS];
163  double h[MAX_N_CARS];
164 
172  int position;
174  int nCars;
175 
177  double caccXi;
178  double caccOmegaN;
179  double caccC1;
182  double caccSpacing;
183  double engineTau;
185  double uMin, uMax;
186  double ploegH;
187  double ploegKp;
188  double ploegKd;
189  double flatbedKa;
190  double flatbedKv;
191  double flatbedKp;
192  double flatbedD;
193  double flatbedH;
194 
199 
202 
204  std::map<int, std::string> members;
205 
208 };
209 
210 #endif
bool initialized[MAX_N_CARS]
tells whether data about a certain vehicle has been initialized
static const double defaultH[]
static const int defaultL[MAX_N_CARS][MAX_N_CARS]
int engineModel
numeric value indicating the employed model
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80
bool frontInitialized
we receive at least one packet?
struct FAKE_CONTROLLER_DATA fakeData
fake controller data.
represent the set of fake data which is sent to the controller in order to automatically make the car...
double ccDesiredSpeed
CC desired speed.
double b[MAX_N_CARS]
vector of damping ratios b
double frontSpeed
current front vehicle speed
GenericEngineModel * engine
engine model employed by this car
double leaderAngle
platoon&#39;s leader angle in radians
MSVehicle * leaderVehicle
leader vehicle, used for auto feeding
Position leaderVelocity
platoon&#39;s leader velocity vector
double leaderAcceleration
platoon&#39;s leader acceleration (used by CACC)
double uMin
limits for u
double frontAngle
front vehicle angle in radians
double accHeadwayTime
headway time for ACC
double caccSpacing
fixed spacing for CACC
int nInitialized
count of initialized vehicles
double K[MAX_N_CARS][MAX_N_CARS]
K matrix.
double frontAcceleration
current front vehicle acceleration (used by CACC)
Position frontPosition
current front vehicle position
bool useControllerAcceleration
determines whether PATH&#39;s CACC should use the real vehicle acceleration or the controller computed on...
int nCars
number of cars in the platoon
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
Position leaderPosition
platoon&#39;s leader position
double controllerAcceleration
acceleration as computed by the controller, to be sent to other vehicles
std::map< int, std::string > members
list of members belonging to my platoon
static const double defaultK[MAX_N_CARS][MAX_N_CARS]
double leaderSpeed
platoon&#39;s leader speed (used by CACC)
enum Plexe::ACTIVE_CONTROLLER activeController
currently active controller
double frontDataReadTime
when front vehicle data has been readed from GPS
Position frontVelocity
front vehicle velocity vector
double leaderControllerAcceleration
platoon&#39;s leader controller acceleration (used by CACC)
double frontControllerAcceleration
front vehicle controller acceleration (used by CACC)
MSVehicle * frontVehicle
front sumo id, used for auto feeding
double caccXi
controller related parameters
static const double defaultB[]
int position
my position within the platoon (0 = first car)
double h[MAX_N_CARS]
vector of time headways h
struct Plexe::VEHICLE_DATA vehicles[MAX_N_CARS]
data about vehicles in the platoon
bool autoLaneChange
automatic whole platoon lane change
bool leaderInitialized
we receive at least one packet?
int L[MAX_N_CARS][MAX_N_CARS]
L matrix.
ACTIVE_CONTROLLER
Determines the currently active controller, i.e., ACC, CACC, or the driver. In future we might need t...
Definition: CC_Const.h:45
#define MAX_N_CARS
Definition: CC_Const.h:74
bool autoFeed
determines whether CACC should automatically fetch data about other vehicles
double leaderDataReadTime
when leader data has been readed from GPS
bool usePrediction
enable/disable data prediction (interpolation) for missing data