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-2022 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
19 // The psycho-physical model of Wiedemann
20 /****************************************************************************/
21 #pragma once
22 #include <config.h>
23 
24 #include "MSCFModel.h"
25 #include <microsim/MSLane.h>
26 #include <microsim/MSVehicle.h>
27 #include <microsim/MSVehicleType.h>
29 
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
38 // XXX: which Wiedemann is this? There are several versions... Below it is stated that it is modified it with Krauss vsafe... (Leo)
40 public:
41 
45  MSCFModel_Wiedemann(const MSVehicleType* vtype);
46 
47 
50 
51 
54 
60  double finalizeSpeed(MSVehicle* const veh, double vPos) const;
61 
62 
71  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const;
72 
73 
81  double stopSpeed(const MSVehicle* const veh, const double speed, double gap, double decel) const;
82 
83 
93  double interactionGap(const MSVehicle* const, double vL) const;
94 
102  double getSecureGap(const MSVehicle* const veh, const MSVehicle* const pred, 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, double predAccel) 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, double predAccel) const; // also 'BREMSBX'
146  double emergency(double dv, double dx, double predAccel, double v, double gap, double abx, double bx) 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  const double myMaxApproachingDecel;
170 
172  static const double D_MAX;
174 
175 private:
178 };
179 
@ SUMO_TAG_CF_WIEDEMANN
double accelSign
state variable for remembering the drift direction
The Wiedemann Model car-following model.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0) const
Computes the vehicle's safe speed (no dawdling)
double following(double sign) const
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
double getSecureGap(const MSVehicle *const veh, const MSVehicle *const pred, const double speed, const double leaderSpeed, const double leaderMaxDecel) const
Returns the minimum gap to reserve if the leader is braking at maximum (>=0)
~MSCFModel_Wiedemann()
Destructor.
const double myMinAccel
The vehicle's minimum acceleration [m/s^2] // also b_null.
double approaching(double dv, double dx, double abx, double predAccel) const
MSCFModel_Wiedemann & operator=(const MSCFModel_Wiedemann &s)
Invalidated assignment operator.
const double myMaxApproachingDecel
The maximum deceleration when approaching.
double _v(const MSVehicle *veh, double predSpeed, double gap, double predAccel) const
static const double D_MAX
free-flow distance in m
double stopSpeed(const MSVehicle *const veh, const double speed, double gap, double decel) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting.
const double myEstimation
The driver's estimation parameter // also 'ZF2'.
double fullspeed(double v, double vpref, double dx, double bx) const
MSCFModel_Wiedemann(const MSVehicleType *vtype)
Constructor.
double emergency(double dv, double dx, double predAccel, double v, double gap, double abx, double bx) const
const double myAX
the minimum front-bumper to front-bumper distance when standing
const double myCX
perception threshold modifier
double interactionGap(const MSVehicle *const, double vL) const
Returns the maximum gap at which an interaction between both vehicles occurs.
int getModelID() const
Returns the model's name.
const double mySecurity
The driver's security parameter // also 'ZF1'.
The car-following model abstraction.
Definition: MSCFModel.h:55
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:75
The car-following model and parameter.
Definition: MSVehicleType.h:62