Eclipse SUMO - Simulation of Urban MObility
MSCFModel_Kerner.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-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 // car-following model by B. Kerner
17 /****************************************************************************/
18 #ifndef MSCFModel_Kerner_h
19 #define MSCFModel_Kerner_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_Kerner : public MSCFModel {
38 public:
42  MSCFModel_Kerner(const MSVehicleType* vtype);
43 
44 
47 
48 
51 
57  double finalizeSpeed(MSVehicle* const veh, double vPos) const;
58 
67  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const;
68 
69 
77  double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const;
78 
79 
84  int getModelID() const {
85  return SUMO_TAG_CF_BKERNER;
86  }
88 
89 
90 
95  MSCFModel* duplicate(const MSVehicleType* vtype) const;
96 
97 
99 
100 
101 private:
103  public:
104  double rand;
105  };
106 
112  double _v(const MSVehicle* const veh, double speed, double vfree, double gap, double predSpeed) const;
113 
114 
115 
116 private:
120  double myK;
121 
123  double myPhi;
124 
126  double myTauDecel;
128 
129 };
130 
131 #endif /* MSCFModel_Kerner_H */
132 
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80
car-following model by B. Kerner
MSCFModel_Kerner(const MSVehicleType *vtype)
Constructor.
The car-following model abstraction.
Definition: MSCFModel.h:57
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
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)
int getModelID() const
Returns the model&#39;s name.
The car-following model and parameter.
Definition: MSVehicleType.h:66
MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
double myPhi
Kerner&#39;s phi.
double _v(const MSVehicle *const veh, double speed, double vfree, double gap, double predSpeed) const
Returns the "safe" velocity.
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
double myTauDecel
The precomputed value for myDecel*myTau.
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) ...
~MSCFModel_Kerner()
Destructor.