SUMO - Simulation of Urban MObility
MSCFModel_Wiedemann.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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // The psycho-physical model of Wiedemann
19 /****************************************************************************/
20 #ifndef MSCFModel_Wiedemann_H
21 #define MSCFModel_Wiedemann_H
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include "MSCFModel.h"
33 #include <microsim/MSLane.h>
34 #include <microsim/MSVehicle.h>
35 #include <microsim/MSVehicleType.h>
37 
38 
39 // ===========================================================================
40 // class definitions
41 // ===========================================================================
46 // XXX: which Wiedemann is this? There are several versions... Below it is stated that it is modified it with Krauss vsafe... (Leo)
48 public:
49 
63  double accel, double decel, double emergencyDecel, double apparentDecel,
64  double security, double estimation);
65 
66 
69 
70 
73 
79  double moveHelper(MSVehicle* const veh, double vPos) const;
80 
81 
90  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const;
91 
92 
100  double stopSpeed(const MSVehicle* const veh, const double speed, double gap) const;
101 
102 
112  double interactionGap(const MSVehicle* const , double vL) const;
113 
114 
119  int getModelID() const {
120  return SUMO_TAG_CF_WIEDEMANN;
121  }
122 
123 
128  MSCFModel* duplicate(const MSVehicleType* vtype) const;
129 
130 
132  return new VehicleVariables();
133  }
135 
136 
137 private:
139  public:
142  double accelSign;
143  };
144 
145 
146 private:
147  /* @brief the main enty point for the speed computation
148  * @param[in] gap The netto gap (front bumper of ego to back bumper of leader)
149  */
150  double _v(const MSVehicle* veh, double predSpeed, double gap) const;
151 
154  double fullspeed(double v, double vpref, double dx, double bx) const; // also 'WUNSCH'
155  double following(double sign) const; // also 'FOLGEN'
156  double approaching(double dv, double dx, double bx) const; // also 'BREMSBX'
157  double emergency(double dv, double dx) const; // also 'BREMSAX'
159 
160 private:
163 
165  const double mySecurity;
166 
168  const double myEstimation;
169 
171  const double myAX;
172 
174  const double myCX;
175 
177  const double myMinAccel;
178 
180  static const double D_MAX;
182 
184  // standing obstacles (see MSCFModel_Krauss::_vsafe)
185  double krauss_vsafe(double gap, double predSpeed) const;
186 
187 private:
190 };
191 
192 #endif /* MSCFModel_Wiedemann_H */
The Wiedemann Model car-following model.
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:83
double krauss_vsafe(double gap, double predSpeed) const
vsafe from krauss since Wiedemann is deficient at approaching
const double myCX
perception threshold modifier
const double mySecurity
The driver&#39;s security parameter // also &#39;ZF1&#39;.
The car-following model abstraction.
Definition: MSCFModel.h:59
MSCFModel_Wiedemann & operator=(const MSCFModel_Wiedemann &s)
Invalidated assignment operator.
int getModelID() const
Returns the model&#39;s name.
double stopSpeed(const MSVehicle *const veh, const double speed, double gap) const
Computes the vehicle&#39;s safe speed for approaching a non-moving obstacle (no dawdling) ...
double following(double sign) const
The car-following model and parameter.
Definition: MSVehicleType.h:72
double interactionGap(const MSVehicle *const, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
double _v(const MSVehicle *veh, double predSpeed, double gap) const
static const double D_MAX
free-flow distance in m
double emergency(double dv, double dx) const
~MSCFModel_Wiedemann()
Destructor.
double accelSign
state variable for remembering the drift direction
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const
Computes the vehicle&#39;s safe speed (no dawdling)
VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
double approaching(double dv, double dx, double bx) const
double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
const double myMinAccel
The vehicle&#39;s minimum acceleration [m/s^2].
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
const double myEstimation
The driver&#39;s estimation parameter // also &#39;ZF2&#39;.
const double myAX
front-bumper to front-bumper distance
MSCFModel_Wiedemann(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double apparentDecel, double security, double estimation)
Constructor.
double fullspeed(double v, double vpref, double dx, double bx) const