17 #ifndef MSCFMODEL_CC_H 18 #define MSCFMODEL_CC_H 101 double followSpeed(
const MSVehicle*
const veh,
double speed,
double gap2pred,
double predSpeed,
double predMaxDecel,
const MSVehicle*
const pred = 0)
const;
118 double stopSpeed(
const MSVehicle*
const veh,
const double speed,
double gap2pred)
const;
133 double maxSpeed,
const bool onInsertion =
false)
const;
274 double _v(
const MSVehicle*
const veh,
double gap2pred,
double egoSpeed,
double predSpeed)
const;
282 double _cc(
const MSVehicle* veh,
double egoSpeed,
double desSpeed)
const;
292 double _acc(
const MSVehicle* veh,
double egoSpeed,
double predSpeed,
double gap2pred,
double headwayTime)
const;
305 double _cacc(
const MSVehicle* veh,
double egoSpeed,
double predSpeed,
double predAcceleration,
double gap2pred,
double leaderSpeed,
double leaderAcceleration,
double spacing)
const;
317 double _ploeg(
const MSVehicle* veh,
double egoSpeed,
double predSpeed,
double predAcceleration,
double gap2pred)
const;
347 double _flatbed(
const MSVehicle* veh,
double egoAcceleration,
double egoSpeed,
double predSpeed,
348 double gap2pred,
double leaderSpeed)
const;
const double myXi
design constant for CACC
Representation of a vehicle in the micro simulation.
MSCFModel_CC & operator=(const MSCFModel_CC &)=delete
Invalidated assignment operator.
~MSCFModel_CC()
Destructor.
virtual double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
virtual double freeSpeed(const MSVehicle *const veh, double speed, double seen, double maxSpeed, const bool onInsertion=false) const
Computes the vehicle's safe speed without a leader.
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
The car-following model abstraction.
A set of automatic Cruise Controllers, including classic Cruise Control (CC), Adaptive Cruise Control...
virtual void setParameter(MSVehicle *veh, const std::string &key, const std::string &value) const
try to set the given parameter for this carFollowingModel
double getACCAcceleration(const MSVehicle *veh) const
returns the ACC computed acceleration when the faked CACC is controlling the car. This can be used to...
MSCFModel * myHumanDriver
the car following model which drives the car when automated cruising is disabled, i...
const double myC1
design constant for CACC
The car-following model and parameter.
double _consensus(const MSVehicle *veh, double egoSpeed, Position egoPosition, double time) const
controller based on consensus strategy
double _v(const MSVehicle *const veh, double gap2pred, double egoSpeed, double predSpeed) const
double interactionGap(const MSVehicle *const, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
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 ...
const double myOmegaN
design constant for CACC
void recomputeParameters(const MSVehicle *veh) const
Recomputes controller related parameters after setting them.
void switchOnACC(const MSVehicle *veh, double ccDesiredSpeed) const
switch on the ACC, so disabling the human driver car control
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...
A point in 2D or 3D with translation and scaling methods.
MSCFModel_CC(const MSVehicleType *vtype)
Constructor.
const double myLambda
design constant for ACC
VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
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...
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
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...
int getMyLanesCount() const
returns the number of lanes set in the configuration file
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0) const
Computes the vehicle's safe speed (no dawdling)
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...
double _flatbed(const MSVehicle *veh, double egoAcceleration, double egoSpeed, double predSpeed, double gap2pred, double leaderSpeed) const
flatbed platoon towing model
void performAutoLaneChange(MSVehicle *const veh) const
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 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 myCcDecel
The maximum deceleration that the CC can output.
const double myFlatbedKa
flatbed CACC parameters
const double myConstantSpacing
the constant gap for CACC
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...
enum Plexe::ACTIVE_CONTROLLER getActiveController(const MSVehicle *veh) const
return the currently active controller
double getCACCConstantSpacing(const MSVehicle *veh) const
returns CACC desired constant spacing
const double myTau
engine time constant used for actuation lag
const double myPloegH
Ploeg's CACC parameters.
ACTIVE_CONTROLLER
Determines the currently active controller, i.e., ACC, CACC, or the driver. In future we might need t...
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...
void resetConsensus(const MSVehicle *veh) const
Resets the consensus controller. In particular, sets the "initialized" vector all to false...
const double myCcAccel
The maximum acceleration that the CC can output.
const double myKp
design constant for CC
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
double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) ...
void getRadarMeasurements(const MSVehicle *veh, double &distance, double &relativeSpeed) const
return the data that is currently being measured by the radar
int getModelID() const
Returns the model's name.