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 // ===========================================================================
48 public:
49 
61  SUMOReal accel, SUMOReal decel,
62  SUMOReal security, SUMOReal estimation);
63 
64 
67 
68 
71 
77  SUMOReal moveHelper(MSVehicle* const veh, SUMOReal vPos) const;
78 
79 
88  SUMOReal followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const;
89 
90 
98  SUMOReal stopSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap) const;
99 
100 
110  SUMOReal interactionGap(const MSVehicle* const , SUMOReal vL) const;
111 
112 
117  int getModelID() const {
118  return SUMO_TAG_CF_WIEDEMANN;
119  }
120 
121 
126  MSCFModel* duplicate(const MSVehicleType* vtype) const;
127 
128 
130  return new VehicleVariables();
131  }
133 
134 
135 private:
137  public:
141  };
142 
143 
144 private:
145  /* @brief the main enty point for the speed computation
146  * @param[in] gap The netto gap (front bumper of ego to back bumper of leader)
147  */
148  SUMOReal _v(const MSVehicle* veh, SUMOReal predSpeed, SUMOReal gap) const;
149 
152  SUMOReal fullspeed(SUMOReal v, SUMOReal vpref, SUMOReal dx, SUMOReal bx) const; // also 'WUNSCH'
153  SUMOReal following(SUMOReal sign) const; // also 'FOLGEN'
154  SUMOReal approaching(SUMOReal dv, SUMOReal dx, SUMOReal bx) const; // also 'BREMSBX'
155  SUMOReal emergency(SUMOReal dv, SUMOReal dx) const; // also 'BREMSAX'
157 
158 private:
161 
164 
167 
169  const SUMOReal myAX;
170 
172  const SUMOReal myCX;
173 
176 
178  static const SUMOReal D_MAX;
180 
182  // standing obstacles (see MSCFModel_Krauss::_vsafe)
183  SUMOReal krauss_vsafe(SUMOReal gap, SUMOReal predSpeed) const;
184 
185 private:
188 };
189 
190 #endif /* MSCFModel_Wiedemann_H */
The Intellignet Driver Model (IDM) car-following model.
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:81
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&#39;s name.
The car-following model abstraction.
Definition: MSCFModel.h:59
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&#39;s safe speed (no dawdling)
const SUMOReal myEstimation
The driver&#39;s estimation parameter // also &#39;ZF2&#39;.
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) ...
const SUMOReal myMinAccel
The vehicle&#39;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&#39;s security parameter // also &#39;ZF1&#39;.
#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:213
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.