Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
CC_VehicleVariables Class Reference

#include <CC_VehicleVariables.h>

Inheritance diagram for CC_VehicleVariables:
[legend]
Collaboration diagram for CC_VehicleVariables:
[legend]

Data Structures

struct  FAKE_CONTROLLER_DATA
 represent the set of fake data which is sent to the controller in order to automatically make the car move to a precise position before joining the platoon. we expect to get from the upper application the data that the CACC needs, i.e.: More...
 

Public Member Functions

 CC_VehicleVariables ()
 
 ~CC_VehicleVariables ()
 

Data Fields

double accHeadwayTime
 headway time for ACC
 
double accLambda
 
enum Plexe::ACTIVE_CONTROLLER activeController
 currently active controller
 
bool autoFeed
 determines whether CACC should automatically fetch data about other vehicles
 
bool autoLaneChange
 automatic whole platoon lane change
 
double b [MAX_N_CARS]
 vector of damping ratios b
 
double caccAlpha1
 
double caccAlpha2
 
double caccAlpha3
 
double caccAlpha4
 
double caccAlpha5
 
double caccC1
 
bool caccInitialized
 
double caccOmegaN
 
double caccSpacing
 fixed spacing for CACC
 
double caccXi
 controller related parameters
 
double ccDesiredSpeed
 CC desired speed.
 
double ccKp
 
bool commitToLaneChange
 when followers asks whether to actually change lane or not, what should the leader tell them?¬
 
double controllerAcceleration
 acceleration as computed by the controller, to be sent to other vehicles
 
bool crashed
 
GenericEngineModelengine
 engine model employed by this car
 
int engineModel
 numeric value indicating the employed model
 
double engineTau
 
struct FAKE_CONTROLLER_DATA fakeData
 fake controller data.
 
double fixedAcceleration
 
double flatbedD
 
double flatbedH
 
double flatbedKa
 
double flatbedKp
 
double flatbedKv
 
double frontAcceleration
 current front vehicle acceleration (used by CACC)
 
double frontAngle
 front vehicle angle in radians
 
double frontControllerAcceleration
 front vehicle controller acceleration (used by CACC)
 
double frontDataReadTime
 when front vehicle data has been readed from GPS
 
bool frontInitialized
 @did we receive at least one packet?
 
Position frontPosition
 current front vehicle position
 
double frontSpeed
 current front vehicle speed
 
MSVehiclefrontVehicle
 front sumo id, used for auto feeding
 
std::string frontVehicleId
 sumo id of the front vehicle
 
Position frontVelocity
 front vehicle velocity vector
 
double h [MAX_N_CARS]
 vector of time headways h
 
bool initialized [MAX_N_CARS]
 tells whether data about a certain vehicle has been initialized
 
bool isLeader
 whether this vehicle is leader of a platoon or not. This is mainly used by the lane change logic. By default this is true as a single vehicle is treated as a 1-vehicle platoon
 
double K [MAX_N_CARS][MAX_N_CARS]
 K matrix.
 
int L [MAX_N_CARS][MAX_N_CARS]
 L matrix.
 
SUMOTime laneChangeCommitTime
 timestep for which the above commit is valid¬
 
double leaderAcceleration
 platoon's leader acceleration (used by CACC)
 
double leaderAngle
 platoon's leader angle in radians
 
double leaderControllerAcceleration
 platoon's leader controller acceleration (used by CACC)
 
double leaderDataReadTime
 when leader data has been readed from GPS
 
bool leaderInitialized
 @did we receive at least one packet?
 
Position leaderPosition
 platoon's leader position
 
double leaderSpeed
 platoon's leader speed (used by CACC)
 
MSVehicleleaderVehicle
 leader vehicle, used for auto feeding
 
std::string leaderVehicleId
 sumo id of the leader vehicle
 
Position leaderVelocity
 platoon's leader velocity vector
 
std::map< int, std::string > members
 list of members belonging to my platoon
 
int nCars
 number of cars in the platoon
 
int nInitialized
 count of initialized vehicles
 
int noCommitReason
 if a follower asks and we don't commit, what should be the blocked state to return?
 
int platoonFixedLane
 whole platoon lane change (not automatic). -1 indicates no need to change lane (mechanism disabled)
 
double ploegH
 
double ploegKd
 
double ploegKp
 
int position
 my position within the platoon (0 = first car)
 
double uMax
 
double uMin
 limits for u
 
bool useControllerAcceleration
 determines whether PATH's CACC should use the real vehicle acceleration or the controller computed one
 
int useFixedAcceleration
 
bool usePrediction
 enable/disable data prediction (interpolation) for missing data
 
struct Plexe::VEHICLE_DATA vehicles [MAX_N_CARS]
 data about vehicles in the platoon
 

Static Public Attributes

static const double defaultB [] = {1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800}
 
static const double defaultH [] = {0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8}
 
static const double defaultK [MAX_N_CARS][MAX_N_CARS]
 
static const int defaultL [MAX_N_CARS][MAX_N_CARS]
 

Detailed Description

Definition at line 33 of file CC_VehicleVariables.h.

Constructor & Destructor Documentation

◆ CC_VehicleVariables()

◆ ~CC_VehicleVariables()

CC_VehicleVariables::~CC_VehicleVariables ( )

Definition at line 89 of file CC_VehicleVariables.cpp.

References engine.

Field Documentation

◆ accHeadwayTime

double CC_VehicleVariables::accHeadwayTime

◆ accLambda

double CC_VehicleVariables::accLambda

◆ activeController

◆ autoFeed

bool CC_VehicleVariables::autoFeed

determines whether CACC should automatically fetch data about other vehicles

Definition at line 106 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ autoLaneChange

bool CC_VehicleVariables::autoLaneChange

automatic whole platoon lane change

Definition at line 212 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::finalizeSpeed(), and MSCFModel_CC::setParameter().

◆ b

double CC_VehicleVariables::b[MAX_N_CARS]

vector of damping ratios b

Definition at line 166 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_consensus(), and CC_VehicleVariables().

◆ caccAlpha1

double CC_VehicleVariables::caccAlpha1

◆ caccAlpha2

double CC_VehicleVariables::caccAlpha2

◆ caccAlpha3

double CC_VehicleVariables::caccAlpha3

◆ caccAlpha4

double CC_VehicleVariables::caccAlpha4

◆ caccAlpha5

double CC_VehicleVariables::caccAlpha5

◆ caccC1

double CC_VehicleVariables::caccC1

◆ caccInitialized

bool CC_VehicleVariables::caccInitialized

Definition at line 142 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ caccOmegaN

double CC_VehicleVariables::caccOmegaN

◆ caccSpacing

◆ caccXi

double CC_VehicleVariables::caccXi

controller related parameters

Definition at line 182 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::createVehicleVariables(), MSCFModel_CC::recomputeParameters(), and MSCFModel_CC::setParameter().

◆ ccDesiredSpeed

double CC_VehicleVariables::ccDesiredSpeed

◆ ccKp

double CC_VehicleVariables::ccKp

◆ commitToLaneChange

bool CC_VehicleVariables::commitToLaneChange

when followers asks whether to actually change lane or not, what should the leader tell them?¬

Definition at line 218 of file CC_VehicleVariables.h.

◆ controllerAcceleration

double CC_VehicleVariables::controllerAcceleration

acceleration as computed by the controller, to be sent to other vehicles

Definition at line 86 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_ploeg(), MSCFModel_CC::_v(), MSCFModel_CC::finalizeSpeed(), MSCFModel_CC::getParameter(), and MSCFModel_CC::getVehicleInformation().

◆ crashed

bool CC_VehicleVariables::crashed

◆ defaultB

const double CC_VehicleVariables::defaultB = {1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800}
static

Default damping ratios vector b for the consensus controller

Definition at line 42 of file CC_VehicleVariables.h.

Referenced by CC_VehicleVariables().

◆ defaultH

const double CC_VehicleVariables::defaultH = {0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8}
static

Default time headways vector h for the consensus controller

Definition at line 43 of file CC_VehicleVariables.h.

Referenced by CC_VehicleVariables().

◆ defaultK

const double CC_VehicleVariables::defaultK
static
Initial value:
= {
{0, 0, 0, 0, 0, 0, 0, 0},
{460, 0, 0, 0, 0, 0, 0, 0},
{80, 860, 0, 0, 0, 0, 0, 0},
{80, 0, 860, 0, 0, 0, 0, 0},
{80, 0, 0, 860, 0, 0, 0, 0},
{80, 0, 0, 0, 860, 0, 0, 0},
{80, 0, 0, 0, 0, 860, 0, 0},
{80, 0, 0, 0, 0, 0, 860, 0}
}

Gains matrix K for the consensus controller

Definition at line 32 of file CC_VehicleVariables.h.

Referenced by CC_VehicleVariables().

◆ defaultL

const int CC_VehicleVariables::defaultL
static
Initial value:
= {
{0, 0, 0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 0, 0, 0},
{1, 1, 0, 0, 0, 0, 0, 0},
{1, 0, 1, 0, 0, 0, 0, 0},
{1, 0, 0, 1, 0, 0, 0, 0},
{1, 0, 0, 0, 1, 0, 0, 0},
{1, 0, 0, 0, 0, 1, 0, 0},
{1, 0, 0, 0, 0, 0, 1, 0}
}

Topology matrix L for the consensus controller

Definition at line 22 of file CC_VehicleVariables.h.

Referenced by CC_VehicleVariables().

◆ engine

◆ engineModel

int CC_VehicleVariables::engineModel

numeric value indicating the employed model

Definition at line 203 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::createVehicleVariables(), MSCFModel_CC::maxNextSpeed(), MSCFModel_CC::minNextSpeed(), and MSCFModel_CC::setParameter().

◆ engineTau

double CC_VehicleVariables::engineTau

◆ fakeData

struct FAKE_CONTROLLER_DATA CC_VehicleVariables::fakeData

fake controller data.

See also
FAKE_CONTROLLER_DATA

Definition at line 159 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), CC_VehicleVariables(), and MSCFModel_CC::setParameter().

◆ fixedAcceleration

double CC_VehicleVariables::fixedAcceleration

Definition at line 147 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ flatbedD

◆ flatbedH

◆ flatbedKa

double CC_VehicleVariables::flatbedKa

◆ flatbedKp

double CC_VehicleVariables::flatbedKp

◆ flatbedKv

double CC_VehicleVariables::flatbedKv

◆ frontAcceleration

double CC_VehicleVariables::frontAcceleration

current front vehicle acceleration (used by CACC)

Definition at line 91 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ frontAngle

double CC_VehicleVariables::frontAngle

front vehicle angle in radians

Definition at line 101 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::setParameter().

◆ frontControllerAcceleration

double CC_VehicleVariables::frontControllerAcceleration

front vehicle controller acceleration (used by CACC)

Definition at line 93 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ frontDataReadTime

double CC_VehicleVariables::frontDataReadTime

when front vehicle data has been readed from GPS

Definition at line 97 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ frontInitialized

bool CC_VehicleVariables::frontInitialized

@did we receive at least one packet?

Definition at line 103 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ frontPosition

Position CC_VehicleVariables::frontPosition

current front vehicle position

Definition at line 95 of file CC_VehicleVariables.h.

Referenced by CC_VehicleVariables(), and MSCFModel_CC::setParameter().

◆ frontSpeed

double CC_VehicleVariables::frontSpeed

current front vehicle speed

Definition at line 89 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ frontVehicle

MSVehicle* CC_VehicleVariables::frontVehicle

front sumo id, used for auto feeding

Definition at line 112 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ frontVehicleId

std::string CC_VehicleVariables::frontVehicleId

sumo id of the front vehicle

Definition at line 114 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ frontVelocity

Position CC_VehicleVariables::frontVelocity

front vehicle velocity vector

Definition at line 99 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::setParameter().

◆ h

double CC_VehicleVariables::h[MAX_N_CARS]

vector of time headways h

Definition at line 168 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_consensus(), CC_VehicleVariables(), and MSCFModel_CC::getSecureGap().

◆ initialized

bool CC_VehicleVariables::initialized[MAX_N_CARS]

tells whether data about a certain vehicle has been initialized

Definition at line 173 of file CC_VehicleVariables.h.

Referenced by CC_VehicleVariables(), MSCFModel_CC::resetConsensus(), and MSCFModel_CC::setParameter().

◆ isLeader

bool CC_VehicleVariables::isLeader

whether this vehicle is leader of a platoon or not. This is mainly used by the lane change logic. By default this is true as a single vehicle is treated as a 1-vehicle platoon

Definition at line 117 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::isPlatoonLaneChangeSafe(), and MSCFModel_CC::setParameter().

◆ K

double CC_VehicleVariables::K[MAX_N_CARS][MAX_N_CARS]

K matrix.

Definition at line 164 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_consensus(), and CC_VehicleVariables().

◆ L

int CC_VehicleVariables::L[MAX_N_CARS][MAX_N_CARS]

L matrix.

Definition at line 162 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_consensus(), and CC_VehicleVariables().

◆ laneChangeCommitTime

SUMOTime CC_VehicleVariables::laneChangeCommitTime

timestep for which the above commit is valid¬

Definition at line 224 of file CC_VehicleVariables.h.

◆ leaderAcceleration

double CC_VehicleVariables::leaderAcceleration

platoon's leader acceleration (used by CACC)

Definition at line 129 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ leaderAngle

double CC_VehicleVariables::leaderAngle

platoon's leader angle in radians

Definition at line 139 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::setParameter().

◆ leaderControllerAcceleration

double CC_VehicleVariables::leaderControllerAcceleration

platoon's leader controller acceleration (used by CACC)

Definition at line 131 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ leaderDataReadTime

double CC_VehicleVariables::leaderDataReadTime

when leader data has been readed from GPS

Definition at line 135 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ leaderInitialized

bool CC_VehicleVariables::leaderInitialized

@did we receive at least one packet?

Definition at line 141 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::setParameter().

◆ leaderPosition

Position CC_VehicleVariables::leaderPosition

platoon's leader position

Definition at line 133 of file CC_VehicleVariables.h.

Referenced by CC_VehicleVariables(), and MSCFModel_CC::setParameter().

◆ leaderSpeed

double CC_VehicleVariables::leaderSpeed

platoon's leader speed (used by CACC)

Definition at line 127 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ leaderVehicle

MSVehicle* CC_VehicleVariables::leaderVehicle

leader vehicle, used for auto feeding

Definition at line 108 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), MSCFModel_CC::isPlatoonLaneChangeSafe(), and MSCFModel_CC::setParameter().

◆ leaderVehicleId

std::string CC_VehicleVariables::leaderVehicleId

sumo id of the leader vehicle

Definition at line 110 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), MSCFModel_CC::isPlatoonLaneChangeSafe(), and MSCFModel_CC::setParameter().

◆ leaderVelocity

Position CC_VehicleVariables::leaderVelocity

platoon's leader velocity vector

Definition at line 137 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::setParameter().

◆ members

std::map<int, std::string> CC_VehicleVariables::members

list of members belonging to my platoon

Definition at line 209 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::changeWholePlatoonLane(), MSCFModel_CC::isPlatoonLaneChangeSafe(), and MSCFModel_CC::setParameter().

◆ nCars

int CC_VehicleVariables::nCars

number of cars in the platoon

Definition at line 179 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_consensus(), MSCFModel_CC::getParameter(), and MSCFModel_CC::setParameter().

◆ nInitialized

int CC_VehicleVariables::nInitialized

count of initialized vehicles

Definition at line 175 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_consensus(), MSCFModel_CC::resetConsensus(), and MSCFModel_CC::setParameter().

◆ noCommitReason

int CC_VehicleVariables::noCommitReason

if a follower asks and we don't commit, what should be the blocked state to return?

Definition at line 221 of file CC_VehicleVariables.h.

◆ platoonFixedLane

int CC_VehicleVariables::platoonFixedLane

whole platoon lane change (not automatic). -1 indicates no need to change lane (mechanism disabled)

Definition at line 215 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::finalizeSpeed(), and MSCFModel_CC::setParameter().

◆ ploegH

◆ ploegKd

double CC_VehicleVariables::ploegKd

◆ ploegKp

double CC_VehicleVariables::ploegKp

◆ position

int CC_VehicleVariables::position

my position within the platoon (0 = first car)

Definition at line 177 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_consensus(), and MSCFModel_CC::setParameter().

◆ uMax

double CC_VehicleVariables::uMax

◆ uMin

double CC_VehicleVariables::uMin

limits for u

Definition at line 190 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::finalizeSpeed(), and MSCFModel_CC::setParameter().

◆ useControllerAcceleration

bool CC_VehicleVariables::useControllerAcceleration

determines whether PATH's CACC should use the real vehicle acceleration or the controller computed one

Definition at line 125 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ useFixedAcceleration

int CC_VehicleVariables::useFixedAcceleration

◆ usePrediction

bool CC_VehicleVariables::usePrediction

enable/disable data prediction (interpolation) for missing data

Definition at line 206 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_v(), and MSCFModel_CC::setParameter().

◆ vehicles

struct Plexe::VEHICLE_DATA CC_VehicleVariables::vehicles[MAX_N_CARS]

data about vehicles in the platoon

Definition at line 171 of file CC_VehicleVariables.h.

Referenced by MSCFModel_CC::_consensus(), MSCFModel_CC::getParameter(), MSCFModel_CC::getSecureGap(), and MSCFModel_CC::setParameter().


The documentation for this class was generated from the following files: