Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
SUMOVTypeParameter.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-2025 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/****************************************************************************/
20// Structure representing possible vehicle parameter
21/****************************************************************************/
22#include <config.h>
23
24#include <algorithm>
35
36#define EMPREFIX std::string("HBEFA4/")
37#define TTT_UNSET SUMOTime_MIN
38
39// ===========================================================================
40// static value definitions
41// ===========================================================================
42std::set<SumoXMLAttr> SUMOVTypeParameter::AllowedJMAttrs({
59});
60
61
62// ===========================================================================
63// member method definitions
64// ===========================================================================
65
68 minGap(2.5),
69 minGapLat(0.6),
70 maxSpeed(200. / 3.6),
71 desiredMaxSpeed(10000 / 3.6), // backward-compatibility: do not influence speeds by default
75 emissionClass(PollutantsInterface::getClassByName(EMPREFIX + "default", vclass)),
77 speedFactor("normc", 1.0, 0.0, 0.2, 2.0),
80 osgFile("car-normal-citrus.obj"),
87 // update default values
88 switch (vclass) {
89 case SVC_PEDESTRIAN:
90 minGap = 0.25;
91 maxSpeed = 37.58 / 3.6; // Usain Bolt
93 width = 0.478;
94 height = 1.719;
96 osgFile = "humanResting.obj";
97 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass);
98 mass = 70.; // https://en.wikipedia.org/wiki/Human_body_weight for Europe
99 speedFactor.setParameter(1, 0.1);
100 break;
101 case SVC_WHEELCHAIR:
102 minGap = 0.5;
103 maxSpeed = 30.0 / 3.6; // https://en.wikipedia.org/wiki/Wheelchair_racing
105 width = 0.8;
106 height = 1.5;
108 osgFile = "humanResting.obj";
109 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass);
110 mass = 90.; //
111 speedFactor.setParameter(1, 0.1);
112 break;
113 case SVC_BICYCLE:
114 minGap = 0.5;
115 minGapLat = 0.35;
116 maxSpeed = 50. / 3.6;
118 width = 0.65;
119 height = 1.7;
121 personCapacity = 1;
122 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass);
123 mass = 10.;
124 speedFactor.setParameter(1, 0.1);
126 break;
127 case SVC_SCOOTER:
128 minGap = 0.5;
129 minGapLat = 0.35;
130 maxSpeed = 25 / 3.6;
132 width = 0.5;
133 height = 1.7;
135 personCapacity = 1;
136 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass);
137 mass = 10.;
138 speedFactor.setParameter(1, 0.1);
140 break;
141 case SVC_MOPED:
142 maxSpeed = 60. / 3.6;
143 width = 0.78;
144 height = 1.7;
146 personCapacity = 1;
147 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "Moped_le50cc_Euro-2", vclass);
148 mass = 80.;
149 speedFactor.setParameter(1, 0.1);
150 break;
151 case SVC_MOTORCYCLE:
152 width = 0.9;
153 height = 1.5;
155 personCapacity = 1;
156 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "MC_4S_gt250cc_preEuro", vclass);
157 mass = 200.;
158 speedFactor.setParameter(1, 0.1);
159 break;
160 case SVC_TRUCK:
161 maxSpeed = 130. / 3.6;
162 width = 2.4;
163 height = 2.4;
165 osgFile = "car-microcargo-citrus.obj";
166 personCapacity = 2;
168 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "RT_le7.5t_Euro-VI_A-C", vclass);
169 mass = 4500.;
170 speedFactor.setParameter(1, 0.05);
171 break;
172 case SVC_TRAILER:
173 maxSpeed = 130. / 3.6;
174 width = 2.55;
175 height = 4.;
177 osgFile = "car-microcargo-citrus.obj";
178 personCapacity = 2;
180 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "TT_AT_gt34-40t_Euro-VI_A-C", vclass);
181 mass = 13000.;
182 speedFactor.setParameter(1, 0.05);
183 break;
184 case SVC_BUS:
185 maxSpeed = 100. / 3.6;
186 width = 2.5;
187 height = 3.4;
189 osgFile = "car-minibus-citrus.obj";
190 personCapacity = 85;
191 // the following values keep better consistency with the default bus length,
192 // although the most frequent city bus seems to have 3 axes and >18t according to the HBEFA4 data
193 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "UBus_Std_gt15-18t_Euro-VI_A-C", vclass);
194 mass = 12000.;
195 break;
196 case SVC_COACH:
197 maxSpeed = 100. / 3.6;
198 width = 2.6;
199 height = 4.;
201 osgFile = "car-minibus-citrus.obj";
202 personCapacity = 70;
203 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "Coach_3-Axes_gt18t_Euro-VI_A-C", vclass);
204 mass = 25000.;
205 speedFactor.setParameter(1, 0.05);
206 break;
207 case SVC_TRAM:
208 maxSpeed = 80. / 3.6;
209 width = 2.4;
210 height = 3.2;
212 osgFile = "tram.obj";
213 personCapacity = 120;
214 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass);
215 mass = 37900.;
216 break;
217 case SVC_RAIL_URBAN:
218 case SVC_SUBWAY:
219 maxSpeed = 100. / 3.6;
220 minGap = 5;
221 width = 3.0;
222 height = 3.6;
224 personCapacity = 300;
225 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass);
226 mass = 59000.;
227 break;
228 case SVC_RAIL:
229 maxSpeed = 160. / 3.6;
230 minGap = 5;
231 width = 2.84;
232 height = 3.75;
234 personCapacity = 434;
235 // slight understatement (-:
236 emissionClass = PollutantsInterface::getClassByName("HBEFA3/HDV_D_EU0", vclass);
237 mass = 79500.; // only locomotive
238 break;
240 maxSpeed = 220. / 3.6;
241 minGap = 5;
242 width = 2.95;
243 height = 3.89;
245 personCapacity = 425;
246 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass);
247 mass = 83000.; // only locomotive
248 break;
249 case SVC_RAIL_FAST:
250 maxSpeed = 330. / 3.6;
251 minGap = 5;
252 width = 2.95;
253 height = 3.89;
255 personCapacity = 425;
256 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass);
257 mass = 409000.;
258 break;
259 case SVC_DELIVERY:
260 width = 2.16;
261 height = 2.86;
263 personCapacity = 2;
264 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "LCV_diesel_N1-III_Euro-6ab", vclass);
265 mass = 5000.;
266 speedFactor.setParameter(1, 0.05);
267 break;
268 case SVC_EMERGENCY:
269 width = 2.16;
270 height = 2.86;
272 personCapacity = 2;
273 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "LCV_diesel_N1-III_Euro-6ab", vclass);
274 mass = 5000.;
275 break;
276 case SVC_PRIVATE:
277 case SVC_VIP:
278 case SVC_PASSENGER:
279 case SVC_HOV:
280 case SVC_CUSTOM1:
281 case SVC_CUSTOM2:
283 speedFactor.setParameter(1, 0.1);
284 break;
285 case SVC_TAXI:
287 speedFactor.setParameter(1, 0.05);
288 break;
289 case SVC_E_VEHICLE:
291 emissionClass = PollutantsInterface::getClassByName(EMPREFIX + "zero", vclass);
292 speedFactor.setParameter(1, 0.1);
293 break;
294 case SVC_CONTAINER:
295 // ISO Container TEU
296 width = 2.438;
297 height = 2.591;
298 break;
299 case SVC_DRONE:
300 width = 0.5;
301 break;
302 case SVC_AIRCRAFT:
303 // Airbus A380
305 width = 79.8;
306 break;
307 case SVC_SHIP:
308 width = 4;
309 maxSpeed = 8 / 1.94; // 8 knots
310 height = 4;
312 // slight understatement (-:
313 emissionClass = PollutantsInterface::getClassByName("HBEFA3/HDV_D_EU0", vclass);
314 mass = 100000.;
315 speedFactor.setParameter(1, 0.1);
316 break;
317 default:
318 break;
319 }
320}
321
322
325
326SUMOVTypeParameter::SUMOVTypeParameter(const std::string& vtid, const SUMOVehicleClass vclass)
327 : id(vtid),
330 speedFactor("normc", 1.0, 0.0, 0.2, 2.0),
331 emissionClass(PollutantsInterface::getClassByName(EMPREFIX + "default", vclass)),
332 color(RGBColor::DEFAULT_COLOR),
333 vehicleClass(vclass),
334 impatience(0.0),
337 boardingDuration(500),
338 loadingDuration(90000),
339 scale(1),
340 width(1.8),
341 height(1.5),
343 osgFile("car-normal-citrus.obj"),
346 maxSpeedLat(1.0),
349 scaleVisual(1),
350 carriageLength(-1),
352 carriageGap(1.),
353 carriageDoors(2),
359 frontSeatPos(1.7),
360 seatingWidth(-1),
362 parametersSet(0),
363 saved(false),
364 onlyReferenced(false) {
366 if (oc.exists("carfollow.model")) {
367 // check for valid value has been performed in MSFrame
368 cfModel = SUMOXMLDefinitions::CarFollowModels.get(oc.getString("carfollow.model"));
369 }
370 // obtain default values depending of vclass
371 VClassDefaultValues defaultValues(vclass);
372 // overwrite SUMOVTypeParameter with VClassDefaultValues
373 length = defaultValues.length;
374 minGap = defaultValues.minGap;
375 minGapLat = defaultValues.minGapLat;
376 maxSpeed = defaultValues.maxSpeed;
377 desiredMaxSpeed = defaultValues.desiredMaxSpeed;
378 width = defaultValues.width;
379 height = defaultValues.height;
380 shape = defaultValues.shape;
381 emissionClass = defaultValues.emissionClass;
382 mass = defaultValues.mass;
383 speedFactor = defaultValues.speedFactor;
384 personCapacity = defaultValues.personCapacity;
385 containerCapacity = defaultValues.containerCapacity;
386 osgFile = defaultValues.osgFile;
387 carriageLength = defaultValues.carriageLength;
388 locomotiveLength = defaultValues.locomotiveLength;
389 carriageDoors = defaultValues.carriageDoors;
391 // check if default speeddev was defined
392 if (oc.exists("default.speeddev")) {
393 const double defaultSpeedDev = oc.getFloat("default.speeddev");
394 if (defaultSpeedDev >= 0) {
395 speedFactor.setParameter(1, defaultSpeedDev);
396 }
397 } else {
398 speedFactor.setParameter(1, -1.);
399 }
401}
402
403void
405
406 myManoeuverAngleTimes.clear();
414 switch (vclass) {
415 case SVC_PASSENGER:
416 case SVC_HOV:
417 case SVC_TAXI:
418 case SVC_E_VEHICLE:
419 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(10, std::pair< SUMOTime, SUMOTime>(3000, 4000))); // straight in but potentially needing parallel parking
420 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(80, std::pair< SUMOTime, SUMOTime>(1000, 11000))); // straight in
421 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(110, std::pair< SUMOTime, SUMOTime>(11000, 2000))); // optional forwards/backwards
422 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(170, std::pair< SUMOTime, SUMOTime>(8000, 3000))); // backwards into obtuse space
423 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(181, std::pair< SUMOTime, SUMOTime>(3000, 4000))); // straight in but potentially needing parallel parking
424 break;
425 case SVC_TRUCK:
426 case SVC_TRAILER:
427 case SVC_BUS:
428 case SVC_COACH:
429 case SVC_DELIVERY:
430 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(10, std::pair< SUMOTime, SUMOTime>(6000, 8000))); // straight in but potentially needing parallel parking
431 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(80, std::pair< SUMOTime, SUMOTime>(2000, 21000))); // straight in
432 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(110, std::pair< SUMOTime, SUMOTime>(21000, 2000))); // optional forwards/backwards
433 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(170, std::pair< SUMOTime, SUMOTime>(14000, 5000))); // backwards into obtuse space
434 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(181, std::pair< SUMOTime, SUMOTime>(6000, 8000))); // straight in but potentially needing parallel parking
435 break;
436 case SVC_PEDESTRIAN:
437 case SVC_MOPED:
438 case SVC_BICYCLE:
439 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(181, std::pair< SUMOTime, SUMOTime>(1000, 1000))); // no dependence on angle
440 break;
441 default:
442 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(10, std::pair< SUMOTime, SUMOTime>(3000, 4000))); // straight in but potentially needing parallel parking
443 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(80, std::pair< SUMOTime, SUMOTime>(1000, 11000))); // straight in
444 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(110, std::pair< SUMOTime, SUMOTime>(11000, 2000))); // optional forwards/backwards
445 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(170, std::pair< SUMOTime, SUMOTime>(8000, 3000))); // backwards into obtuse space
446 myManoeuverAngleTimes.insert(std::pair<int, std::pair<SUMOTime, SUMOTime>>(181, std::pair< SUMOTime, SUMOTime>(3000, 4000))); // straight in but potentially needing parallel parking
447 break;
448 }
449}
450
451void
453 // first check if vehicle type can be written
454 if (onlyReferenced) {
455 return;
456 }
457 // open vehicle tag
459 // write ID (always needed)
460 dev.writeAttr(SUMO_ATTR_ID, id);
461 // write parameters depending if is set
464 }
467 }
470 }
473 }
476 }
479 }
481 // Note: action step length is only exposed in seconds to the user
483 }
486 }
488 dev.writeAttr(SUMO_ATTR_EMISSIONCLASS, PollutantsInterface::getName(emissionClass));
489 }
492 }
494 if (impatience == -std::numeric_limits<double>::max()) {
496 } else {
498 }
499 }
502 }
505 }
508 }
511 }
514 }
517 }
520 }
523 }
526 }
529 }
532 }
534 switch (latAlignmentProcedure) {
537 break;
539 dev.writeAttr(SUMO_ATTR_LATALIGNMENT, "right");
540 break;
542 dev.writeAttr(SUMO_ATTR_LATALIGNMENT, "center");
543 break;
545 dev.writeAttr(SUMO_ATTR_LATALIGNMENT, "arbitrary");
546 break;
549 break;
551 dev.writeAttr(SUMO_ATTR_LATALIGNMENT, "compact");
552 break;
555 break;
557 default:
558 break;
559 }
560 }
563 }
566 }
569 }
572 }
575 }
578 }
581 }
584 }
585 // Write Lane Change Model parameters
586 for (const auto& lcParam : lcParameter) {
587 dev.writeAttr(lcParam.first, lcParam.second);
588 }
589 // Write Junction Model parameter
590 for (const auto& jmParam : jmParameter) {
591 dev.writeAttr(jmParam.first, jmParam.second);
592 }
595 }
596 // Write Car Following Model parameters
597 for (const auto& cfParam : cfParameter) {
598 dev.writeAttr(cfParam.first, cfParam.second);
599 }
600 // Write carriage length
605 dev.closeTag();
606 }
607 // Write locomotive length
612 dev.closeTag();
613 }
614 // Write carriage gap
619 dev.closeTag();
620 }
621 // Write carriage doors
626 dev.closeTag();
627 }
628 // Write rest of parameters
629 writeParams(dev);
630 // close tag
631 dev.closeTag();
632}
633
634
635double
636SUMOVTypeParameter::getCFParam(const SumoXMLAttr attr, const double defaultValue) const {
637 if (cfParameter.count(attr)) {
638 return StringUtils::toDouble(cfParameter.find(attr)->second);
639 } else {
640 return defaultValue;
641 }
642}
643
644
645std::string
646SUMOVTypeParameter::getCFParamString(const SumoXMLAttr attr, const std::string defaultValue) const {
647 if (cfParameter.count(attr)) {
648 return cfParameter.find(attr)->second;
649 } else {
650 return defaultValue;
651 }
652}
653
654
655std::vector<double>
657 std::vector<double> result;
658 const std::string values = getCFParamString(attr, "");
659 if (!values.empty()) {
660 for (std::string value : StringTokenizer(values).getVector()) {
661 result.push_back(StringUtils::toDouble(value));
662 }
663 }
664 return result;
665}
666
667
668
671 if (cfParameter.count(attr)) {
672 std::vector<double> speedTable = getCFValueTable(SUMO_ATTR_SPEED_TABLE);
673 std::vector<double> valueTable = getCFValueTable(attr);
674 if (valueTable.size() == 1) {
675 throw ProcessError(TLF("Invalid size of % table for vType '%' (at least 2 values are required).", toString(attr), id));
676 } else if (speedTable.size() != valueTable.size()) {
677 throw ProcessError(TLF("Mismatching size of speedTable (%) and % table (%) for vType '%'.", speedTable.size(), toString(attr), valueTable.size(), id));
678 }
680 for (int i = 0; i < (int)speedTable.size(); i++) {
681 result[speedTable[i]] = valueTable[i];
682 }
683 return result;
684 } else {
685 return defaultProfile;
686 }
687}
688
689
690double
691SUMOVTypeParameter::getLCParam(const SumoXMLAttr attr, const double defaultValue) const {
692 if (lcParameter.count(attr)) {
693 return StringUtils::toDouble(lcParameter.find(attr)->second);
694 } else {
695 return defaultValue;
696 }
697}
698
699
700std::string
701SUMOVTypeParameter::getLCParamString(const SumoXMLAttr attr, const std::string& defaultValue) const {
702 if (lcParameter.count(attr)) {
703 return lcParameter.find(attr)->second;
704 } else {
705 return defaultValue;
706 }
707}
708
709
714
715
716double
717SUMOVTypeParameter::getJMParam(const SumoXMLAttr attr, const double defaultValue) const {
718 if (jmParameter.count(attr)) {
719 return StringUtils::toDouble(jmParameter.find(attr)->second);
720 } else {
721 return defaultValue;
722 }
723}
724
725
726std::string
727SUMOVTypeParameter::getJMParamString(const SumoXMLAttr attr, const std::string defaultValue) const {
728 if (jmParameter.count(attr)) {
729 return jmParameter.find(attr)->second;
730 } else {
731 return defaultValue;
732 }
733}
734
737 SUMOTime last = 0;
738 for (std::pair<int, std::pair<SUMOTime, SUMOTime>> angleTime : myManoeuverAngleTimes) {
739 if (angle <= angleTime.first) {
740 return (angleTime.second.first);
741 } else {
742 last = angleTime.second.first;
743 }
744 }
745 return (last);
746}
747
750 SUMOTime last = 0;
751 for (std::pair<int, std::pair<SUMOTime, SUMOTime>> angleTime : myManoeuverAngleTimes) {
752 if (angle <= angleTime.first) {
753 return (angleTime.second.second);
754 } else {
755 last = angleTime.second.second;
756 }
757 }
758 return (last);
759}
760
761std::string
763 std::stringstream stream;
764
765 stream << std::fixed << std::setprecision(1);
766 int count = 0;
767 for (std::pair<int, std::pair<SUMOTime, SUMOTime>> angleTime : myManoeuverAngleTimes) {
768 if (count++ > 0) {
769 stream << ",";
770 }
771 stream << toString(angleTime.first) + " " << STEPS2TIME(angleTime.second.first) << " " << STEPS2TIME(angleTime.second.second);
772 }
773 std::string triplets = stream.str();
774 return triplets;
775}
776
777
778void
779SUMOVTypeParameter::cacheParamRestrictions(const std::vector<std::string>& restrictionKeys) {
780 for (const std::string& key : restrictionKeys) {
782 }
783}
784
785
786void
788 if (hasParameter("scaleVisual")) {
790 }
791 if (hasParameter("carriageLength")) {
794 } else {
795 switch (shape) {
797 carriageLength = 8.25; // 16.5 overall, 2 modules http://de.wikipedia.org/wiki/Ikarus_180
798 carriageGap = 0;
799 break;
802 carriageLength = 24.5;
803 locomotiveLength = 19.100; // https://en.wikipedia.org/wiki/DB_Class_101
804 } else if (vehicleClass == SVC_RAIL_FAST) {
805 carriageLength = 24.775; // http://de.wikipedia.org/wiki/ICE_3
806 locomotiveLength = 25.835;
807 } else {
808 carriageLength = 24.5; // http://de.wikipedia.org/wiki/UIC-Y-Wagen_%28DR%29
809 locomotiveLength = 16.4; // https://en.wikipedia.org/wiki/DB_Class_218
810 }
811 break;
813 if (vehicleClass == SVC_TRAM) {
814 carriageLength = 5.71; // http://de.wikipedia.org/wiki/Bombardier_Flexity_Berlin
815 locomotiveLength = 5.71;
816 } else if (vehicleClass == SVC_RAIL_URBAN) {
817 carriageLength = 18.4; // https://en.wikipedia.org/wiki/DBAG_Class_481
818 locomotiveLength = 18.4;
819 } else {
820 carriageLength = 16.85; // 67.4m overall, 4 carriages http://de.wikipedia.org/wiki/DB-Baureihe_423
821 }
822 break;
824 carriageLength = 13.86; // UIC 571-1 http://de.wikipedia.org/wiki/Flachwagen
825 break;
827 carriageLength = 13.5;
828 locomotiveLength = 2.5;
829 carriageGap = 0.5;
830 break;
832 carriageLength = 6.75;
833 locomotiveLength = 2.5 + 6.75;
834 carriageGap = 0.5;
835 break;
836 default:
837 break;
838 }
839 }
840 if (hasParameter("locomotiveLength")) {
843 } else if (locomotiveLength < 0) {
845 }
846 if (hasParameter("carriageGap")) {
849 }
850 if (hasParameter("carriageDoors")) {
853 }
854 if (hasParameter("carriageDoorWidth")) {
856 }
857 if (hasParameter("maxPlatformDistance")) {
859 }
860 if (hasParameter("frontSeatPos")) {
863 } else {
864 switch (shape) {
866 frontSeatPos = 5;
867 break;
869 frontSeatPos = 1.2;
870 break;
872 frontSeatPos = 0.6;
873 break;
876 frontSeatPos = 0.9;
877 break;
882 frontSeatPos = 0.5;
883 break;
887 frontSeatPos = 0.8;
888 break;
889 default:
890 break;
891 }
892 }
893
894 if (hasParameter("seatingWidth")) {
897 }
898 if (hasParameter("carriageImages")) {
899 std::vector<std::string> rawFiles = StringTokenizer(getParameter("carriageImages"), ",").getVector();
900 for (const std::string& f : rawFiles) {
901 carriageImages.push_back(FileHelpers::checkForRelativity(f, fileName));
902 }
903 }
904}
905
906
907double
909 switch (vc) {
910 case SVC_PEDESTRIAN:
911 case SVC_WHEELCHAIR:
912 return 1.5;
913 case SVC_BICYCLE:
914 case SVC_SCOOTER:
915 return 1.2;
916 case SVC_MOTORCYCLE:
917 return 6.;
918 case SVC_MOPED:
919 return 1.1;
920 case SVC_TRUCK:
921 return 1.3;
922 case SVC_TRAILER:
923 return 1.1;
924 case SVC_BUS:
925 return 1.2;
926 case SVC_COACH:
927 return 2.;
928 case SVC_TRAM:
929 return 1.;
930 case SVC_RAIL_URBAN:
931 return 1.;
932 case SVC_RAIL:
933 return 0.25;
935 case SVC_RAIL_FAST:
936 return 0.5;
937 case SVC_SHIP:
938 return 0.1;
939 default:
940 return 2.6;//2.9;
941 }
942}
943
944
945double
947 switch (vc) {
948 case SVC_PEDESTRIAN:
949 case SVC_WHEELCHAIR:
950 return 2.;
951 case SVC_BICYCLE:
952 case SVC_SCOOTER:
953 return 3.;
954 case SVC_MOPED:
955 return 7.;
956 case SVC_MOTORCYCLE:
957 return 10.;
958 case SVC_TRUCK:
959 case SVC_TRAILER:
960 case SVC_BUS:
961 case SVC_COACH:
962 return 4.;
963 case SVC_TRAM:
964 case SVC_RAIL_URBAN:
965 return 3.;
966 case SVC_RAIL:
968 case SVC_RAIL_FAST:
969 return 1.3;
970 case SVC_SHIP:
971 return 0.15;
972 default:
973 return 4.5;//7.5;
974 }
975}
976
977
978double
979SUMOVTypeParameter::getDefaultEmergencyDecel(const SUMOVehicleClass vc, double decel, double defaultOption) {
980 if (defaultOption == VTYPEPARS_DEFAULT_EMERGENCYDECEL_DEFAULT) {
981 double vcDecel;
982 switch (vc) {
983 case SVC_PEDESTRIAN:
984 case SVC_WHEELCHAIR:
985 vcDecel = 5.;
986 break;
987 case SVC_BICYCLE:
988 case SVC_SCOOTER:
989 vcDecel = 7.;
990 break;
991 case SVC_MOPED:
992 case SVC_MOTORCYCLE:
993 vcDecel = 10.;
994 break;
995 case SVC_TRUCK:
996 case SVC_TRAILER:
997 case SVC_BUS:
998 case SVC_COACH:
999 case SVC_TRAM:
1000 case SVC_RAIL_URBAN:
1001 vcDecel = 7.;
1002 break;
1003 case SVC_RAIL:
1004 case SVC_RAIL_ELECTRIC:
1005 case SVC_RAIL_FAST:
1006 vcDecel = 5.;
1007 break;
1008 case SVC_SHIP:
1009 vcDecel = 1.;
1010 break;
1011 default:
1012 vcDecel = 9.;
1013 }
1014 return MAX2(decel, vcDecel);
1015 } else if (defaultOption == VTYPEPARS_DEFAULT_EMERGENCYDECEL_DECEL) {
1016 return decel;
1017 } else {
1018 // value already checked in MSFrame::checkOptions
1019 return MAX2(decel, defaultOption);
1020 }
1021}
1022
1023
1024
1025double
1027 switch (vc) {
1028 case SVC_TRAM:
1029 case SVC_RAIL_URBAN:
1030 case SVC_RAIL:
1031 case SVC_RAIL_ELECTRIC:
1032 case SVC_RAIL_FAST:
1033 case SVC_SHIP:
1034 return 0.;
1035 default:
1036 return 0.5;
1037 }
1038}
1039
1040const SUMOVTypeParameter&
1042 static SUMOVTypeParameter defaultParams("");
1043 return defaultParams;
1044}
1045
1046bool
1047SUMOVTypeParameter::parseLatAlignment(const std::string& val, double& lao, LatAlignmentDefinition& lad) {
1048 bool ok = true;
1049 lao = 0.0;
1051 if (val == "right") {
1053 } else if (val == "center") {
1055 } else if (val == "arbitrary") {
1057 } else if (val == "nice") {
1059 } else if (val == "compact") {
1061 } else if (val == "left") {
1063 } else {
1064 try {
1065 lao = StringUtils::toDouble(val);
1066 } catch (...) {
1067 ok = false;
1068 }
1069 }
1070 return ok;
1071}
1072
1073
1076 return timeToTeleport == TTT_UNSET ? defaultValue : timeToTeleport;
1077}
1078
1081 return timeToTeleportBidi == TTT_UNSET ? defaultValue : timeToTeleportBidi;
1082}
1083
1086 UNUSED_PARAMETER(maxAccel);
1088 std::vector<std::pair<double, double> > MaxAccelProfile;
1089 switch (vc) {
1090 case SVC_PEDESTRIAN:
1091 case SVC_BICYCLE:
1092 case SVC_MOTORCYCLE:
1093 case SVC_MOPED:
1094 case SVC_TRUCK:
1095 case SVC_TRAILER:
1096 case SVC_BUS:
1097 case SVC_COACH:
1098 case SVC_TRAM:
1099 case SVC_RAIL_URBAN:
1100 case SVC_RAIL:
1101 case SVC_RAIL_ELECTRIC:
1102 case SVC_RAIL_FAST:
1103 case SVC_SHIP:
1104 default:
1105 return result;
1106 }
1107}
1108
1111 UNUSED_PARAMETER(desAccel);
1113 switch (vc) {
1114 case SVC_PEDESTRIAN:
1115 case SVC_BICYCLE:
1116 case SVC_MOTORCYCLE:
1117 case SVC_MOPED:
1118 case SVC_TRUCK:
1119 case SVC_TRAILER:
1120 case SVC_BUS:
1121 case SVC_COACH:
1122 case SVC_TRAM:
1123 case SVC_RAIL_URBAN:
1124 case SVC_RAIL:
1125 case SVC_RAIL_ELECTRIC:
1126 case SVC_RAIL_FAST:
1127 case SVC_SHIP:
1128 default:
1129 return result;
1130 }
1131}
1132
1133/****************************************************************************/
long long int SUMOTime
Definition GUI.h:36
#define TLF(string,...)
Definition MsgHandler.h:306
const std::string invalid_return< std::string >::value
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
Definition SUMOTime.cpp:91
#define STEPS2TIME(x)
Definition SUMOTime.h:55
#define TTT_UNSET
#define EMPREFIX
const long long int VTYPEPARS_TTT_SET
const long long int VTYPEPARS_SHAPE_SET
const long long int VTYPEPARS_LOADING_DURATION
const long long int VTYPEPARS_TTT_BIDI_SET
const long long int VTYPEPARS_SCALE_SET
const long long int VTYPEPARS_PERSON_CAPACITY
const long long int VTYPEPARS_CAR_FOLLOW_MODEL
const long long int VTYPEPARS_FRONT_SEAT_POS_SET
const long long int VTYPEPARS_WIDTH_SET
const long long int VTYPEPARS_CARRIAGE_LENGTH_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 int VTYPEPARS_DEFAULT_EMERGENCYDECEL_DEFAULT
const long long int VTYPEPARS_LATALIGNMENT_SET
const long long int VTYPEPARS_COLOR_SET
const long long int VTYPEPARS_LANE_CHANGE_MODEL_SET
const long long int VTYPEPARS_DESIRED_MAXSPEED_SET
const long long int VTYPEPARS_OSGFILE_SET
const long long int VTYPEPARS_MANEUVER_ANGLE_TIMES_SET
const long long int VTYPEPARS_SPEEDFACTOR_PREMATURE_SET
const long long int VTYPEPARS_SPEEDFACTOR_SET
const long long int VTYPEPARS_CARRIAGE_GAP_SET
const long long int VTYPEPARS_MINGAP_SET
const long long int VTYPEPARS_PROBABILITY_SET
const long long int VTYPEPARS_HEIGHT_SET
const int VTYPEPARS_DEFAULT_EMERGENCYDECEL_DECEL
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.
@ RIGHT
drive on the right side
@ GIVEN
The alignment as offset is given.
@ DEFAULT
No information given; use default.
@ LEFT
drive on the left side
@ ARBITRARY
maintain the current alignment
@ NICE
align with the closest sublane border
@ COMPACT
align with the rightmost sublane that allows keeping the current speed
@ CENTER
drive in the middle
const long long int VTYPEPARS_BOARDING_FACTOR_SET
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_SEATING_WIDTH_SET
const long long int VTYPEPARS_IMGFILE_SET
const long long int VTYPEPARS_CONTAINER_CAPACITY
const long long int VTYPEPARS_MINGAP_LAT_SET
const long long int VTYPEPARS_CARRIAGE_DOORS_SET
const long long int VTYPEPARS_LOCOMOTIVE_LENGTH_SET
double getDefaultVehicleLength(const SUMOVehicleClass vc)
Returns the default vehicle length This put into a function so it can be used by NBVehicle.
std::string getVehicleShapeName(SUMOVehicleShape id)
Returns the class name of the shape class given by its id.
const double DEFAULT_VEH_HEIGHT
const double DEFAULT_VEH_PROB
const double DEFAULT_VEH_MASS
SUMOVehicleShape
Definition of vehicle classes to differ between different appearances.
@ BUS
render as a bus
@ RAIL_CARGO
render as a cargo train
@ RAIL
render as a rail
@ PASSENGER
render as a passenger vehicle
@ SCOOTER
render as a scooter
@ RAIL_CAR
render as a (city) rail without locomotive
@ SHIP
render as a arbitrary ship
@ DELIVERY
render as a delivery vehicle
@ BICYCLE
render as a bicycle
@ MOTORCYCLE
render as a motorcycle
@ UNKNOWN
not defined
@ BUS_TROLLEY
render as a trolley bus
@ TAXI
automated car (with cruise controllers)
@ E_VEHICLE
render as a (futuristic) e-vehicle
@ TRUCK
render as a transport vehicle
@ AIRCRAFT
render as aircraft
@ MOPED
render as a moped
@ BUS_FLEXIBLE
render as a flexible city bus
@ TRUCK_1TRAILER
render as a transport vehicle with one trailer
@ BUS_COACH
render as a coach
@ TRUCK_SEMITRAILER
render as a semi-trailer transport vehicle ("Sattelschlepper")
@ PEDESTRIAN
render as a pedestrian
const double DEFAULT_PEDESTRIAN_SPEED
const double DEFAULT_BICYCLE_SPEED
const double DEFAULT_VEH_WIDTH
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_SHIP
is an arbitrary ship
@ SVC_PRIVATE
private vehicles
@ SVC_VIP
vip vehicles
@ SVC_HOV
vehicle is a HOV
@ SVC_TRUCK
vehicle is a large transport vehicle
@ SVC_CUSTOM2
is a user-defined type
@ SVC_WHEELCHAIR
@ SVC_RAIL
vehicle is a not electrified rail
@ SVC_COACH
vehicle is a coach
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_CONTAINER
@ SVC_SCOOTER
@ SVC_RAIL_FAST
vehicle that is allowed to drive on high-speed rail tracks
@ SVC_TRAILER
vehicle is a large transport vehicle
@ SVC_CUSTOM1
is a user-defined type
@ SVC_DRONE
@ SVC_RAIL_ELECTRIC
rail vehicle that requires electrified tracks
@ SVC_DELIVERY
vehicle is a small delivery vehicle
@ SVC_RAIL_URBAN
vehicle is a city rail
@ SVC_MOTORCYCLE
vehicle is a motorcycle
@ SVC_EMERGENCY
public emergency vehicles
@ SVC_MOPED
vehicle is a moped
@ SVC_TRAM
vehicle is a light rail
@ SVC_TAXI
vehicle is a taxi
@ SVC_BUS
vehicle is a bus
@ SVC_E_VEHICLE
is an electric vehicle
@ SVC_AIRCRAFT
@ SVC_SUBWAY
@ SVC_PEDESTRIAN
pedestrian
@ CENTER
At the center of the lane.
@ SUMO_TAG_CF_KRAUSS
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_PARAM
parameter associated to a certain key
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_JM_STOPLINE_GAP_MINOR
@ SUMO_ATTR_EMISSIONCLASS
@ SUMO_ATTR_JM_IGNORE_FOE_SPEED
@ SUMO_ATTR_JM_STOPSIGN_WAIT
@ SUMO_ATTR_JM_IGNORE_KEEPCLEAR_TIME
@ SUMO_ATTR_VALUE
@ SUMO_ATTR_LANE_CHANGE_MODEL
@ SUMO_ATTR_JM_STOPLINE_GAP
@ SUMO_ATTR_SCALE
@ SUMO_ATTR_MAXSPEED_LAT
@ SUMO_ATTR_ACTIONSTEPLENGTH
@ SUMO_ATTR_MINGAP
@ SUMO_ATTR_JM_DRIVE_AFTER_RED_TIME
@ SUMO_ATTR_MASS
@ SUMO_ATTR_JM_ALLWAYSTOP_WAIT
@ SUMO_ATTR_LOADING_DURATION
@ SUMO_ATTR_MANEUVER_ANGLE_TIMES
Class specific timing values for vehicle maneuvering through angle ranges.
@ SUMO_ATTR_JM_EXTRA_GAP
@ SUMO_ATTR_TIME_TO_TELEPORT_BIDI
@ SUMO_ATTR_CAR_FOLLOW_MODEL
@ SUMO_ATTR_JM_DRIVE_AFTER_YELLOW_TIME
@ SUMO_ATTR_GUISHAPE
@ SUMO_ATTR_DESIRED_MAXSPEED
@ SUMO_ATTR_JM_IGNORE_FOE_PROB
@ SUMO_ATTR_CARRIAGE_DOORS
@ SUMO_ATTR_CONTAINER_CAPACITY
@ SUMO_ATTR_BOARDING_FACTOR
@ SUMO_ATTR_MINGAP_LAT
@ SUMO_ATTR_HEIGHT
@ SUMO_ATTR_JM_CROSSING_GAP
@ SUMO_ATTR_CARRIAGE_LENGTH
@ SUMO_ATTR_LATALIGNMENT
@ SUMO_ATTR_SPEED_TABLE
@ SUMO_ATTR_IMPATIENCE
@ SUMO_ATTR_VCLASS
@ SUMO_ATTR_BOARDING_DURATION
@ SUMO_ATTR_JM_SIGMA_MINOR
@ SUMO_ATTR_PROB
@ SUMO_ATTR_TIME_TO_TELEPORT
@ SUMO_ATTR_SPEEDFACTOR
@ SUMO_ATTR_LENGTH
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_MAXSPEED
@ SUMO_ATTR_ID
@ SUMO_ATTR_SPEEDFACTOR_PREMATURE
@ SUMO_ATTR_OSGFILE
@ SUMO_ATTR_IMGFILE
@ SUMO_ATTR_WIDTH
@ SUMO_ATTR_JM_IGNORE_JUNCTION_FOE_PROB
@ SUMO_ATTR_PERSON_CAPACITY
@ SUMO_ATTR_KEY
@ SUMO_ATTR_LOCOMOTIVE_LENGTH
@ SUMO_ATTR_JM_DRIVE_RED_SPEED
@ SUMO_ATTR_JM_TIMEGAP_MINOR
@ SUMO_ATTR_CARRIAGE_GAP
@ SUMO_ATTR_JM_ADVANCE
T MAX2(T a, T b)
Definition StdDefs.h:86
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
static std::string checkForRelativity(const std::string &filename, const std::string &basePath)
Returns the path from a configuration so that it is accessible from the current working directory.
std::map< double, double > LinearApproxMap
A storage for options typed value containers).
Definition OptionsCont.h:89
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float).
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String).
bool exists(const std::string &name) const
Returns the information whether the named option is known.
static OptionsCont & getOptions()
Retrieves the options.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
bool hasParameter(const std::string &key) const
Returns whether the parameter is set.
virtual const std::string getParameter(const std::string &key, const std::string defaultValue="") const
Returns the value for a given key.
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
Helper methods for PHEMlight-based emission computation.
Structure representing possible vehicle parameter.
double locomotiveLength
the length of the locomotive
SUMOTime getExitManoeuvreTime(const int angle) const
Returns the time that will be needed for the vehicle type to execute the (exit) manoeuvre (and be blo...
double scaleVisual
the scaling factor when drawing the object
double width
This class' width.
SubParams cfParameter
Car-following parameter.
void write(OutputDevice &dev) const
Writes the vtype.
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....
void cacheParamRestrictions(const std::vector< std::string > &restrictionKeys)
bool saved
Information whether this type was already saved (needed by routers).
std::vector< double > getCFValueTable(SumoXMLAttr attr) const
retrieve value table from cfParameter
SUMOTime getTimeToTeleport(SUMOTime defaultValue) const
return time-to-teleport (either custom or default)
bool wasSet(long long int what) const
Returns whether the given parameter was set.
double height
This class' height.
static LinearApproxHelpers::LinearApproxMap getDefaultDesAccelProfile(const SUMOVehicleClass vc, double desAccel)
Returns the default desired acceleration profile for the given vehicle class This needs to be a funct...
double desiredMaxSpeed
The vehicle type's desired maximum speed [m/s].
SUMOEmissionClass emissionClass
The emission class of this vehicle.
double frontSeatPos
the offset of the first person seat from the front of the vehicle
double latAlignmentOffset
(optional) The vehicle's desired lateral alignment as offset in m from center line
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.
double carriageLength
the length of train carriages
static std::set< SumoXMLAttr > AllowedJMAttrs
allowed attrs for the junction model
double seatingWidth
width to be used when comping seats
SUMOTime getTimeToTeleportBidi(SUMOTime defaultValue) const
return time-to-teleport.bidi (either custom or default)
double length
The physical vehicle length.
double maxSpeedLat
The vehicle type's maximum lateral speed [m/s].
std::vector< std::string > carriageImages
Image files for additional carriages.
double speedFactorPremature
the possible speed reduction when a train is ahead of schedule
std::vector< double > paramRestrictions
cached value of parameters which may restrict access to certain edges
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 ...
SUMOTime getEntryManoeuvreTime(const int angle) const
Returns the time that will be needed for the vehicle type to execute the (entry) manoeuvre (and be bl...
void initRailVisualizationParameters(const std::string fileName="")
init Rail Visualization Parameters
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.
double maxPlatformDistance
the maximum distance between platform and train
std::map< SumoXMLAttr, std::string > SubParams
sub-model parameters
std::string imgFile
Image file for this class.
SUMOVehicleShape shape
This class' shape.
int personCapacity
The person capacity of the vehicle.
int carriageDoors
the number of doors per carriage
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street.
bool onlyReferenced
Information whether this is a type-stub, being only referenced but not defined (needed by routers).
LinearApproxHelpers::LinearApproxMap getCFProfile(const SumoXMLAttr attr, const LinearApproxHelpers::LinearApproxMap &defaultProfile) const
Returns the named value from the map, or the default if it is not contained there.
double scale
individual scaling factor (-1 for undefined)
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.
SUMOTime timeToTeleport
the custom time-to-teleport for this type
std::string osgFile
3D model file for this class
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 timeToTeleportBidi
the custom time-to-teleport.bidi for this type
void setManoeuverAngleTimes(const SUMOVehicleClass vclass)
Initialise the default mapping between manoeuver angle and times dependant on vehicle class.
double carriageGap
the length of the gap between carriages
int containerCapacity
The container capacity of the vehicle.
static const SUMOVTypeParameter & getDefault()
return the default parameters, this is a function due to the http://www.parashift....
SUMOTime boardingDuration
The time a person needs to board the vehicle.
static LinearApproxHelpers::LinearApproxMap getDefaultMaxAccelProfile(const SUMOVehicleClass vc, double maxAccel)
Returns the default maximum acceleration profile for the given vehicle class This needs to be a funct...
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].
double boardingFactor
factor for boardingDuration / loadingDuration
SUMOVehicleClass vehicleClass
The vehicle's class.
SUMOVTypeParameter(const std::string &vtid, const SUMOVehicleClass vc=SVC_IGNORING)
Constructor.
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.
SUMOTime loadingDuration
The time a container needs to get loaded on the vehicle.
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.
std::string id
The vehicle type's id.
SumoXMLTag cfModel
The enum-representation of the car-following model to use.
const SubParams & getLCParams() const
Returns the LC parameter.
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.
SubParams lcParameter
Lane-changing parameter.
LatAlignmentDefinition latAlignmentProcedure
Information on how the vehicle shall choose the lateral alignment.
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...
double carriageDoorWidth
the width of the carriage doors
SubParams jmParameter
Junction-model parameter.
double impatience
The vehicle's impatience (willingness to obstruct others).
std::string getManoeuverAngleTimesS() const
Returns myManoeuverAngleTimes as a string for xml output.
std::map< int, std::pair< SUMOTime, SUMOTime > > myManoeuverAngleTimes
Map of manoeuver angles versus the times (entry, exit) to execute the manoeuver.
LaneChangeModel lcModel
The lane-change model to use.
static bool parseLatAlignment(const std::string &val, double &lao, LatAlignmentDefinition &lad)
Parses and validates a given latAlignment value.
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 ...
static StringBijection< SumoXMLTag > CarFollowModels
car following models
std::vector< std::string > getVector()
return vector of strings
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
#define UNUSED_PARAMETER(x)
struct for default values that depend of VClass
int carriageDoors
the number of doors per carriage
int personCapacity
The person capacity of the vehicle.
double maxPlatformDistance
the maximum distance between platform and train
double carriageLength
the length of train carriages
double desiredMaxSpeed
The vehicle type's desired maximum speed [m/s].
std::string osgFile
3D model file for this class
SUMOEmissionClass emissionClass
The emission class of this vehicle.
double minGap
This class' free space in front of the vehicle itself.
int containerCapacity
The container capacity of the vehicle.
double maxSpeed
The vehicle type's maximum speed [m/s] (technical limit, not subject to speed deviation).
double carriageDoorWidth
the width of the carriage doors
Distribution_Parameterized speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street.
double length
The physical vehicle length.
SUMOVehicleShape shape
This class' shape.
double minGapLat
The vehicle type's minimum lateral gap [m].
LatAlignmentDefinition latAlignmentProcedure
the lateral alignment procedure
double locomotiveLength
the length of train locomotive