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:
55  MSCFModel_PWag2009(const MSVehicleType* vtype, double accel,
56  double decel, double emergencyDecel, double apparentDecel,
57  double dawdle, double headwayTime, double tauLast, double apProb);
58 
59 
62 
63 
66 
72  double moveHelper(MSVehicle* const veh, double vPos) const;
73 
74 
83  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const;
84 
85 
93  double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const;
94 
95 
100  int getModelID() const {
102  }
103 
104 
108  double getImperfection() const {
109  return myDawdle;
110  }
112 
113 
114 
119  MSCFModel* duplicate(const MSVehicleType* vtype) const;
120 
121 
123  VehicleVariables* ret = new VehicleVariables();
124  ret->aOld = 0.0;
125  return ret;
126  }
127 
128 
129 private:
131  public:
132  double aOld;
133  };
134 
140  double _v(const MSVehicle* const veh, double speed, double gap, double predSpeed) const;
141 
142 
147  double dawdle(double speed) const;
148 
149 private:
153  double myDawdle;
154 
156  double myTauDecel;
157 
160 
163 
167 
168 };
169 
170 #endif /* MSCFModel_PWag2009_H */
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:83
double myTauDecel
The precomputed value for myDecel*myTau.
int getModelID() const
Returns the model&#39;s name.
The car-following model abstraction.
Definition: MSCFModel.h:60
~MSCFModel_PWag2009()
Destructor.
double getImperfection() const
Get the driver&#39;s imperfection.
The car-following model and parameter.
Definition: MSVehicleType.h:73
virtual MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
double myDecelDivTau
The precomputed value for myDecel/myTau.
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const
Computes the vehicle&#39;s safe speed (no dawdling)
Scalable model based on Krauss by Peter Wagner.
double dawdle(double speed) const
Applies driver imperfection (dawdling / sigma)
double myTauLastDecel
The precomputed value for (minimum headway time)*myDecel.
MSCFModel_PWag2009(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double apparentDecel, double dawdle, double headwayTime, double tauLast, double apProb)
Constructor.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double myActionPointProbability
The probability for any action.
double _v(const MSVehicle *const veh, double speed, double gap, double predSpeed) const
Returns the next velocity.
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) ...