Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSCFModel_Wiedemann.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2026 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>
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)
40public:
41
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,
72 double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0, const CalcReason usage = CalcReason::CURRENT) const;
73
74
82 double stopSpeed(const MSVehicle* const veh, const double speed, double gap, double decel, const CalcReason usage = CalcReason::CURRENT) const;
83
84
94 double interactionGap(const MSVehicle* const, double vL) const;
95
103 double getSecureGap(const MSVehicle* const veh, const MSVehicle* const pred, const double speed, const double leaderSpeed, const double leaderMaxDecel) const;
104
109 int getModelID() const {
111 }
112
113
118 MSCFModel* duplicate(const MSVehicleType* vtype) const;
119
120
122 return new VehicleVariables();
123 }
125
126
127private:
129 public:
132 double accelSign;
133
137 void saveState(OutputDevice& out, const MSCFModel& cfm) const;
138
142 void loadState(const SUMOSAXAttributes& attrs);
143 };
144
145
146private:
147 /* @brief the main enty point for the speed computation
148 * @param[in] gap The netto gap (front bumper of ego to back bumper of leader)
149 */
150 double _v(const MSVehicle* veh, double predSpeed, double gap, double predAccel) const;
151
154 double fullspeed(double v, double vpref, double dx, double bx) const; // also 'WUNSCH'
155 double following(double sign) const; // also 'FOLGEN'
156 double approaching(double dv, double dx, double abx, double predAccel) const; // also 'BREMSBX'
157 double emergency(double dv, double dx, double predAccel, double v, double gap, double abx, double bx) const; // also 'BREMSAX'
159
160private:
163
165 const double mySecurity;
166
168 const double myEstimation;
169
171 const double myAX;
172
174 const double myCX;
175
177 const double myMinAccel;
178
181
183 static const double D_MAX;
185
186private:
189};
@ SUMO_TAG_CF_WIEDEMANN
double accelSign
state variable for remembering the drift direction
void saveState(OutputDevice &out, const MSCFModel &cfm) const
Saves the vehicle variables.
void loadState(const SUMOSAXAttributes &attrs)
Loads the state of the vehicle variables from the given description.
The Wiedemann Model car-following model.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting.
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)
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
double stopSpeed(const MSVehicle *const veh, const double speed, double gap, double decel, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
const double myMaxApproachingDecel
The maximum deceleration when approaching.
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed (no dawdling)
double _v(const MSVehicle *veh, double predSpeed, double gap, double predAccel) const
static const double D_MAX
free-flow distance in m
MSCFModel_Wiedemann & operator=(const MSCFModel_Wiedemann &s)
Invalidated assignment operator.
const double myEstimation
The driver's estimation parameter // also 'ZF2'.
double fullspeed(double v, double vpref, double dx, double bx) const
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:59
CalcReason
What the return value of stop/follow/free-Speed is used for.
Definition MSCFModel.h:95
@ CURRENT
the return value is used for calculating the next speed
Definition MSCFModel.h:97
Representation of a vehicle in the micro simulation.
Definition MSVehicle.h:77
The car-following model and parameter.
Static storage of an output device and its base (abstract) implementation.
Encapsulated SAX-Attributes.