Eclipse SUMO - Simulation of Urban MObility
MSCFModel_Wiedemann.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // The psycho-physical model of Wiedemann
17 /****************************************************************************/
18 #ifndef MSCFModel_Wiedemann_H
19 #define MSCFModel_Wiedemann_H
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include "MSCFModel.h"
27 #include <microsim/MSLane.h>
28 #include <microsim/MSVehicle.h>
29 #include <microsim/MSVehicleType.h>
31 
32 
33 // ===========================================================================
34 // class definitions
35 // ===========================================================================
40 // XXX: which Wiedemann is this? There are several versions... Below it is stated that it is modified it with Krauss vsafe... (Leo)
42 public:
43 
47  MSCFModel_Wiedemann(const MSVehicleType* vtype);
48 
49 
52 
53 
56 
62  double finalizeSpeed(MSVehicle* const veh, double vPos) const;
63 
64 
73  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const;
74 
75 
83  double stopSpeed(const MSVehicle* const veh, const double speed, double gap) const;
84 
85 
95  double interactionGap(const MSVehicle* const, double vL) const;
96 
102  double getSecureGap(const double speed, const double leaderSpeed, const double leaderMaxDecel) const;
103 
108  int getModelID() const {
109  return SUMO_TAG_CF_WIEDEMANN;
110  }
111 
112 
117  MSCFModel* duplicate(const MSVehicleType* vtype) const;
118 
119 
121  return new VehicleVariables();
122  }
124 
125 
126 private:
128  public:
131  double accelSign;
132  };
133 
134 
135 private:
136  /* @brief the main enty point for the speed computation
137  * @param[in] gap The netto gap (front bumper of ego to back bumper of leader)
138  */
139  double _v(const MSVehicle* veh, double predSpeed, double gap) const;
140 
143  double fullspeed(double v, double vpref, double dx, double bx) const; // also 'WUNSCH'
144  double following(double sign) const; // also 'FOLGEN'
145  double approaching(double dv, double dx, double abx) const; // also 'BREMSBX'
146  double emergency(double dv, double dx) const; // also 'BREMSAX'
148 
149 private:
152 
154  const double mySecurity;
155 
157  const double myEstimation;
158 
160  const double myAX;
161 
163  const double myCX;
164 
166  const double myMinAccel;
167 
169  static const double D_MAX;
171 
172 private:
175 };
176 
177 #endif /* MSCFModel_Wiedemann_H */
The Wiedemann Model car-following model.
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
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:57
MSCFModel_Wiedemann & operator=(const MSCFModel_Wiedemann &s)
Invalidated assignment operator.
double getSecureGap(const double speed, const double leaderSpeed, const double leaderMaxDecel) const
Returns the minimum gap to reserve if the leader is braking at maximum (>=0)
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:66
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
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0) const
Computes the vehicle&#39;s safe speed (no dawdling)
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
VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
const double myMinAccel
The vehicle&#39;s minimum acceleration [m/s^2] // also b_null.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double approaching(double dv, double dx, double abx) const
MSCFModel_Wiedemann(const MSVehicleType *vtype)
Constructor.
const double myEstimation
The driver&#39;s estimation parameter // also &#39;ZF2&#39;.
const double myAX
the minimum front-bumper to front-bumper distance when standing
double fullspeed(double v, double vpref, double dx, double bx) const