SUMO - Simulation of Urban MObility
GNECalibratorVehicleType.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-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 // VehicleType used by GNECalibrators
18 /****************************************************************************/
19 #ifndef GNECalibratorVehicleType_h
20 #define GNECalibratorVehicleType_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
35 #include <utils/common/RGBColor.h>
36 
37 #include "GNEAttributeCarrier.h"
38 
39 // ===========================================================================
40 // class declaration
41 // ===========================================================================
42 
43 class GNECalibrator;
45 
46 // ===========================================================================
47 // class definitions
48 // ===========================================================================
54 
55 public:
58 
60  GNECalibratorVehicleType(GNECalibrator* calibratorParent, std::string vehicleTypeID,
61  double accel, double decel, double sigma, double tau, double length, double minGap,
62  double maxSpeed, double speedFactor, double speedDev, const RGBColor& color,
63  SUMOVehicleClass vClass, const std::string& emissionClass, SUMOVehicleShape shape,
64  double width, const std::string& filename, double impatience, const std::string& laneChangeModel,
65  const std::string& carFollowModel, int personCapacity, int containerCapacity, double boardingDuration,
66  double loadingDuration, const std::string& latAlignment, double minGapLat, double maxSpeedLat);
67 
70 
72  void writeVehicleType(OutputDevice& device);
73 
76 
79  /* @brief method for getting the Attribute of an XML key
80  * @param[in] key The attribute key
81  * @return string with the value associated to key
82  */
83  std::string getAttribute(SumoXMLAttr key) const;
84 
85  /* @brief method for setting the attribute and letting the object perform additional changes
86  * @param[in] key The attribute key
87  * @param[in] value The new value
88  * @param[in] undoList The undoList on which to register changes
89  * @param[in] net optionally the GNENet to inform about gui updates
90  */
91  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
92 
93  /* @brief method for setting the attribute and letting the object perform additional changes
94  * @param[in] key The attribute key
95  * @param[in] value The new value
96  * @param[in] undoList The undoList on which to register changes
97  */
98  bool isValid(SumoXMLAttr key, const std::string& value);
100 
101 private:
104 
106  std::string myVehicleTypeID;
107 
109  double myAccel;
110 
112  double myDecel;
113 
115  double mySigma;
116 
118  double myTau;
119 
121  double myLength;
122 
124  double myMinGap;
125 
127  double myMaxSpeed;
128 
131 
133  double mySpeedDev;
134 
137 
140 
142  std::string myEmissionClass;
143 
146 
148  double myWidth;
149 
151  std::string myFilename;
152 
154  double myImpatience;
155 
157  std::string myLaneChangeModel;
158 
160  std::string myCarFollowModel;
161 
164 
167 
170 
173 
175  std::string myLatAlignment;
176 
178  double myMinGapLat;
179 
182 
183 private:
185  void setAttribute(SumoXMLAttr key, const std::string& value);
186 
189 
192 };
193 
194 #endif
195 /****************************************************************************/
double myTau
Car-following model parameter.
double myMinGap
Empty space after leader [m].
double myMaxSpeedLat
The maximum lateral speed when using the sublane-model.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
double myImpatience
Willingess of drivers to impede vehicles with higher priority. See below for semantics.
double myWidth
The vehicle&#39;s width [m] (only used for drawing)
double myAccel
The acceleration ability of vehicles of this type (in m/s^2)
GNECalibrator * myCalibratorParent
pointer to calibrator parent
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
double myDecel
The deceleration ability of vehicles of this type (in m/s^2)
void writeVehicleType(OutputDevice &device)
write Flow values into a XML
std::string myLatAlignment
The preferred lateral alignment when using the sublane-model. One of (left, right, center, compact, nice, arbitrary).
double myLength
The vehicle&#39;s netto-length (length) (in m)
double mySigma
Car-following model parameter.
std::string myCarFollowModel
The model used for car following.
std::string myVehicleTypeID
vehicleType ID
bool isValid(SumoXMLAttr key, const std::string &value)
RGBColor myColor
This vehicle type&#39;s color.
int myPersonCapacity
The number of persons (excluding an autonomous driver) the vehicle can transport. ...
double mySpeedDev
The deviation of the speedFactor; see below for details.
SUMOVehicleClass myVClass
An abstract vehicle class.
GNECalibratorVehicleType * operator=(GNECalibratorVehicleType *)=delete
Invalidated assignment operator.
SUMOVehicleShape myShape
How this vehicle is rendered.
std::string myEmissionClass
An abstract emission class.
std::string myFilename
Image file for rendering vehicles of this type (should be grayscale to allow functional coloring) ...
Dialog for edit calibrators.
double myBoardingDuration
The time required by a person to board the vehicle.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent
double myLoadingDuration
The time required to load a container onto the vehicle.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
double myMinGapLat
The minimum lateral gap at a speed difference of 100km/h when using the sublane-model.
double myMaxSpeed
The vehicle&#39;s maximum velocity (in m/s)
double mySpeedFactor
The vehicles expected multiplicator for lane speed limits.
std::string myLaneChangeModel
The model used for changing lanes.
int myContainerCapacity
The number of containers the vehicle can transport.
GNECalibratorVehicleType(GNECalibratorDialog *calibratorDialog)
constructor (Used only in GNECalibratorDialog)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)