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.dev/sumo
3// Copyright (C) 2001-2023 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 myParameter.impatience = impatience;
283}
284
285
286void
288 if (myOriginalType != nullptr && duration < 0) {
290 } else {
291 if (isPerson) {
292 myParameter.boardingDuration = duration;
293 } else {
294 myParameter.loadingDuration = duration;
295 }
296 }
298}
299
300void
302 myParameter.shape = shape;
304}
305
306
307
308// ------------ Static methods for building vehicle types
311 MSVehicleType* vtype = new MSVehicleType(from);
314 // by default decel and apparentDecel are identical
315 const double apparentDecel = from.getCFParam(SUMO_ATTR_APPARENTDECEL, decel);
316
317 if (emergencyDecel < decel) {
318 WRITE_WARNINGF(TL("Value of 'emergencyDecel' (%) should be higher than 'decel' (%) for vType '%'."), toString(emergencyDecel), toString(decel), from.id);
319 }
320 if (emergencyDecel < apparentDecel) {
321 WRITE_WARNINGF(TL("Value of 'emergencyDecel' (%) is lower than 'apparentDecel' (%) for vType '%' may cause collisions."), toString(emergencyDecel), toString(apparentDecel), from.id);
322 }
323
324 switch (from.cfModel) {
325 case SUMO_TAG_CF_IDM:
326 vtype->myCarFollowModel = new MSCFModel_IDM(vtype, false);
327 break;
328 case SUMO_TAG_CF_IDMM:
329 vtype->myCarFollowModel = new MSCFModel_IDM(vtype, true);
330 break;
332 vtype->myCarFollowModel = new MSCFModel_Kerner(vtype);
333 break;
335 vtype->myCarFollowModel = new MSCFModel_KraussOrig1(vtype);
336 break;
338 vtype->myCarFollowModel = new MSCFModel_KraussPS(vtype);
339 break;
341 vtype->myCarFollowModel = new MSCFModel_KraussX(vtype);
342 break;
343 case SUMO_TAG_CF_EIDM:
344 vtype->myCarFollowModel = new MSCFModel_EIDM(vtype);
345 break;
347 vtype->myCarFollowModel = new MSCFModel_SmartSK(vtype);
348 break;
350 vtype->myCarFollowModel = new MSCFModel_Daniel1(vtype);
351 break;
353 vtype->myCarFollowModel = new MSCFModel_PWag2009(vtype);
354 break;
356 vtype->myCarFollowModel = new MSCFModel_Wiedemann(vtype);
357 break;
358 case SUMO_TAG_CF_W99:
359 vtype->myCarFollowModel = new MSCFModel_W99(vtype);
360 break;
361 case SUMO_TAG_CF_RAIL:
362 vtype->myCarFollowModel = new MSCFModel_Rail(vtype);
363 break;
364 case SUMO_TAG_CF_ACC:
365 vtype->myCarFollowModel = new MSCFModel_ACC(vtype);
366 break;
367 case SUMO_TAG_CF_CACC:
368 vtype->myCarFollowModel = new MSCFModel_CACC(vtype);
369 break;
370 case SUMO_TAG_CF_CC:
371 vtype->myCarFollowModel = new MSCFModel_CC(vtype);
372 break;
374 default:
375 vtype->myCarFollowModel = new MSCFModel_Krauss(vtype);
376 break;
377 }
378 // init Rail visualization parameters
380 return vtype;
381}
382
385 return (getParameter().getEntryManoeuvreTime(angle));
386}
387
390 return (getParameter().getExitManoeuvreTime(angle));
391}
392
394MSVehicleType::buildSingularType(const std::string& id) const {
395 return duplicateType(id, false);
396}
397
398
400MSVehicleType::duplicateType(const std::string& id, bool persistent) const {
402 vtype->myParameter.id = id;
404 if (!persistent) {
405 vtype->myOriginalType = this;
406 }
407 if (!MSNet::getInstance()->getVehicleControl().addVType(vtype)) {
408 std::string singular = persistent ? "" : "singular ";
409 throw ProcessError("could not add " + singular + "type " + vtype->getID());
410 }
411 return vtype;
412}
413
414void
418 && STEPS2TIME(myParameter.actionStepLength) > getCarFollowModel().getHeadwayTime()) {
420 std::stringstream s;
421 s << "Given action step length " << STEPS2TIME(myParameter.actionStepLength) << " for vehicle type '" << getID()
422 << "' is larger than its parameter tau (=" << getCarFollowModel().getHeadwayTime() << ")!"
423 << " This may lead to collisions. (This warning is only issued once per vehicle type).";
424 WRITE_WARNING(s.str());
425 }
430 std::string warning2;
431 if (OptionsCont::getOptions().isDefault("step-method.ballistic")) {
432 warning2 = " Setting it now to avoid collisions.";
434 } else {
435 warning2 = " This may cause collisions.";
436 }
437 WRITE_WARNINGF("Action step length '%' is used for vehicle type '%' but step-method.ballistic was not set." + warning2
439 }
440 if (!myWarnedStepLengthTauOnce && TS > getCarFollowModel().getHeadwayTime()
443 WRITE_WARNINGF(TL("Value of tau=% in vehicle type '%' lower than simulation step size may cause collisions."),
444 getCarFollowModel().getHeadwayTime(), getID());
445 }
446 if (MSGlobals::gUseMesoSim && getVehicleClass() != SVC_PEDESTRIAN && !OptionsCont::getOptions().getBool("meso-lane-queue")) {
447 SVCPermissions ignoreVClasses = parseVehicleClasses(OptionsCont::getOptions().getStringVector("meso-ignore-lanes-by-vclass"));
448 if ((ignoreVClasses & getVehicleClass()) != 0) {
449 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"),
451 }
452 }
453}
454
455void
457 if (myOriginalType != nullptr && accel < 0) {
459 }
462}
463
464void
466 if (myOriginalType != nullptr && decel < 0) {
468 }
471}
472
473void
474MSVehicleType::setEmergencyDecel(double emergencyDecel) {
475 if (myOriginalType != nullptr && emergencyDecel < 0) {
477 }
478 myCarFollowModel->setEmergencyDecel(emergencyDecel);
480}
481
482void
483MSVehicleType::setApparentDecel(double apparentDecel) {
484 if (myOriginalType != nullptr && apparentDecel < 0) {
486 }
487 myCarFollowModel->setApparentDecel(apparentDecel);
489}
490
491void
492MSVehicleType::setImperfection(double imperfection) {
493 if (myOriginalType != nullptr && imperfection < 0) {
495 }
496 myCarFollowModel->setImperfection(imperfection);
498}
499
500void
502 if (myOriginalType != nullptr && tau < 0) {
504 }
507}
508
509/****************************************************************************/
long long int SUMOTime
Definition: GUI.h:36
#define WRITE_WARNINGF(...)
Definition: MsgHandler.h:271
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:270
#define TL(string)
Definition: MsgHandler.h:287
SUMOTime DELTA_T
Definition: SUMOTime.cpp:38
#define STEPS2TIME(x)
Definition: SUMOTime.h:55
#define TS
Definition: SUMOTime.h:42
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
const long long int VTYPEPARS_BOARDING_DURATION
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:28
double roundDecimal(double x, int precision)
round to the given number of decimal digits
Definition: StdDefs.cpp:52
T MAX2(T a, T b)
Definition: StdDefs.h:82
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:272
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:280
double getMaxAccel() const
Get the vehicle type's maximum acceleration [m/s^2].
Definition: MSCFModel.h:256
virtual double getImperfection() const
Get the driver's imperfection.
Definition: MSCFModel.h:303
double getMaxDecel() const
Get the vehicle type's maximal comfortable deceleration [m/s^2].
Definition: MSCFModel.h:264
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:311
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:380
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:1990
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:1996
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.
SUMOTime getBoardingDuration(const bool isPerson) const
Get this vehicle type's boarding duration.
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.
void setBoardingDuration(SUMOTime duration, bool isPerson=true)
Set a new value for this type's boardingDuration.
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.
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:60
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...
SUMOTime boardingDuration
The time a person needs to board the vehicle.
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.
SUMOTime loadingDuration
The time a container needs to get loaded on the vehicle.
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)