SUMO - Simulation of Urban MObility
MSCFModel_ACC.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 // ACC 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_ACC_H
25 #define MSCFModel_ACC_H
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #include <config.h>
31 
32 #include "MSCFModel.h"
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
38 class MSVehicle;
39 class MSVehicleType;
40 class MSCFModel_CACC;
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
49 class MSCFModel_ACC : public MSCFModel {
50 public:
54  MSCFModel_ACC(const MSVehicleType* vtype);
55 
58 
59 
62 
71  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const;
72 
73 
81  double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const;
82 
83 
93  double interactionGap(const MSVehicle* const, double vL) const;
94 
95 
100  int getModelID() const {
101  return SUMO_TAG_CF_ACC;
102  }
104 
105 
106 
111  MSCFModel* duplicate(const MSVehicleType* vtype) const;
112 
115  ret->ACC_ControlMode = 0;
116  ret->lastUpdateTime = 0;
117  return ret;
118  }
119 
120  friend class MSCFModel_CACC;
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 accelSpeedControl(double vErr) const;
137  double accelGapControl(const MSVehicle* const veh, const double gap2pred, const double speed, const double predSpeed, double vErr) const;
138 
139 
140 private:
148 
149 private:
152 };
153 
154 #endif /* MSCFModel_ACC_H */
double myGapControlGainSpeed
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:79
long long int SUMOTime
Definition: SUMOTime.h:36
double myGapClosingControlGainSpace
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) ...
The car-following model abstraction.
Definition: MSCFModel.h:57
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
virtual MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
The CACC car-following model.
~MSCFModel_ACC()
Destructor.
double myCollisionAvoidanceGainSpace
The car-following model and parameter.
Definition: MSVehicleType.h:66
double interactionGap(const MSVehicle *const, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
MSCFModel_ACC(const MSVehicleType *vtype)
Constructor.
The ACC car-following model.
Definition: MSCFModel_ACC.h:49
double mySpeedControlGain
double accelGapControl(const MSVehicle *const veh, const double gap2pred, const double speed, const double predSpeed, double vErr) const
double accelSpeedControl(double vErr) const
int ACC_ControlMode
The vehicle&#39;s ACC control mode. 0 for speed control and 1 for gap control.
double myCollisionAvoidanceGainSpeed
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_ACC & operator=(const MSCFModel_ACC &s)
Invalidated assignment operator.
int getModelID() const
Returns the model&#39;s name.
double _v(const MSVehicle *const veh, const double gap2pred, const double mySpeed, const double predSpeed, const double desSpeed, const bool respectMinGap=true) const
double myGapClosingControlGainSpeed
double myGapControlGainSpace