20 {0, 0, 0, 0, 0, 0, 0, 0},
21 {1, 0, 0, 0, 0, 0, 0, 0},
22 {1, 1, 0, 0, 0, 0, 0, 0},
23 {1, 0, 1, 0, 0, 0, 0, 0},
24 {1, 0, 0, 1, 0, 0, 0, 0},
25 {1, 0, 0, 0, 1, 0, 0, 0},
26 {1, 0, 0, 0, 0, 1, 0, 0},
27 {1, 0, 0, 0, 0, 0, 1, 0}
30 {0, 0, 0, 0, 0, 0, 0, 0},
31 {460, 0, 0, 0, 0, 0, 0, 0},
32 {80, 860, 0, 0, 0, 0, 0, 0},
33 {80, 0, 860, 0, 0, 0, 0, 0},
34 {80, 0, 0, 860, 0, 0, 0, 0},
35 {80, 0, 0, 0, 860, 0, 0, 0},
36 {80, 0, 0, 0, 0, 860, 0, 0},
37 {80, 0, 0, 0, 0, 0, 860, 0}
43 controllerAcceleration(0), frontSpeed(0), frontAcceleration(0),
44 frontControllerAcceleration(0), frontDataReadTime(0), frontAngle(0), frontInitialized(false),
45 autoFeed(false), leaderVehicle(0), frontVehicle(0),
46 accHeadwayTime(1.5), accLambda(0.1),
47 useControllerAcceleration(true), leaderSpeed(0),
48 leaderAcceleration(0), leaderControllerAcceleration(0), leaderDataReadTime(0), leaderAngle(0),
49 leaderInitialized(false), caccInitialized(false),
50 useFixedAcceleration(0), fixedAcceleration(0),
52 ccDesiredSpeed(14), ccKp(1), activeController(
Plexe::
DRIVER),
53 nInitialized(0), position(-1), nCars(8),
54 caccXi(-1), caccOmegaN(-1), caccC1(-1), caccAlpha1(-1), caccAlpha2(-1),
55 caccAlpha3(-1), caccAlpha4(-1), caccAlpha5(-1), caccSpacing(5),
57 uMin(-1e6), uMax(1e6),
58 ploegH(0.5), ploegKp(0.2), ploegKd(0.7),
59 flatbedKa(2.4), flatbedKv(0.6), flatbedKp(12), flatbedD(5), flatbedH(4),
62 autoLaneChange(false) {
74 memcpy(
K,
defaultK,
sizeof(
double)*MAX_N_CARS * MAX_N_CARS);
75 memcpy(
b,
defaultB,
sizeof(
double)*MAX_N_CARS);
76 memcpy(
h,
defaultH,
sizeof(
double)*MAX_N_CARS);
bool initialized[MAX_N_CARS]
tells whether data about a certain vehicle has been initialized
static const double defaultH[]
double frontControllerAcceleration
static const int defaultL[MAX_N_CARS][MAX_N_CARS]
struct FAKE_CONTROLLER_DATA fakeData
fake controller data.
double b[MAX_N_CARS]
vector of damping ratios b
double leaderControllerAcceleration
GenericEngineModel * engine
engine model employed by this car
void set(double x, double y)
set positions x and y
double K[MAX_N_CARS][MAX_N_CARS]
K matrix.
Position frontPosition
current front vehicle position
Position leaderPosition
platoon's leader position
static const double defaultK[MAX_N_CARS][MAX_N_CARS]
static const double defaultB[]
double h[MAX_N_CARS]
vector of time headways h
int L[MAX_N_CARS][MAX_N_CARS]
L matrix.
#define CC_ENGINE_MODEL_FOLM
double leaderAcceleration