SUMO - Simulation of Urban MObility
MSCFModel_CACC.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // CACC car-following model based on [1], [2].
16 // [1] Milanes, V., and S. E. Shladover. Handling Cut-In Vehicles in Strings
17 // of Cooperative Adaptive Cruise Control Vehicles. Journal of Intelligent
18 // Transportation Systems, Vol. 20, No. 2, 2015, pp. 178-191.
19 // [2] Xiao, L., M. Wang and B. van Arem. Realistic Car-Following Models for
20 // Microscopic Simulation of Adaptive and Cooperative Adaptive Cruise
21 // Control Vehicles. Transportation Research Record: Journal of the
22 // Transportation Research Board, No. 2623, 2017. (DOI: 10.3141/2623-01).
23 /****************************************************************************/
24 #ifndef MSCFModel_CACC_H
25 #define MSCFModel_CACC_H
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #include <config.h>
31 
32 #include "MSCFModel.h"
33 #include "MSCFModel_ACC.h"
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
39 class MSVehicle;
40 class MSVehicleType;
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
49 class MSCFModel_CACC : public MSCFModel {
50 public:
55  MSCFModel_CACC(const MSVehicleType* vtype);
56 
59 
60 
63 
72  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const;
73 
74 
82  double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const;
83 
84 
94  double interactionGap(const MSVehicle* const, double vL) const;
95 
96 
101  int getModelID() const {
102  return SUMO_TAG_CF_CACC;
103  }
105 
106 
107 
112  MSCFModel* duplicate(const MSVehicleType* vtype) const;
113 
116  ret->CACC_ControlMode = 0;
117  ret->lastUpdateTime = 0;
118  return ret;
119  }
120 
121 
122 private:
124  public:
129  };
130 
131 
132 private:
133  double _v(const MSVehicle* const veh, const double gap2pred, const double mySpeed,
134  const double predSpeed, const double desSpeed, const bool respectMinGap = true) const;
135 
136  double speedSpeedContol(const double speed, double vErr) const;
137  double speedGapControl(const MSVehicle* const veh, const double gap2pred,
138  const double speed, const double predSpeed, const double desSpeed, double vErr) const;
139 
140 private:
149 
150 private:
153 };
154 
155 #endif /* MSCFModel_CACC_H */
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:79
long long int SUMOTime
Definition: SUMOTime.h:36
The car-following model abstraction.
Definition: MSCFModel.h:57
int CACC_ControlMode
The vehicle&#39;s CACC precious time step gap error.
The CACC car-following model.
The car-following model and parameter.
Definition: MSVehicleType.h:66
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double myCollisionAvoidanceGainGapDot
double myGapClosingControlGainGapDot
double speedSpeedContol(const double speed, double vErr) const
double interactionGap(const MSVehicle *const, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
The ACC car-following model.
Definition: MSCFModel_ACC.h:49
MSCFModel_ACC acc_CFM
double myCollisionAvoidanceGainGap
MSCFModel_CACC & operator=(const MSCFModel_CACC &s)
Invalidated assignment operator.
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0) const
Computes the vehicle&#39;s safe speed (no dawdling)
MSCFModel_CACC(const MSVehicleType *vtype)
Constructor.
~MSCFModel_CACC()
Destructor.
double _v(const MSVehicle *const veh, const double gap2pred, const double mySpeed, const double predSpeed, const double desSpeed, const bool respectMinGap=true) const
virtual MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
double myGapControlGainGap
int getModelID() const
Returns the model&#39;s name.
double myGapClosingControlGainGap
double speedGapControl(const MSVehicle *const veh, const double gap2pred, const double speed, const double predSpeed, const double desSpeed, double vErr) const
double mySpeedControlGain
double myGapControlGainGapDot
double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred) const
Computes the vehicle&#39;s safe speed for approaching a non-moving obstacle (no dawdling) ...