Eclipse 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-2019 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 
90  double getSecureGap(const double speed, const double leaderSpeed, const double leaderMaxDecel) const;
91 
99  double insertionFollowSpeed(const MSVehicle* const v, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const;
100 
101 
111  double interactionGap(const MSVehicle* const, double vL) const;
112 
113 
118  int getModelID() const {
119  return SUMO_TAG_CF_CACC;
120  }
122 
123 
124 
129  MSCFModel* duplicate(const MSVehicleType* vtype) const;
130 
133  ret->CACC_ControlMode = 0;
134  ret->lastUpdateTime = 0;
135  return ret;
136  }
137 
138 
139 private:
141  public:
146  };
147 
148 
149 private:
150  double _v(const MSVehicle* const veh, const MSVehicle* const pred, const double gap2pred, const double mySpeed,
151  const double predSpeed, const double desSpeed, const bool respectMinGap = true) const;
152 
153  double speedSpeedContol(const double speed, double vErr) const;
154  double speedGapControl(const MSVehicle* const veh, const double gap2pred,
155  const double speed, const double predSpeed, const double desSpeed, double vErr,
156  const MSVehicle* const pred) const;
157 
158 private:
168 
169 private:
172 };
173 
174 #endif /* MSCFModel_CACC_H */
MSVehicleType
The car-following model and parameter.
Definition: MSVehicleType.h:66
MSCFModel_CACC::myGapControlGainGap
double myGapControlGainGap
Definition: MSCFModel_CACC.h:163
MSCFModel_CACC::insertionFollowSpeed
double insertionFollowSpeed(const MSVehicle *const v, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0) const
Computes the vehicle's acceptable speed at insertion.
Definition: MSCFModel_CACC.cpp:142
MSCFModel_CACC::stopSpeed
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)
Definition: MSCFModel_CACC.cpp:119
MSCFModel_CACC::duplicate
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
Definition: MSCFModel_CACC.cpp:345
MSCFModel_CACC::CACCVehicleVariables
Definition: MSCFModel_CACC.h:140
SUMO_TAG_CF_CACC
Definition: SUMOXMLDefinitions.h:289
MSCFModel_CACC::CACCVehicleVariables::CACCVehicleVariables
CACCVehicleVariables()
Definition: MSCFModel_CACC.h:142
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
MSCFModel_CACC
The CACC car-following model.
Definition: MSCFModel_CACC.h:49
MSCFModel_CACC::CACCVehicleVariables::lastUpdateTime
SUMOTime lastUpdateTime
Definition: MSCFModel_CACC.h:145
MSCFModel_CACC::myGapClosingControlGainGapDot
double myGapClosingControlGainGapDot
Definition: MSCFModel_CACC.h:162
MSCFModel_CACC::followSpeed
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)
Definition: MSCFModel_CACC.cpp:90
MSCFModel_CACC::myHeadwayTimeACC
double myHeadwayTimeACC
Definition: MSCFModel_CACC.h:167
MSCFModel_CACC::myGapControlGainGapDot
double myGapControlGainGapDot
Definition: MSCFModel_CACC.h:164
MSCFModel_CACC::mySpeedControlGain
double mySpeedControlGain
Definition: MSCFModel_CACC.h:160
MSCFModel_CACC::myCollisionAvoidanceGainGapDot
double myCollisionAvoidanceGainGapDot
Definition: MSCFModel_CACC.h:166
MSCFModel_CACC::getSecureGap
double getSecureGap(const double speed, const double leaderSpeed, const double leaderMaxDecel) const
Returns the a gap such that the gap mode acceleration of the follower is zero.
Definition: MSCFModel_CACC.cpp:128
MSCFModel_CACC::acc_CFM
MSCFModel_ACC acc_CFM
Definition: MSCFModel_CACC.h:159
MSCFModel_CACC::createVehicleVariables
virtual MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting.
Definition: MSCFModel_CACC.h:131
MSCFModel_ACC.h
MSCFModel_CACC::CACCVehicleVariables::CACC_ControlMode
int CACC_ControlMode
The vehicle's CACC precious time step gap error.
Definition: MSCFModel_CACC.h:144
MSCFModel_CACC::myCollisionAvoidanceGainGap
double myCollisionAvoidanceGainGap
Definition: MSCFModel_CACC.h:165
MSCFModel_ACC
The ACC car-following model.
Definition: MSCFModel_ACC.h:49
MSCFModel_CACC::speedSpeedContol
double speedSpeedContol(const double speed, double vErr) const
Definition: MSCFModel_CACC.cpp:187
MSCFModel_CACC::_v
double _v(const MSVehicle *const veh, const MSVehicle *const pred, const double gap2pred, const double mySpeed, const double predSpeed, const double desSpeed, const bool respectMinGap=true) const
Definition: MSCFModel_CACC.cpp:266
MSCFModel::VehicleVariables
Definition: MSCFModel.h:61
MSCFModel.h
MSCFModel
The car-following model abstraction.
Definition: MSCFModel.h:57
config.h
MSCFModel_CACC::getModelID
int getModelID() const
Returns the model's name.
Definition: MSCFModel_CACC.h:118
MSCFModel_CACC::MSCFModel_CACC
MSCFModel_CACC(const MSVehicleType *vtype)
Constructor.
Definition: MSCFModel_CACC.cpp:72
MSCFModel_CACC::operator=
MSCFModel_CACC & operator=(const MSCFModel_CACC &s)
Invalidated assignment operator.
MSCFModel_CACC::interactionGap
double interactionGap(const MSVehicle *const, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
Definition: MSCFModel_CACC.cpp:182
MSCFModel_CACC::myGapClosingControlGainGap
double myGapClosingControlGainGap
Definition: MSCFModel_CACC.h:161
SUMOXMLDefinitions.h
MSCFModel_CACC::~MSCFModel_CACC
~MSCFModel_CACC()
Destructor.
Definition: MSCFModel_CACC.cpp:86
MSCFModel_CACC::speedGapControl
double speedGapControl(const MSVehicle *const veh, const double gap2pred, const double speed, const double predSpeed, const double desSpeed, double vErr, const MSVehicle *const pred) const
Definition: MSCFModel_CACC.cpp:194
MSVehicle
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80