SUMO - Simulation of Urban MObility
VehicleType.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2017-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // C++ TraCI client API implementation
18 /****************************************************************************/
19 
20 #ifndef SUMO_VehicleType_H
21 #define SUMO_VehicleType_H
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #include <string>
28 #include <libsumo/TraCIDefs.h>
29 #include <microsim/MSVehicleType.h>
30 
31 
32 // ===========================================================================
33 // class definitions
34 // ===========================================================================
39 namespace libsumo {
40 class VehicleType {
41 
42 public:
43 
44  static std::vector<std::string> getIDList();
45  static double getLength(const std::string& typeID);
46  static double getMaxSpeed(const std::string& typeID);
47  static double getActionStepLength(const std::string& typeID);
48  static double getSpeedFactor(const std::string& typeID);
49  static double getSpeedDeviation(const std::string& typeID);
50  static double getAccel(const std::string& typeID);
51  static double getDecel(const std::string& typeID);
52  static double getEmergencyDecel(const std::string& typeID);
53  static double getApparentDecel(const std::string& typeID);
54  static double getImperfection(const std::string& typeID);
55  static double getTau(const std::string& typeID);
56  static std::string getVehicleClass(const std::string& typeID);
57  static std::string getEmissionClass(const std::string& typeID);
58  static std::string getShapeClass(const std::string& typeID);
59  static double getMinGap(const std::string& typeID);
60  static double getWidth(const std::string& typeID);
61  static double getHeight(const std::string& typeID);
62  static TraCIColor getColor(const std::string& typeID);
63  static double getMinGapLat(const std::string& typeID);
64  static double getMaxSpeedLat(const std::string& typeID);
65  static std::string getLateralAlignment(const std::string& typeID);
66  static std::string getParameter(const std::string& typeID, const std::string& key);
67 
68  static void setLength(const std::string& typeID, double length);
69  static void setMaxSpeed(const std::string& typeID, double speed);
70  static void setActionStepLength(const std::string& typeID, double actionStepLength, bool resetActionOffset);
71  static void setVehicleClass(const std::string& typeID, const std::string& clazz);
72  static void setSpeedFactor(const std::string& typeID, double factor);
73  static void setSpeedDeviation(const std::string& typeID, double deviation);
74  static void setEmissionClass(const std::string& typeID, const std::string& clazz);
75  static void setShapeClass(const std::string& typeID, const std::string& shapeClass);
76  static void setWidth(const std::string& typeID, double width);
77  static void setHeight(const std::string& typeID, double height);
78  static void setMinGap(const std::string& typeID, double minGap);
79  static void setAccel(const std::string& typeID, double accel);
80  static void setDecel(const std::string& typeID, double decel);
81  static void setEmergencyDecel(const std::string& typeID, double decel);
82  static void setApparentDecel(const std::string& typeID, double decel);
83  static void setImperfection(const std::string& typeID, double imperfection);
84  static void setTau(const std::string& typeID, double tau);
85  static void setColor(const std::string& typeID, const TraCIColor& c);
86  static void setMinGapLat(const std::string& typeID, double minGapLat);
87  static void setMaxSpeedLat(const std::string& typeID, double speed);
88  static void setLateralAlignment(const std::string& typeID, const std::string& latAlignment);
89  static void copy(const std::string& origTypeID, const std::string& newTypeID);
90  static MSVehicleType* getVType(std::string id);
91 
92  static void setParameter(const std::string& id, const std::string& name, const std::string& value);
93 
94 private:
96  VehicleType();
97 
99  VehicleType(const VehicleType& src);
100 
102  VehicleType& operator=(const VehicleType& src);
103 
104 };
105 }
106 
107 
108 #endif //SUMO_VehicleType_H
109 
110 /****************************************************************************/
static double getImperfection(const std::string &typeID)
static void setSpeedFactor(const std::string &typeID, double factor)
static double getHeight(const std::string &typeID)
static double getDecel(const std::string &typeID)
Definition: VehicleType.cpp:85
static double getEmergencyDecel(const std::string &typeID)
Definition: VehicleType.cpp:91
static double getSpeedDeviation(const std::string &typeID)
Definition: VehicleType.cpp:73
static double getSpeedFactor(const std::string &typeID)
Definition: VehicleType.cpp:67
static double getMaxSpeed(const std::string &typeID)
Definition: VehicleType.cpp:55
static void setSpeedDeviation(const std::string &typeID, double deviation)
static void setLength(const std::string &typeID, double length)
static std::string getParameter(const std::string &typeID, const std::string &key)
static double getApparentDecel(const std::string &typeID)
Definition: VehicleType.cpp:97
static void setMaxSpeed(const std::string &typeID, double speed)
The car-following model and parameter.
Definition: MSVehicleType.h:72
static double getLength(const std::string &typeID)
Definition: VehicleType.cpp:49
static void setApparentDecel(const std::string &typeID, double decel)
static void setTau(const std::string &typeID, double tau)
static MSVehicleType * getVType(std::string id)
static std::string getVehicleClass(const std::string &typeID)
static void setWidth(const std::string &typeID, double width)
static void setMinGapLat(const std::string &typeID, double minGapLat)
static void setShapeClass(const std::string &typeID, const std::string &shapeClass)
static void copy(const std::string &origTypeID, const std::string &newTypeID)
static double getMaxSpeedLat(const std::string &typeID)
static void setActionStepLength(const std::string &typeID, double actionStepLength, bool resetActionOffset)
static double getWidth(const std::string &typeID)
VehicleType & operator=(const VehicleType &src)
invalidated assignment operator
VehicleType()
invalidated standard constructor
Definition: Edge.cpp:31
static void setDecel(const std::string &typeID, double decel)
static void setImperfection(const std::string &typeID, double imperfection)
static std::string getEmissionClass(const std::string &typeID)
static void setParameter(const std::string &id, const std::string &name, const std::string &value)
static void setEmergencyDecel(const std::string &typeID, double decel)
static void setLateralAlignment(const std::string &typeID, const std::string &latAlignment)
static void setMinGap(const std::string &typeID, double minGap)
static double getActionStepLength(const std::string &typeID)
Definition: VehicleType.cpp:61
static void setMaxSpeedLat(const std::string &typeID, double speed)
static double getMinGap(const std::string &typeID)
static void setColor(const std::string &typeID, const TraCIColor &c)
static double getMinGapLat(const std::string &typeID)
static double getTau(const std::string &typeID)
static double getAccel(const std::string &typeID)
Definition: VehicleType.cpp:79
static std::string getLateralAlignment(const std::string &typeID)
static void setHeight(const std::string &typeID, double height)
static void setEmissionClass(const std::string &typeID, const std::string &clazz)
static void setVehicleClass(const std::string &typeID, const std::string &clazz)
static std::string getShapeClass(const std::string &typeID)
static TraCIColor getColor(const std::string &typeID)
static void setAccel(const std::string &typeID, double accel)
static std::vector< std::string > getIDList()
Definition: VehicleType.cpp:42