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 /****************************************************************************/
16 // Scalable model based on Krauss by Peter Wagner
17 /****************************************************************************/
18 #ifndef MSCFModel_PWag2009_h
19 #define MSCFModel_PWag2009_h
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include "MSCFModel.h"
28 
29 
30 // ===========================================================================
31 // class definitions
32 // ===========================================================================
37 class MSCFModel_PWag2009 : public MSCFModel {
38 public:
42  MSCFModel_PWag2009(const MSVehicleType* vtype);
43 
44 
47 
48 
51 
57  double finalizeSpeed(MSVehicle* const veh, double vPos) const;
58 
59 
68  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const;
69 
70 
78  double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const;
79 
80 
85  int getModelID() const {
87  }
88 
89 
93  double getImperfection() const {
94  return myDawdle;
95  }
97 
98 
99 
104  MSCFModel* duplicate(const MSVehicleType* vtype) const;
105 
106 
108  VehicleVariables* ret = new VehicleVariables();
109  ret->aOld = 0.0;
110  return ret;
111  }
112 
113 
114 private:
116  public:
117  double aOld;
118  };
119 
125  double _v(const MSVehicle* const veh, double speed, double gap, double predSpeed) const;
126 
127 
132  double dawdle(double speed) const;
133 
134 private:
138  double myDawdle;
139 
141  double myTauDecel;
142 
145 
148 
152 
153 };
154 
155 #endif /* MSCFModel_PWag2009_H */
MSVehicleType
The car-following model and parameter.
Definition: MSVehicleType.h:65
MSCFModel_PWag2009::myDawdle
double myDawdle
Definition: MSCFModel_PWag2009.h:138
MSCFModel_PWag2009::VehicleVariables::aOld
double aOld
Definition: MSCFModel_PWag2009.h:117
MSCFModel_PWag2009::myTauDecel
double myTauDecel
The precomputed value for myDecel*myTau.
Definition: MSCFModel_PWag2009.h:141
MSCFModel_PWag2009::myTauLastDecel
double myTauLastDecel
The precomputed value for (minimum headway time)*myDecel.
Definition: MSCFModel_PWag2009.h:147
MSCFModel_PWag2009::myDecelDivTau
double myDecelDivTau
The precomputed value for myDecel/myTau.
Definition: MSCFModel_PWag2009.h:144
MSCFModel_PWag2009::duplicate
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
Definition: MSCFModel_PWag2009.cpp:134
MSCFModel_PWag2009::stopSpeed
double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
Definition: MSCFModel_PWag2009.cpp:85
MSCFModel_PWag2009::dawdle
double dawdle(double speed) const
Applies driver imperfection (dawdling / sigma)
Definition: MSCFModel_PWag2009.cpp:104
MSCFModel_PWag2009::getModelID
int getModelID() const
Returns the model's name.
Definition: MSCFModel_PWag2009.h:85
MSCFModel_PWag2009::followSpeed
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0) const
Computes the vehicle's safe speed (no dawdling)
Definition: MSCFModel_PWag2009.cpp:63
MSCFModel_PWag2009::MSCFModel_PWag2009
MSCFModel_PWag2009(const MSVehicleType *vtype)
Constructor.
Definition: MSCFModel_PWag2009.cpp:35
MSCFModel_PWag2009::createVehicleVariables
virtual MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting.
Definition: MSCFModel_PWag2009.h:107
SUMO_TAG_CF_PWAGNER2009
Definition: SUMOXMLDefinitions.h:283
MSCFModel_PWag2009::finalizeSpeed
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
Definition: MSCFModel_PWag2009.cpp:49
MSCFModel_PWag2009::~MSCFModel_PWag2009
~MSCFModel_PWag2009()
Destructor.
Definition: MSCFModel_PWag2009.cpp:45
MSCFModel::VehicleVariables
Definition: MSCFModel.h:60
MSCFModel.h
MSCFModel_PWag2009::getImperfection
double getImperfection() const
Get the driver's imperfection.
Definition: MSCFModel_PWag2009.h:93
MSCFModel_PWag2009::_v
double _v(const MSVehicle *const veh, double speed, double gap, double predSpeed) const
Returns the next velocity.
MSCFModel
The car-following model abstraction.
Definition: MSCFModel.h:56
config.h
MSCFModel_PWag2009::VehicleVariables
Definition: MSCFModel_PWag2009.h:115
MSCFModel_PWag2009::myActionPointProbability
double myActionPointProbability
The probability for any action.
Definition: MSCFModel_PWag2009.h:150
SUMOXMLDefinitions.h
MSVehicle
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:79
MSCFModel_PWag2009
Scalable model based on Krauss by Peter Wagner.
Definition: MSCFModel_PWag2009.h:37