SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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-sim.org/
11 // Copyright (C) 2001-2013 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 */