Eclipse 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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // Scalable model based on Krauss by Peter Wagner
18 /****************************************************************************/
19 #ifndef MSCFModel_PWag2009_h
20 #define MSCFModel_PWag2009_h
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include "MSCFModel.h"
29 
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
38 class MSCFModel_PWag2009 : public MSCFModel {
39 public:
43  MSCFModel_PWag2009(const MSVehicleType* vtype);
44 
45 
48 
49 
52 
58  double finalizeSpeed(MSVehicle* const veh, double vPos) const;
59 
60 
69  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const;
70 
71 
79  double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const;
80 
81 
86  int getModelID() const {
88  }
89 
90 
94  double getImperfection() const {
95  return myDawdle;
96  }
98 
99 
100 
105  MSCFModel* duplicate(const MSVehicleType* vtype) const;
106 
107 
109  VehicleVariables* ret = new VehicleVariables();
110  ret->aOld = 0.0;
111  return ret;
112  }
113 
114 
115 private:
117  public:
118  double aOld;
119  };
120 
126  double _v(const MSVehicle* const veh, double speed, double gap, double predSpeed) const;
127 
128 
133  double dawdle(double speed) const;
134 
135 private:
139  double myDawdle;
140 
142  double myTauDecel;
143 
146 
149 
153 
154 };
155 
156 #endif /* MSCFModel_PWag2009_H */
double getImperfection() const
Get the driver&#39;s imperfection.
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80
double myTauDecel
The precomputed value for myDecel*myTau.
The car-following model abstraction.
Definition: MSCFModel.h:57
~MSCFModel_PWag2009()
Destructor.
The car-following model and parameter.
Definition: MSVehicleType.h:66
double _v(const MSVehicle *const veh, double speed, double gap, double predSpeed) const
Returns the next velocity.
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0) const
Computes the vehicle&#39;s safe speed (no dawdling)
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)
Constructor.
double myActionPointProbability
The probability for any action.
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.