SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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.
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 emergency(SUMOReal dv, SUMOReal dx) const
int getModelID() const
Returns the model's name.
The car-following model abstraction.
Definition: MSCFModel.h:60
MSCFModel_Wiedemann & operator=(const MSCFModel_Wiedemann &s)
Invalidated assignment operator.
SUMOReal moveHelper(MSVehicle *const veh, SUMOReal vPos) const
Applies interaction with stops and lane changing model influences.
VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
SUMOReal approaching(SUMOReal dv, SUMOReal dx, SUMOReal bx) const
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
SUMOReal followSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Computes the vehicle's safe speed (no dawdling)
const SUMOReal myEstimation
The driver's estimation parameter // also 'ZF2'.
SUMOReal stopSpeed(const MSVehicle *const veh, const SUMOReal speed, SUMOReal gap) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) ...
const SUMOReal myMinAccel
The vehicle's minimum acceleration [m/s^2].
SUMOReal fullspeed(SUMOReal v, SUMOReal vpref, SUMOReal dx, SUMOReal bx) const
~MSCFModel_Wiedemann()
Destructor.
SUMOReal following(SUMOReal sign) const
const SUMOReal myCX
perception threshold modifier
const SUMOReal mySecurity
The driver's security parameter // also 'ZF1'.
#define sign(a)
Definition: polyfonts.c:68
SUMOReal krauss_vsafe(SUMOReal gap, SUMOReal predSpeed) const
vsafe from krauss since Wiedemann is deficient at approaching
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
#define SUMOReal
Definition: config.h:214
SUMOReal _v(const MSVehicle *veh, SUMOReal predSpeed, SUMOReal gap) const
SUMOReal interactionGap(const MSVehicle *const , SUMOReal vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.