Eclipse SUMO - Simulation of Urban MObility
MSVehicleType.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2001-2022 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
22// The car-following model and parameter
23/****************************************************************************/
24#include <config.h>
25
26#include <cassert>
33#include "MSNet.h"
48#include "MSVehicleControl.h"
50#include "MSVehicleType.h"
51
52
53// ===========================================================================
54// static members
55// ===========================================================================
57
58
59// ===========================================================================
60// method definitions
61// ===========================================================================
63 myParameter(parameter),
64 myEnergyParams(&parameter),
65 myWarnedActionStepLengthTauOnce(false),
66 myWarnedActionStepLengthBallisticOnce(false),
67 myWarnedStepLengthTauOnce(false),
68 myIndex(myNextIndex++),
69 myCarFollowModel(nullptr),
70 myOriginalType(nullptr) {
71 assert(getLength() > 0);
72 assert(getMaxSpeed() > 0);
73
74 // Check if actionStepLength was set by user, if not init to global default
77 }
79}
80
81
83 delete myCarFollowModel;
84}
85
86
87double
88MSVehicleType::computeChosenSpeedDeviation(SumoRNG* rng, const double minDev) const {
90}
91
92
93// ------------ Setter methods
94void
95MSVehicleType::setLength(const double& length) {
96 if (myOriginalType != nullptr && length < 0) {
98 } else {
99 myParameter.length = length;
100 }
102}
103
104
105void
106MSVehicleType::setHeight(const double& height) {
107 if (myOriginalType != nullptr && height < 0) {
109 } else {
110 myParameter.height = height;
111 }
113}
114
115
116void
117MSVehicleType::setMinGap(const double& minGap) {
118 if (myOriginalType != nullptr && minGap < 0) {
120 } else {
121 myParameter.minGap = minGap;
122 }
124}
125
126
127void
128MSVehicleType::setMinGapLat(const double& minGapLat) {
129 if (myOriginalType != nullptr && minGapLat < 0) {
131 } else {
132 myParameter.minGapLat = minGapLat;
133 }
135}
136
137
138void
139MSVehicleType::setMaxSpeed(const double& maxSpeed) {
140 if (myOriginalType != nullptr && maxSpeed < 0) {
142 } else {
143 myParameter.maxSpeed = maxSpeed;
144 }
146}
147
148
149void
150MSVehicleType::setMaxSpeedLat(const double& maxSpeedLat) {
151 if (myOriginalType != nullptr && maxSpeedLat < 0) {
153 } else {
154 myParameter.maxSpeedLat = maxSpeedLat;
155 }
157}
158
159
160void
162 myParameter.vehicleClass = vclass;
164}
165
166
167void
168MSVehicleType::setPreferredLateralAlignment(const LatAlignmentDefinition& latAlignment, double latAlignmentOffset) {
169 myParameter.latAlignmentProcedure = latAlignment;
170 myParameter.latAlignmentOffset = latAlignmentOffset;
172}
173
174void
176 myParameter.scale = value;
177}
178
179void
181 if (myOriginalType != nullptr && prob < 0) {
183 } else {
185 }
187}
188
189
190void
191MSVehicleType::setSpeedFactor(const double& factor) {
192 if (myOriginalType != nullptr && factor < 0) {
194 } else {
196 }
198}
199
200
201void
203 if (myOriginalType != nullptr && dev < 0) {
205 } else {
207 }
209}
210
211
212void
213MSVehicleType::setActionStepLength(const SUMOTime actionStepLength, bool resetActionOffset) {
214 assert(actionStepLength >= 0);
216
217 if (myParameter.actionStepLength == actionStepLength) {
218 return;
219 }
220
221 SUMOTime previousActionStepLength = myParameter.actionStepLength;
222 myParameter.actionStepLength = actionStepLength;
224 check();
225
226 if (isVehicleSpecific()) {
227 // don't perform vehicle lookup for singular vtype
228 return;
229 }
230
231 // For non-singular vType reset all vehicle's actionOffsets
232 // Iterate through vehicles
234 for (auto vehIt = vc.loadedVehBegin(); vehIt != vc.loadedVehEnd(); ++vehIt) {
235 MSVehicle* veh = static_cast<MSVehicle*>(vehIt->second);
236 if (&veh->getVehicleType() == this) {
237 // Found vehicle of this type. Perform requested actionOffsetReset
238 if (resetActionOffset) {
239 veh->resetActionOffset();
240 } else {
241 veh->updateActionOffset(previousActionStepLength, actionStepLength);
242 }
243 }
244 }
245}
246
247
248void
250 myParameter.emissionClass = eclass;
252}
253
254
255void
257 myParameter.mass = mass;
259}
260
261
262void
264 myParameter.color = color;
266}
267
268
269void
270MSVehicleType::setWidth(const double& width) {
271 if (myOriginalType != nullptr && width < 0) {
273 } else {
274 myParameter.width = width;
275 }
277}
278
279void
280MSVehicleType::setImpatience(const double impatience) {
281 if (myOriginalType != nullptr && impatience < 0) {
283 } else {
284 myParameter.impatience = impatience;
285 }
287}
288
289
290void
292 myParameter.shape = shape;
294}
295
296
297
298// ------------ Static methods for building vehicle types
301 MSVehicleType* vtype = new MSVehicleType(from);
304 // by default decel and apparentDecel are identical
305 const double apparentDecel = from.getCFParam(SUMO_ATTR_APPARENTDECEL, decel);
306
307 if (emergencyDecel < decel) {
308 WRITE_WARNING("Value of 'emergencyDecel' (" + toString(emergencyDecel) + ") should be higher than 'decel' (" + toString(decel) + ") for vType '" + from.id + "'.");
309 }
310 if (emergencyDecel < apparentDecel) {
311 WRITE_WARNING("Value of 'emergencyDecel' (" + toString(emergencyDecel) + ") is lower than 'apparentDecel' (" + toString(apparentDecel) + ") for vType '" + from.id + "' may cause collisions.");
312 }
313
314 switch (from.cfModel) {
315 case SUMO_TAG_CF_IDM:
316 vtype->myCarFollowModel = new MSCFModel_IDM(vtype, false);
317 break;
318 case SUMO_TAG_CF_IDMM:
319 vtype->myCarFollowModel = new MSCFModel_IDM(vtype, true);
320 break;
322 vtype->myCarFollowModel = new MSCFModel_Kerner(vtype);
323 break;
325 vtype->myCarFollowModel = new MSCFModel_KraussOrig1(vtype);
326 break;
328 vtype->myCarFollowModel = new MSCFModel_KraussPS(vtype);
329 break;
331 vtype->myCarFollowModel = new MSCFModel_KraussX(vtype);
332 break;
333 case SUMO_TAG_CF_EIDM:
334 vtype->myCarFollowModel = new MSCFModel_EIDM(vtype);
335 break;
337 vtype->myCarFollowModel = new MSCFModel_SmartSK(vtype);
338 break;
340 vtype->myCarFollowModel = new MSCFModel_Daniel1(vtype);
341 break;
343 vtype->myCarFollowModel = new MSCFModel_PWag2009(vtype);
344 break;
346 vtype->myCarFollowModel = new MSCFModel_Wiedemann(vtype);
347 break;
348 case SUMO_TAG_CF_W99:
349 vtype->myCarFollowModel = new MSCFModel_W99(vtype);
350 break;
351 case SUMO_TAG_CF_RAIL:
352 vtype->myCarFollowModel = new MSCFModel_Rail(vtype);
353 break;
354 case SUMO_TAG_CF_ACC:
355 vtype->myCarFollowModel = new MSCFModel_ACC(vtype);
356 break;
357 case SUMO_TAG_CF_CACC:
358 vtype->myCarFollowModel = new MSCFModel_CACC(vtype);
359 break;
360 case SUMO_TAG_CF_CC:
361 vtype->myCarFollowModel = new MSCFModel_CC(vtype);
362 break;
364 default:
365 vtype->myCarFollowModel = new MSCFModel_Krauss(vtype);
366 break;
367 }
368 // init Rail visualization parameters
370 return vtype;
371}
372
375 return (getParameter().getEntryManoeuvreTime(angle));
376}
377
380 return (getParameter().getExitManoeuvreTime(angle));
381}
382
384MSVehicleType::buildSingularType(const std::string& id) const {
385 return duplicateType(id, false);
386}
387
388
390MSVehicleType::duplicateType(const std::string& id, bool persistent) const {
392 vtype->myParameter.id = id;
394 if (!persistent) {
395 vtype->myOriginalType = this;
396 }
397 if (!MSNet::getInstance()->getVehicleControl().addVType(vtype)) {
398 std::string singular = persistent ? "" : "singular ";
399 throw ProcessError("could not add " + singular + "type " + vtype->getID());
400 }
401 return vtype;
402}
403
404void
408 && STEPS2TIME(myParameter.actionStepLength) > getCarFollowModel().getHeadwayTime()) {
410 std::stringstream s;
411 s << "Given action step length " << STEPS2TIME(myParameter.actionStepLength) << " for vehicle type '" << getID()
412 << "' is larger than its parameter tau (=" << getCarFollowModel().getHeadwayTime() << ")!"
413 << " This may lead to collisions. (This warning is only issued once per vehicle type).";
414 WRITE_WARNING(s.str());
415 }
420 std::string warning2;
421 if (OptionsCont::getOptions().isDefault("step-method.ballistic")) {
422 warning2 = " Setting it now to avoid collisions.";
424 } else {
425 warning2 = " This may cause collisions.";
426 }
427 WRITE_WARNINGF("Action step length '%' is used for vehicle type '%' but step-method.ballistic was not set." + warning2
429 }
430 if (!myWarnedStepLengthTauOnce && TS > getCarFollowModel().getHeadwayTime()
433 WRITE_WARNINGF(TL("Value of tau=% in vehicle type '%' lower than simulation step size may cause collisions."),
434 getCarFollowModel().getHeadwayTime(), getID());
435 }
436 if (MSGlobals::gUseMesoSim && getVehicleClass() != SVC_PEDESTRIAN && !OptionsCont::getOptions().getBool("meso-lane-queue")) {
437 SVCPermissions ignoreVClasses = parseVehicleClasses(OptionsCont::getOptions().getStringVector("meso-ignore-lanes-by-vclass"));
438 if ((ignoreVClasses & getVehicleClass()) != 0) {
439 WRITE_WARNINGF(TL("Vehicle class '%' of vType '%' is set as ignored by option --meso-ignore-lanes-by-vclass to ensure default vehicle capacity. Set option --meso-lane-queue for multi-modal meso simulation"),
441 }
442 }
443}
444
445void
447 if (myOriginalType != nullptr && accel < 0) {
449 }
452}
453
454void
456 if (myOriginalType != nullptr && decel < 0) {
458 }
461}
462
463void
464MSVehicleType::setEmergencyDecel(double emergencyDecel) {
465 if (myOriginalType != nullptr && emergencyDecel < 0) {
467 }
468 myCarFollowModel->setEmergencyDecel(emergencyDecel);
470}
471
472void
473MSVehicleType::setApparentDecel(double apparentDecel) {
474 if (myOriginalType != nullptr && apparentDecel < 0) {
476 }
477 myCarFollowModel->setApparentDecel(apparentDecel);
479}
480
481void
482MSVehicleType::setImperfection(double imperfection) {
483 if (myOriginalType != nullptr && imperfection < 0) {
485 }
486 myCarFollowModel->setImperfection(imperfection);
488}
489
490void
492 if (myOriginalType != nullptr && tau < 0) {
494 }
497}
498
499/****************************************************************************/
long long int SUMOTime
Definition: GUI.h:36
#define WRITE_WARNINGF(...)
Definition: MsgHandler.h:266
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:265
#define TL(string)
Definition: MsgHandler.h:282
SUMOTime DELTA_T
Definition: SUMOTime.cpp:37
#define STEPS2TIME(x)
Definition: SUMOTime.h:54
#define TS
Definition: SUMOTime.h:41
const long long int VTYPEPARS_SHAPE_SET
const long long int VTYPEPARS_WIDTH_SET
const long long int VTYPEPARS_ACTIONSTEPLENGTH_SET
const long long int VTYPEPARS_MAXSPEED_LAT_SET
const long long int VTYPEPARS_MAXSPEED_SET
const long long int VTYPEPARS_EMISSIONCLASS_SET
const long long int VTYPEPARS_LATALIGNMENT_SET
const long long int VTYPEPARS_COLOR_SET
const long long int VTYPEPARS_SPEEDFACTOR_SET
const long long int VTYPEPARS_MINGAP_SET
const long long int VTYPEPARS_PROBABILITY_SET
const long long int VTYPEPARS_HEIGHT_SET
const long long int VTYPEPARS_MASS_SET
LatAlignmentDefinition
Possible ways to choose the lateral alignment, i.e., how vehicles align themselves within their lane.
const long long int VTYPEPARS_VEHICLECLASS_SET
const long long int VTYPEPARS_IMPATIENCE_SET
const long long int VTYPEPARS_LENGTH_SET
const long long int VTYPEPARS_MINGAP_LAT_SET
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_PEDESTRIAN
pedestrian
int SUMOEmissionClass
SUMOVehicleShape
Definition of vehicle classes to differ between different appearances.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
@ SUMO_TAG_CF_KRAUSS
@ SUMO_TAG_CF_BKERNER
@ SUMO_TAG_CF_KRAUSSX
@ SUMO_TAG_CF_CACC
@ SUMO_TAG_CF_CC
@ SUMO_TAG_CF_KRAUSS_PLUS_SLOPE
@ SUMO_TAG_CF_IDM
@ SUMO_TAG_CF_W99
@ SUMO_TAG_CF_RAIL
@ SUMO_TAG_CF_SMART_SK
@ SUMO_TAG_CF_EIDM
@ SUMO_TAG_CF_PWAGNER2009
@ SUMO_TAG_CF_KRAUSS_ORIG1
@ SUMO_TAG_CF_WIEDEMANN
@ SUMO_TAG_CF_IDMM
@ SUMO_TAG_CF_DANIEL1
@ SUMO_TAG_CF_ACC
@ SUMO_ATTR_APPARENTDECEL
@ SUMO_ATTR_DECEL
@ SUMO_ATTR_EMERGENCYDECEL
@ SUMO_ATTR_ACCEL
@ SUMO_ATTR_SIGMA
@ SUMO_ATTR_TAU
int gPrecisionRandom
Definition: StdDefs.cpp:27
double roundDecimal(double x, int precision)
round to the given number of decimal digits
Definition: StdDefs.cpp:50
T MAX2(T a, T b)
Definition: StdDefs.h:77
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:46
double sample(SumoRNG *which=0) const
Draw a sample of the distribution.
std::vector< double > & getParameter()
Returns the parameters of this distribution.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
The ACC car-following model.
Definition: MSCFModel_ACC.h:47
The CACC car-following model.
A set of automatic Cruise Controllers, including classic Cruise Control (CC), Adaptive Cruise Control...
Definition: MSCFModel_CC.h:56
The original Krauss (1998) car-following model and parameter.
The Extended Intelligent Driver Model (EIDM) car-following model.
The Intelligent Driver Model (IDM) car-following model.
Definition: MSCFModel_IDM.h:39
car-following model by B. Kerner
Krauss car-following model, with acceleration decrease and faster start.
The original Krauss (1998) car-following model and parameter.
Krauss car-following model, changing accel and speed by slope.
Krauss car-following model, changing accel and speed by slope.
Scalable model based on Krauss by Peter Wagner.
The original Krauss (1998) car-following model and parameter.
The W99 Model car-following model.
Definition: MSCFModel_W99.h:40
The Wiedemann Model car-following model.
virtual void setImperfection(double imperfection)
Sets a new value for driver imperfection.
Definition: MSCFModel.h:560
double getEmergencyDecel() const
Get the vehicle type's maximal phisically possible deceleration [m/s^2].
Definition: MSCFModel.h:270
virtual void setHeadwayTime(double headwayTime)
Sets a new value for desired headway [s].
Definition: MSCFModel.h:568
virtual void setEmergencyDecel(double decel)
Sets a new value for maximal physically possible deceleration [m/s^2].
Definition: MSCFModel.h:544
virtual void setMaxAccel(double accel)
Sets a new value for maximum acceleration [m/s^2].
Definition: MSCFModel.h:528
virtual void setMaxDecel(double decel)
Sets a new value for maximal comfortable deceleration [m/s^2].
Definition: MSCFModel.h:536
double getApparentDecel() const
Get the vehicle type's apparent deceleration [m/s^2] (the one regarded by its followers.
Definition: MSCFModel.h:278
double getMaxAccel() const
Get the vehicle type's maximum acceleration [m/s^2].
Definition: MSCFModel.h:254
virtual double getImperfection() const
Get the driver's imperfection.
Definition: MSCFModel.h:301
double getMaxDecel() const
Get the vehicle type's maximal comfortable deceleration [m/s^2].
Definition: MSCFModel.h:262
virtual void setApparentDecel(double decel)
Sets a new value for the apparent deceleration [m/s^2].
Definition: MSCFModel.h:552
virtual MSCFModel * duplicate(const MSVehicleType *vtype) const =0
Duplicates the car-following model.
virtual double getHeadwayTime() const
Get the driver's desired headway [s].
Definition: MSCFModel.h:309
static bool gUseMesoSim
Definition: MSGlobals.h:103
static double gDefaultEmergencyDecel
encoding of the string-option default.emergencydecel
Definition: MSGlobals.h:127
static bool gSemiImplicitEulerUpdate
Definition: MSGlobals.h:53
static SUMOTime gActionStepLength
default value for the interval between two action points for MSVehicle (defaults to DELTA_T)
Definition: MSGlobals.h:115
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:183
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
Definition: MSNet.h:379
The class responsible for building and deletion of vehicles.
constVehIt loadedVehBegin() const
Returns the begin of the internal vehicle map.
constVehIt loadedVehEnd() const
Returns the end of the internal vehicle map.
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:77
void resetActionOffset(const SUMOTime timeUntilNextAction=0)
Resets the action offset for the vehicle.
Definition: MSVehicle.cpp:1989
void updateActionOffset(const SUMOTime oldActionStepLength, const SUMOTime newActionStepLength)
Process an updated action step length value (only affects the vehicle's action offset,...
Definition: MSVehicle.cpp:1995
The car-following model and parameter.
Definition: MSVehicleType.h:63
void setHeight(const double &height)
Set a new value for this type's height.
double getDefaultProbability() const
Get the default probability of this vehicle type.
void setMaxSpeedLat(const double &maxSpeedLat)
Set a new value for this type's maximum lateral speed.
double getMinGapLat() const
Get the minimum lateral gap that vehicles of this type maintain.
double getWidth() const
Get the width which vehicles of this class shall have when being drawn.
double myCachedActionStepLengthSecs
the vtypes actionsStepLength in seconds (cached because needed very often)
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
void setSpeedFactor(const double &factor)
Set a new value for this type's speed factor.
static MSVehicleType * build(SUMOVTypeParameter &from)
Builds the microsim vehicle type described by the given parameter.
void setEmissionClass(SUMOEmissionClass eclass)
Set a new value for this type's emission class.
double getMaxSpeed() const
Get vehicle's (technical) maximum speed [m/s].
MSVehicleType(const SUMOVTypeParameter &parameter)
Constructor.
void setDefaultProbability(const double &prob)
Set a new value for this type's default probability.
void setEmergencyDecel(double emergencyDecel)
Set a new value for this type's emergency deceleration.
void setSpeedDeviation(const double &dev)
Set a new value for this type's speed deviation.
bool myWarnedActionStepLengthTauOnce
Indicator whether the user was already warned once about an action step length larger than the desire...
const std::string & getID() const
Returns the name of the vehicle type.
Definition: MSVehicleType.h:91
MSCFModel * myCarFollowModel
instance of the car following model.
void setMinGapLat(const double &minGapLat)
Set a new value for this type's minimum lataral gap.
double getMinGap() const
Get the free space in front of vehicles of this class.
MSVehicleType * duplicateType(const std::string &id, bool persistent) const
Duplicates the microsim vehicle type giving the newly created type the given id.
SUMOVTypeParameter myParameter
the parameter container
bool myWarnedStepLengthTauOnce
void setApparentDecel(double apparentDecel)
Set a new value for this type's apparent deceleration.
double getHeight() const
Get the height which vehicles of this class shall have when being drawn.
void setMaxSpeed(const double &maxSpeed)
Set a new value for this type's maximum speed.
const MSVehicleType * myOriginalType
The original type.
void setLength(const double &length)
Set a new value for this type's length.
void setDecel(double decel)
Set a new value for this type's deceleration.
double getMaxSpeedLat() const
Get vehicle's maximum lateral speed [m/s].
SUMOTime getExitManoeuvreTime(const int angle) const
Accessor function for parameter equivalent returning exit time for a specific manoeuver angle.
void setVClass(SUMOVehicleClass vclass)
Set a new value for this type's vehicle class.
void setAccel(double accel)
Set a new value for this type's acceleration.
const MSCFModel & getCarFollowModel() const
Returns the vehicle type's car following model definition (const version)
void setWidth(const double &width)
Set a new value for this type's width.
void setColor(const RGBColor &color)
Set a new value for this type's color.
bool isVehicleSpecific() const
Returns whether this type belongs to a single vehicle only (was modified)
void setImpatience(const double impatience)
Set a new value for this type's impatience.
void setImperfection(double imperfection)
Set a new value for this type's imperfection.
void setPreferredLateralAlignment(const LatAlignmentDefinition &latAlignment, double latAlignmentOffset=0.0)
Set vehicle's preferred lateral alignment.
static int myNextIndex
next value for the running index
void setTau(double tau)
Set a new value for this type's headway.
void setActionStepLength(const SUMOTime actionStepLength, bool resetActionOffset)
Set a new value for this type's action step length.
double getLength() const
Get vehicle's length [m].
void setMass(double mass)
Set a new value for this type's mass.
void setMinGap(const double &minGap)
Set a new value for this type's minimum gap.
SUMOTime getEntryManoeuvreTime(const int angle) const
Accessor function for parameter equivalent returning entry time for a specific manoeuver angle.
double getImpatience() const
Returns this type's impatience.
const SUMOVTypeParameter & getParameter() const
double computeChosenSpeedDeviation(SumoRNG *rng, const double minDev=-1.) const
Computes and returns the speed deviation.
virtual ~MSVehicleType()
Destructor.
void setShape(SUMOVehicleShape shape)
Set a new value for this type's shape.
void check()
Checks whether vehicle type parameters may be problematic (Currently, only the value for the action s...
bool myWarnedActionStepLengthBallisticOnce
MSVehicleType * buildSingularType(const std::string &id) const
Duplicates the microsim vehicle type giving the newly created type the given id, marking it as vehicl...
void setScale(double value)
Set traffic scaling factor.
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:59
Structure representing possible vehicle parameter.
double width
This class' width.
SubParams cfParameter
Car-following parameter.
double defaultProbability
The probability when being added to a distribution without an explicit probability.
SUMOTime actionStepLength
The vehicle type's default actionStepLength [ms], i.e. the interval between two control actions....
bool wasSet(long long int what) const
Returns whether the given parameter was set.
double height
This class' height.
SUMOEmissionClass emissionClass
The emission class of this vehicle.
double latAlignmentOffset
(optional) The vehicle's desired lateral alignment as offset in m from center line
double length
The physical vehicle length.
double maxSpeedLat
The vehicle type's maximum lateral speed [m/s].
static double getDefaultDecel(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default deceleration for the given vehicle class This needs to be a function because the ...
RGBColor color
The color.
long long int parametersSet
Information for the router which parameter were set.
double minGap
This class' free space in front of the vehicle itself.
void initRailVisualizationParameters()
init Rail Visualization Parameters
SUMOVehicleShape shape
This class' shape.
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street.
double scale
individual scaling factor (-1 for undefined)
double maxSpeed
The vehicle type's (technical) maximum speed [m/s].
static double getDefaultEmergencyDecel(const SUMOVehicleClass vc, double decel, double defaultOption)
Returns the default emergency deceleration for the given vehicle class This needs to be a function be...
double getCFParam(const SumoXMLAttr attr, const double defaultValue) const
Returns the named value from the map, or the default if it is not contained there.
double minGapLat
The vehicle type's minimum lateral gap [m].
SUMOVehicleClass vehicleClass
The vehicle's class.
double mass
The mass.
std::string id
The vehicle type's id.
SumoXMLTag cfModel
The enum-representation of the car-following model to use.
LatAlignmentDefinition latAlignmentProcedure
Information on how the vehicle shall choose the lateral alignment.
double impatience
The vehicle's impatience (willingness to obstruct others)