Eclipse SUMO - Simulation of Urban MObility
SUMOVTypeParameter.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-2019 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 /****************************************************************************/
17 // Structure representing possible vehicle parameter
18 /****************************************************************************/
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <algorithm>
28 #include <utils/common/ToString.h>
35 
36 #define EMPREFIX std::string("HBEFA3/")
37 
38 
39 // ===========================================================================
40 // member method definitions
41 // ===========================================================================
42 
44  length(5./*4.3*/),
45  minGap(2.5),
46  maxSpeed(200. / 3.6),
47  width(1.8),
48  height(1.5),
49  shape(SVS_UNKNOWN),
50  emissionClass(PollutantsInterface::getClassByName(EMPREFIX + "PC_G_EU4", vclass)),
51  speedFactor("normc", 1.0, 0.0, 0.2, 2.0),
52  personCapacity(4),
53  containerCapacity(0),
54  osgFile("car-normal-citrus.obj"),
55  carriageLength(-1),
56  locomotiveLength(-1) {
57  // update default values
58  switch (vclass) {
59  case SVC_PEDESTRIAN:
60  length = 0.215;
61  minGap = 0.25;
63  width = 0.478;
64  height = 1.719;
67  speedFactor.getParameter()[1] = 0.1;
68  break;
69  case SVC_BICYCLE:
70  length = 1.6;
71  minGap = 0.5;
72  maxSpeed = 20. / 3.6;
73  width = 0.65;
74  height = 1.7;
76  personCapacity = 1;
78  speedFactor.getParameter()[1] = 0.1;
79  break;
80  case SVC_MOPED:
81  length = 2.1;
82  maxSpeed = 60. / 3.6;
83  width = 0.8;
84  height = 1.7;
85  shape = SVS_MOPED;
86  personCapacity = 1;
88  speedFactor.getParameter()[1] = 0.1;
89  break;
90  case SVC_MOTORCYCLE:
91  length = 2.2;
92  width = 0.9;
93  height = 1.5;
95  personCapacity = 1;
97  speedFactor.getParameter()[1] = 0.1;
98  break;
99  case SVC_TRUCK:
100  length = 7.1;
101  maxSpeed = 130. / 3.6;
102  width = 2.4;
103  height = 2.4;
104  shape = SVS_TRUCK;
105  osgFile = "car-microcargo-citrus.obj";
106  personCapacity = 2;
107  containerCapacity = 1;
109  speedFactor.getParameter()[1] = 0.05;
110  break;
111  case SVC_TRAILER:
112  length = 16.5;
113  maxSpeed = 130. / 3.6;
114  width = 2.55;
115  height = 4.;
117  osgFile = "car-microcargo-citrus.obj";
118  personCapacity = 2;
119  containerCapacity = 2;
121  speedFactor.getParameter()[1] = 0.05;
122  break;
123  case SVC_BUS:
124  length = 12.;
125  maxSpeed = 100. / 3.6;
126  width = 2.5;
127  height = 3.4;
128  shape = SVS_BUS;
129  osgFile = "car-minibus-citrus.obj";
130  personCapacity = 85;
132  break;
133  case SVC_COACH:
134  length = 14.;
135  maxSpeed = 100. / 3.6;
136  width = 2.6;
137  height = 4.;
139  osgFile = "car-minibus-citrus.obj";
140  personCapacity = 70;
142  speedFactor.getParameter()[1] = 0.05;
143  break;
144  case SVC_TRAM:
145  length = 22.;
146  maxSpeed = 80. / 3.6;
147  width = 2.4;
148  height = 3.2;
150  carriageLength = 5.71; // http://de.wikipedia.org/wiki/Bombardier_Flexity_Berlin
151  locomotiveLength = 5.71;
152  personCapacity = 120;
154  break;
155  case SVC_RAIL_URBAN:
156  length = 36.5 * 3;
157  maxSpeed = 100. / 3.6;
158  width = 3.0;
159  height = 3.6;
161  carriageLength = 18.4; // https://en.wikipedia.org/wiki/DBAG_Class_481
162  locomotiveLength = 18.4;
163  personCapacity = 300;
165  break;
166  case SVC_RAIL:
167  length = 67.5 * 2;
168  maxSpeed = 160. / 3.6;
169  width = 2.84;
170  height = 3.75;
171  shape = SVS_RAIL;
172  carriageLength = 24.5; // http://de.wikipedia.org/wiki/UIC-Y-Wagen_%28DR%29
173  locomotiveLength = 16.4; // https://en.wikipedia.org/wiki/DB_Class_218
174  personCapacity = 434;
175  // slight understatement (-:
177  break;
178  case SVC_RAIL_ELECTRIC:
179  length = 25. * 8;
180  maxSpeed = 220. / 3.6;
181  width = 2.95;
182  height = 3.89;
183  shape = SVS_RAIL;
184  carriageLength = 24.775;
185  locomotiveLength = 19.100; // https://en.wikipedia.org/wiki/DB_Class_101
186  personCapacity = 425;
188  break;
189  case SVC_RAIL_FAST:
190  length = 25. * 8;
191  maxSpeed = 330. / 3.6;
192  width = 2.95;
193  height = 3.89;
194  shape = SVS_RAIL;
195  carriageLength = 24.775; // http://de.wikipedia.org/wiki/ICE_3
196  locomotiveLength = 25.835;
197  personCapacity = 425;
199  break;
200  case SVC_DELIVERY:
201  length = 6.5;
202  width = 2.16;
203  height = 2.86;
205  personCapacity = 2;
207  speedFactor.getParameter()[1] = 0.05;
208  break;
209  case SVC_EMERGENCY:
210  length = 6.5;
211  width = 2.16;
212  height = 2.86;
214  personCapacity = 2;
216  break;
217  case SVC_PRIVATE:
218  case SVC_VIP:
219  case SVC_PASSENGER:
220  case SVC_HOV:
221  case SVC_CUSTOM1:
222  case SVC_CUSTOM2:
224  speedFactor.getParameter()[1] = 0.1;
225  break;
226  case SVC_TAXI:
228  speedFactor.getParameter()[1] = 0.05;
229  break;
230  case SVC_E_VEHICLE:
233  speedFactor.getParameter()[1] = 0.1;
234  break;
235  case SVC_SHIP:
236  length = 17;
237  width = 4;
238  maxSpeed = 8 / 1.94; // 8 knots
239  height = 4;
240  shape = SVS_SHIP;
241  // slight understatement (-:
243  speedFactor.getParameter()[1] = 0.1;
244  break;
245  default:
246  break;
247  }
248 }
249 
250 
252  speedFactor("normc", 1.0, 0.0, 0.2, 2.0) {}
253 
254 
255 SUMOVTypeParameter::SUMOVTypeParameter(const std::string& vtid, const SUMOVehicleClass vclass) :
256  id(vtid), length(5./*4.3*/), minGap(2.5), maxSpeed(200. / 3.6),
258  speedFactor("normc", 1.0, 0.0, 0.2, 2.0),
259  emissionClass(PollutantsInterface::getClassByName(EMPREFIX + "PC_G_EU4", vclass)), color(RGBColor::DEFAULT_COLOR),
261  loadingDuration(90000), width(1.8), height(1.5), shape(SVS_UNKNOWN), osgFile("car-normal-citrus.obj"),
266  parametersSet(0), saved(false), onlyReferenced(false) {
267  const OptionsCont& oc = OptionsCont::getOptions();
268  if (oc.exists("carfollow.model")) {
269  // check for valid value has been performed in MSFrame
270  cfModel = SUMOXMLDefinitions::CarFollowModels.get(oc.getString("carfollow.model"));
271  }
272  // obtain default values depending of vclass
273  VClassDefaultValues defaultValues(vclass);
274  // overwritte SUMOVTypeParameter with VClassDefaultValues
275  length = defaultValues.length;
276  minGap = defaultValues.minGap;
277  maxSpeed = defaultValues.maxSpeed;
278  width = defaultValues.width;
279  height = defaultValues.height;
280  shape = defaultValues.shape;
281  emissionClass = defaultValues.emissionClass;
282  speedFactor = defaultValues.speedFactor;
283  personCapacity = defaultValues.personCapacity;
284  containerCapacity = defaultValues.containerCapacity;
285  osgFile = defaultValues.osgFile;
286  carriageLength = defaultValues.carriageLength;
287  locomotiveLength = defaultValues.locomotiveLength;
288  // check if default speeddev was defined
289  if (oc.exists("default.speeddev")) {
290  const double defaultSpeedDev = oc.getFloat("default.speeddev");
291  if (defaultSpeedDev >= 0) {
292  speedFactor.getParameter()[1] = defaultSpeedDev;
293  }
294  } else {
295  speedFactor.getParameter()[1] = 0;
296  }
297 }
298 
299 
300 void
302  if (onlyReferenced) {
303  return;
304  }
305  dev.openTag(SUMO_TAG_VTYPE);
306  dev.writeAttr(SUMO_ATTR_ID, id);
309  }
312  }
315  }
318  }
321  }
323  // Note: action step length is only exposed in seconds to the user
325  }
328  }
331  }
334  }
336  if (impatience == -std::numeric_limits<double>::max()) {
337  dev.writeAttr(SUMO_ATTR_IMPATIENCE, "off");
338  } else {
340  }
341  }
344  }
347  }
350  }
353  }
356  }
359  }
362  }
365  }
368  }
371  }
374  }
377  }
380  }
383  }
384  // Write Lane Change Model parameters
385  for (const auto& i : lcParameter) {
386  dev.writeAttr(i.first, i.second);
387  }
388  // Write Junction Model parameter
389  for (const auto& i : jmParameter) {
390  dev.writeAttr(i.first, i.second);
391  }
394  }
395  // Write Car Following Model parameters
396  for (const auto& i : cfParameter) {
397  dev.writeAttr(i.first, i.second);
398  }
399  // Write rest of parameters
400  writeParams(dev);
401  dev.closeTag();
402 }
403 
404 
405 double
406 SUMOVTypeParameter::getCFParam(const SumoXMLAttr attr, const double defaultValue) const {
407  if (cfParameter.count(attr)) {
408  return StringUtils::toDouble(cfParameter.find(attr)->second);
409  } else {
410  return defaultValue;
411  }
412 }
413 
414 
415 std::string
416 SUMOVTypeParameter::getCFParamString(const SumoXMLAttr attr, const std::string defaultValue) const {
417  if (cfParameter.count(attr)) {
418  return cfParameter.find(attr)->second;
419  } else {
420  return defaultValue;
421  }
422 }
423 
424 
425 double
426 SUMOVTypeParameter::getLCParam(const SumoXMLAttr attr, const double defaultValue) const {
427  if (lcParameter.count(attr)) {
428  return StringUtils::toDouble(lcParameter.find(attr)->second);
429  } else {
430  return defaultValue;
431  }
432 }
433 
434 
435 std::string
436 SUMOVTypeParameter::getLCParamString(const SumoXMLAttr attr, const std::string& defaultValue) const {
437  if (lcParameter.count(attr)) {
438  return lcParameter.find(attr)->second;
439  } else {
440  return defaultValue;
441  }
442 }
443 
444 
447  return lcParameter;
448 }
449 
450 
451 double
452 SUMOVTypeParameter::getJMParam(const SumoXMLAttr attr, const double defaultValue) const {
453  if (jmParameter.count(attr)) {
454  return StringUtils::toDouble(jmParameter.find(attr)->second);
455  } else {
456  return defaultValue;
457  }
458 }
459 
460 
461 std::string
462 SUMOVTypeParameter::getJMParamString(const SumoXMLAttr attr, const std::string defaultValue) const {
463  if (jmParameter.count(attr)) {
464  return jmParameter.find(attr)->second;
465  } else {
466  return defaultValue;
467  }
468 }
469 
470 
471 double
473  switch (vc) {
474  case SVC_PEDESTRIAN:
475  return 1.5;
476  case SVC_BICYCLE:
477  return 1.2;
478  case SVC_MOTORCYCLE:
479  return 6.;
480  case SVC_MOPED:
481  return 1.1;
482  case SVC_TRUCK:
483  return 1.3;
484  case SVC_TRAILER:
485  return 1.1;
486  case SVC_BUS:
487  return 1.2;
488  case SVC_COACH:
489  return 2.;
490  case SVC_TRAM:
491  return 1.;
492  case SVC_RAIL_URBAN:
493  return 1.;
494  case SVC_RAIL:
495  return 0.25;
496  case SVC_RAIL_ELECTRIC:
497  case SVC_RAIL_FAST:
498  return 0.5;
499  case SVC_SHIP:
500  return 0.1;
501  default:
502  return 2.6;//2.9;
503  }
504 }
505 
506 
507 double
509  switch (vc) {
510  case SVC_PEDESTRIAN:
511  return 2.;
512  case SVC_BICYCLE:
513  return 3.;
514  case SVC_MOPED:
515  return 7.;
516  case SVC_MOTORCYCLE:
517  return 10.;
518  case SVC_TRUCK:
519  case SVC_TRAILER:
520  case SVC_BUS:
521  case SVC_COACH:
522  return 4.;
523  case SVC_TRAM:
524  case SVC_RAIL_URBAN:
525  return 3.;
526  case SVC_RAIL:
527  case SVC_RAIL_ELECTRIC:
528  case SVC_RAIL_FAST:
529  return 1.3;
530  case SVC_SHIP:
531  return 0.15;
532  default:
533  return 4.5;//7.5;
534  }
535 }
536 
537 
538 double
539 SUMOVTypeParameter::getDefaultEmergencyDecel(const SUMOVehicleClass vc, double decel, double defaultOption) {
540  if (defaultOption == VTYPEPARS_DEFAULT_EMERGENCYDECEL_DEFAULT) {
541  double vcDecel;
542  switch (vc) {
543  case SVC_PEDESTRIAN:
544  vcDecel = 5.;
545  break;
546  case SVC_BICYCLE:
547  vcDecel = 7.;
548  break;
549  case SVC_MOPED:
550  case SVC_MOTORCYCLE:
551  vcDecel = 10.;
552  break;
553  case SVC_TRUCK:
554  case SVC_TRAILER:
555  case SVC_BUS:
556  case SVC_COACH:
557  case SVC_TRAM:
558  case SVC_RAIL_URBAN:
559  vcDecel = 7.;
560  break;
561  case SVC_RAIL:
562  case SVC_RAIL_ELECTRIC:
563  case SVC_RAIL_FAST:
564  vcDecel = 5.;
565  break;
566  case SVC_SHIP:
567  vcDecel = 1.;
568  break;
569  default:
570  vcDecel = 9.;
571  }
572  return MAX2(decel, vcDecel);
573  } else if (defaultOption == VTYPEPARS_DEFAULT_EMERGENCYDECEL_DECEL) {
574  return decel;
575  } else {
576  // value already checked in MSFrame::checkOptions
577  return MAX2(decel, defaultOption);
578  }
579 }
580 
581 
582 
583 double
585  switch (vc) {
586  case SVC_TRAM:
587  case SVC_RAIL_URBAN:
588  case SVC_RAIL:
589  case SVC_RAIL_ELECTRIC:
590  case SVC_RAIL_FAST:
591  case SVC_SHIP:
592  return 0.;
593  default:
594  return 0.5;
595  }
596 }
597 
598 
599 const SUMOVTypeParameter&
601  static SUMOVTypeParameter defaultParams("");
602  return defaultParams;
603 }
604 
605 
606 /****************************************************************************/
VTYPEPARS_LATALIGNMENT_SET
const int VTYPEPARS_LATALIGNMENT_SET
Definition: SUMOVTypeParameter.h:67
SUMOVTypeParameter::SubParams
std::map< SumoXMLAttr, std::string > SubParams
sub-model parameters
Definition: SUMOVTypeParameter.h:190
SVC_RAIL_FAST
vehicle that is allowed to drive on high-speed rail tracks
Definition: SUMOVehicleClass.h:193
SUMO_ATTR_MAXSPEED
Definition: SUMOXMLDefinitions.h:442
SUMO_ATTR_OSGFILE
Definition: SUMOXMLDefinitions.h:788
SUMO_ATTR_BOARDING_DURATION
Definition: SUMOXMLDefinitions.h:462
VTYPEPARS_HASDRIVERSTATE_SET
const int VTYPEPARS_HASDRIVERSTATE_SET
Definition: SUMOVTypeParameter.h:70
SVC_PEDESTRIAN
pedestrian
Definition: SUMOVehicleClass.h:157
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:134
SUMOVTypeParameter::lcParameter
SubParams lcParameter
Lane-changing parameter.
Definition: SUMOVTypeParameter.h:285
ToString.h
SUMOVTypeParameter::VClassDefaultValues::carriageLength
double carriageLength
the length of train carriages
Definition: SUMOVTypeParameter.h:127
SVC_E_VEHICLE
is an electric vehicle
Definition: SUMOVehicleClass.h:182
SUMOVTypeParameter::locomotiveLength
double locomotiveLength
Definition: SUMOVTypeParameter.h:304
SUMOVTypeParameter::SUMOVTypeParameter
SUMOVTypeParameter(const std::string &vtid, const SUMOVehicleClass vc=SVC_IGNORING)
Constructor.
Definition: SUMOVTypeParameter.cpp:255
SUMOVTypeParameter::length
double length
The physical vehicle length.
Definition: SUMOVTypeParameter.h:213
SVC_EMERGENCY
public emergency vehicles
Definition: SUMOVehicleClass.h:144
SUMO_ATTR_IMGFILE
Definition: SUMOXMLDefinitions.h:789
VTYPEPARS_MINGAP_SET
const int VTYPEPARS_MINGAP_SET
Definition: SUMOVTypeParameter.h:47
SUMO_ATTR_MINGAP_LAT
Definition: SUMOXMLDefinitions.h:445
SVS_MOTORCYCLE
render as a motorcycle
Definition: SUMOVehicleClass.h:61
SVC_COACH
vehicle is a coach
Definition: SUMOVehicleClass.h:168
SUMO_ATTR_LATALIGNMENT
Definition: SUMOXMLDefinitions.h:444
SUMO_ATTR_LENGTH
Definition: SUMOXMLDefinitions.h:394
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
SUMOVTypeParameter::actionStepLength
SUMOTime actionStepLength
The vehicle type's default actionStepLength [ms], i.e. the interval between two control actions....
Definition: SUMOVTypeParameter.h:223
SUMO_ATTR_MAXSPEED_LAT
Definition: SUMOXMLDefinitions.h:443
SUMOVTypeParameter::VClassDefaultValues::emissionClass
SUMOEmissionClass emissionClass
The emission class of this vehicle.
Definition: SUMOVTypeParameter.h:112
SVC_CUSTOM2
is a user-defined type
Definition: SUMOVehicleClass.h:201
OptionsCont.h
SUMOVTypeParameter::cfModel
SumoXMLTag cfModel
The enum-representation of the car-following model to use.
Definition: SUMOVTypeParameter.h:276
LCM_DEFAULT
Definition: SUMOXMLDefinitions.h:1302
StringUtils::toDouble
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
Definition: StringUtils.cpp:313
VTYPEPARS_BOARDING_DURATION
const int VTYPEPARS_BOARDING_DURATION
Definition: SUMOVTypeParameter.h:62
SUMO_ATTR_SPEEDFACTOR
Definition: SUMOXMLDefinitions.h:456
MsgHandler.h
SUMOVTypeParameter::impatience
double impatience
The vehicle's impatience (willingness to obstruct others)
Definition: SUMOVTypeParameter.h:241
LATALIGN_CENTER
drive in the middle
Definition: SUMOXMLDefinitions.h:1327
OptionsCont::getString
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
Definition: OptionsCont.cpp:202
SUMOVTypeParameter::osgFile
std::string osgFile
3D model file for this class
Definition: SUMOVTypeParameter.h:268
VTYPEPARS_MINGAP_LAT_SET
const int VTYPEPARS_MINGAP_LAT_SET
Definition: SUMOVTypeParameter.h:68
OptionsCont::exists
bool exists(const std::string &name) const
Returns the information whether the named option is known.
Definition: OptionsCont.cpp:130
SUMO_ATTR_LOADING_DURATION
Definition: SUMOXMLDefinitions.h:463
SUMO_TAG_CF_KRAUSS
Definition: SUMOXMLDefinitions.h:276
SVS_TRUCK
render as a transport vehicle
Definition: SUMOVehicleClass.h:77
SUMO_ATTR_COLOR
A color information.
Definition: SUMOXMLDefinitions.h:701
SVC_BICYCLE
vehicle is a bicycle
Definition: SUMOVehicleClass.h:180
OptionsCont::getOptions
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:58
SVC_DELIVERY
vehicle is a small delivery vehicle
Definition: SUMOVehicleClass.h:170
SUMOVTypeParameter::saved
bool saved
Information whether this type was already saved (needed by routers)
Definition: SUMOVTypeParameter.h:311
VTYPEPARS_OSGFILE_SET
const int VTYPEPARS_OSGFILE_SET
Definition: SUMOVTypeParameter.h:57
SUMOVTypeParameter::carriageLength
double carriageLength
the length of train carriages and locomotive
Definition: SUMOVTypeParameter.h:303
VTYPEPARS_DEFAULT_EMERGENCYDECEL_DECEL
const int VTYPEPARS_DEFAULT_EMERGENCYDECEL_DECEL
Definition: SUMOVTypeParameter.h:77
SUMO_ATTR_CONTAINER_CAPACITY
Definition: SUMOXMLDefinitions.h:648
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:379
SUMOVTypeParameter::shape
SUMOVehicleShape shape
This class' shape.
Definition: SUMOVTypeParameter.h:265
VTYPEPARS_PROBABILITY_SET
const int VTYPEPARS_PROBABILITY_SET
Definition: SUMOVTypeParameter.h:49
SUMOVTypeParameter::getDefaultImperfection
static double getDefaultImperfection(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default driver's imperfection (sigma or epsilon in Krauss' model) for the given vehicle c...
Definition: SUMOVTypeParameter.cpp:584
SUMO_TAG_VTYPE
description of a vehicle type
Definition: SUMOXMLDefinitions.h:122
PollutantsInterface::getName
static std::string getName(const SUMOEmissionClass c)
Checks whether the string describes a known vehicle class.
Definition: PollutantsInterface.cpp:100
SUMOVTypeParameter::VClassDefaultValues::length
double length
The physical vehicle length.
Definition: SUMOVTypeParameter.h:94
SUMO_ATTR_LANE_CHANGE_MODEL
Definition: SUMOXMLDefinitions.h:458
getVehicleShapeName
std::string getVehicleShapeName(SUMOVehicleShape id)
Returns the class name of the shape class given by its id.
Definition: SUMOVehicleClass.cpp:359
SUMOVTypeParameter::containerCapacity
int containerCapacity
The container capacity of the vehicle.
Definition: SUMOVTypeParameter.h:247
SVC_RAIL
vehicle is a not electrified rail
Definition: SUMOVehicleClass.h:189
SVC_RAIL_URBAN
vehicle is a city rail
Definition: SUMOVehicleClass.h:187
SUMOVTypeParameter::getLCParams
const SubParams & getLCParams() const
Returns the LC parameter.
Definition: SUMOVTypeParameter.cpp:446
SUMO_ATTR_HASDRIVERSTATE
Definition: SUMOXMLDefinitions.h:450
Parameterised::writeParams
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
Definition: Parameterised.cpp:111
OutputDevice::closeTag
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
Definition: OutputDevice.cpp:254
VTYPEPARS_CAR_FOLLOW_MODEL
const int VTYPEPARS_CAR_FOLLOW_MODEL
Definition: SUMOVTypeParameter.h:65
SUMOVTypeParameter::onlyReferenced
bool onlyReferenced
Information whether this is a type-stub, being only referenced but not defined (needed by routers)
Definition: SUMOVTypeParameter.h:314
SVC_PRIVATE
private vehicles
Definition: SUMOVehicleClass.h:142
SVS_UNKNOWN
not defined
Definition: SUMOVehicleClass.h:53
SUMOXMLDefinitions::CarFollowModels
static StringBijection< SumoXMLTag > CarFollowModels
car following models
Definition: SUMOXMLDefinitions.h:1393
MAX2
T MAX2(T a, T b)
Definition: StdDefs.h:80
SVS_BICYCLE
render as a bicycle
Definition: SUMOVehicleClass.h:57
SUMOVTypeParameter::wasSet
bool wasSet(int what) const
Returns whether the given parameter was set.
Definition: SUMOVTypeParameter.h:150
SUMOVTypeParameter::parametersSet
int parametersSet
Information for the router which parameter were set.
Definition: SUMOVTypeParameter.h:308
VTYPEPARS_MAXSPEED_LAT_SET
const int VTYPEPARS_MAXSPEED_LAT_SET
Definition: SUMOVTypeParameter.h:66
SVC_TRAM
vehicle is a light rail
Definition: SUMOVehicleClass.h:185
OutputDevice::writeAttr
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:256
RGBColor
Definition: RGBColor.h:40
SVS_DELIVERY
automated car (with cruise controllers)
Definition: SUMOVehicleClass.h:75
Distribution_Parameterized::getParameter
std::vector< double > & getParameter()
Returns the parameters of this distribution.
Definition: Distribution_Parameterized.cpp:111
SUMO_ATTR_PROB
Definition: SUMOXMLDefinitions.h:627
VTYPEPARS_LANE_CHANGE_MODEL_SET
const int VTYPEPARS_LANE_CHANGE_MODEL_SET
Definition: SUMOVTypeParameter.h:60
SUMOVTypeParameter::imgFile
std::string imgFile
Image file for this class.
Definition: SUMOVTypeParameter.h:271
SVC_TRUCK
vehicle is a large transport vehicle
Definition: SUMOVehicleClass.h:172
SUMOVTypeParameter::getLCParamString
std::string getLCParamString(const SumoXMLAttr attr, const std::string &defaultValue) const
Returns the named value from the map, or the default if it is not contained there.
Definition: SUMOVTypeParameter.cpp:436
SVC_CUSTOM1
is a user-defined type
Definition: SUMOVehicleClass.h:199
SUMOVTypeParameter::VClassDefaultValues::containerCapacity
int containerCapacity
The container capacity of the vehicle.
Definition: SUMOVTypeParameter.h:121
SVS_BUS
render as a bus
Definition: SUMOVehicleClass.h:83
SUMOVTypeParameter::height
double height
This class' height.
Definition: SUMOVTypeParameter.h:262
PollutantsInterface.h
SUMOVTypeParameter
Structure representing possible vehicle parameter.
Definition: SUMOVTypeParameter.h:86
DEFAULT_PEDESTRIAN_SPEED
const double DEFAULT_PEDESTRIAN_SPEED
SUMOVTypeParameter::jmParameter
SubParams jmParameter
Junction-model parameter.
Definition: SUMOVTypeParameter.h:288
StringBijection::get
T get(const std::string &str) const
Definition: StringBijection.h:98
SVC_HOV
vehicle is a HOV
Definition: SUMOVehicleClass.h:162
SUMOVTypeParameter::getDefaultAccel
static double getDefaultAccel(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default acceleration for the given vehicle class This needs to be a function because the ...
Definition: SUMOVTypeParameter.cpp:472
SUMOVTypeParameter::cfParameter
SubParams cfParameter
Car-following parameter.
Definition: SUMOVTypeParameter.h:282
SUMOVTypeParameter::defaultProbability
double defaultProbability
The probability when being added to a distribution without an explicit probability.
Definition: SUMOVTypeParameter.h:226
SUMOVTypeParameter::VClassDefaultValues::maxSpeed
double maxSpeed
The vehicle type's maximum speed [m/s].
Definition: SUMOVTypeParameter.h:100
STEPS2TIME
#define STEPS2TIME(x)
Definition: SUMOTime.h:57
SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
Definition: SUMOVehicleClass.h:160
SUMO_ATTR_WIDTH
Definition: SUMOXMLDefinitions.h:387
SVC_RAIL_ELECTRIC
rail vehicle that requires electrified tracks
Definition: SUMOVehicleClass.h:191
SUMOVTypeParameter::getDefaultDecel
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 ...
Definition: SUMOVTypeParameter.cpp:508
OutputDevice.h
VTYPEPARS_ACTIONSTEPLENGTH_SET
const int VTYPEPARS_ACTIONSTEPLENGTH_SET
Definition: SUMOVTypeParameter.h:69
SUMO_ATTR_PERSON_CAPACITY
Definition: SUMOXMLDefinitions.h:647
SUMOVTypeParameter::VClassDefaultValues::width
double width
This class' width.
Definition: SUMOVTypeParameter.h:103
SUMOVTypeParameter::boardingDuration
SUMOTime boardingDuration
The time a person needs to board the vehicle.
Definition: SUMOVTypeParameter.h:250
SUMOVTypeParameter::VClassDefaultValues::minGap
double minGap
This class' free space in front of the vehicle itself.
Definition: SUMOVTypeParameter.h:97
SUMOVTypeParameter::minGap
double minGap
This class' free space in front of the vehicle itself.
Definition: SUMOVTypeParameter.h:216
SVS_MOPED
render as a moped
Definition: SUMOVehicleClass.h:59
SUMOVTypeParameter::getJMParamString
std::string getJMParamString(const SumoXMLAttr attr, const std::string defaultValue) const
Returns the named value from the map, or the default if it is not contained there.
Definition: SUMOVTypeParameter.cpp:462
SUMOVTypeParameter::width
double width
This class' width.
Definition: SUMOVTypeParameter.h:259
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:90
SUMOVTypeParameter::maxSpeedLat
double maxSpeedLat
The vehicle type's maximum lateral speed [m/s].
Definition: SUMOVTypeParameter.h:294
SUMOVTypeParameter::getCFParam
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.
Definition: SUMOVTypeParameter.cpp:406
SUMOVTypeParameter::maxSpeed
double maxSpeed
The vehicle type's maximum speed [m/s].
Definition: SUMOVTypeParameter.h:219
SUMOVTypeParameter::personCapacity
int personCapacity
The person capacity of the vehicle.
Definition: SUMOVTypeParameter.h:244
SUMOVTypeParameter::VClassDefaultValues::shape
SUMOVehicleShape shape
This class' shape.
Definition: SUMOVTypeParameter.h:109
SUMOVTypeParameter::hasDriverState
bool hasDriverState
Whether vehicles of this type are equipped with a driver (i.e. MSDriverState))
Definition: SUMOVTypeParameter.h:279
VTYPEPARS_SPEEDFACTOR_SET
const int VTYPEPARS_SPEEDFACTOR_SET
Definition: SUMOVTypeParameter.h:50
SVC_VIP
vip vehicles
Definition: SUMOVehicleClass.h:150
SVC_SHIP
is an arbitrary ship
Definition: SUMOVehicleClass.h:196
SUMOVTypeParameter::write
void write(OutputDevice &dev) const
Writes the vtype.
Definition: SUMOVTypeParameter.cpp:301
SVS_RAIL_CAR
render as a (city) rail without locomotive
Definition: SUMOVehicleClass.h:93
SVS_PEDESTRIAN
render as a pedestrian
Definition: SUMOVehicleClass.h:55
SUMOVTypeParameter::speedFactor
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street.
Definition: SUMOVTypeParameter.h:229
PollutantsInterface::getClassByName
static SUMOEmissionClass getClassByName(const std::string &eClass, const SUMOVehicleClass vc=SVC_IGNORING)
Checks whether the string describes a known vehicle class.
Definition: PollutantsInterface.cpp:54
SUMOVTypeParameter::VClassDefaultValues::osgFile
std::string osgFile
3D model file for this class
Definition: SUMOVTypeParameter.h:124
VTYPEPARS_LOADING_DURATION
const int VTYPEPARS_LOADING_DURATION
Definition: SUMOVTypeParameter.h:64
OptionsCont::getFloat
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
Definition: OptionsCont.cpp:209
SUMOVTypeParameter::VClassDefaultValues::locomotiveLength
double locomotiveLength
the length of train locomotive
Definition: SUMOVTypeParameter.h:130
SUMO_ATTR_HEIGHT
Definition: SUMOXMLDefinitions.h:786
VTYPEPARS_CONTAINER_CAPACITY
const int VTYPEPARS_CONTAINER_CAPACITY
Definition: SUMOVTypeParameter.h:63
OutputDevice::openTag
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Definition: OutputDevice.cpp:240
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
StringUtils.h
SUMOVTypeParameter::carriageGap
double carriageGap
Definition: SUMOVTypeParameter.h:305
SUMOVTypeParameter::getLCParam
double getLCParam(const SumoXMLAttr attr, const double defaultValue) const
Returns the named value from the map, or the default if it is not contained there.
Definition: SUMOVTypeParameter.cpp:426
SUMOVTypeParameter::getDefaultEmergencyDecel
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...
Definition: SUMOVTypeParameter.cpp:539
SVC_MOPED
vehicle is a moped
Definition: SUMOVehicleClass.h:178
SUMOVTypeParameter::latAlignment
LateralAlignment latAlignment
The vehicles desired lateral alignment.
Definition: SUMOVTypeParameter.h:297
SUMO_ATTR_CAR_FOLLOW_MODEL
Definition: SUMOXMLDefinitions.h:459
SUMO_ATTR_IMPATIENCE
Definition: SUMOXMLDefinitions.h:793
SUMOVTypeParameter::id
std::string id
The vehicle type's id.
Definition: SUMOVTypeParameter.h:210
SVC_TAXI
vehicle is a taxi
Definition: SUMOVehicleClass.h:164
SUMO_ATTR_GUISHAPE
Definition: SUMOXMLDefinitions.h:787
SUMOVTypeParameter::VClassDefaultValues
struct for default values that depend of VClass
Definition: SUMOVTypeParameter.h:89
VTYPEPARS_DEFAULT_EMERGENCYDECEL_DEFAULT
const int VTYPEPARS_DEFAULT_EMERGENCYDECEL_DEFAULT
Definition: SUMOVTypeParameter.h:76
VTYPEPARS_PERSON_CAPACITY
const int VTYPEPARS_PERSON_CAPACITY
Definition: SUMOVTypeParameter.h:61
SVS_PASSENGER
render as a passenger vehicle
Definition: SUMOVehicleClass.h:63
SVS_E_VEHICLE
render as a (futuristic) e-vehicle
Definition: SUMOVehicleClass.h:97
SVS_SHIP
render as a arbitrary ship
Definition: SUMOVehicleClass.h:101
VTYPEPARS_HEIGHT_SET
const int VTYPEPARS_HEIGHT_SET
Definition: SUMOVTypeParameter.h:55
SUMO_ATTR_VCLASS
Definition: SUMOXMLDefinitions.h:452
SUMOVTypeParameter::VClassDefaultValues::personCapacity
int personCapacity
The person capacity of the vehicle.
Definition: SUMOVTypeParameter.h:118
SUMOVTypeParameter::lcModel
LaneChangeModel lcModel
The lane-change model to use.
Definition: SUMOVTypeParameter.h:291
VTYPEPARS_IMGFILE_SET
const int VTYPEPARS_IMGFILE_SET
Definition: SUMOVTypeParameter.h:58
SUMO_ATTR_MINGAP
Definition: SUMOXMLDefinitions.h:460
config.h
SUMOVTypeParameter::getCFParamString
std::string getCFParamString(const SumoXMLAttr attr, const std::string defaultValue) const
Returns the named value from the map, or the default if it is not contained there.
Definition: SUMOVTypeParameter.cpp:416
EMPREFIX
#define EMPREFIX
Definition: SUMOVTypeParameter.cpp:36
PollutantsInterface
Helper methods for PHEMlight-based emission computation.
Definition: PollutantsInterface.h:52
SVC_TRAILER
vehicle is a large transport vehicle
Definition: SUMOVehicleClass.h:174
SVC_BUS
vehicle is a bus
Definition: SUMOVehicleClass.h:166
SUMO_ATTR_ACTIONSTEPLENGTH
Definition: SUMOXMLDefinitions.h:451
SUMOVTypeParameter::loadingDuration
SUMOTime loadingDuration
The time a container needs to get loaded on the vehicle.
Definition: SUMOVTypeParameter.h:253
SUMOVTypeParameter::color
RGBColor color
The color.
Definition: SUMOVTypeParameter.h:235
SVS_TRUCK_1TRAILER
render as a transport vehicle with one trailer
Definition: SUMOVehicleClass.h:81
VTYPEPARS_LENGTH_SET
const int VTYPEPARS_LENGTH_SET
Definition: SUMOVTypeParameter.h:46
SVC_MOTORCYCLE
vehicle is a motorcycle
Definition: SUMOVehicleClass.h:176
SUMOVTypeParameter::emissionClass
SUMOEmissionClass emissionClass
The emission class of this vehicle.
Definition: SUMOVTypeParameter.h:232
SVS_BUS_COACH
render as a coach
Definition: SUMOVehicleClass.h:85
VTYPEPARS_EMISSIONCLASS_SET
const int VTYPEPARS_EMISSIONCLASS_SET
Definition: SUMOVTypeParameter.h:51
VTYPEPARS_COLOR_SET
const int VTYPEPARS_COLOR_SET
Definition: SUMOVTypeParameter.h:52
VTYPEPARS_SHAPE_SET
const int VTYPEPARS_SHAPE_SET
Definition: SUMOVTypeParameter.h:56
SUMOVTypeParameter::VClassDefaultValues::height
double height
This class' height.
Definition: SUMOVTypeParameter.h:106
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:373
SUMOVTypeParameter.h
VTYPEPARS_WIDTH_SET
const int VTYPEPARS_WIDTH_SET
Definition: SUMOVTypeParameter.h:54
SUMOVTypeParameter::vehicleClass
SUMOVehicleClass vehicleClass
The vehicle's class.
Definition: SUMOVTypeParameter.h:238
VTYPEPARS_IMPATIENCE_SET
const int VTYPEPARS_IMPATIENCE_SET
Definition: SUMOVTypeParameter.h:59
DEFAULT_VEH_PROB
const double DEFAULT_VEH_PROB
SUMOVTypeParameter::getJMParam
double getJMParam(const SumoXMLAttr attr, const double defaultValue) const
Returns the named value from the map, or the default if it is not contained there.
Definition: SUMOVTypeParameter.cpp:452
SUMO_ATTR_EMISSIONCLASS
Definition: SUMOXMLDefinitions.h:792
SUMOVTypeParameter::VClassDefaultValues::speedFactor
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street.
Definition: SUMOVTypeParameter.h:115
SUMOXMLDefinitions.h
VTYPEPARS_MAXSPEED_SET
const int VTYPEPARS_MAXSPEED_SET
Definition: SUMOVTypeParameter.h:48
VTYPEPARS_VEHICLECLASS_SET
const int VTYPEPARS_VEHICLECLASS_SET
Definition: SUMOVTypeParameter.h:53
SUMOVTypeParameter::getDefault
static const SUMOVTypeParameter & getDefault()
return the default parameters, this is a function due to the http://www.parashift....
Definition: SUMOVTypeParameter.cpp:600
SUMOVTypeParameter::minGapLat
double minGapLat
The vehicle type's minimum lateral gap [m].
Definition: SUMOVTypeParameter.h:300
SVS_RAIL
render as a rail
Definition: SUMOVehicleClass.h:91
SUMOVTypeParameter::VClassDefaultValues::VClassDefaultValues
VClassDefaultValues()
default constructor
Definition: SUMOVTypeParameter.cpp:251