SUMO - Simulation of Urban MObility
MSCFModel_PWag2009.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Scalable model based on Krauss by Peter Wagner
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2010-2017 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef MSCFModel_PWag2009_h
23 #define MSCFModel_PWag2009_h
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include "MSCFModel.h"
36 
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
45 class MSCFModel_PWag2009 : public MSCFModel {
46 public:
54  MSCFModel_PWag2009(const MSVehicleType* vtype, double accel, double decel,
55  double emergencyDecel, double dawdle,
56  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:60
~MSCFModel_PWag2009()
Destructor.
The car-following model and parameter.
Definition: MSVehicleType.h:74
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) ...
double dawdle(double speed) const
Applies driver imperfection (dawdling / sigma)
MSCFModel_PWag2009(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double dawdle, double headwayTime, double tauLast, double apProb)
Constructor.
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.