 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
16 #ifndef MSCFMODEL_CC_H
17 #define MSCFMODEL_CC_H
100 double followSpeed(
const MSVehicle*
const veh,
double speed,
double gap2pred,
double predSpeed,
double predMaxDecel,
const MSVehicle*
const pred = 0)
const;
117 double stopSpeed(
const MSVehicle*
const veh,
const double speed,
double gap2pred)
const;
132 double maxSpeed,
const bool onInsertion =
false)
const;
273 double _v(
const MSVehicle*
const veh,
double gap2pred,
double egoSpeed,
double predSpeed)
const;
281 double _cc(
const MSVehicle* veh,
double egoSpeed,
double desSpeed)
const;
291 double _acc(
const MSVehicle* veh,
double egoSpeed,
double predSpeed,
double gap2pred,
double headwayTime)
const;
304 double _cacc(
const MSVehicle* veh,
double egoSpeed,
double predSpeed,
double predAcceleration,
double gap2pred,
double leaderSpeed,
double leaderAcceleration,
double spacing)
const;
316 double _ploeg(
const MSVehicle* veh,
double egoSpeed,
double predSpeed,
double predAcceleration,
double gap2pred)
const;
346 double _flatbed(
const MSVehicle* veh,
double egoAcceleration,
double egoSpeed,
double predSpeed,
347 double gap2pred,
double leaderSpeed)
const;
The car-following model and parameter.
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 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...
enum Plexe::ACTIVE_CONTROLLER getActiveController(const MSVehicle *veh) const
return the currently active controller
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.
double _flatbed(const MSVehicle *veh, double egoAcceleration, double egoSpeed, double predSpeed, double gap2pred, double leaderSpeed) const
flatbed platoon towing model
void getRadarMeasurements(const MSVehicle *veh, double &distance, double &relativeSpeed) const
return the data that is currently being measured by the radar
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....
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 myPloegH
Ploeg's CACC parameters.
const double myOmegaN
design constant for CACC
void recomputeParameters(const MSVehicle *veh) const
Recomputes controller related parameters after setting them.
const int myLanesCount
number of lanes in the highway, in the absence of on-/off-ramps. This is used to move to the correct ...
const double myC1
design constant for CACC
const double myKp
design constant for CC
double _v(const MSVehicle *const veh, double gap2pred, double egoSpeed, double predSpeed) const
const double myConstantSpacing
the constant gap for CACC
const double myLambda
design constant for ACC
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 myFlatbedKa
flatbed CACC parameters
virtual double maxNextSpeed(double speed, const MSVehicle *const veh) const
Returns the maximum speed given the current speed.
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 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 _consensus(const MSVehicle *veh, double egoSpeed, Position egoPosition, double time) const
controller based on consensus strategy
const double myCcAccel
The maximum acceleration that the CC can output.
~MSCFModel_CC()
Destructor.
const double myTau
engine time constant used for actuation lag
A point in 2D or 3D with translation and scaling methods.
void switchOnACC(const MSVehicle *veh, double ccDesiredSpeed) const
switch on the ACC, so disabling the human driver car control
A set of automatic Cruise Controllers, including classic Cruise Control (CC), Adaptive Cruise Control...
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting.
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...
const double myCcDecel
The maximum deceleration that the CC can output.
double getCACCConstantSpacing(const MSVehicle *veh) const
returns CACC desired constant spacing
int getModelID() const
Returns the model's name.
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...
const double myXi
design constant for CACC
The car-following model abstraction.
MSCFModel_CC & operator=(const MSCFModel_CC &)=delete
Invalidated assignment operator.
ACTIVE_CONTROLLER
Determines the currently active controller, i.e., ACC, CACC, or the driver. In future we might need t...
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...
double interactionGap(const MSVehicle *const, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
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_CC(const MSVehicleType *vtype)
Constructor.
MSCFModel * myHumanDriver
the car following model which drives the car when automated cruising is disabled, i....
void performAutoLaneChange(MSVehicle *const veh) const
virtual void setParameter(MSVehicle *veh, const std::string &key, const std::string &value) const
try to set the given parameter for this carFollowingModel
int getMyLanesCount() const
returns the number of lanes set in the configuration file
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)
Representation of a vehicle in the micro simulation.