Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSCFModel_Kerner.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 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/****************************************************************************/
19// car-following model by B. Kerner
20/****************************************************************************/
21#pragma once
22#include <config.h>
23
24#include "MSCFModel.h"
26
27
28// ===========================================================================
29// class definitions
30// ===========================================================================
36public:
40 MSCFModel_Kerner(const MSVehicleType* vtype);
41
42
45
46
49
55 double finalizeSpeed(MSVehicle* const veh, double vPos) const;
56
65 double followSpeed(const MSVehicle* const veh, double speed, double gap2pred,
66 double predSpeed, double predMaxDecel, const MSVehicle* const pred = 0, const CalcReason usage = CalcReason::CURRENT) const;
67
68
76 double stopSpeed(const MSVehicle* const veh, const double speed, double gap2pred, double decel, const CalcReason usage = CalcReason::CURRENT) const;
77
78
83 int getModelID() const {
85 }
87
88
89
94 MSCFModel* duplicate(const MSVehicleType* vtype) const;
95
96
98
99
100private:
102 public:
103 double rand;
104 };
105
111 double _v(const MSVehicle* const veh, double speed, double vfree, double gap, double predSpeed) const;
112
113
114
115private:
119 double myK;
120
122 double myPhi;
123
127
128};
@ SUMO_TAG_CF_BKERNER
car-following model by B. Kerner
int getModelID() const
Returns the model's name.
MSCFModel * duplicate(const MSVehicleType *vtype) const
Duplicates the car-following model.
~MSCFModel_Kerner()
Destructor.
double myTauDecel
The precomputed value for myDecel*myTau.
double myPhi
Kerner's phi.
double _v(const MSVehicle *const veh, double speed, double vfree, double gap, double predSpeed) const
Returns the "safe" velocity.
double stopSpeed(const MSVehicle *const veh, const double speed, double gap2pred, double decel, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed for approaching a non-moving obstacle (no dawdling)
double followSpeed(const MSVehicle *const veh, double speed, double gap2pred, double predSpeed, double predMaxDecel, const MSVehicle *const pred=0, const CalcReason usage=CalcReason::CURRENT) const
Computes the vehicle's safe speed (no dawdling)
MSCFModel::VehicleVariables * createVehicleVariables() const
Returns model specific values which are stored inside a vehicle and must be used with casting.
double finalizeSpeed(MSVehicle *const veh, double vPos) const
Applies interaction with stops and lane changing model influences.
The car-following model abstraction.
Definition MSCFModel.h:55
CalcReason
What the return value of stop/follow/free-Speed is used for.
Definition MSCFModel.h:77
@ CURRENT
the return value is used for calculating the next speed
Definition MSCFModel.h:79
Representation of a vehicle in the micro simulation.
Definition MSVehicle.h:77
The car-following model and parameter.