Line data Source code
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 : /****************************************************************************/
14 : /// @file MSCFModel_KraussPS.h
15 : /// @author Tobias Mayer
16 : /// @author Daniel Krajzewicz
17 : /// @author Jakob Erdmann
18 : /// @author Michael Behrisch
19 : /// @date Tue, 28 Jul 2009
20 : ///
21 : // Krauss car-following model, changing accel and speed by slope
22 : /****************************************************************************/
23 : #pragma once
24 : #include <config.h>
25 :
26 : #include "MSCFModel_Krauss.h"
27 : #include <utils/xml/SUMOXMLDefinitions.h>
28 :
29 :
30 : // ===========================================================================
31 : // class definitions
32 : // ===========================================================================
33 : /** @class MSCFModel_KraussPS
34 : * @brief Krauss car-following model, changing accel and speed by slope
35 : * @see MSCFModel
36 : * @see MSCFModel_Krauss
37 : */
38 : class MSCFModel_KraussPS : public MSCFModel_Krauss {
39 : public:
40 : /** @brief Constructor
41 : * @param[in] vtype the type for which this model is built and also the parameter object to configure this model
42 : */
43 : MSCFModel_KraussPS(const MSVehicleType* vtype);
44 :
45 :
46 : /// @brief Destructor
47 : ~MSCFModel_KraussPS();
48 :
49 :
50 : /// @name Implementations of the MSCFModel interface
51 : /// @{
52 :
53 : /** @brief Returns the maximum speed given the current speed
54 : *
55 : * The implementation of this method must take into account the time step
56 : * duration.
57 : *
58 : * Justification: Due to air brake or other influences, the vehicle's next maximum
59 : * speed may depend on the vehicle's current speed (given).
60 : *
61 : * @param[in] speed The vehicle's current speed
62 : * @param[in] speed The vehicle itself, for obtaining other values
63 : * @return The maximum possible speed for the next step
64 : */
65 : double maxNextSpeed(double speed, const MSVehicle* const veh) const;
66 :
67 :
68 : /** @brief Returns the model's name
69 : * @return The model's name
70 : * @see MSCFModel::getModelName
71 : */
72 0 : int getModelID() const {
73 0 : return SUMO_TAG_CF_KRAUSS_PLUS_SLOPE;
74 : }
75 : /// @}
76 :
77 :
78 : /** @brief Duplicates the car-following model
79 : * @param[in] vtype The vehicle type this model belongs to (1:1)
80 : * @return A duplicate of this car-following model
81 : */
82 : MSCFModel* duplicate(const MSVehicleType* vtype) const;
83 :
84 :
85 : };
|