SUMO - Simulation of Urban MObility
MSCFModel_Krauss.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // Krauss car-following model, with acceleration decrease and faster start
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef MSCFModel_Krauss_h
24 #define MSCFModel_Krauss_h
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include "MSCFModel_KraussOrig1.h"
37 
38 
39 // ===========================================================================
40 // class definitions
41 // ===========================================================================
47 public:
54  MSCFModel_Krauss(const MSVehicleType* vtype, SUMOReal accel, SUMOReal decel, SUMOReal dawdle, SUMOReal headwayTime);
55 
56 
59 
60 
63 
72  SUMOReal followSpeed(const MSVehicle* const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const;
73 
74 
82  SUMOReal stopSpeed(const MSVehicle* const veh, const SUMOReal speed, SUMOReal gap2pred) const;
83 
84 
89  int getModelID() const {
90  return SUMO_TAG_CF_KRAUSS;
91  }
93 
94 
99  MSCFModel* duplicate(const MSVehicleType* vtype) const;
100 
101 
102 private:
108  SUMOReal _vsafe(SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const;
109 
112  SUMOReal _vstop(SUMOReal gap) const;
113 
114 
119  SUMOReal dawdle(SUMOReal speed) const;
120 
121 };
122 
123 #endif /* MSCFMODEL_KRAUSS_H */
124 
MSCFModel_Krauss(const MSVehicleType *vtype, SUMOReal accel, SUMOReal decel, SUMOReal dawdle, SUMOReal headwayTime)
Constructor.
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:77
SUMOReal _vsafe(SUMOReal gap, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Returns the "safe" velocity.
The car-following model abstraction.
Definition: MSCFModel.h:58
The original Krauss (1998) car-following model and parameter.
~MSCFModel_Krauss()
Destructor.
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) ...
The car-following model and parameter.
Definition: MSVehicleType.h:74
SUMOReal followSpeed(const MSVehicle *const veh, SUMOReal speed, SUMOReal gap2pred, SUMOReal predSpeed, SUMOReal predMaxDecel) const
Computes the vehicle's safe speed (no dawdling)
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
SUMOReal dawdle(SUMOReal speed) const
Applies driver imperfection (dawdling / sigma)
#define SUMOReal
Definition: config.h:215
Krauss car-following model, with acceleration decrease and faster start.
SUMOReal _vstop(SUMOReal gap) const
Returns the "safe" velocity for stopping within gap.
int getModelID() const
Returns the model's name.