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-2022 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
21 // Krauss car-following model, with acceleration decrease and faster start
22 /****************************************************************************/
23 #pragma once
24 #include <config.h>
25 
26 #include "MSCFModel_KraussOrig1.h"
28 
29 
30 // ===========================================================================
31 // class definitions
32 // ===========================================================================
38 public:
42  MSCFModel_Krauss(const MSVehicleType* vtype);
43 
44 
47 
51  double patchSpeedBeforeLC(const MSVehicle* veh, double vMin, double vMax) const;
52 
60  double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred, double decel) const;
61 
62 
72  double followSpeed(const MSVehicle* const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0) const;
73 
74 
79  int getModelID() const {
80  return SUMO_TAG_CF_KRAUSS;
81  }
83 
84 
89  MSCFModel* duplicate(const MSVehicleType* vtype) const;
90 
91 
92 protected:
93 
99  double dawdle2(double speed, double sigma, SumoRNG* rng) const;
100 
101 };
102 
103 
@ SUMO_TAG_CF_KRAUSS
Krauss car-following model, with acceleration decrease and faster start.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
double patchSpeedBeforeLC(const MSVehicle *veh, double vMin, double vMax) const
apply custom speed adaptations within the given speed bounds
int getModelID() const
Returns the model's name.
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.
double dawdle2(double speed, double sigma, SumoRNG *rng) const
Applies driver imperfection (dawdling / sigma)
double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred, double decel) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling) this uses the m...
~MSCFModel_Krauss()
Destructor.
MSCFModel_Krauss(const MSVehicleType *vtype)
Constructor.
The original Krauss (1998) car-following model and parameter.
The car-following model abstraction.
Definition: MSCFModel.h:55
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:75
The car-following model and parameter.
Definition: MSVehicleType.h:62