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-2016 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 
62  SUMOReal accel, SUMOReal decel,
63  SUMOReal security, SUMOReal estimation);
64 
65 
68 
69 
72 
78  SUMOReal moveHelper(MSVehicle* const veh, SUMOReal vPos) const;
79 
80 
89  SUMOReal followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const;
90 
91 
99  SUMOReal stopSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap) const;
100 
101 
111  SUMOReal interactionGap(const MSVehicle* const , SUMOReal vL) const;
112 
113 
118  int getModelID() const {
119  return SUMO_TAG_CF_WIEDEMANN;
120  }
121 
122 
127  MSCFModel* duplicate(const MSVehicleType* vtype) const;
128 
129 
131  return new VehicleVariables();
132  }
134 
135 
136 private:
138  public:
142  };
143 
144 
145 private:
146  /* @brief the main enty point for the speed computation
147  * @param[in] gap The netto gap (front bumper of ego to back bumper of leader)
148  */
149  SUMOReal _v(const MSVehicle* veh, SUMOReal predSpeed, SUMOReal gap) const;
150 
153  SUMOReal fullspeed(SUMOReal v, SUMOReal vpref, SUMOReal dx, SUMOReal bx) const; // also 'WUNSCH'
154  SUMOReal following(SUMOReal sign) const; // also 'FOLGEN'
155  SUMOReal approaching(SUMOReal dv, SUMOReal dx, SUMOReal bx) const; // also 'BREMSBX'
156  SUMOReal emergency(SUMOReal dv, SUMOReal dx) const; // also 'BREMSAX'
158 
159 private:
162 
165 
168 
170  const SUMOReal myAX;
171 
173  const SUMOReal myCX;
174 
177 
179  static const SUMOReal D_MAX;
181 
183  // standing obstacles (see MSCFModel_Krauss::_vsafe)
184  SUMOReal krauss_vsafe(SUMOReal gap, SUMOReal predSpeed) const;
185 
186 private:
189 };
190 
191 #endif /* MSCFModel_Wiedemann_H */
The Wiedemann Model car-following model.
SUMOReal _v(const MSVehicle *veh, SUMOReal predSpeed, SUMOReal gap) const
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:82
MSCFModel_Wiedemann(const MSVehicleType *vtype, SUMOReal accel, SUMOReal decel, SUMOReal security, SUMOReal estimation)
Constructor.
SUMOReal interactionGap(const MSVehicle *const, SUMOReal vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
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.
const SUMOReal myAX
front-bumper to front-bumper distance
The car-following model and parameter.
Definition: MSVehicleType.h:74
SUMOReal accelSign
state variable for remembering the drift direction
static const SUMOReal D_MAX
free-flow distance in m
const SUMOReal myEstimation
The driver&#39;s estimation parameter // also &#39;ZF2&#39;.
const SUMOReal myMinAccel
The vehicle&#39;s minimum acceleration [m/s^2].
~MSCFModel_Wiedemann()
Destructor.
SUMOReal moveHelper(MSVehicle *const veh, SUMOReal vPos) const
Applies interaction with stops and lane changing model influences.
const SUMOReal myCX
perception threshold modifier
SUMOReal approaching(SUMOReal dv, SUMOReal dx, SUMOReal bx) const
SUMOReal following(SUMOReal sign) const
const SUMOReal mySecurity
The driver&#39;s security parameter // also &#39;ZF1&#39;.
VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
#define sign(a)
Definition: polyfonts.c:68
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
SUMOReal stopSpeed(const MSVehicle *const veh, const SUMOReal speed, SUMOReal gap) const
Computes the vehicle&#39;s safe speed for approaching a non-moving obstacle (no dawdling) ...
SUMOReal followSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Computes the vehicle&#39;s safe speed (no dawdling)
#define SUMOReal
Definition: config.h:213
SUMOReal fullspeed(SUMOReal v, SUMOReal vpref, SUMOReal dx, SUMOReal bx) const
SUMOReal emergency(SUMOReal dv, SUMOReal dx) const
SUMOReal krauss_vsafe(SUMOReal gap, SUMOReal predSpeed) const
vsafe from krauss since Wiedemann is deficient at approaching