SUMO - Simulation of Urban MObility
GNECalibratorVehicleType.h
Go to the documentation of this file.
1 /****************************************************************************/
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef GNECalibratorVehicleType_h
21 #define GNECalibratorVehicleType_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
36 
37 // ===========================================================================
38 // class declaration
39 // ===========================================================================
40 
41 class GNECalibrator;
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
51 public:
53  GNECalibratorVehicleType(GNECalibrator* calibratorParent);
54 
56  GNECalibratorVehicleType(GNECalibrator* calibratorParent, std::string vehicleTypeID,
57  double accel, double decel, double sigma, double tau, double length, double minGap,
58  double maxSpeed, double speedFactor, double speedDev, const std::string& color,
59  SUMOVehicleClass vClass, const std::string& emissionClass, SUMOVehicleShape shape,
60  double width, const std::string& filename, double impatience, const std::string& laneChangeModel,
61  const std::string& carFollowModel, int personCapacity, int containerCapacity, double boardingDuration,
62  double loadingDuration, const std::string& latAlignment, double minGapLat, double maxSpeedLat);
63 
66 
69 
71  SumoXMLTag getTag() const;
72 
74  std::string getVehicleTypeID() const;
75 
77  double getAccel() const;
78 
80  double getDecel() const;
81 
83  double getSigma() const;
84 
86  double getTau() const;
87 
89  double getLength() const;
90 
92  double getMinGap() const;
93 
95  double getMaxSpeed() const;
96 
98  double getSpeedFactor() const;
99 
101  double getSpeedDev() const;
102 
104  std::string getColor() const;
105 
107  SUMOVehicleClass getVClass() const;
108 
110  std::string getEmissionClass() const;
111 
113  SUMOVehicleShape getShape() const;
114 
116  double getWidth() const;
117 
119  std::string getFilename() const;
120 
122  double getImpatience() const;
123 
125  std::string getLaneChangeModel() const;
126 
128  std::string getCarFollowModel() const;
129 
131  int getPersonCapacity() const;
132 
134  int getContainerCapacity() const;
135 
137  double getBoardingDuration() const;
138 
140  double getLoadingDuration() const;
141 
143  std::string getLatAlignment() const;
144 
146  double getMinGapLat() const;
147 
149  double getMaxSpeedLat() const;
150 
154  bool setVehicleTypeID(std::string vehicleTypeID);
155 
159  bool setAccel(double accel = 2.6);
160 
164  bool setAccel(std::string accel);
165 
169  bool setDecel(double decel = 4.5);
170 
174  bool setDecel(std::string decel);
175 
179  bool setSigma(double sigma = 0.5);
180 
184  bool setSigma(std::string sigma);
185 
189  bool setTau(double tau = 1.0);
190 
194  bool setTau(std::string tau);
195 
199  bool setLength(double length = 5.0);
200 
204  bool setLength(std::string length);
205 
209  bool setMinGap(double minGap = 2.5);
210 
214  bool setMinGap(std::string minGap);
215 
219  bool setMaxSpeed(double maxSpeed = 70.0);
220 
224  bool setMaxSpeed(std::string maxSpeed);
225 
229  bool setSpeedFactor(double speedFactor = 1.0);
230 
234  bool setSpeedFactor(std::string speedFactor);
235 
239  bool setSpeedDev(double speedDev = 0.0);
240 
244  bool setSpeedDev(std::string speedDev);
245 
249  bool setColor(std::string color = "1,1,0");
250 
254  bool setVClass(SUMOVehicleClass vClass = SVC_PRIVATE);
255 
259  bool setVClass(std::string vClass);
260 
264  bool setEmissionClass(std::string emissionClass = "P_7_7");
265 
269  bool setShape(std::string shape);
270 
275 
279  bool setWidth(double width = 2.0);
280 
284  bool setWidth(std::string width);
285 
289  bool setFilename(std::string filename = "");
290 
294  bool setImpatience(double impatience = 0.0);
295 
299  bool setImpatience(std::string impatience);
300 
304  bool setLaneChangeModel(std::string laneChangeModel = "LC2013");
305 
309  bool setCarFollowModel(std::string carFollowModel = "Krauss");
310 
314  bool setPersonCapacity(int personCapacity = 4);
315 
319  bool setPersonCapacity(std::string personCapacity);
320 
324  bool setContainerCapacity(int containerCapacity = 0);
325 
329  bool setContainerCapacity(std::string containerCapacity);
330 
334  bool setBoardingDuration(double boardingDuration = 0.5);
335 
339  bool setBoardingDuration(std::string boardingDuration);
340 
344  bool setLoadingDuration(double loadingDuration = 90.0);
345 
349  bool setLoadingDuration(std::string loadingDuration);
350 
354  bool setLatAlignment(std::string latAlignment = "center");
355 
359  bool setMinGapLat(double minGapLat = 0.12);
360 
364  bool setMinGapLat(std::string minGapLat);
365 
369  bool setMaxSpeedLat(double maxSpeedLat = 1.0);
370 
374  bool setMaxSpeedLat(std::string maxSpeedLat);
375 
377  bool operator==(const GNECalibratorVehicleType& calibratorVehicleType) const;
378 
379 private:
382 
384  std::string myVehicleTypeID;
385 
387  double myAccel;
388 
390  double myDecel;
391 
393  double mySigma;
394 
396  double myTau;
397 
399  double myLength;
400 
402  double myMinGap;
403 
405  double myMaxSpeed;
406 
409 
411  double mySpeedDev;
412 
414  std::string myColor;
415 
418 
420  std::string myEmissionClass;
421 
424 
426  double myWidth;
427 
429  std::string myFilename;
430 
432  double myImpatience;
433 
435  std::string myLaneChangeModel;
436 
438  std::string myCarFollowModel;
439 
442 
445 
448 
451 
453  std::string myLatAlignment;
454 
456  double myMinGapLat;
457 
460 };
461 
462 #endif
463 /****************************************************************************/
double myTau
Car-following model parameter.
double myMinGap
Empty space after leader [m].
double myMaxSpeedLat
The maximum lateral speed when using the sublane-model.
SumoXMLTag
Numbers representing SUMO-XML - element names.
bool setTau(double tau=1.0)
set tau
std::string getVehicleTypeID() const
get VehicleTypeID
bool setDecel(double decel=4.5)
set decel
std::string getLatAlignment() const
get lateral lat
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
bool setLength(double length=5.0)
set length
double getWidth() const
get width
bool setImpatience(double impatience=0.0)
set impatience
double getLoadingDuration() const
get loading duration
double getImpatience() const
get impatience
bool setAccel(double accel=2.6)
set accel
double myImpatience
Willingess of drivers to impede vehicles with higher priority. See below for semantics.
bool setMinGapLat(double minGapLat=0.12)
set min gap lat
bool setEmissionClass(std::string emissionClass="P_7_7")
set emission class
bool setShape(std::string shape)
set shape (string version)
double getMinGapLat() const
get min gap lat
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)
SumoXMLTag getTag() const
get tag
bool setFilename(std::string filename="")
set filename
GNECalibrator * myCalibratorParent
pointer to calibrator parent
double myDecel
The deceleration ability of vehicles of this type (in m/s^2)
int getPersonCapacity() const
get person capacity
SUMOVehicleShape getShape() const
get shape
bool setMaxSpeed(double maxSpeed=70.0)
set max speed
std::string getLaneChangeModel() const
get lane change model
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 getDecel() const
get decel
std::string getFilename() const
get filename
double mySigma
Car-following model parameter.
double getLength() const
get length
double getMinGap() const
get min gap
std::string getEmissionClass() const
get emission class
std::string myCarFollowModel
The model used for car following.
bool setWidth(double width=2.0)
set width
std::string myVehicleTypeID
vehicleType ID
double getAccel() const
get accel
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.
bool setPersonCapacity(int personCapacity=4)
set person capacity
private vehicles
SUMOVehicleClass myVClass
An abstract vehicle class.
GNECalibratorVehicleType(GNECalibrator *calibratorParent)
constructor
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent
std::string getColor() const
get color
SUMOVehicleShape myShape
How this vehicle is rendered.
render as a passenger vehicle
std::string myEmissionClass
An abstract emission class.
bool setSigma(double sigma=0.5)
set sigma
std::string myFilename
Image file for rendering vehicles of this type (should be grayscale to allow functional coloring) ...
bool setSpeedDev(double speedDev=0.0)
set speed dev
double getBoardingDuration() const
get boarding duration
bool setBoardingDuration(double boardingDuration=0.5)
set boarding duration
bool setMaxSpeedLat(double maxSpeedLat=1.0)
set max speed lat
int getContainerCapacity() const
get container capacity
bool setLaneChangeModel(std::string laneChangeModel="LC2013")
set lane change model
double myBoardingDuration
The time required by a person to board the vehicle.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
bool setCarFollowModel(std::string carFollowModel="Krauss")
set car follow model
bool setMinGap(double minGap=2.5)
set min gap
bool setSpeedFactor(double speedFactor=1.0)
set speed factor
double getSpeedDev() const
get speed dev
SUMOVehicleClass getVClass() const
get VClass
double myLoadingDuration
The time required to load a container onto the vehicle.
double getMaxSpeed() const
get max speed
double getSigma() const
get sigma
std::string myColor
This vehicle type&#39;s color.
std::string getCarFollowModel() const
get car follow model
double myMinGapLat
The minimum lateral gap at a speed difference of 100km/h when using the sublane-model.
bool setVClass(SUMOVehicleClass vClass=SVC_PRIVATE)
set VClass
bool setColor(std::string color="1,1,0")
set color
double getSpeedFactor() const
get speed factor
bool setLoadingDuration(double loadingDuration=90.0)
set loading duration
bool setContainerCapacity(int containerCapacity=0)
set container capacity
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.
bool setVehicleTypeID(std::string vehicleTypeID)
set vehicleType ID
bool setLatAlignment(std::string latAlignment="center")
set lateral lat
bool operator==(const GNECalibratorVehicleType &calibratorVehicleType) const
overload operator ==
double getMaxSpeedLat() const
get max speed lat