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-2022 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
20 // Scalable model based on Krauss by Peter Wagner
21 /****************************************************************************/
22 #pragma once
23 #include <config.h>
24 
25 #include "MSCFModel.h"
27 
28 
29 // ===========================================================================
30 // class definitions
31 // ===========================================================================
36 class MSCFModel_PWag2009 : public MSCFModel {
37 public:
41  MSCFModel_PWag2009(const MSVehicleType* vtype);
42 
43 
46 
47 
50 
56  double finalizeSpeed(MSVehicle* const veh, double vPos) const;
57 
59  double patchSpeedBeforeLC(const MSVehicle* veh, double vMin, double vMax) const;
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, double decel) 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 
@ SUMO_TAG_CF_PWAGNER2009
Scalable model based on Krauss by Peter Wagner.
~MSCFModel_PWag2009()
Destructor.
double myDecelDivTau
The precomputed value for myDecel/myTau.
double myTauLastDecel
The precomputed value for (minimum headway time)*myDecel.
double getImperfection() const
Get the driver's imperfection.
double myActionPointProbability
The probability for any action.
int getModelID() const
Returns the model's name.
double _v(const MSVehicle *const veh, double speed, double gap, double predSpeed) const
Returns the next velocity.
double patchSpeedBeforeLC(const MSVehicle *veh, double vMin, double vMax) const
apply dawdling
double dawdle(double speed) const
Applies driver imperfection (dawdling / sigma)
MSCFModel_PWag2009(const MSVehicleType *vtype)
Constructor.
double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred, double decel) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double myTauDecel
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.
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)
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
The car-following model abstraction.
Definition: MSCFModel.h:55
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:75
The car-following model and parameter.
Definition: MSVehicleType.h:62