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 /****************************************************************************/
18 // Krauss car-following model, with acceleration decrease and faster start
19 /****************************************************************************/
20 #ifndef MSCFModel_Krauss_h
21 #define MSCFModel_Krauss_h
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include "MSCFModel_KraussOrig1.h"
30 
31 
32 // ===========================================================================
33 // class definitions
34 // ===========================================================================
40 public:
44  MSCFModel_Krauss(const MSVehicleType* vtype);
45 
46 
49 
53  double patchSpeedBeforeLC(const MSVehicle* veh, double vMin, double vMax) const;
54 
62  double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred) const;
63 
64 
74  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const;
75 
76 
81  int getModelID() const {
82  return SUMO_TAG_CF_KRAUSS;
83  }
85 
86 
91  MSCFModel* duplicate(const MSVehicleType* vtype) const;
92 
93 
94 protected:
95 
101  double dawdle2(double speed, double sigma, std::mt19937* rng) const;
102 
103 };
104 
105 #endif /* MSCFMODEL_KRAUSS_H */
106 
MSVehicleType
The car-following model and parameter.
Definition: MSVehicleType.h:66
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:57
MSCFModel_Krauss
Krauss car-following model, with acceleration decrease and faster start.
Definition: MSCFModel_Krauss.h:39
SUMO_TAG_CF_KRAUSS
Definition: SUMOXMLDefinitions.h:276
MSCFModel_Krauss::getModelID
int getModelID() const
Returns the model's name.
Definition: MSCFModel_Krauss.h:81
MSCFModel_Krauss::duplicate
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
Definition: MSCFModel_Krauss.cpp:127
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:82
MSCFModel_Krauss::~MSCFModel_Krauss
~MSCFModel_Krauss()
Destructor.
Definition: MSCFModel_Krauss.cpp:53
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:67
MSCFModel_KraussOrig1
The original Krauss (1998) car-following model and parameter.
Definition: MSCFModel_KraussOrig1.h:39
MSCFModel_Krauss::MSCFModel_Krauss
MSCFModel_Krauss(const MSVehicleType *vtype)
Constructor.
Definition: MSCFModel_Krauss.cpp:48
MSCFModel
The car-following model abstraction.
Definition: MSCFModel.h:57
config.h
MSCFModel_Krauss::dawdle2
double dawdle2(double speed, double sigma, std::mt19937 *rng) const
Applies driver imperfection (dawdling / sigma)
Definition: MSCFModel_Krauss.cpp:102
SUMOXMLDefinitions.h
MSVehicle
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80