Eclipse SUMO - Simulation of Urban MObility
MSCFModel_Krauss.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 /****************************************************************************/
17 // Krauss car-following model, with acceleration decrease and faster start
18 /****************************************************************************/
19 #ifndef MSCFModel_Krauss_h
20 #define MSCFModel_Krauss_h
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include "MSCFModel_KraussOrig1.h"
29 
30 
31 // ===========================================================================
32 // class definitions
33 // ===========================================================================
39 public:
43  MSCFModel_Krauss(const MSVehicleType* vtype);
44 
45 
48 
52  double patchSpeedBeforeLC(const MSVehicle* veh, double vMin, double vMax) const;
53 
61  double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const;
62 
63 
73  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const;
74 
75 
80  int getModelID() const {
81  return SUMO_TAG_CF_KRAUSS;
82  }
84 
85 
90  MSCFModel* duplicate(const MSVehicleType* vtype) const;
91 
92 
93 protected:
94 
100  double dawdle2(double speed, double sigma, std::mt19937* rng) const;
101 
102 };
103 
104 #endif /* MSCFMODEL_KRAUSS_H */
105 
MSVehicleType
The car-following model and parameter.
Definition: MSVehicleType.h:65
MSCFModel_Krauss::patchSpeedBeforeLC
double patchSpeedBeforeLC(const MSVehicle *veh, double vMin, double vMax) const
apply custom speed adaptations within the given speed bounds
Definition: MSCFModel_Krauss.cpp:56
MSCFModel_Krauss
Krauss car-following model, with acceleration decrease and faster start.
Definition: MSCFModel_Krauss.h:38
SUMO_TAG_CF_KRAUSS
@ SUMO_TAG_CF_KRAUSS
Definition: SUMOXMLDefinitions.h:275
MSCFModel_Krauss::getModelID
int getModelID() const
Returns the model's name.
Definition: MSCFModel_Krauss.h:80
MSCFModel_Krauss::duplicate
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
Definition: MSCFModel_Krauss.cpp:119
MSCFModel_KraussOrig1.h
MSCFModel_Krauss::followSpeed
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) this uses the maximumSafeFollowSpeed.
Definition: MSCFModel_Krauss.cpp:76
MSCFModel_Krauss::~MSCFModel_Krauss
~MSCFModel_Krauss()
Destructor.
Definition: MSCFModel_Krauss.cpp:52
MSCFModel_Krauss::stopSpeed
double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) this uses the m...
Definition: MSCFModel_Krauss.cpp:66
MSCFModel_KraussOrig1
The original Krauss (1998) car-following model and parameter.
Definition: MSCFModel_KraussOrig1.h:38
MSCFModel_Krauss::MSCFModel_Krauss
MSCFModel_Krauss(const MSVehicleType *vtype)
Constructor.
Definition: MSCFModel_Krauss.cpp:47
MSCFModel
The car-following model abstraction.
Definition: MSCFModel.h:56
config.h
MSCFModel_Krauss::dawdle2
double dawdle2(double speed, double sigma, std::mt19937 *rng) const
Applies driver imperfection (dawdling / sigma)
Definition: MSCFModel_Krauss.cpp:94
SUMOXMLDefinitions.h
MSVehicle
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:79