SUMO - Simulation of Urban MObility
MSCFModel_Wiedemann.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // The psycho-physical model of Wiedemann
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef MSCFModel_Wiedemann_H
22 #define MSCFModel_Wiedemann_H
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include "MSCFModel.h"
34 #include <microsim/MSLane.h>
35 #include <microsim/MSVehicle.h>
36 #include <microsim/MSVehicleType.h>
38 
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
47 // XXX: which Wiedemann is this? There are several versions... Below it is stated that it is modified it with Krauss vsafe... (Leo)
49 public:
50 
63  double accel, double decel, double emergencyDecel,
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:60
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:74
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.
#define sign(a)
Definition: polyfonts.c:68
const double myMinAccel
The vehicle&#39;s minimum acceleration [m/s^2].
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
MSCFModel_Wiedemann(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double security, double estimation)
Constructor.
const double myEstimation
The driver&#39;s estimation parameter // also &#39;ZF2&#39;.
const double myAX
front-bumper to front-bumper distance
double fullspeed(double v, double vpref, double dx, double bx) const