37#define sgn(x) ((x > 0) - (x < 0))
66 throw ProcessError(
TL(
"The number of lanes needs to be specified in the attributes of carFollowing-CC with the \"lanesCount\" attribute"));
114 vars->leaderVehicle = leader;
115 vars->leaderVehicleId = leaderId;
116 if (leader !=
nullptr) {
121 vars->isLeader =
true;
137 std::pair<int, int> state = libsumo::Vehicle::getLaneChangeState(veh->
getID(), left ? +1 : -1);
141 auto followers = libsumo::Vehicle::getNeighbors(veh->
getID(), left ? 0b100 : 0b101);
142 auto leaders = libsumo::Vehicle::getNeighbors(veh->
getID(), left ? 0b110 : 0b111);
143 bool noNeighbors = followers.empty() && leaders.empty();
144 if (!(state.second &
LCA_BLOCKED) && noNeighbors) {
146 for (
auto m = vars->
members.begin(); m != vars->
members.end(); m++) {
147 const std::pair<int, int> mState = libsumo::Vehicle::getLaneChangeState(m->second, left ? +1 : -1);
148 followers = libsumo::Vehicle::getNeighbors(m->second, left ? 0b100 : 0b101);
149 leaders = libsumo::Vehicle::getNeighbors(m->second, left ? 0b110 : 0b111);
150 noNeighbors = followers.empty() && leaders.empty();
153 result = mState.second;
155 if (!followers.empty()) {
158 if (!leaders.empty()) {
167 result = state.second;
169 if (!followers.empty()) {
172 if (!leaders.empty()) {
184 for (
auto& member : vars->
members) {
185 libsumo::Vehicle::changeLane(member.second, veh->
getLaneIndex() + direction, 0);
192 std::pair<int, int> state = libsumo::Vehicle::getLaneChangeState(veh->
getID(), +1);
193 int traciState = state.first;
201 state = libsumo::Vehicle::getLaneChangeState(veh->
getID(), -1);
202 traciState = state.first;
215 if (currentLane == vars->platoonFixedLane) {
217 vars->platoonFixedLane = -1;
220 bool left = currentLane < vars->platoonFixedLane;
230 const double tolerance = 0.8;
238 return (vars->
ploegH * speed + 2) * tolerance;
242 return (vars->
flatbedD - vars->
flatbedH * (speed - leaderSpeed)) * tolerance;
255 if (vars->laneChangeCommitTime == timestep) {
256 if (vars->commitToLaneChange) {
259 return vars->noCommitReason;
264 vars->commitToLaneChange =
true;
265 vars->laneChangeCommitTime = timestep;
288 double controllerAcceleration;
290 double engineAcceleration;
300 if (s.pars.collision) {
320 controllerAcceleration = std::min(vars->
uMax, std::max(vars->
uMin, controllerAcceleration));
340 return _v(veh, gap2pred, speed, predSpeed);
363 if (gap2pred == -1) {
364 gap2pred = std::numeric_limits<double>().max();
366 return _v(veh, gap2pred, speed, speed + relSpeed);
375 double gap2pred, relSpeed;
377 if (gap2pred == -1) {
378 gap2pred = std::numeric_limits<double>().max();
380 return _v(veh, gap2pred, speed, speed + relSpeed);
429 double ccAcceleration;
431 double accAcceleration;
433 double caccAcceleration;
435 double predAcceleration, leaderAcceleration, leaderSpeed;
457 if (gap2pred > 250 || ccAcceleration < accAcceleration) {
458 controllerAcceleration = ccAcceleration;
460 controllerAcceleration = accAcceleration;
486 controllerAcceleration =
_cacc(veh, egoSpeed, predSpeed, predAcceleration, gap2pred, leaderSpeed, leaderAcceleration, vars->
caccSpacing);
490 controllerAcceleration = 0;
515 controllerAcceleration = std::min(ccAcceleration, caccAcceleration);
536 controllerAcceleration = 0;
565 controllerAcceleration = 0;
571 std::cerr <<
"Switching to normal driver behavior still not implemented in MSCFModel_CC\n";
576 std::cerr <<
"Invalid controller selected in MSCFModel_CC\n";
584 speed =
MAX2(
double(0), egoSpeed +
ACCEL2SPEED(controllerAcceleration));
603 return -1.0 / headwayTime * (egoSpeed - predSpeed + vars->
accLambda * (-gap2pred + headwayTime * egoSpeed + 2));
608MSCFModel_CC::_cacc(
const MSVehicle* veh,
double egoSpeed,
double predSpeed,
double predAcceleration,
double gap2pred,
double leaderSpeed,
double leaderAcceleration,
double spacing)
const {
611 double epsilon = -gap2pred + spacing;
613 double epsilon_dot = egoSpeed - predSpeed;
623 return (1 / vars->
ploegH * (
645 for (k = min_i; k <= max_i; k++) {
646 d += h[k] * vehicles[0].
speed + vehicles[k].
length + 15;
664 int nCars = vars->
nCars;
672 double actualDistance = 0;
674 double desiredDistance = 0;
676 double speedError = 0;
684 vehicles[index].
speed = egoSpeed;
696 speedError = -vars->
b[index] * (egoSpeed - vehicles[0].
speed);
699 for (j = 0; j < nCars; j++) {
703 d_i += vars->
L[index][j];
704 desiredDistance -= vars->
K[index][j] * vars->
L[index][j] *
d_i_j(vehicles, vars->
h, index, j);
706 desiredDistance = desiredDistance / d_i;
709 for (j = 0; j < nCars; j++) {
715 double dt = time - vehicles[j].
time;
717 otherPosition.
setx(vehicles[j].positionX + dt * vehicles[j].speedX);
718 otherPosition.
sety(vehicles[j].positionY + dt * vehicles[j].speedY);
719 double distance = egoPosition.
distanceTo2D(otherPosition) *
sgn(j - index);
720 actualDistance -= vars->
K[index][j] * vars->
L[index][j] * distance;
723 actualDistance = actualDistance / (d_i);
726 u_i = (speedError + desiredDistance + actualDistance) / 1000;
733 double gap2pred,
double leaderSpeed)
const {
737 vars->
flatbedKv * (predSpeed - egoSpeed) +
833 std::stringstream warn;
834 warn <<
"MSCFModel_CC: setting a number of cars of " << vars->
nCars <<
" out of a maximum of " <<
MAX_N_CARS <<
835 ". The CONSENSUS controller will not work properly if chosen. If you are using a different controller " <<
836 "you can ignore this warning";
844 buf >>
id >> position;
851 auto cfm =
dynamic_cast<const MSCFModel_CC*
>(&vehicle->getVehicleType().getCarFollowModel());
855 cfm->setLeader(vehicle, veh, veh->
getID());
860 for (
auto item = vars->
members.begin(); item != vars->
members.end(); item++)
861 if (item->second.compare(value) == 0) {
866 auto cfm =
dynamic_cast<const MSCFModel_CC*
>(&vehicle->getVehicleType().getCarFollowModel());
868 throw libsumo::TraCIException(
"Removing " + value +
" from members but " + value +
" is not using MSCFModel_CC");
870 cfm->setLeader(vehicle,
nullptr,
"");
958 switch (engineModel) {
1013 std::string leaderId, frontId;
1020 throw InvalidArgument(
"Trying to enable auto feeding without providing leader vehicle id");
1029 throw InvalidArgument(
"Trying to enable auto feeding without providing front vehicle id");
1047 throw InvalidArgument(
"Invalid value '" + value +
"' for parameter '" + key +
"' for vehicle '" + veh->
getID() +
"'");
1064 velocity.
x() << velocity.
y() << veh->
getAngle();
1068 return vars->
crashed ?
"1" :
"0";
1071 double distance, relSpeed;
1073 buf << distance << relSpeed;
1084 const MSLane* lastLane = route->getEdges().back()->getLanes()[0];
1093 const MSLane* firstLane = route->getEdges().front()->getLanes()[0];
1123 if (index >= vars->
nCars || index < 0) {
1144 buf << (gear + 1) << rpm;
1179 std::pair<std::string, double> l = libsumo::Vehicle::getLeader(veh->
getID(), 250);
1184 distance = l.second;
1192 double distance, relSpeed;
1213 return vars->isLeader;
#define ENGINE_PAR_XMLFILE
#define PAR_FIXED_ACCELERATION
#define PAR_REMOVE_MEMBER
#define CC_PAR_CACC_OMEGA_N
#define CC_PAR_FLATBED_KP
#define PAR_FRONT_FAKE_DATA
#define PAR_SPEED_AND_ACCELERATION
#define CC_ENGINE_MODEL_REALISTIC
#define PAR_PLATOON_FIXED_LANE
#define CC_PAR_FLATBED_KV
#define PAR_USE_PREDICTION
#define PAR_DISTANCE_TO_END
#define CC_ENGINE_MODEL_FOLM
#define CC_PAR_VEHICLE_MODEL
#define PAR_PRECEDING_SPEED_AND_ACCELERATION
#define PAR_ACTIVE_CONTROLLER
#define PAR_LEADER_SPEED_AND_ACCELERATION
#define CC_PAR_PLATOON_SIZE
#define CC_PAR_VEHICLE_POSITION
#define CC_PAR_FLATBED_KA
#define CC_PAR_VEHICLE_ENGINE_MODEL
#define PAR_USE_AUTO_FEEDING
#define PAR_CC_DESIRED_SPEED
#define CC_PAR_VEHICLES_FILE
#define PAR_LEADER_FAKE_DATA
#define PAR_ACC_HEADWAY_TIME
#define PAR_DISTANCE_FROM_BEGIN
#define ENGINE_PAR_VEHICLE
#define CC_PAR_ENGINE_TAU
#define PAR_USE_CONTROLLER_ACCELERATION
#define PAR_ACC_ACCELERATION
#define CC_PAR_VEHICLE_DATA
#define PAR_ENABLE_AUTO_LANE_CHANGE
#define WRITE_WARNING(msg)
std::shared_ptr< const MSRoute > ConstMSRoutePtr
@ LCA_KEEPRIGHT
The action is due to the default of keeping right "Rechtsfahrgebot".
@ LCA_BLOCKED
blocked in all directions
@ LCA_BLOCKED_BY_RIGHT_LEADER
The vehicle is blocked by right leader.
@ LCA_BLOCKED_BY_LEFT_FOLLOWER
The vehicle is blocked by left follower.
@ LCA_LEFT
Wants go to the left.
@ LCA_BLOCKED_BY_RIGHT_FOLLOWER
The vehicle is blocked by right follower.
@ LCA_SPEEDGAIN
The action is due to the wish to be faster (tactical lc)
@ LCA_RIGHT
Wants go to the right.
@ LCA_BLOCKED_BY_LEFT_LEADER
@ SUMO_ATTR_CF_CC_FLATBED_KP
@ SUMO_ATTR_CF_CC_FLATBED_D
@ SUMO_ATTR_CF_CC_FLATBED_KA
@ SUMO_ATTR_CF_CC_PLOEG_KP
@ SUMO_ATTR_CF_CC_PLOEG_H
@ SUMO_ATTR_CF_CC_CCACCEL
@ SUMO_ATTR_CF_CC_PLOEG_KD
@ SUMO_ATTR_CF_CC_CCDECEL
@ SUMO_ATTR_CF_CC_FLATBED_H
@ SUMO_ATTR_CF_CC_LANES_COUNT
@ SUMO_ATTR_CF_CC_CONSTSPACING
@ SUMO_ATTR_CF_CC_FLATBED_KV
#define UNUSED_PARAMETER(x)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
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
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
double frontControllerAcceleration
front vehicle controller acceleration (used by CACC)
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 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)
std::string leaderVehicleId
sumo id of the leader vehicle
bool autoLaneChange
automatic whole platoon lane change
Position leaderVelocity
platoon's leader velocity vector
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...
void setMaximumAcceleration(double maxAcc)
virtual double getRealAcceleration(double speed_mps, double accel_mps2, double reqAccel_mps2, SUMOTime timeStep=0)=0
void setMaximumDeceleration(double maxDec)
virtual void setParameter(const std::string parameter, const std::string &value)=0
ConstMSRoutePtr getRoutePtr() const
Returns the current route.
void setChosenSpeedFactor(const double factor)
Returns the precomputed factor by which the driver wants to be faster than the speed limit.
const std::list< MSStop > & getStops() const
A set of automatic Cruise Controllers, including classic Cruise Control (CC), Adaptive Cruise Control...
double _v(const MSVehicle *const veh, double gap2pred, double egoSpeed, double predSpeed) const
MSCFModel_CC(const MSVehicleType *vtype)
Constructor.
virtual std::string getParameter(const MSVehicle *veh, const std::string &key) const
set the information about a generic car. This method should be invoked by TraCI when a wireless messa...
virtual double insertionFollowSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0) const
Overload base MSCFModel::insertionFollowSpeed method to inject automated vehicles as soon as they are...
const double myPloegH
Ploeg's CACC parameters.
double getACCAcceleration(const MSVehicle *veh) const
returns the ACC computed acceleration when the faked CACC is controlling the car. This can be used to...
bool isLeader(const MSVehicle *veh) const
Returns whether a vehicle is a leader of a platoon or not. By default, a vehicle on its own using an ...
int getMyLanesCount() const
returns the number of lanes set in the configuration file
double _flatbed(const MSVehicle *veh, double egoAcceleration, double egoSpeed, double predSpeed, double gap2pred, double leaderSpeed) const
flatbed platoon towing model
void getVehicleInformation(const MSVehicle *veh, double &speed, double &acceleration, double &controllerAcceleration, Position &position, double &time) const
get the information about a vehicle. This can be used by TraCI in order to get speed and acceleration...
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
virtual double getSecureGap(const MSVehicle *const veh, const MSVehicle *const, const double speed, const double leaderSpeed, const double leaderMaxDecel) const
Returns the minimum gap to reserve if the leader is braking at maximum (>=0)
VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting.
MSVehicle * findVehicle(std::string id) const
void getRadarMeasurements(const MSVehicle *veh, double &distance, double &relativeSpeed) const
return the data that is currently being measured by the radar
double _consensus(const MSVehicle *veh, double egoSpeed, Position egoPosition, double time) const
controller based on consensus strategy
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed (no dawdling)
double _ploeg(const MSVehicle *veh, double egoSpeed, double predSpeed, double predAcceleration, double gap2pred) const
controller for the Ploeg's CACC which computes the control input variation. Opposed to other controll...
void performPlatoonLaneChange(MSVehicle *const veh) const
If safe to do so, moves a platoon to a user-desired lane. If not safe, this method continues to try a...
void changeWholePlatoonLane(MSVehicle *const veh, int direction) const
Moves an entire platoon on an adjacent lane, calling changeLane() on all members.
const double myTau
engine time constant used for actuation lag
double d_i_j(const struct Plexe::VEHICLE_DATA *vehicles, const double h[MAX_N_CARS], int i, int j) const
computes the desired distance between vehicle i and vehicle j
const double myOmegaN
design constant for CACC
double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred, double decel, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
const double myC1
design constant for CACC
const int myLanesCount
number of lanes in the highway, in the absence of on-/off-ramps. This is used to move to the correct ...
virtual double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
double _cacc(const MSVehicle *veh, double egoSpeed, double predSpeed, double predAcceleration, double gap2pred, double leaderSpeed, double leaderAcceleration, double spacing) const
controller for the CACC which computes the acceleration to be applied. the value needs to be passed t...
virtual void setParameter(MSVehicle *veh, const std::string &key, const std::string &value) const
try to set the given parameter for this carFollowingModel
const double myConstantSpacing
the constant gap for CACC
double getCACCConstantSpacing(const MSVehicle *veh) const
returns CACC desired constant spacing
~MSCFModel_CC()
Destructor.
void recomputeParameters(const MSVehicle *veh) const
Recomputes controller related parameters after setting them.
const double myXi
design constant for CACC
const double myFlatbedKa
flatbed CACC parameters
void switchOnACC(const MSVehicle *veh, double ccDesiredSpeed) const
switch on the ACC, so disabling the human driver car control
int commitToLaneChange(const MSVehicle *veh, bool left) const
MSCFModel * myHumanDriver
the car following model which drives the car when automated cruising is disabled, i....
const double myLambda
design constant for ACC
void performAutoLaneChange(MSVehicle *const veh) const
Check whether a platoon would gain speed by moving to the left or whether it should move to the right...
void setLeader(MSVehicle *veh, MSVehicle *const leader, std::string leaderId) const
Sets the leader for a member of the platoon.
const double myKp
design constant for CC
virtual double minNextSpeed(double speed, const MSVehicle *const veh=0) const
Returns the minimum speed given the current speed (depends on the numerical update scheme and its ste...
const double myCcAccel
The maximum acceleration that the CC can output.
int isPlatoonLaneChangeSafe(const MSVehicle *veh, bool left) const
computes whether a lane change for a whole platoon is safe or not. This is done by checking the lane ...
virtual double freeSpeed(const MSVehicle *const veh, double speed, double seen, double maxSpeed, const bool onInsertion=false, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed without a leader.
const double myCcDecel
The maximum deceleration that the CC can output.
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
void resetConsensus(const MSVehicle *veh) const
Resets the consensus controller. In particular, sets the "initialized" vector all to false....
double interactionGap(const MSVehicle *const, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
enum Plexe::ACTIVE_CONTROLLER getActiveController(const MSVehicle *veh) const
return the currently active controller
double _cc(const MSVehicle *veh, double egoSpeed, double desSpeed) const
controller for the CC which computes the acceleration to be applied. the value needs to be passed to ...
double _acc(const MSVehicle *veh, double egoSpeed, double predSpeed, double gap2pred, double headwayTime) const
controller for the ACC which computes the acceleration to be applied. the value needs to be passed to...
Krauss car-following model, with acceleration decrease and faster start.
The car-following model abstraction.
virtual double interactionGap(const MSVehicle *const veh, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
virtual double freeSpeed(const MSVehicle *const veh, double speed, double seen, double maxSpeed, const bool onInsertion=false, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed without a leader.
virtual double minNextSpeed(double speed, const MSVehicle *const veh=0) const
Returns the minimum speed given the current speed (depends on the numerical update scheme and its ste...
virtual double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences. Called at most once per simulation...
CalcReason
What the return value of stop/follow/free-Speed is used for.
virtual double getSecureGap(const MSVehicle *const veh, const MSVehicle *const, const double speed, const double leaderSpeed, const double leaderMaxDecel) const
Returns the minimum gap to reserve if the leader is braking at maximum (>=0)
double myDecel
The vehicle's maximum deceleration [m/s^2].
double getMaxAccel() const
Get the vehicle type's maximum acceleration [m/s^2].
double myAccel
The vehicle's maximum acceleration [m/s^2].
virtual double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0, const CalcReason usage=CalcReason::CURRENT) const =0
Computes the vehicle's follow speed (no dawdling)
double stopSpeed(const MSVehicle *const veh, const double speed, double gap, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Representation of a lane in the micro simulation.
double getSpeedLimit() const
Returns the lane's maximum allowed speed.
double getLength() const
Returns the lane's length.
MSEdge & getEdge() const
Returns the lane's edge.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
void setSpeedMode(int speedMode)
Sets speed-constraining behaviors.
SUMOVehicle * getVehicle(const std::string &id) const
Returns the vehicle with the given id.
Representation of a vehicle in the micro simulation.
double getAcceleration() const
Returns the vehicle's acceleration in m/s (this is computed as the last step's mean acceleration in c...
Position getPosition(const double offset=0) const
Return current position (x/y, cartesian)
const MSLane * getLane() const
Returns the lane the vehicle is on.
bool isLeader(const MSLink *link, const MSVehicle *veh, const double gap) const
whether the given vehicle must be followed at the given junction
Influencer & getInfluencer()
double getSpeed() const
Returns the vehicle's current speed.
double processNextStop(double currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
double getPositionOnLane() const
Get the vehicle's position along the lane.
double getAngle() const
Returns the vehicle's direction in radians.
MSCFModel::VehicleVariables * getCarFollowVariables() const
Returns the vehicle's car following model variables.
Position getVelocityVector() const
Returns the vehicle's direction in radians.
The car-following model and parameter.
const std::string & getID() const
Returns the id.
A point in 2D or 3D with translation and scaling methods.
void setx(double x)
set position x
void set(double x, double y)
set positions x and y
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
double x() const
Returns the x-position.
void sety(double y)
set position y
double y() const
Returns the y-position.
void getEngineData(double speed_mps, int &gear, double &rpm)
virtual double getSpeed() const =0
Returns the object's current speed.
Representation of a vehicle.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
An error which allows to continue.
ACTIVE_CONTROLLER
Determines the currently active controller, i.e., ACC, CACC, or the driver. In future we might need t...
double leaderAcceleration
double leaderControllerAcceleration
double frontControllerAcceleration