78 updateFromAttributes(sumoBaseObject);
93 fromTrainStop.clear();
95 fromContainerStop.clear();
96 toContainerStop.clear();
97 fromChargingStation.clear();
98 toChargingStation.clear();
99 fromParkingArea.clear();
100 toParkingArea.clear();
101 consecutiveEdges.clear();
109 if (fromEdge.empty()) {
112 return getNumberOfDefinedParameters() == 1;
119 return (
int)consecutiveEdges.size() +
120 (fromJunction.empty() ? 0 : 1) +
121 (toJunction.empty() ? 0 : 1) +
122 (fromEdge.empty() ? 0 : 1) +
123 (toEdge.empty() ? 0 : 1) +
124 (fromTAZ.empty() ? 0 : 1) +
125 (toTAZ.empty() ? 0 : 1) +
126 (fromBusStop.empty() ? 0 : 1) +
127 (toBusStop.empty() ? 0 : 1) +
128 (fromTrainStop.empty() ? 0 : 1) +
129 (toTrainStop.empty() ? 0 : 1) +
130 (fromContainerStop.empty() ? 0 : 1) +
131 (toContainerStop.empty() ? 0 : 1) +
132 (fromChargingStation.empty() ? 0 : 1) +
133 (toChargingStation.empty() ? 0 : 1) +
134 (fromParkingArea.empty() ? 0 : 1) +
135 (toParkingArea.empty() ? 0 : 1) +
136 (fromRoute.empty() ? 0 : 1) +
137 (toRoute.empty() ? 0 : 1);
144 if (isSingleEdgePlan()) {
146 }
else if (consecutiveEdges.size() > 0) {
148 }
else if (!toRoute.empty()) {
150 }
else if (!fromEdge.empty()) {
151 if (!toEdge.empty()) {
153 }
else if (!toTAZ.empty()) {
155 }
else if (!toJunction.empty()) {
157 }
else if (!toBusStop.empty()) {
159 }
else if (!toTrainStop.empty()) {
161 }
else if (!toContainerStop.empty()) {
163 }
else if (!toChargingStation.empty()) {
165 }
else if (!toParkingArea.empty()) {
170 }
else if (!fromTAZ.empty()) {
171 if (!toEdge.empty()) {
173 }
else if (!toTAZ.empty()) {
175 }
else if (!toJunction.empty()) {
177 }
else if (!toBusStop.empty()) {
179 }
else if (!toTrainStop.empty()) {
181 }
else if (!toContainerStop.empty()) {
183 }
else if (!toChargingStation.empty()) {
185 }
else if (!toParkingArea.empty()) {
190 }
else if (!fromJunction.empty()) {
191 if (!toEdge.empty()) {
193 }
else if (!toTAZ.empty()) {
195 }
else if (!toJunction.empty()) {
197 }
else if (!toBusStop.empty()) {
199 }
else if (!toTrainStop.empty()) {
201 }
else if (!toContainerStop.empty()) {
203 }
else if (!toChargingStation.empty()) {
205 }
else if (!toParkingArea.empty()) {
210 }
else if (!fromBusStop.empty()) {
211 if (!toEdge.empty()) {
213 }
else if (!toTAZ.empty()) {
215 }
else if (!toJunction.empty()) {
217 }
else if (!toBusStop.empty()) {
219 }
else if (!toTrainStop.empty()) {
221 }
else if (!toContainerStop.empty()) {
223 }
else if (!toChargingStation.empty()) {
225 }
else if (!toParkingArea.empty()) {
230 }
else if (!fromTrainStop.empty()) {
231 if (!toEdge.empty()) {
233 }
else if (!toTAZ.empty()) {
235 }
else if (!toJunction.empty()) {
237 }
else if (!toBusStop.empty()) {
239 }
else if (!toTrainStop.empty()) {
241 }
else if (!toContainerStop.empty()) {
243 }
else if (!toChargingStation.empty()) {
245 }
else if (!toParkingArea.empty()) {
250 }
else if (!fromContainerStop.empty()) {
251 if (!toEdge.empty()) {
253 }
else if (!toTAZ.empty()) {
255 }
else if (!toJunction.empty()) {
257 }
else if (!toBusStop.empty()) {
259 }
else if (!toTrainStop.empty()) {
261 }
else if (!toContainerStop.empty()) {
263 }
else if (!toChargingStation.empty()) {
265 }
else if (!toParkingArea.empty()) {
270 }
else if (!fromChargingStation.empty()) {
271 if (!toEdge.empty()) {
273 }
else if (!toTAZ.empty()) {
275 }
else if (!toJunction.empty()) {
277 }
else if (!toBusStop.empty()) {
279 }
else if (!toTrainStop.empty()) {
281 }
else if (!toContainerStop.empty()) {
283 }
else if (!toChargingStation.empty()) {
285 }
else if (!toParkingArea.empty()) {
290 }
else if (!fromParkingArea.empty()) {
291 if (!toEdge.empty()) {
293 }
else if (!toTAZ.empty()) {
295 }
else if (!toJunction.empty()) {
297 }
else if (!toBusStop.empty()) {
299 }
else if (!toTrainStop.empty()) {
301 }
else if (!toContainerStop.empty()) {
303 }
else if (!toChargingStation.empty()) {
305 }
else if (!toParkingArea.empty()) {
318 if (isSingleEdgePlan()) {
320 }
else if (!fromEdge.empty()) {
321 if (!toEdge.empty()) {
323 }
else if (!toTAZ.empty()) {
325 }
else if (!toJunction.empty()) {
327 }
else if (!toBusStop.empty()) {
329 }
else if (!toTrainStop.empty()) {
331 }
else if (!toContainerStop.empty()) {
333 }
else if (!toChargingStation.empty()) {
335 }
else if (!toParkingArea.empty()) {
340 }
else if (!fromTAZ.empty()) {
341 if (!toEdge.empty()) {
343 }
else if (!toTAZ.empty()) {
345 }
else if (!toJunction.empty()) {
347 }
else if (!toBusStop.empty()) {
349 }
else if (!toTrainStop.empty()) {
351 }
else if (!toContainerStop.empty()) {
353 }
else if (!toChargingStation.empty()) {
355 }
else if (!toParkingArea.empty()) {
360 }
else if (!fromJunction.empty()) {
361 if (!toEdge.empty()) {
363 }
else if (!toTAZ.empty()) {
365 }
else if (!toJunction.empty()) {
367 }
else if (!toBusStop.empty()) {
369 }
else if (!toTrainStop.empty()) {
371 }
else if (!toContainerStop.empty()) {
373 }
else if (!toChargingStation.empty()) {
375 }
else if (!toParkingArea.empty()) {
380 }
else if (!fromBusStop.empty()) {
381 if (!toEdge.empty()) {
383 }
else if (!toTAZ.empty()) {
385 }
else if (!toJunction.empty()) {
387 }
else if (!toBusStop.empty()) {
389 }
else if (!toTrainStop.empty()) {
391 }
else if (!toContainerStop.empty()) {
393 }
else if (!toChargingStation.empty()) {
395 }
else if (!toParkingArea.empty()) {
400 }
else if (!fromTrainStop.empty()) {
401 if (!toEdge.empty()) {
403 }
else if (!toTAZ.empty()) {
405 }
else if (!toJunction.empty()) {
407 }
else if (!toBusStop.empty()) {
409 }
else if (!toTrainStop.empty()) {
411 }
else if (!toContainerStop.empty()) {
413 }
else if (!toChargingStation.empty()) {
415 }
else if (!toParkingArea.empty()) {
420 }
else if (!fromContainerStop.empty()) {
421 if (!toEdge.empty()) {
423 }
else if (!toTAZ.empty()) {
425 }
else if (!toJunction.empty()) {
427 }
else if (!toBusStop.empty()) {
429 }
else if (!toTrainStop.empty()) {
431 }
else if (!toContainerStop.empty()) {
433 }
else if (!toChargingStation.empty()) {
435 }
else if (!toParkingArea.empty()) {
440 }
else if (!fromChargingStation.empty()) {
441 if (!toEdge.empty()) {
443 }
else if (!toTAZ.empty()) {
445 }
else if (!toJunction.empty()) {
447 }
else if (!toBusStop.empty()) {
449 }
else if (!toTrainStop.empty()) {
451 }
else if (!toContainerStop.empty()) {
453 }
else if (!toChargingStation.empty()) {
455 }
else if (!toParkingArea.empty()) {
460 }
else if (!fromParkingArea.empty()) {
461 if (!toEdge.empty()) {
463 }
else if (!toTAZ.empty()) {
465 }
else if (!toJunction.empty()) {
467 }
else if (!toBusStop.empty()) {
469 }
else if (!toTrainStop.empty()) {
471 }
else if (!toContainerStop.empty()) {
473 }
else if (!toChargingStation.empty()) {
475 }
else if (!toParkingArea.empty()) {
488 if (isSingleEdgePlan()) {
490 }
else if (!fromEdge.empty()) {
491 if (!toEdge.empty()) {
493 }
else if (!toBusStop.empty()) {
495 }
else if (!toTrainStop.empty()) {
497 }
else if (!toContainerStop.empty()) {
499 }
else if (!toChargingStation.empty()) {
501 }
else if (!toParkingArea.empty()) {
506 }
else if (!fromBusStop.empty()) {
507 if (!toEdge.empty()) {
509 }
else if (!toBusStop.empty()) {
511 }
else if (!toTrainStop.empty()) {
513 }
else if (!toContainerStop.empty()) {
515 }
else if (!toChargingStation.empty()) {
517 }
else if (!toParkingArea.empty()) {
522 }
else if (!fromTrainStop.empty()) {
523 if (!toEdge.empty()) {
525 }
else if (!toBusStop.empty()) {
527 }
else if (!toTrainStop.empty()) {
529 }
else if (!toContainerStop.empty()) {
531 }
else if (!toChargingStation.empty()) {
533 }
else if (!toParkingArea.empty()) {
538 }
else if (!fromContainerStop.empty()) {
539 if (!toEdge.empty()) {
541 }
else if (!toBusStop.empty()) {
543 }
else if (!toTrainStop.empty()) {
545 }
else if (!toContainerStop.empty()) {
547 }
else if (!toChargingStation.empty()) {
549 }
else if (!toParkingArea.empty()) {
554 }
else if (!fromChargingStation.empty()) {
555 if (!toEdge.empty()) {
557 }
else if (!toBusStop.empty()) {
559 }
else if (!toTrainStop.empty()) {
561 }
else if (!toContainerStop.empty()) {
563 }
else if (!toChargingStation.empty()) {
565 }
else if (!toParkingArea.empty()) {
570 }
else if (!fromParkingArea.empty()) {
571 if (!toEdge.empty()) {
573 }
else if (!toBusStop.empty()) {
575 }
else if (!toTrainStop.empty()) {
577 }
else if (!toContainerStop.empty()) {
579 }
else if (!toChargingStation.empty()) {
581 }
else if (!toParkingArea.empty()) {
594 if (isSingleEdgePlan()) {
596 }
else if (!fromEdge.empty()) {
597 if (!toEdge.empty()) {
599 }
else if (!toBusStop.empty()) {
601 }
else if (!toTrainStop.empty()) {
603 }
else if (!toContainerStop.empty()) {
605 }
else if (!toChargingStation.empty()) {
607 }
else if (!toParkingArea.empty()) {
612 }
else if (!fromBusStop.empty()) {
613 if (!toEdge.empty()) {
615 }
else if (!toBusStop.empty()) {
617 }
else if (!toTrainStop.empty()) {
619 }
else if (!toContainerStop.empty()) {
621 }
else if (!toChargingStation.empty()) {
623 }
else if (!toParkingArea.empty()) {
628 }
else if (!fromTrainStop.empty()) {
629 if (!toEdge.empty()) {
631 }
else if (!toBusStop.empty()) {
633 }
else if (!toTrainStop.empty()) {
635 }
else if (!toContainerStop.empty()) {
637 }
else if (!toChargingStation.empty()) {
639 }
else if (!toParkingArea.empty()) {
644 }
else if (!fromContainerStop.empty()) {
645 if (!toEdge.empty()) {
647 }
else if (!toBusStop.empty()) {
649 }
else if (!toTrainStop.empty()) {
651 }
else if (!toContainerStop.empty()) {
653 }
else if (!toChargingStation.empty()) {
655 }
else if (!toParkingArea.empty()) {
660 }
else if (!fromChargingStation.empty()) {
661 if (!toEdge.empty()) {
663 }
else if (!toBusStop.empty()) {
665 }
else if (!toTrainStop.empty()) {
667 }
else if (!toContainerStop.empty()) {
669 }
else if (!toChargingStation.empty()) {
671 }
else if (!toParkingArea.empty()) {
676 }
else if (!fromParkingArea.empty()) {
677 if (!toEdge.empty()) {
679 }
else if (!toBusStop.empty()) {
681 }
else if (!toTrainStop.empty()) {
683 }
else if (!toContainerStop.empty()) {
685 }
else if (!toChargingStation.empty()) {
687 }
else if (!toParkingArea.empty()) {
700 if (isSingleEdgePlan()) {
702 }
else if (consecutiveEdges.size() > 0) {
704 }
else if (!fromEdge.empty()) {
705 if (!toEdge.empty()) {
707 }
else if (!toBusStop.empty()) {
709 }
else if (!toTrainStop.empty()) {
711 }
else if (!toContainerStop.empty()) {
713 }
else if (!toChargingStation.empty()) {
715 }
else if (!toParkingArea.empty()) {
720 }
else if (!fromBusStop.empty()) {
721 if (!toEdge.empty()) {
723 }
else if (!toBusStop.empty()) {
725 }
else if (!toTrainStop.empty()) {
727 }
else if (!toContainerStop.empty()) {
729 }
else if (!toChargingStation.empty()) {
731 }
else if (!toParkingArea.empty()) {
736 }
else if (!fromTrainStop.empty()) {
737 if (!toEdge.empty()) {
739 }
else if (!toBusStop.empty()) {
741 }
else if (!toTrainStop.empty()) {
743 }
else if (!toContainerStop.empty()) {
745 }
else if (!toChargingStation.empty()) {
747 }
else if (!toParkingArea.empty()) {
752 }
else if (!fromContainerStop.empty()) {
753 if (!toEdge.empty()) {
755 }
else if (!toBusStop.empty()) {
757 }
else if (!toTrainStop.empty()) {
759 }
else if (!toContainerStop.empty()) {
761 }
else if (!toChargingStation.empty()) {
763 }
else if (!toParkingArea.empty()) {
768 }
else if (!fromChargingStation.empty()) {
769 if (!toEdge.empty()) {
771 }
else if (!toBusStop.empty()) {
773 }
else if (!toTrainStop.empty()) {
775 }
else if (!toContainerStop.empty()) {
777 }
else if (!toChargingStation.empty()) {
779 }
else if (!toParkingArea.empty()) {
784 }
else if (!fromParkingArea.empty()) {
785 if (!toEdge.empty()) {
787 }
else if (!toBusStop.empty()) {
789 }
else if (!toTrainStop.empty()) {
791 }
else if (!toContainerStop.empty()) {
793 }
else if (!toChargingStation.empty()) {
795 }
else if (!toParkingArea.empty()) {
808 if (!toEdge.empty()) {
810 }
else if (!toBusStop.empty()) {
812 }
else if (!toTrainStop.empty()) {
814 }
else if (!toContainerStop.empty()) {
816 }
else if (!toChargingStation.empty()) {
818 }
else if (!toParkingArea.empty()) {
828 if (!toEdge.empty()) {
830 }
else if (!toBusStop.empty()) {
832 }
else if (!toTrainStop.empty()) {
834 }
else if (!toContainerStop.empty()) {
836 }
else if (!toChargingStation.empty()) {
838 }
else if (!toParkingArea.empty()) {
850 if (sumoBaseObject ==
nullptr) {
855 if (parentObject ==
nullptr) {
868 return *(objIterator - 1);
876 const auto previousPlanObj = getPreviousPlanObj(sumoBaseObject);
877 if (previousPlanObj) {
879 const auto previousPlanParameters = previousPlanObj->getPlanParameters();
880 if (!previousPlanParameters.toEdge.empty()) {
882 resetPreviousFromAttributes(previousPlanObj,
"edge", previousPlanParameters.toEdge);
883 fromEdge = previousPlanParameters.toEdge;
884 }
else if (!previousPlanParameters.consecutiveEdges.empty()) {
886 resetPreviousFromAttributes(previousPlanObj,
"consecutive edge", previousPlanParameters.consecutiveEdges.back());
887 fromEdge = previousPlanParameters.consecutiveEdges.back();
888 }
else if (!previousPlanParameters.toRoute.empty()) {
890 resetPreviousFromAttributes(previousPlanObj,
"route edge", previousPlanParameters.toRoute);
891 fromRoute = previousPlanParameters.toRoute;
892 }
else if (!previousPlanParameters.toJunction.empty()) {
894 resetPreviousFromAttributes(previousPlanObj,
"junction", previousPlanParameters.toJunction);
895 fromJunction = previousPlanParameters.toJunction;
896 }
else if (!previousPlanParameters.toTAZ.empty()) {
898 resetPreviousFromAttributes(previousPlanObj,
"TAZ", previousPlanParameters.toTAZ);
899 fromTAZ = previousPlanParameters.toTAZ;
900 }
else if (!previousPlanParameters.toBusStop.empty()) {
902 resetPreviousFromAttributes(previousPlanObj,
"bus stop", previousPlanParameters.toBusStop);
903 fromBusStop = previousPlanParameters.toBusStop;
904 }
else if (!previousPlanParameters.toTrainStop.empty()) {
906 resetPreviousFromAttributes(previousPlanObj,
"train stop", previousPlanParameters.toTrainStop);
907 fromTrainStop = previousPlanParameters.toTrainStop;
908 }
else if (!previousPlanParameters.toContainerStop.empty()) {
910 resetPreviousFromAttributes(previousPlanObj,
"container stop", previousPlanParameters.toContainerStop);
911 fromContainerStop = previousPlanParameters.toContainerStop;
912 }
else if (!previousPlanParameters.toChargingStation.empty()) {
914 resetPreviousFromAttributes(previousPlanObj,
"charging station", previousPlanParameters.toChargingStation);
915 fromChargingStation = previousPlanParameters.toChargingStation;
916 }
else if (!previousPlanParameters.toParkingArea.empty()) {
918 resetPreviousFromAttributes(previousPlanObj,
"parking area", previousPlanParameters.toParkingArea);
919 fromParkingArea = previousPlanParameters.toParkingArea;
927 const std::string& newType,
const std::string& newId)
const {
928 if (!fromEdge.empty()) {
929 writeIgnoringMessage(previousPlanObj,
"edge", fromEdge, newType, newId);
931 if (!fromJunction.empty()) {
932 writeIgnoringMessage(previousPlanObj,
"junction", fromJunction, newType, newId);
934 if (!fromTAZ.empty()) {
935 writeIgnoringMessage(previousPlanObj,
"TAZ", fromTAZ, newType, newId);
937 if (!fromBusStop.empty()) {
938 writeIgnoringMessage(previousPlanObj,
"bus stop", fromBusStop, newType, newId);
940 if (!fromTrainStop.empty()) {
941 writeIgnoringMessage(previousPlanObj,
"train stop", fromTrainStop, newType, newId);
943 if (!fromContainerStop.empty()) {
944 writeIgnoringMessage(previousPlanObj,
"container stop", fromContainerStop, newType, newId);
946 if (!fromChargingStation.empty()) {
947 writeIgnoringMessage(previousPlanObj,
"charging station", fromChargingStation, newType, newId);
949 if (!fromParkingArea.empty()) {
950 writeIgnoringMessage(previousPlanObj,
"parking area", fromParkingArea, newType, newId);
957 const std::string& oldType,
const std::string& oldId,
const std::string& newType,
const std::string& newId)
const {
958 WRITE_WARNING(
TLF(
"Ignoring from % '%' used in % '%' and using instead the previous end element % '%'",
970 mySumoBaseObjectParent(parent),
971 myVehicleTypeParameter(
"") {
981 if (mySumoBaseObjectParent) {
982 mySumoBaseObjectParent->removeSumoBaseObjectChild(
this);
985 while (mySumoBaseObjectChildren.size() > 0) {
986 delete mySumoBaseObjectChildren.back();
998 myStringAttributes.clear();
999 myIntAttributes.clear();
1000 myDoubleAttributes.clear();
1001 myBoolAttributes.clear();
1002 myPositionAttributes.clear();
1003 myTimeAttributes.clear();
1004 myColorAttributes.clear();
1005 myStringListAttributes.clear();
1006 myDoubleListAttributes.clear();
1007 myPositionVectorAttributes.clear();
1008 myParentIDs.clear();
1009 myParameters.clear();
1010 mySumoBaseObjectChildren.clear();
1012 myDefinedVehicleTypeParameter =
false;
1013 myDefinedVehicleParameter =
false;
1014 myDefinedStopParameter =
false;
1016 while (mySumoBaseObjectChildren.size() > 0) {
1017 delete mySumoBaseObjectChildren.back();
1030 myWasCreated =
true;
1042 return myWasCreated;
1048 return mySumoBaseObjectParent;
1052std::map<std::string, std::string>
1054 std::map<std::string, std::string> result;
1055 for (
const auto& attr : myStringAttributes) {
1056 result[
toString(attr.first)] = attr.second;
1058 for (
const auto& attr : myIntAttributes) {
1061 for (
const auto& attr : myDoubleAttributes) {
1064 for (
const auto& attr : myBoolAttributes) {
1067 for (
const auto& attr : myPositionAttributes) {
1070 for (
const auto& attr : myTimeAttributes) {
1073 for (
const auto& attr : myColorAttributes) {
1076 for (
const auto& attr : myStringListAttributes) {
1079 for (
const auto& attr : myDoubleListAttributes) {
1082 for (
const auto& attr : myPositionVectorAttributes) {
1091 if (hasStringAttribute(attr)) {
1092 return myStringAttributes.at(attr);
1094 handleAttributeError(attr,
"string");
1102 if (hasIntAttribute(attr)) {
1103 return myIntAttributes.at(attr);
1105 handleAttributeError(attr,
"int");
1113 if (hasDoubleAttribute(attr)) {
1114 return myDoubleAttributes.at(attr);
1116 handleAttributeError(attr,
"double");
1124 if (hasBoolAttribute(attr)) {
1125 return myBoolAttributes.at(attr);
1127 handleAttributeError(attr,
"bool");
1135 if (hasPositionAttribute(attr)) {
1136 return myPositionAttributes.at(attr);
1138 handleAttributeError(attr,
"position");
1146 if (hasTimeAttribute(attr)) {
1147 return myTimeAttributes.at(attr);
1149 handleAttributeError(attr,
"time");
1158 if (hasTimeAttribute(attr)) {
1159 return myTimeAttributes.at(attr);
1163 if (hasTimeAttribute(attr)) {
1164 return myTimeAttributes.at(attr);
1174 if (hasColorAttribute(attr)) {
1175 return myColorAttributes.at(attr);
1177 handleAttributeError(attr,
"color");
1183const std::vector<std::string>&
1185 if (hasStringListAttribute(attr)) {
1186 return myStringListAttributes.at(attr);
1188 handleAttributeError(attr,
"string list");
1194const std::vector<double>&
1196 if (hasDoubleListAttribute(attr)) {
1197 return myDoubleListAttributes.at(attr);
1199 handleAttributeError(attr,
"double list");
1207 if (hasPositionVectorAttribute(attr)) {
1208 return myPositionVectorAttributes.at(attr);
1210 handleAttributeError(attr,
"position vector");
1217 if (hasParentID(tag)) {
1218 return myParentIDs.at(tag);
1234 if (myDefinedVehicleTypeParameter) {
1235 return myVehicleTypeParameter;
1244 if (myDefinedVehicleParameter) {
1245 return myVehicleParameter;
1254 if (myDefinedStopParameter) {
1255 return myStopParameter;
1263const std::map<std::string, std::string>&
1265 return myParameters;
1271 return myPlanParameters;
1275const std::vector<CommonXMLStructure::SumoBaseObject*>&
1277 return mySumoBaseObjectChildren;
1283 return myStringAttributes.count(attr) > 0;
1289 return myIntAttributes.count(attr) > 0;
1295 return myDoubleAttributes.count(attr) > 0;
1301 return myBoolAttributes.count(attr) > 0;
1307 return myPositionAttributes.count(attr) > 0;
1313 return myTimeAttributes.count(attr) > 0;
1319 return myColorAttributes.count(attr) > 0;
1325 return myStringListAttributes.count(attr) > 0;
1331 return myDoubleListAttributes.count(attr) > 0;
1337 return myPositionVectorAttributes.count(attr) > 0;
1343 return myParentIDs.count(tag) > 0;
1349 myStringAttributes[attr] = value;
1355 myIntAttributes[attr] = value;
1361 myDoubleAttributes[attr] = value;
1367 myBoolAttributes[attr] = value;
1373 myPositionAttributes[attr] = value;
1379 myTimeAttributes[attr] = value;
1385 myColorAttributes[attr] = value;
1391 myStringListAttributes[attr] = value;
1397 myDoubleListAttributes[attr] = value;
1403 myPositionVectorAttributes[attr] = value;
1409 myParentIDs[tag] = ID;
1416 for (
const auto& parameter : parameters) {
1418 addParameter(keyValue[0], keyValue[1]);
1426 if (myDefinedVehicleTypeParameter) {
1427 myVehicleTypeParameter.setParameter(key, value);
1428 }
else if (myDefinedVehicleParameter) {
1429 myVehicleParameter.setParameter(key, value);
1430 }
else if (myDefinedStopParameter) {
1431 myStopParameter.setParameter(key, value);
1433 myParameters[key] = value;
1446 myVehicleTypeParameter = *vehicleTypeParameter;
1447 myDefinedVehicleTypeParameter =
true;
1449 addStringAttribute(
SUMO_ATTR_ID, myVehicleTypeParameter.id);
1455 myVehicleParameter = *vehicleParameter;
1456 myDefinedVehicleParameter =
true;
1458 if (!myVehicleParameter.id.empty()) {
1459 addStringAttribute(
SUMO_ATTR_ID, myVehicleParameter.id);
1462 if (!vehicleParameter->
routeid.empty()) {
1470 myStopParameter = stopParameter;
1471 myDefinedStopParameter =
true;
1473 if (!myStopParameter.edge.empty()) {
1477 if (!myStopParameter.lane.empty()) {
1481 if (!myStopParameter.busstop.empty()) {
1485 if (!myStopParameter.containerstop.empty()) {
1489 if (!myStopParameter.parkingarea.empty()) {
1493 if (!myStopParameter.chargingStation.empty()) {
1501 myPlanParameters = planParameters;
1507 mySumoBaseObjectChildren.push_back(sumoBaseObject);
1514 auto it = std::find(mySumoBaseObjectChildren.begin(), mySumoBaseObjectChildren.end(), sumoBaseObject);
1516 if (it != mySumoBaseObjectChildren.end()) {
1517 mySumoBaseObjectChildren.erase(it);
#define WRITE_ERRORF(...)
#define WRITE_WARNING(msg)
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_RIDE_CHARGINGSTATION_CHARGINGSTATION
@ GNE_TAG_TRANSPORT_CONTAINERSTOP_TRAINSTOP
@ GNE_TAG_TRANSPORT_CONTAINERSTOP_BUSSTOP
@ GNE_TAG_TRANSHIP_PARKINGAREA_BUSSTOP
@ GNE_TAG_TRANSHIP_PARKINGAREA_CHARGINGSTATION
@ GNE_TAG_WALK_BUSSTOP_BUSSTOP
@ GNE_TAG_PERSONTRIP_EDGE_EDGE
@ GNE_TAG_PERSONTRIP_TAZ_EDGE
@ GNE_TAG_PERSONTRIP_EDGE_CONTAINERSTOP
@ GNE_TAG_WALK_PARKINGAREA_CHARGINGSTATION
@ GNE_TAG_WALK_CHARGINGSTATION_JUNCTION
@ GNE_TAG_PERSONTRIP_CONTAINERSTOP_TAZ
@ GNE_TAG_RIDE_CONTAINERSTOP_BUSSTOP
@ GNE_TAG_RIDE_BUSSTOP_BUSSTOP
@ GNE_TAG_WALK_PARKINGAREA_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_TAZ_CONTAINERSTOP
@ GNE_TAG_TRANSHIP_CHARGINGSTATION_BUSSTOP
@ GNE_TAG_PERSONTRIP_CHARGINGSTATION_TRAINSTOP
@ GNE_TAG_PERSONTRIP_EDGE_JUNCTION
@ GNE_TAG_TRANSHIP_TRAINSTOP_CHARGINGSTATION
@ GNE_TAG_RIDE_CONTAINERSTOP_CONTAINERSTOP
@ GNE_TAG_TRANSHIP_TRAINSTOP_EDGE
@ GNE_TAG_WALK_TAZ_BUSSTOP
@ GNE_TAG_PERSONTRIP_EDGE_PARKINGAREA
@ GNE_TAG_PERSONTRIP_TRAINSTOP_EDGE
@ GNE_TAG_PERSONTRIP_TRAINSTOP_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_PARKINGAREA_TRAINSTOP
@ GNE_TAG_STOPCONTAINER_TRAINSTOP
@ GNE_TAG_RIDE_PARKINGAREA_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_CHARGINGSTATION_PARKINGAREA
@ GNE_TAG_PERSONTRIP_TRAINSTOP_PARKINGAREA
@ GNE_TAG_PERSONTRIP_TAZ_CHARGINGSTATION
@ GNE_TAG_RIDE_CONTAINERSTOP_EDGE
@ GNE_TAG_WALK_BUSSTOP_CHARGINGSTATION
@ GNE_TAG_PERSONTRIP_BUSSTOP_EDGE
@ GNE_TAG_WALK_TRAINSTOP_CHARGINGSTATION
@ GNE_TAG_WALK_PARKINGAREA_TRAINSTOP
@ GNE_TAG_WALK_PARKINGAREA_PARKINGAREA
@ GNE_TAG_TRANSPORT_EDGE_TRAINSTOP
@ GNE_TAG_WALK_BUSSTOP_TRAINSTOP
@ GNE_TAG_TRANSHIP_EDGE_CHARGINGSTATION
@ GNE_TAG_PERSONTRIP_TAZ_TRAINSTOP
@ GNE_TAG_TRANSPORT_CONTAINERSTOP_CHARGINGSTATION
@ GNE_TAG_WALK_TAZ_CONTAINERSTOP
@ GNE_TAG_WALK_PARKINGAREA_JUNCTION
@ GNE_TAG_WALK_CONTAINERSTOP_EDGE
@ GNE_TAG_PERSONTRIP_EDGE_CHARGINGSTATION
@ GNE_TAG_TRANSPORT_EDGE_PARKINGAREA
@ GNE_TAG_TRANSHIP_BUSSTOP_CHARGINGSTATION
@ GNE_TAG_WALK_EDGE_PARKINGAREA
@ GNE_TAG_TRANSPORT_EDGE_BUSSTOP
@ GNE_TAG_TRANSPORT_CONTAINERSTOP_EDGE
@ GNE_TAG_TRANSPORT_CHARGINGSTATION_PARKINGAREA
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
@ GNE_TAG_WALK_PARKINGAREA_EDGE
@ GNE_TAG_TRANSHIP_EDGE_EDGE
@ GNE_TAG_RIDE_TRAINSTOP_CONTAINERSTOP
@ GNE_TAG_RIDE_CHARGINGSTATION_EDGE
@ GNE_TAG_RIDE_CHARGINGSTATION_CONTAINERSTOP
@ GNE_TAG_WALK_CONTAINERSTOP_CHARGINGSTATION
@ GNE_TAG_TRANSHIP_PARKINGAREA_CONTAINERSTOP
@ GNE_TAG_WALK_BUSSTOP_JUNCTION
@ GNE_TAG_TRANSHIP_CHARGINGSTATION_TRAINSTOP
@ SUMO_TAG_ROOTFILE
root file
@ GNE_TAG_TRANSHIP_EDGE_CONTAINERSTOP
@ GNE_TAG_WALK_CONTAINERSTOP_JUNCTION
@ GNE_TAG_TRANSPORT_PARKINGAREA_PARKINGAREA
@ GNE_TAG_TRANSPORT_CHARGINGSTATION_TRAINSTOP
@ GNE_TAG_TRANSPORT_TRAINSTOP_TRAINSTOP
@ GNE_TAG_WALK_CHARGINGSTATION_TRAINSTOP
@ GNE_TAG_PERSONTRIP_BUSSTOP_CONTAINERSTOP
@ GNE_TAG_TRANSPORT_TRAINSTOP_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_PARKINGAREA_TAZ
@ GNE_TAG_STOPCONTAINER_EDGE
@ GNE_TAG_WALK_TRAINSTOP_TAZ
@ GNE_TAG_PERSONTRIP_PARKINGAREA_JUNCTION
@ GNE_TAG_STOPCONTAINER_PARKINGAREA
@ GNE_TAG_PERSONTRIP_CONTAINERSTOP_TRAINSTOP
@ GNE_TAG_TRANSPORT_CHARGINGSTATION_CONTAINERSTOP
@ GNE_TAG_TRANSPORT_TRAINSTOP_CHARGINGSTATION
@ GNE_TAG_TRANSPORT_PARKINGAREA_CONTAINERSTOP
@ GNE_TAG_STOPPERSON_BUSSTOP
@ GNE_TAG_TRANSPORT_BUSSTOP_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_BUSSTOP_TRAINSTOP
@ GNE_TAG_RIDE_PARKINGAREA_BUSSTOP
@ GNE_TAG_PERSONTRIP_CHARGINGSTATION_TAZ
@ GNE_TAG_PERSONTRIP_CONTAINERSTOP_EDGE
@ GNE_TAG_TRANSHIP_CONTAINERSTOP_PARKINGAREA
@ GNE_TAG_PERSONTRIP_JUNCTION_BUSSTOP
@ GNE_TAG_TRANSHIP_BUSSTOP_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_CHARGINGSTATION_BUSSTOP
@ GNE_TAG_TRANSPORT_PARKINGAREA_EDGE
@ GNE_TAG_PERSONTRIP_TRAINSTOP_TAZ
@ GNE_TAG_TRANSHIP_PARKINGAREA_TRAINSTOP
@ GNE_TAG_WALK_BUSSTOP_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_TAZ_PARKINGAREA
@ GNE_TAG_PERSONTRIP_CONTAINERSTOP_PARKINGAREA
@ GNE_TAG_WALK_JUNCTION_PARKINGAREA
@ GNE_TAG_RIDE_TRAINSTOP_CHARGINGSTATION
@ GNE_TAG_WALK_CHARGINGSTATION_BUSSTOP
@ GNE_TAG_PERSONTRIP_JUNCTION_TRAINSTOP
@ GNE_TAG_WALK_CONTAINERSTOP_TAZ
@ GNE_TAG_PERSONTRIP_TRAINSTOP_BUSSTOP
@ GNE_TAG_TRANSHIP_BUSSTOP_EDGE
@ GNE_TAG_TRANSPORT_CHARGINGSTATION_CHARGINGSTATION
@ GNE_TAG_PERSONTRIP_BUSSTOP_JUNCTION
@ GNE_TAG_WALK_JUNCTION_CONTAINERSTOP
@ GNE_TAG_STOPCONTAINER_CONTAINERSTOP
@ GNE_TAG_RIDE_BUSSTOP_TRAINSTOP
@ GNE_TAG_TRANSHIP_CHARGINGSTATION_EDGE
@ GNE_TAG_PERSONTRIP_EDGE_TRAINSTOP
@ GNE_TAG_RIDE_BUSSTOP_EDGE
@ GNE_TAG_RIDE_TRAINSTOP_BUSSTOP
@ GNE_TAG_WALK_TRAINSTOP_EDGE
@ GNE_TAG_PERSONTRIP_PARKINGAREA_EDGE
@ GNE_TAG_TRANSPORT_BUSSTOP_CHARGINGSTATION
@ GNE_TAG_PERSONTRIP_PARKINGAREA_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_TRAINSTOP_TRAINSTOP
@ GNE_TAG_TRANSPORT_EDGE_EDGE
@ GNE_TAG_WALK_EDGE_TRAINSTOP
@ GNE_TAG_WALK_TAZ_CHARGINGSTATION
@ GNE_TAG_TRANSPORT_EDGE_CONTAINERSTOP
@ GNE_TAG_STOPCONTAINER_BUSSTOP
@ GNE_TAG_WALK_JUNCTION_TAZ
@ GNE_TAG_WALK_JUNCTION_CHARGINGSTATION
@ GNE_TAG_WALK_CHARGINGSTATION_TAZ
@ GNE_TAG_PERSONTRIP_TAZ_BUSSTOP
@ GNE_TAG_RIDE_PARKINGAREA_CHARGINGSTATION
@ GNE_TAG_PERSONTRIP_CHARGINGSTATION_JUNCTION
@ GNE_TAG_PERSONTRIP_CHARGINGSTATION_CHARGINGSTATION
@ GNE_TAG_WALK_JUNCTION_JUNCTION
@ GNE_TAG_TRANSPORT_PARKINGAREA_TRAINSTOP
@ GNE_TAG_TRANSHIP_PARKINGAREA_PARKINGAREA
@ GNE_TAG_WALK_CONTAINERSTOP_PARKINGAREA
@ GNE_TAG_PERSONTRIP_TAZ_TAZ
@ GNE_TAG_TRANSHIP_CHARGINGSTATION_CHARGINGSTATION
@ GNE_TAG_RIDE_EDGE_CHARGINGSTATION
@ GNE_TAG_PERSONTRIP_CHARGINGSTATION_EDGE
@ GNE_TAG_PERSONTRIP_EDGE_BUSSTOP
@ GNE_TAG_WALK_CHARGINGSTATION_CONTAINERSTOP
@ GNE_TAG_WALK_BUSSTOP_PARKINGAREA
@ GNE_TAG_WALK_CHARGINGSTATION_PARKINGAREA
@ GNE_TAG_PERSONTRIP_CHARGINGSTATION_CONTAINERSTOP
@ GNE_TAG_TRANSHIP_BUSSTOP_TRAINSTOP
@ GNE_TAG_PERSONTRIP_BUSSTOP_TAZ
@ GNE_TAG_WALK_CONTAINERSTOP_BUSSTOP
@ GNE_TAG_RIDE_CHARGINGSTATION_PARKINGAREA
@ GNE_TAG_RIDE_CHARGINGSTATION_BUSSTOP
@ GNE_TAG_PERSONTRIP_CONTAINERSTOP_CONTAINERSTOP
@ GNE_TAG_TRANSPORT_CHARGINGSTATION_EDGE
@ GNE_TAG_PERSONTRIP_BUSSTOP_CHARGINGSTATION
@ GNE_TAG_WALK_BUSSTOP_EDGE
@ GNE_TAG_TRANSPORT_TRAINSTOP_BUSSTOP
@ GNE_TAG_WALK_JUNCTION_TRAINSTOP
@ GNE_TAG_TRANSHIP_EDGE_TRAINSTOP
@ GNE_TAG_TRANSHIP_TRAINSTOP_TRAINSTOP
@ GNE_TAG_RIDE_PARKINGAREA_PARKINGAREA
@ GNE_TAG_WALK_TRAINSTOP_PARKINGAREA
@ GNE_TAG_RIDE_EDGE_BUSSTOP
@ GNE_TAG_WALK_TAZ_JUNCTION
@ GNE_TAG_PERSONTRIP_JUNCTION_PARKINGAREA
@ GNE_TAG_TRANSPORT_BUSSTOP_TRAINSTOP
@ GNE_TAG_TRANSPORT_TRAINSTOP_PARKINGAREA
@ GNE_TAG_STOPPERSON_CONTAINERSTOP
@ GNE_TAG_WALK_BUSSTOP_TAZ
@ GNE_TAG_RIDE_CONTAINERSTOP_CHARGINGSTATION
@ GNE_TAG_TRANSPORT_CONTAINERSTOP_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_BUSSTOP_BUSSTOP
@ GNE_TAG_TRANSHIP_BUSSTOP_PARKINGAREA
@ GNE_TAG_PERSONTRIP_JUNCTION_JUNCTION
@ GNE_TAG_WALK_TRAINSTOP_BUSSTOP
@ GNE_TAG_PERSONTRIP_TAZ_JUNCTION
@ GNE_TAG_WALK_EDGE_CHARGINGSTATION
@ GNE_TAG_TRANSPORT_PARKINGAREA_BUSSTOP
@ GNE_TAG_RIDE_EDGE_TRAINSTOP
@ GNE_TAG_WALK_TRAINSTOP_CONTAINERSTOP
@ GNE_TAG_WALK_JUNCTION_BUSSTOP
@ GNE_TAG_PERSONTRIP_CONTAINERSTOP_JUNCTION
@ GNE_TAG_WALK_JUNCTION_EDGE
@ GNE_TAG_PERSONTRIP_BUSSTOP_PARKINGAREA
@ GNE_TAG_TRANSHIP_CONTAINERSTOP_TRAINSTOP
@ GNE_TAG_PERSONTRIP_PARKINGAREA_BUSSTOP
@ GNE_TAG_RIDE_BUSSTOP_CHARGINGSTATION
@ GNE_TAG_WALK_EDGE_CONTAINERSTOP
@ GNE_TAG_WALK_TRAINSTOP_JUNCTION
@ GNE_TAG_TRANSHIP_CHARGINGSTATION_PARKINGAREA
@ GNE_TAG_STOPPERSON_CHARGINGSTATION
@ GNE_TAG_TRANSPORT_BUSSTOP_EDGE
@ GNE_TAG_TRANSHIP_CONTAINERSTOP_BUSSTOP
@ GNE_TAG_WALK_PARKINGAREA_TAZ
@ GNE_TAG_PERSONTRIP_JUNCTION_EDGE
@ GNE_TAG_RIDE_CONTAINERSTOP_PARKINGAREA
@ GNE_TAG_RIDE_CHARGINGSTATION_TRAINSTOP
@ GNE_TAG_STOPPERSON_TRAINSTOP
@ GNE_TAG_TRANSPORT_CHARGINGSTATION_BUSSTOP
@ GNE_TAG_PERSONTRIP_PARKINGAREA_CHARGINGSTATION
@ GNE_TAG_TRANSHIP_CHARGINGSTATION_CONTAINERSTOP
@ GNE_TAG_TRANSHIP_EDGE_BUSSTOP
@ GNE_TAG_RIDE_BUSSTOP_PARKINGAREA
@ GNE_TAG_WALK_EDGE_JUNCTION
@ GNE_TAG_RIDE_PARKINGAREA_EDGE
@ GNE_TAG_PERSONTRIP_JUNCTION_TAZ
@ GNE_TAG_TRANSHIP_PARKINGAREA_EDGE
@ GNE_TAG_TRANSPORT_PARKINGAREA_CHARGINGSTATION
@ GNE_TAG_TRANSHIP_TRAINSTOP_CONTAINERSTOP
@ GNE_TAG_PERSONTRIP_JUNCTION_CONTAINERSTOP
@ GNE_TAG_WALK_TRAINSTOP_TRAINSTOP
@ GNE_TAG_WALK_CHARGINGSTATION_EDGE
@ GNE_TAG_TRANSHIP_EDGE_PARKINGAREA
@ GNE_TAG_WALK_EDGE_BUSSTOP
@ GNE_TAG_PERSONTRIP_PARKINGAREA_PARKINGAREA
@ GNE_TAG_TRANSHIP_TRAINSTOP_BUSSTOP
@ GNE_TAG_TRANSHIP_BUSSTOP_BUSSTOP
@ GNE_TAG_TRANSPORT_TRAINSTOP_EDGE
@ GNE_TAG_PERSONTRIP_TRAINSTOP_CHARGINGSTATION
@ GNE_TAG_TRANSPORT_EDGE_CHARGINGSTATION
@ GNE_TAG_TRANSHIP_CONTAINERSTOP_CONTAINERSTOP
@ GNE_TAG_WALK_CONTAINERSTOP_TRAINSTOP
@ GNE_TAG_RIDE_EDGE_PARKINGAREA
@ GNE_TAG_RIDE_BUSSTOP_CONTAINERSTOP
@ GNE_TAG_WALK_TAZ_TRAINSTOP
@ GNE_TAG_PERSONTRIP_CONTAINERSTOP_CHARGINGSTATION
@ GNE_TAG_TRANSHIP_TRAINSTOP_PARKINGAREA
@ GNE_TAG_PERSONTRIP_CONTAINERSTOP_BUSSTOP
@ GNE_TAG_RIDE_TRAINSTOP_TRAINSTOP
@ GNE_TAG_TRANSPORT_BUSSTOP_BUSSTOP
@ GNE_TAG_WALK_PARKINGAREA_BUSSTOP
@ GNE_TAG_STOPCONTAINER_CHARGINGSTATION
@ GNE_TAG_TRANSPORT_BUSSTOP_PARKINGAREA
@ GNE_TAG_WALK_TAZ_PARKINGAREA
@ GNE_TAG_PERSONTRIP_TRAINSTOP_JUNCTION
@ GNE_TAG_RIDE_CONTAINERSTOP_TRAINSTOP
@ GNE_TAG_STOPPERSON_EDGE
@ GNE_TAG_PERSONTRIP_JUNCTION_CHARGINGSTATION
@ GNE_TAG_RIDE_PARKINGAREA_TRAINSTOP
@ GNE_TAG_TRANSPORT_CONTAINERSTOP_PARKINGAREA
@ GNE_TAG_TRANSHIP_CONTAINERSTOP_CHARGINGSTATION
@ GNE_TAG_PERSONTRIP_EDGE_TAZ
@ GNE_TAG_WALK_CONTAINERSTOP_CONTAINERSTOP
@ GNE_TAG_RIDE_TRAINSTOP_PARKINGAREA
@ GNE_TAG_TRANSHIP_CONTAINERSTOP_EDGE
@ GNE_TAG_WALK_CHARGINGSTATION_CHARGINGSTATION
@ GNE_TAG_RIDE_EDGE_CONTAINERSTOP
@ GNE_TAG_STOPPERSON_PARKINGAREA
@ GNE_TAG_RIDE_TRAINSTOP_EDGE
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_FROM_TRAINSTOP
@ SUMO_ATTR_FROM_JUNCTION
@ SUMO_ATTR_CONTAINER_STOP
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_CHARGING_STATION
@ GNE_ATTR_FROM_PARKINGAREA
@ GNE_ATTR_FROM_CONTAINERSTOP
@ GNE_ATTR_FROM_CHARGINGSTATION
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
plan parameters (used for group all from-to parameters related with plans)
SumoXMLTag getPersonStopTag() const
get the person stop tag for the current combination of parameters
SumoXMLTag getRideTag() const
get the ride tag for the current combination of parameters
void writeIgnoringMessage(const CommonXMLStructure::SumoBaseObject *previousPlanObj, const std::string &oldType, const std::string &oldId, const std::string &newType, const std::string &newId) const
write ignoring message
int getNumberOfDefinedParameters() const
get number of defined plans
SumoXMLTag getPersonTripTag() const
get the personTrip tag for the current combination of parameters
SumoXMLTag getTransportTag() const
get the transport tag for the current combination of parameters
const CommonXMLStructure::SumoBaseObject * getPreviousPlanObj(const CommonXMLStructure::SumoBaseObject *sumoBaseObject) const
get previous plan obj
void clear()
clear parameters
bool isSingleEdgePlan() const
check if this is a single-edge plan
void updateFromAttributes(const CommonXMLStructure::SumoBaseObject *sumoBaseObject)
update the from attributes
SumoXMLTag getContainerStopTag() const
get the container stop tag for the current combination of parameters
SumoXMLTag getWalkTag() const
get the walk tag for the current combination of parameters
SumoXMLTag getTranshipTag() const
get the tranship tag for the current combination of parameters
void resetPreviousFromAttributes(const CommonXMLStructure::SumoBaseObject *previousPlanObj, const std::string &newType, const std::string &newId) const
reste all previous from attributes
void addDoubleListAttribute(const SumoXMLAttr attr, const std::vector< double > &value)
add double list attribute into current SumoBaseObject node
const std::vector< double > & getDoubleListAttribute(const SumoXMLAttr attr) const
get double list attribute
void addIntAttribute(const SumoXMLAttr attr, const int value)
add int attribute into current SumoBaseObject node
void setVehicleTypeParameter(const SUMOVTypeParameter *vehicleTypeParameter)
set vehicle type parameters
void addSumoBaseObjectChild(SumoBaseObject *sumoBaseObject)
add SumoBaseObject child
const SUMOVehicleParameter::Stop & getStopParameter() const
get stop parameters
const RGBColor & getColorAttribute(const SumoXMLAttr attr) const
get color attribute
SUMOTime getTimeAttribute(const SumoXMLAttr attr) const
get time attribute
const PositionVector & getPositionVectorAttribute(const SumoXMLAttr attr) const
get PositionVector attribute
SumoBaseObject(SumoBaseObject *sumoBaseObjectParent)
constructor
bool hasBoolAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given bool attribute
bool hasParentID(const SumoXMLTag tag) const
check if current SumoBaseObject has the given parent ID
void removeSumoBaseObjectChild(SumoBaseObject *sumoBaseObject)
remove SumoBaseObject child
bool hasStringAttribute(const SumoXMLAttr attr) const
has function
std::map< std::string, std::string > getAllAttributes() const
get all attributes in string format
bool hasPositionAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given bool attribute
void setTag(const SumoXMLTag tag)
set SumoBaseObject tag
SumoBaseObject * getParentSumoBaseObject() const
get pointer to mySumoBaseObjectParent SumoBaseObject (if is null, then is the root)
const Position & getPositionAttribute(const SumoXMLAttr attr) const
get Position attribute
const CommonXMLStructure::PlanParameters & getPlanParameters() const
get plan parameteres
void addPositionVectorAttribute(const SumoXMLAttr attr, const PositionVector &value)
add PositionVector attribute into current SumoBaseObject node
const std::map< std::string, std::string > & getParameters() const
get parameters
SUMOVehicleClass getVClass() const
vehicle class
SumoBaseObject * mySumoBaseObjectParent
pointer to SumoBaseObject parent (If is null, then is the root)
bool hasPositionVectorAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given positionVector attribute
bool hasTimeAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given time attribute
void addBoolAttribute(const SumoXMLAttr attr, const bool value)
add bool attribute into current SumoBaseObject node
void setPlanParameters(const CommonXMLStructure::PlanParameters &planParameters)
set plan parmeter
const SUMOVTypeParameter & getVehicleTypeParameter() const
get current vType
SumoXMLTag getTag() const
get XML myTag
const std::string & getParentID(const SumoXMLTag tag) const
get parent ID
void addParameter(const std::string &key, const std::string &value)
add parameter into current SumoBaseObject node
void addParentID(const SumoXMLTag tag, const std::string &ID)
add parent (string) attribute into current SumoBaseObject node
~SumoBaseObject()
destructor
bool hasColorAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given color attribute
void markAsCreated()
mark as successfully created
void addTimeAttribute(const SumoXMLAttr attr, const SUMOTime value)
add time attribute into current SumoBaseObject node
void addStringListAttribute(const SumoXMLAttr attr, const std::vector< std::string > &value)
add string list attribute into current SumoBaseObject node
bool hasIntAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given int attribute
int getIntAttribute(const SumoXMLAttr attr) const
get int attribute
void addDoubleAttribute(const SumoXMLAttr attr, const double value)
add double attribute into current SumoBaseObject node
void handleAttributeError(const SumoXMLAttr attr, const std::string &type) const
handle attribute error
bool hasDoubleAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given double attribute
void addPositionAttribute(const SumoXMLAttr attr, const Position &value)
add Position attribute into current SumoBaseObject node
bool getBoolAttribute(const SumoXMLAttr attr) const
get bool attribute
void setVClass(SUMOVehicleClass vClass)
set vehicle class
bool wasCreated() const
check if the object was successfully created in build<...> function
SUMOTime getPeriodAttribute() const
get 'period' attribute
void setVehicleParameter(const SUMOVehicleParameter *vehicleParameter)
set vehicle parameters
void addStringAttribute(const SumoXMLAttr attr, const std::string &value)
add string attribute into current SumoBaseObject node
void setStopParameter(const SUMOVehicleParameter::Stop &stopParameter)
add stop parameters
double getDoubleAttribute(const SumoXMLAttr attr) const
get double attribute
const SUMOVehicleParameter & getVehicleParameter() const
get vehicle parameters
bool hasDoubleListAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given double list attribute
const std::vector< std::string > & getStringListAttribute(const SumoXMLAttr attr) const
get string list attribute
bool hasStringListAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given string list attribute
void clear()
clear SumoBaseObject
void addColorAttribute(const SumoXMLAttr attr, const RGBColor &value)
add color attribute into current SumoBaseObject node
const std::string & getStringAttribute(const SumoXMLAttr attr) const
get string attribute
void addParameters(const std::string &value)
add parameters into current SumoBaseObject node (format: key=value1|key2=value2|.....
const std::vector< SumoBaseObject * > & getSumoBaseObjectChildren() const
get SumoBaseObject children
void abortSUMOBaseOBject()
abort SUMOBaseOBject
CommonXMLStructure::SumoBaseObject * getSumoBaseObjectRoot() const
get SumoBaseObject root
CommonXMLStructure::SumoBaseObject * getCurrentSumoBaseObject() const
get current editedSumoBaseObject
void openSUMOBaseOBject()
open SUMOBaseOBject
CommonXMLStructure::SumoBaseObject * mySumoBaseObjectRoot
SumoBaseObject root.
CommonXMLStructure()
Constructor.
CommonXMLStructure::SumoBaseObject * myCurrentSumoBaseObject
last inserted SumoBaseObject
void closeSUMOBaseOBject()
close SUMOBaseOBject
~CommonXMLStructure()
Destructor.
A point in 2D or 3D with translation and scaling methods.
Encapsulated SAX-Attributes.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue=T(), bool report=true) const
Tries to read given attribute assuming it is an int.
Structure representing possible vehicle parameter.
Definition of vehicle stop (position and duration)
Structure representing possible vehicle parameter.
std::string routeid
The vehicle's route id.
std::vector< std::string > getVector()
return vector of strings