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 #include <config.h>
25 
29 #include <utils/common/RGBColor.h>
30 
31 #include "GNEAdditional.h"
32 
33 // ===========================================================================
34 // class declaration
35 // ===========================================================================
36 
37 class GNECalibrator;
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
48 
49 public:
52 
54  GNECalibratorVehicleType(GNEViewNet* viewNet, const std::string& id);
55 
57  GNECalibratorVehicleType(GNEViewNet* viewNet, 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 
74  void moveGeometry(const Position& oldPos, const Position& offset);
75 
80  void commitGeometryMoving(const Position& oldPos, GNEUndoList* undoList);
81 
83  void updateGeometry(bool updateGrid);
84 
88 
91 
94  std::string getParentName() const;
95 
100  void drawGL(const GUIVisualizationSettings& s) const;
102 
105  /* @brief method for getting the Attribute of an XML key
106  * @param[in] key The attribute key
107  * @return string with the value associated to key
108  */
109  std::string getAttribute(SumoXMLAttr key) const;
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  * @param[in] net optionally the GNENet to inform about gui updates
116  */
117  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
118 
119  /* @brief method for setting the attribute and letting the object perform additional changes
120  * @param[in] key The attribute key
121  * @param[in] value The new value
122  * @param[in] undoList The undoList on which to register changes
123  */
124  bool isValid(SumoXMLAttr key, const std::string& value);
125 
127  std::string getPopUpID() const;
128 
130  std::string getHierarchyName() const;
132 
133 private:
135  double myAccel;
136 
138  double myDecel;
139 
141  double mySigma;
142 
144  double myTau;
145 
147  double myLength;
148 
150  double myMinGap;
151 
153  double myMaxSpeed;
154 
157 
159  double mySpeedDev;
160 
163 
166 
168  std::string myEmissionClass;
169 
172 
174  double myWidth;
175 
177  std::string myFilename;
178 
180  double myImpatience;
181 
183  std::string myLaneChangeModel;
184 
186  std::string myCarFollowModel;
187 
190 
193 
196 
199 
201  std::string myLatAlignment;
202 
204  double myMinGapLat;
205 
208 
209 private:
211  void setAttribute(SumoXMLAttr key, const std::string& value);
212 
215 
218 };
219 
220 #endif
221 /****************************************************************************/
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 moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
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&#39;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&#39;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.
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&#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.
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 commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
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&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:53
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&#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.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...