SUMO - Simulation of Urban MObility
GNECalibratorVehicleType.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // VehicleType used by GNECalibrators
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 #include <utils/common/RGBColor.h>
37 
38 // ===========================================================================
39 // class declaration
40 // ===========================================================================
41 
42 class GNECalibrator;
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
52 public:
54  GNECalibratorVehicleType(GNECalibrator* calibratorParent);
55 
57  GNECalibratorVehicleType(GNECalibrator* calibratorParent, std::string vehicleTypeID,
58  double accel, double decel, double sigma, double tau, double length, double minGap,
59  double maxSpeed, double speedFactor, double speedDev, const RGBColor& color,
60  SUMOVehicleClass vClass, const std::string& emissionClass, SUMOVehicleShape shape,
61  double width, const std::string& filename, double impatience, const std::string& laneChangeModel,
62  const std::string& carFollowModel, int personCapacity, int containerCapacity, double boardingDuration,
63  double loadingDuration, const std::string& latAlignment, double minGapLat, double maxSpeedLat);
64 
67 
70 
72  SumoXMLTag getTag() const;
73 
75  std::string getVehicleTypeID() const;
76 
78  double getAccel() const;
79 
81  double getDecel() const;
82 
84  double getSigma() const;
85 
87  double getTau() const;
88 
90  double getLength() const;
91 
93  double getMinGap() const;
94 
96  double getMaxSpeed() const;
97 
99  double getSpeedFactor() const;
100 
102  double getSpeedDev() const;
103 
105  const RGBColor& getColor() const;
106 
108  SUMOVehicleClass getVClass() const;
109 
111  std::string getEmissionClass() const;
112 
114  SUMOVehicleShape getShape() const;
115 
117  double getWidth() const;
118 
120  std::string getFilename() const;
121 
123  double getImpatience() const;
124 
126  std::string getLaneChangeModel() const;
127 
129  std::string getCarFollowModel() const;
130 
132  int getPersonCapacity() const;
133 
135  int getContainerCapacity() const;
136 
138  double getBoardingDuration() const;
139 
141  double getLoadingDuration() const;
142 
144  std::string getLatAlignment() const;
145 
147  double getMinGapLat() const;
148 
150  double getMaxSpeedLat() const;
151 
155  bool setVehicleTypeID(std::string vehicleTypeID);
156 
160  bool setAccel(double accel = 2.6);
161 
165  bool setAccel(std::string accel);
166 
170  bool setDecel(double decel = 4.5);
171 
175  bool setDecel(std::string decel);
176 
180  bool setSigma(double sigma = 0.5);
181 
185  bool setSigma(std::string sigma);
186 
190  bool setTau(double tau = 1.0);
191 
195  bool setTau(std::string tau);
196 
200  bool setLength(double length = 5.0);
201 
205  bool setLength(std::string length);
206 
210  bool setMinGap(double minGap = 2.5);
211 
215  bool setMinGap(std::string minGap);
216 
220  bool setMaxSpeed(double maxSpeed = 70.0);
221 
225  bool setMaxSpeed(std::string maxSpeed);
226 
230  bool setSpeedFactor(double speedFactor = 1.0);
231 
235  bool setSpeedFactor(std::string speedFactor);
236 
240  bool setSpeedDev(double speedDev = 0.0);
241 
245  bool setSpeedDev(std::string speedDev);
246 
250  bool setColor(const RGBColor& color);
251 
255  bool setColor(std::string color = "1,1,0");
256 
260  bool setVClass(SUMOVehicleClass vClass = SVC_PRIVATE);
261 
265  bool setVClass(std::string vClass);
266 
270  bool setEmissionClass(std::string emissionClass = "P_7_7");
271 
275  bool setShape(std::string shape);
276 
281 
285  bool setWidth(double width = 2.0);
286 
290  bool setWidth(std::string width);
291 
295  bool setFilename(std::string filename = "");
296 
300  bool setImpatience(double impatience = 0.0);
301 
305  bool setImpatience(std::string impatience);
306 
310  bool setLaneChangeModel(std::string laneChangeModel = "LC2013");
311 
315  bool setCarFollowModel(std::string carFollowModel = "Krauss");
316 
320  bool setPersonCapacity(int personCapacity = 4);
321 
325  bool setPersonCapacity(std::string personCapacity);
326 
330  bool setContainerCapacity(int containerCapacity = 0);
331 
335  bool setContainerCapacity(std::string containerCapacity);
336 
340  bool setBoardingDuration(double boardingDuration = 0.5);
341 
345  bool setBoardingDuration(std::string boardingDuration);
346 
350  bool setLoadingDuration(double loadingDuration = 90.0);
351 
355  bool setLoadingDuration(std::string loadingDuration);
356 
360  bool setLatAlignment(std::string latAlignment = "center");
361 
365  bool setMinGapLat(double minGapLat = 0.12);
366 
370  bool setMinGapLat(std::string minGapLat);
371 
375  bool setMaxSpeedLat(double maxSpeedLat = 1.0);
376 
380  bool setMaxSpeedLat(std::string maxSpeedLat);
381 
383  bool operator==(const GNECalibratorVehicleType& calibratorVehicleType) const;
384 
385 private:
388 
390  std::string myVehicleTypeID;
391 
393  double myAccel;
394 
396  double myDecel;
397 
399  double mySigma;
400 
402  double myTau;
403 
405  double myLength;
406 
408  double myMinGap;
409 
411  double myMaxSpeed;
412 
415 
417  double mySpeedDev;
418 
421 
424 
426  std::string myEmissionClass;
427 
430 
432  double myWidth;
433 
435  std::string myFilename;
436 
438  double myImpatience;
439 
441  std::string myLaneChangeModel;
442 
444  std::string myCarFollowModel;
445 
448 
451 
454 
457 
459  std::string myLatAlignment;
460 
462  double myMinGapLat;
463 
466 };
467 
468 #endif
469 /****************************************************************************/
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
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.
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
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
const RGBColor & getColor() const
get color
double myLoadingDuration
The time required to load a container onto the vehicle.
double getMaxSpeed() const
get max speed
bool setColor(const RGBColor &color)
set color
double getSigma() const
get sigma
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
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