SUMO - Simulation of Urban MObility
MSCFModel_PWag2009.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2010-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // Scalable model based on Krauss by Peter Wagner
20 /****************************************************************************/
21 #ifndef MSCFModel_PWag2009_h
22 #define MSCFModel_PWag2009_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"
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
44 class MSCFModel_PWag2009 : public MSCFModel {
45 public:
54  MSCFModel_PWag2009(const MSVehicleType* vtype, double accel,
55  double decel, double emergencyDecel, double apparentDecel,
56  double dawdle, double headwayTime, double tauLast, double apProb);
57 
58 
61 
62 
65 
71  double moveHelper(MSVehicle* const veh, double vPos) const;
72 
73 
82  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const;
83 
84 
92  double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const;
93 
94 
99  int getModelID() const {
101  }
102 
103 
107  double getImperfection() const {
108  return myDawdle;
109  }
111 
112 
113 
118  MSCFModel* duplicate(const MSVehicleType* vtype) const;
119 
120 
122  VehicleVariables* ret = new VehicleVariables();
123  ret->aOld = 0.0;
124  return ret;
125  }
126 
127 
128 private:
130  public:
131  double aOld;
132  };
133 
139  double _v(const MSVehicle* const veh, double speed, double gap, double predSpeed) const;
140 
141 
146  double dawdle(double speed) const;
147 
148 private:
152  double myDawdle;
153 
155  double myTauDecel;
156 
159 
162 
166 
167 };
168 
169 #endif /* MSCFModel_PWag2009_H */
double getImperfection() const
Get the driver&#39;s imperfection.
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:83
double myTauDecel
The precomputed value for myDecel*myTau.
The car-following model abstraction.
Definition: MSCFModel.h:59
~MSCFModel_PWag2009()
Destructor.
The car-following model and parameter.
Definition: MSVehicleType.h:72
double _v(const MSVehicle *const veh, double speed, double gap, double predSpeed) const
Returns the next velocity.
double myDecelDivTau
The precomputed value for myDecel/myTau.
virtual MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
int getModelID() const
Returns the model&#39;s name.
Scalable model based on Krauss by Peter Wagner.
double myTauLastDecel
The precomputed value for (minimum headway time)*myDecel.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred) const
Computes the vehicle&#39;s safe speed for approaching a non-moving obstacle (no dawdling) ...
MSCFModel_PWag2009(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double apparentDecel, double dawdle, double headwayTime, double tauLast, double apProb)
Constructor.
double dawdle(double speed) const
Applies driver imperfection (dawdling / sigma)
double myActionPointProbability
The probability for any action.
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const
Computes the vehicle&#39;s safe speed (no dawdling)
double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.