SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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-2016 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:
52  MSCFModel_Kerner(const MSVehicleType* vtype, SUMOReal accel, SUMOReal decel, SUMOReal headwayTime, SUMOReal k, SUMOReal phi);
53 
54 
57 
58 
61 
67  SUMOReal moveHelper(MSVehicle* const veh, SUMOReal vPos) const;
68 
77  SUMOReal followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const;
78 
79 
87  SUMOReal stopSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap2pred) const;
88 
89 
94  int getModelID() const {
95  return SUMO_TAG_CF_BKERNER;
96  }
98 
99 
100 
105  MSCFModel* duplicate(const MSVehicleType* vtype) const;
106 
107 
109 
110 
111 private:
113  public:
115  };
116 
122  SUMOReal _v(const MSVehicle* const veh, SUMOReal speed, SUMOReal vfree, SUMOReal gap, SUMOReal predSpeed) const;
123 
124 
125 
126 private:
131 
134 
138 
139 };
140 
141 #endif /* MSCFModel_Kerner_H */
142 
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:82
car-following model by B. Kerner
MSCFModel_Kerner(const MSVehicleType *vtype, SUMOReal accel, SUMOReal decel, SUMOReal headwayTime, SUMOReal k, SUMOReal phi)
Constructor.
SUMOReal _v(const MSVehicle *const veh, SUMOReal speed, SUMOReal vfree, SUMOReal gap, SUMOReal predSpeed) const
Returns the "safe" velocity.
The car-following model abstraction.
Definition: MSCFModel.h:60
SUMOReal followSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Computes the vehicle's safe speed (no dawdling)
The car-following model and parameter.
Definition: MSVehicleType.h:74
SUMOReal moveHelper(MSVehicle *const veh, SUMOReal vPos) const
Applies interaction with stops and lane changing model influences.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
int getModelID() const
Returns the model's name.
SUMOReal myTauDecel
The precomputed value for myDecel*myTau.
SUMOReal myPhi
Kerner's phi.
MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting...
#define SUMOReal
Definition: config.h:214
SUMOReal stopSpeed(const MSVehicle *const veh, const SUMOReal speed, SUMOReal gap2pred) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) ...
~MSCFModel_Kerner()
Destructor.