SUMO - Simulation of Urban MObility
MSCFModel_Kerner.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // car-following model by B. Kerner
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef MSCFModel_Kerner_h
22 #define MSCFModel_Kerner_h
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include "MSCFModel.h"
35 
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
44 class MSCFModel_Kerner : public MSCFModel {
45 public:
55  MSCFModel_Kerner(const MSVehicleType* vtype, double accel,
56  double decel, double emergencyDecel, double apparentDecel,
57  double headwayTime, double k, double phi);
58 
59 
62 
63 
66 
72  double moveHelper(MSVehicle* const veh, double vPos) const;
73 
82  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const;
83 
84 
92  double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const;
93 
94 
99  int getModelID() const {
100  return SUMO_TAG_CF_BKERNER;
101  }
103 
104 
105 
110  MSCFModel* duplicate(const MSVehicleType* vtype) const;
111 
112 
114 
115 
116 private:
118  public:
119  double rand;
120  };
121 
127  double _v(const MSVehicle* const veh, double speed, double vfree, double gap, double predSpeed) const;
128 
129 
130 
131 private:
135  double myK;
136 
138  double myPhi;
139 
141  double myTauDecel;
143 
144 };
145 
146 #endif /* MSCFModel_Kerner_H */
147 
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:83
car-following model by B. Kerner
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel) const
Computes the vehicle&#39;s safe speed (no dawdling)
The car-following model abstraction.
Definition: MSCFModel.h:60
The car-following model and parameter.
Definition: MSVehicleType.h:73
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double _v(const MSVehicle *const veh, double speed, double vfree, double gap, double predSpeed) const
Returns the "safe" velocity.
double myPhi
Kerner&#39;s phi.
int getModelID() const
Returns the model&#39;s name.
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(const MSVehicleType *vtype, double accel, double decel, double emergencyDecel, double apparentDecel, double headwayTime, double k, double phi)
Constructor.
double moveHelper(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
double myTauDecel
The precomputed value for myDecel*myTau.
~MSCFModel_Kerner()
Destructor.