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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // VehicleType used by GNECalibrators
16 /****************************************************************************/
17 #ifndef GNECalibratorVehicleType_h
18 #define GNECalibratorVehicleType_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 
25 #include "GNEAdditional.h"
26 
27 // ===========================================================================
28 // class declaration
29 // ===========================================================================
30 
31 class GNECalibrator;
33 
34 // ===========================================================================
35 // class definitions
36 // ===========================================================================
42 
43 public:
46 
48  GNECalibratorVehicleType(GNEViewNet* viewNet, const std::string& id);
49 
51  GNECalibratorVehicleType(GNEViewNet* viewNet, std::string vehicleTypeID,
52  double accel, double decel, double sigma, double tau, double length, double minGap,
53  double maxSpeed, double speedFactor, double speedDev, const RGBColor& color,
54  SUMOVehicleClass vClass, const std::string& emissionClass, SUMOVehicleShape shape,
55  double width, const std::string& filename, double impatience, const std::string& laneChangeModel,
56  const std::string& carFollowModel, int personCapacity, int containerCapacity, double boardingDuration,
57  double loadingDuration, const std::string& latAlignment, double minGapLat, double maxSpeedLat);
58 
61 
64 
67  void moveGeometry(const Position& offset);
68 
72  void commitGeometryMoving(GNEUndoList* undoList);
73 
75  void updateGeometry(bool updateGrid);
76 
80 
83 
86  std::string getParentName() const;
87 
92  void drawGL(const GUIVisualizationSettings& s) const;
94 
97  /* @brief method for getting the Attribute of an XML key
98  * @param[in] key The attribute key
99  * @return string with the value associated to key
100  */
101  std::string getAttribute(SumoXMLAttr key) const;
102 
103  /* @brief method for setting the attribute and letting the object perform additional changes
104  * @param[in] key The attribute key
105  * @param[in] value The new value
106  * @param[in] undoList The undoList on which to register changes
107  * @param[in] net optionally the GNENet to inform about gui updates
108  */
109  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
110 
111  /* @brief method for setting the attribute and letting the object perform additional changes
112  * @param[in] key The attribute key
113  * @param[in] value The new value
114  * @param[in] undoList The undoList on which to register changes
115  */
116  bool isValid(SumoXMLAttr key, const std::string& value);
117 
119  std::string getPopUpID() const;
120 
122  std::string getHierarchyName() const;
124 
125 private:
127  double myAccel;
128 
130  double myDecel;
131 
133  double mySigma;
134 
136  double myTau;
137 
139  double myLength;
140 
142  double myMinGap;
143 
145  double myMaxSpeed;
146 
149 
151  double mySpeedDev;
152 
155 
158 
160  std::string myEmissionClass;
161 
164 
166  double myWidth;
167 
169  std::string myFilename;
170 
172  double myImpatience;
173 
175  std::string myLaneChangeModel;
176 
178  std::string myCarFollowModel;
179 
182 
185 
188 
191 
193  std::string myLatAlignment;
194 
196  double myMinGapLat;
197 
200 
201 private:
203  void setAttribute(SumoXMLAttr key, const std::string& value);
204 
207 
210 };
211 
212 #endif
213 /****************************************************************************/
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...
void updateGeometry(bool updateGrid)
update pre-computed geometry information
Stores the information about how to visualize structures.
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's width [m] (only used for drawing)
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double myAccel
The acceleration ability of vehicles of this type (in m/s^2)
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string getParentName() const
Returns the name of the parent object.
GNECalibratorVehicleType(GNEViewNet *viewNet)
constructor (Used only in GNECalibratorDialog)
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
double myDecel
The deceleration ability of vehicles of this type (in m/s^2)
std::string myLatAlignment
The preferred lateral alignment when using the sublane-model. One of (left, right, center, compact, nice, arbitrary).
double myLength
The vehicle's netto-length (length) (in m)
double mySigma
Car-following model parameter.
Position getPositionInView() const
Returns position of additional in view.
std::string myCarFollowModel
The model used for car following.
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
RGBColor myColor
This vehicle type'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.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
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.
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
double myBoardingDuration
The time required by a person to board the vehicle.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
double myLoadingDuration
The time required to load a container onto the vehicle.
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
double myMinGapLat
The minimum lateral gap at a speed difference of 100km/h when using the sublane-model.
double myMaxSpeed
The vehicle'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.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...