51 for (
const auto& additionalTag : additionalTags) {
52 myAdditionals.insert(std::make_pair(additionalTag.getTag(), std::set<GNEAdditional*>()));
56 for (
const auto& shapeTag : shapeTags) {
57 myShapes.insert(std::make_pair(shapeTag.getTag(), std::set<GNEShape*>()));
61 for (
const auto& TAZElementTag : TAZElementTags) {
62 myTAZElements.insert(std::make_pair(TAZElementTag.getTag(), std::set<GNETAZElement*>()));
66 for (
const auto& demandElementTag : demandElementTags) {
67 myDemandElements.insert(std::make_pair(demandElementTag.getTag(), std::set<GNEDemandElement*>()));
70 for (
const auto& stopTag : stopTags) {
71 myDemandElements.insert(std::make_pair(stopTag.getTag(), std::set<GNEDemandElement*>()));
75 for (
const auto& genericDataElementTag : genericDataElementTags) {
76 myGenericDatas.insert(std::make_pair(genericDataElementTag.getTag(), std::set<GNEGenericData*>()));
83 for (
const auto& edgeType : myEdgeTypes) {
84 edgeType.second->decRef(
"GNENetHelper::~GNENet");
86 WRITE_DEBUG(
"Deleting unreferenced " + edgeType.second->getTagStr() +
" '" + edgeType.second->getID() +
"' in AttributeCarriers destructor");
87 delete edgeType.second;
90 for (
const auto& edge : myEdges) {
91 edge.second->decRef(
"GNENetHelper::~GNENet");
93 WRITE_DEBUG(
"Deleting unreferenced " + edge.second->getTagStr() +
" '" + edge.second->getID() +
"' in AttributeCarriers destructor");
97 for (
const auto& junction : myJunctions) {
98 junction.second->decRef(
"GNENetHelper::~GNENet");
100 WRITE_DEBUG(
"Deleting unreferenced " + junction.second->getTagStr() +
" '" + junction.second->getID() +
"' in AttributeCarriers destructor");
101 delete junction.second;
104 for (
const auto& additionalTag : myAdditionals) {
105 for (
const auto& additional : additionalTag.second) {
107 additional->decRef();
109 WRITE_DEBUG(
"Deleting unreferenced " + additional->getTagStr() +
" in AttributeCarriers destructor");
114 for (
const auto& shapeTag : myShapes) {
115 for (
const auto& shape : shapeTag.second) {
119 WRITE_DEBUG(
"Deleting unreferenced " + shape->getTagStr() +
" in AttributeCarriers destructor");
124 for (
const auto& TAZElementTag : myTAZElements) {
125 for (
const auto& TAZElement : TAZElementTag.second) {
127 TAZElement->decRef();
129 WRITE_DEBUG(
"Deleting unreferenced " + TAZElement->getTagStr() +
" in AttributeCarriers destructor");
134 for (
const auto& demandElementTag : myDemandElements) {
135 for (
const auto& demandElement : demandElementTag.second) {
137 demandElement->decRef();
140 WRITE_DEBUG(
"Deleting unreferenced " + demandElement->getTagStr() +
" in AttributeCarriers destructor");
142 delete demandElement;
146 for (
const auto& dataSet : myDataSets) {
150 WRITE_DEBUG(
"Deleting unreferenced " + dataSet->getTagStr() +
" in AttributeCarriers destructor");
158 std::map<std::string, GNEEdge*> newEdgeMap;
159 std::map<std::string, GNEJunction*> newJunctionMap;
161 for (
const auto& edge : myEdges) {
162 edge.second->setMicrosimID(edge.second->getNBEdge()->getID());
163 newEdgeMap[edge.second->getNBEdge()->getID()] = edge.second;
165 for (
const auto& junction : myJunctions) {
166 newJunctionMap[junction.second->getNBNode()->getID()] = junction.second;
167 junction.second->setMicrosimID(junction.second->getNBNode()->getID());
169 myEdges = newEdgeMap;
170 myJunctions = newJunctionMap;
187 for (
const auto& lane : myEdges.at(AC->
getID())->getLanes()) {
217 return shape.
around(
dynamic_cast<GNEPOI*
>(AC)->getPositionInView());
233 if (
object !=
nullptr) {
239 throw ProcessError(
"GUIGlObject does not match the declared type");
243 }
else if (hardFail) {
244 throw ProcessError(
"Attempted to retrieve non-existant GUIGlObject");
251 std::vector<GNEAttributeCarrier*>
253 std::vector<GNEAttributeCarrier*> result;
255 for (
const auto& junction : myJunctions) {
256 result.push_back(junction.second);
259 for (
const auto& edge : myEdges) {
260 result.push_back(edge.second);
263 for (
const auto& lane : myLanes) {
264 result.push_back(lane);
267 for (
const auto& connection : myConnections) {
268 result.push_back(connection);
271 for (
const auto& crossing : myCrossings) {
272 result.push_back(crossing);
275 for (
const auto& additional : myAdditionals.at(tag)) {
276 result.push_back(additional);
279 for (
const auto& shape : myShapes.at(tag)) {
280 result.push_back(shape);
283 for (
const auto& TAZElement : myTAZElements.at(tag)) {
284 result.push_back(TAZElement);
287 for (
const auto& demandElemet : myDemandElements.at(tag)) {
288 result.push_back(demandElemet);
291 for (
const auto& dataSet : myDataSets) {
292 result.push_back(dataSet);
295 for (
const auto& dataInterval : myDataIntervals) {
296 result.push_back(dataInterval);
299 for (
const auto& genericData : myGenericDatas.at(tag)) {
300 result.push_back(genericData);
307 std::vector<GNEAttributeCarrier*>
309 std::vector<GNEAttributeCarrier*> result;
313 for (
const auto& junction : myJunctions) {
314 if (!onlySelected || junction.second->isAttributeCarrierSelected()) {
315 result.push_back(junction.second);
318 for (
const auto& crossing : myCrossings) {
319 if (!onlySelected || crossing->isAttributeCarrierSelected()) {
320 result.push_back(crossing);
323 for (
const auto& edge : myEdges) {
324 if (!onlySelected || edge.second->isAttributeCarrierSelected()) {
325 result.push_back(edge.second);
328 for (
const auto& lane : myLanes) {
329 if (!onlySelected || lane->isAttributeCarrierSelected()) {
330 result.push_back(lane);
333 for (
const auto& connection : myConnections) {
334 if (!onlySelected || connection->isAttributeCarrierSelected()) {
335 result.push_back(connection);
338 for (
const auto& additionalSet : myAdditionals) {
339 for (
const auto& additional : additionalSet.second) {
340 if (!onlySelected || additional->isAttributeCarrierSelected()) {
341 result.push_back(additional);
345 for (
const auto& shapeSet : myShapes) {
346 for (
const auto& shape : shapeSet.second) {
347 if (!onlySelected || shape->isAttributeCarrierSelected()) {
348 result.push_back(shape);
352 for (
const auto& TAZSet : myTAZElements) {
353 for (
const auto& TAZElement : TAZSet.second) {
354 if (!onlySelected || TAZElement->isAttributeCarrierSelected()) {
355 result.push_back(TAZElement);
360 for (
const auto& demandElementSet : myDemandElements) {
361 for (
const auto& demandElement : demandElementSet.second) {
362 if (!onlySelected || demandElement->isAttributeCarrierSelected()) {
363 result.push_back(demandElement);
368 for (
const auto& dataSet : myDataSets) {
369 if (!onlySelected || dataSet->isAttributeCarrierSelected()) {
370 result.push_back(dataSet);
373 for (
const auto& dataInterval : myDataIntervals) {
374 if (!onlySelected || dataInterval->isAttributeCarrierSelected()) {
375 result.push_back(dataInterval);
378 for (
const auto& genericDataSet : myGenericDatas) {
379 for (
const auto& genericData : genericDataSet.second) {
380 if (!onlySelected || genericData->isAttributeCarrierSelected()) {
381 result.push_back(genericData);
390 std::vector<GNEAttributeCarrier*>
393 const auto& editModes = myNet->getViewNet()->getEditModes();
395 std::vector<GNEAttributeCarrier*> result;
404 if (ignoreCurrentSupermode) {
415 result.push_back(AC);
425 if (myJunctions.count(
id)) {
426 return myJunctions.at(
id);
427 }
else if (hardFail) {
436 const std::map<std::string, GNEJunction*>&
442 std::vector<GNEJunction*>
444 std::vector<GNEJunction*> result;
446 for (
const auto& junction : myJunctions) {
447 if (junction.second->isAttributeCarrierSelected()) {
448 result.push_back(junction.second);
458 junction->
incRef(
"GNENet::registerJunction");
464 myNet->addGLObjectIntoGrid(junction);
481 if (myJunctions.count(junction->
getID()) == 0) {
482 throw ProcessError(junction->
getTagStr() +
" with ID='" + junction->
getID() +
"' doesn't exist in AttributeCarriers.junction");
483 }
else if (myJunctions.count(newID) != 0) {
484 throw ProcessError(
"There is another " + junction->
getTagStr() +
" with new ID='" + newID +
"' in myJunctions");
489 myNet->getNetBuilder()->getNodeCont().rename(junction->
getNBNode(), newID);
493 myJunctions[junction->
getID()] = junction;
497 myNet->requireSaveNet(
true);
505 for (
const auto& junction : myJunctions) {
506 if (junction.second->isAttributeCarrierSelected()) {
518 if (crossing && (myCrossings.count(crossing) > 0)) {
520 }
else if (hardFail) {
528 const std::set<GNECrossing*>&
534 std::vector<GNECrossing*>
536 std::vector<GNECrossing*> result;
538 for (
const auto& crossing : myCrossings) {
539 if (crossing->isAttributeCarrierSelected()) {
540 result.push_back(crossing);
549 if (myCrossings.insert(crossing).second ==
false) {
557 const auto finder = myCrossings.find(crossing);
558 if (finder == myCrossings.end()) {
561 myCrossings.erase(finder);
569 for (
const auto& crossing : myCrossings) {
570 if (crossing->isAttributeCarrierSelected()) {
580 if (myEdgeTypes.count(
id) > 0) {
581 return myEdgeTypes.at(
id);
582 }
else if (hardFail) {
594 edgeType->
incRef(
"GNENet::registerEdgeType");
601 const std::map<std::string, GNEEdgeType*>&
614 if (myEdgeTypes.count(edgeType->
getID()) == 0) {
615 throw ProcessError(edgeType->
getTagStr() +
" with ID='" + edgeType->
getID() +
"' doesn't exist in AttributeCarriers.edgeType");
616 }
else if (myEdgeTypes.count(newID) != 0) {
617 throw ProcessError(
"There is another " + edgeType->
getTagStr() +
" with new ID='" + newID +
"' in myEdgeTypes");
620 myEdgeTypes.erase(edgeType->
getID());
622 myNet->getNetBuilder()->getTypeCont().updateEdgeTypeID(edgeType->
getID(), newID);
626 myEdgeTypes[edgeType->
getID()] = edgeType;
628 myNet->requireSaveNet(
true);
636 while (myEdgeTypes.count(
"edgeType_" +
toString(counter)) != 0) {
639 return (
"edgeType_" +
toString(counter));
645 if (myEdges.count(
id) > 0) {
646 return myEdges.at(
id);
647 }
else if (hardFail) {
658 if ((from ==
nullptr) || (to ==
nullptr)) {
662 for (
const auto& edge : myEdges) {
663 if ((edge.second->getFromJunction() == from) && (edge.second->getToJunction() == to)) {
676 const std::map<std::string, GNEEdge*>&
682 std::vector<GNEEdge*>
684 std::vector<GNEEdge*> result;
686 for (
const auto& edge : myEdges) {
687 if (edge.second->isAttributeCarrierSelected()) {
688 result.push_back(edge.second);
697 edge->
incRef(
"GNENet::registerEdge");
704 myNet->addGLObjectIntoGrid(edge);
706 for (
const auto& lane : edge->
getLanes()) {
723 if (myEdges.count(edge->
getID()) == 0) {
725 }
else if (myEdges.count(newID) != 0) {
726 throw ProcessError(
"There is another " + edge->
getTagStr() +
" with new ID='" + newID +
"' in myEdges");
731 myNet->getNetBuilder()->getEdgeCont().rename(edge->
getNBEdge(), newID);
735 myEdges[edge->
getID()] = edge;
737 for (
const auto& lane : edge->
getLanes()) {
738 lane->updateConnectionIDs();
741 myNet->requireSaveNet(
true);
749 for (
const auto& edge : myEdges) {
750 if (edge.second->isAttributeCarrierSelected()) {
761 const GNEEdge* edge = retrieveEdge(edge_id,
false);
762 if (edge !=
nullptr) {
765 for (
auto laneIt : edge->
getLanes()) {
766 if (laneIt->getID() ==
id) {
771 if (lane ==
nullptr) {
778 if (checkVolatileChange && (myNet->getEdgesAndNumberOfLanes().count(edge_id) == 1) &&
779 myNet->getEdgesAndNumberOfLanes().at(edge_id) != (
int)edge->
getLanes().size()) {
784 }
else if (hardFail) {
796 if (lane && (myLanes.count(lane) > 0)) {
798 }
else if (hardFail) {
806 const std::set<GNELane*>&
812 std::vector<GNELane*>
814 std::vector<GNELane*> result;
816 for (
const auto& lane : myLanes) {
817 if (lane->isAttributeCarrierSelected()) {
818 result.push_back(lane);
827 if (myLanes.insert(lane).second ==
false) {
835 const auto finder = myLanes.find(lane);
836 if (finder == myLanes.end()) {
839 myLanes.erase(finder);
847 for (
const auto& lane : myLanes) {
848 if (lane->isAttributeCarrierSelected()) {
859 for (
const auto& connection : myConnections) {
860 if (connection->getID() ==
id) {
877 if (connection && (myConnections.count(connection) > 0)) {
879 }
else if (hardFail) {
887 const std::set<GNEConnection*>&
889 return myConnections;
893 std::vector<GNEConnection*>
895 std::vector<GNEConnection*> result;
897 for (
const auto& connection : myConnections) {
898 if (connection->isAttributeCarrierSelected()) {
899 result.push_back(connection);
908 if (myConnections.insert(connection).second ==
false) {
916 const auto finder = myConnections.find(connection);
917 if (finder == myConnections.end()) {
920 myConnections.erase(finder);
928 for (
const auto& connection : myConnections) {
929 if (connection->isAttributeCarrierSelected()) {
939 for (
const auto& additional : myAdditionals.at(type)) {
940 if (additional->getID() ==
id) {
945 throw ProcessError(
"Attempted to retrieve non-existant additional (string)");
958 }
else if (hardFail) {
959 throw ProcessError(
"Attempted to retrieve non-existant additional (AttributeCarrier)");
985 throw ProcessError(
"Attempted to retrieve non-existant rerouter interval");
989 const std::map<SumoXMLTag, std::set<GNEAdditional*> >&
991 return myAdditionals;
995 std::vector<GNEAdditional*>
997 std::vector<GNEAdditional*> result;
999 for (
const auto& additionalsTags : myAdditionals) {
1000 for (
const auto& additional : additionalsTags.second) {
1001 if (additional->isAttributeCarrierSelected()) {
1002 result.push_back(additional);
1013 for (
const auto& additionalsTag : myAdditionals) {
1014 counter += (int)additionalsTag.second.size();
1023 for (
const auto& additionalsTags : myAdditionals) {
1024 for (
const auto& additional : additionalsTags.second) {
1025 myNet->removeGLObjectFromGrid(additional);
1029 for (
auto& additionals : myAdditionals) {
1030 additionals.second.clear();
1038 for (
const auto& additionalsTags : myAdditionals) {
1039 for (
const auto& additional : additionalsTags.second) {
1040 if (additional->isAttributeCarrierSelected()) {
1056 prefix = oc.
getString(
"busStop-prefix");
1058 prefix = oc.
getString(
"trainStop-prefix");
1060 prefix = oc.
getString(
"containerStop-prefix");
1062 prefix = oc.
getString(
"chargingStation-prefix");
1064 prefix = oc.
getString(
"parkingArea-prefix");
1066 prefix = oc.
getString(
"e1Detector-prefix");
1068 prefix = oc.
getString(
"e2Detector-prefix");
1070 prefix = oc.
getString(
"e3Detector-prefix");
1072 prefix = oc.
getString(
"e1InstantDetector-prefix");
1074 prefix = oc.
getString(
"rerouter-prefix");
1076 prefix = oc.
getString(
"calibrator-prefix");
1078 prefix = oc.
getString(
"routeProbe-prefix");
1090 while ((retrieveAdditional(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr)) {
1094 return (prefix +
"_" +
toString(counter));
1100 for (
const auto& shape : myShapes.at(type)) {
1101 if (shape->getID() ==
id) {
1106 throw ProcessError(
"Attempted to retrieve non-existant shape");
1119 }
else if (hardFail) {
1120 throw ProcessError(
"Attempted to retrieve non-existant shape");
1127 std::vector<GNEShape*>
1129 std::vector<GNEShape*> result;
1131 for (
const auto& shapeTag : myShapes) {
1132 for (
const auto& shape : shapeTag.second) {
1133 if (shape->isAttributeCarrierSelected()) {
1134 result.push_back(shape);
1142 const std::map<SumoXMLTag, std::set<GNEShape*> >&
1156 prefix = oc.
getString(
"polygon-prefix");
1167 return (prefix +
"_" +
toString(counter));
1174 return (prefix +
"_" +
toString(counter));
1182 for (
const auto& shapeTag : myShapes) {
1183 counter += (int)shapeTag.second.size();
1192 for (
const auto& shapesTags : myShapes) {
1193 for (
const auto& shape : shapesTags.second) {
1194 myNet->removeGLObjectFromGrid(shape);
1198 for (
auto& shapes : myShapes) {
1199 shapes.second.clear();
1208 if (poly->isAttributeCarrierSelected()) {
1220 if (
POI->isAttributeCarrierSelected()) {
1225 if (POILane->isAttributeCarrierSelected()) {
1230 if (
POIGEO->isAttributeCarrierSelected()) {
1240 for (
const auto& TAZElement : myTAZElements.at(type)) {
1241 if (TAZElement->getID() ==
id) {
1246 throw ProcessError(
"Attempted to retrieve non-existant TAZElement");
1259 }
else if (hardFail) {
1260 throw ProcessError(
"Attempted to retrieve non-existant TAZElement");
1267 std::vector<GNETAZElement*>
1269 std::vector<GNETAZElement*> result;
1271 for (
const auto& TAZElementTags : myTAZElements) {
1272 for (
const auto& TAZElement : TAZElementTags.second) {
1273 if (TAZElement->isAttributeCarrierSelected()) {
1274 result.push_back(TAZElement);
1282 const std::map<SumoXMLTag, std::set<GNETAZElement*> >&
1284 return myTAZElements;
1291 for (
const auto& TAZElementsTags : myTAZElements) {
1292 for (
const auto& TAZElement : TAZElementsTags.second) {
1293 myNet->removeGLObjectFromGrid(TAZElement);
1297 for (
auto& TAZElements : myTAZElements) {
1298 TAZElements.second.clear();
1306 for (
const auto& TAZElementsTag : myTAZElements) {
1307 counter += (int)TAZElementsTag.second.size();
1316 for (
const auto& poly : myTAZElements.at(
SUMO_TAG_TAZ)) {
1317 if (poly->isAttributeCarrierSelected()) {
1332 return std::find(TAZElementTag.begin(), TAZElementTag.end(), TAZElement) != TAZElementTag.end();
1351 while (retrieveTAZElement(tag,
toString(tag) +
"_" +
toString(counter)) !=
nullptr) {
1361 for (
const auto& demandElement : myDemandElements.at(type)) {
1362 if (demandElement->getID() ==
id) {
1363 return demandElement;
1367 throw ProcessError(
"Attempted to retrieve non-existant demand element (string)");
1378 if (demandElement && (myDemandElements.at(AC->
getTagProperty().
getTag()).count(demandElement) > 0)) {
1379 return demandElement;
1380 }
else if (hardFail) {
1381 throw ProcessError(
"Attempted to retrieve non-existant demand element (AttributeCarrier)");
1388 std::vector<GNEDemandElement*>
1390 std::vector<GNEDemandElement*> result;
1392 for (
const auto& demandElementTag : myDemandElements) {
1393 for (
const auto& demandElement : demandElementTag.second) {
1394 if (demandElement->isAttributeCarrierSelected()) {
1395 result.push_back(demandElement);
1403 const std::map<SumoXMLTag, std::set<GNEDemandElement*> >&
1405 return myDemandElements;
1412 for (
const auto& demandElementTag : myDemandElements) {
1413 counter += (int)demandElementTag.second.size();
1433 }
else if (tagProperty.isVehicle() && !tagProperty.isFlow()) {
1434 prefix = oc.
getString(
"vehicle-prefix");
1435 }
else if (tagProperty.isFlow()) {
1437 }
else if (tagProperty.isPerson()) {
1439 }
else if (tagProperty.isContainer()) {
1440 prefix = oc.
getString(
"container-prefix");
1444 if (tagProperty.isVehicle() || tagProperty.isFlow()) {
1457 return (prefix +
"_" +
toString(counter));
1458 }
else if (tagProperty.isPerson()) {
1465 return (prefix +
"_" +
toString(counter));
1466 }
else if (tagProperty.isContainer()) {
1473 return (prefix +
"_" +
toString(counter));
1475 while (retrieveDemandElement(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
1479 return (prefix +
"_" +
toString(counter));
1498 for (
const auto& demandElementsTags : myDemandElements) {
1499 for (
const auto& demandElement : demandElementsTags.second) {
1500 myNet->removeGLObjectFromGrid(demandElement);
1504 for (
auto& demandElements : myDemandElements) {
1505 demandElements.second.clear();
1515 defaultVehicleType->
incRef(
"GNENet::DEFAULT_VEHTYPE");
1520 defaultBikeType->
incRef(
"GNENet::DEFAULT_BIKETYPE_ID");
1525 defaultTaxiType->
incRef(
"GNENet::DEFAULT_TAXITYPE_ID");
1530 defaultPersonType->
incRef(
"GNENet::DEFAULT_PEDTYPE_ID");
1534 myDemandElements.at(defaultContainerType->
getTagProperty().
getTag()).insert(defaultContainerType);
1535 defaultContainerType->
incRef(
"GNENet::DEFAULT_CONTAINERTYPE_ID");
1542 for (
const auto& demandElementsTags : myDemandElements) {
1543 for (
const auto& demandElement : demandElementsTags.second) {
1544 if (demandElement->isAttributeCarrierSelected()) {
1558 if (route->isAttributeCarrierSelected()) {
1564 if (vehicle->getChildDemandElements().front()->isAttributeCarrierSelected()) {
1569 if (flow->getChildDemandElements().front()->isAttributeCarrierSelected()) {
1582 if (vehicle->isAttributeCarrierSelected()) {
1586 for (
const auto& trip : myDemandElements.at(
SUMO_TAG_TRIP)) {
1587 if (trip->isAttributeCarrierSelected()) {
1592 if (vehicle->isAttributeCarrierSelected()) {
1596 for (
const auto& flow : myDemandElements.at(
SUMO_TAG_FLOW)) {
1597 if (flow->isAttributeCarrierSelected()) {
1602 if (flow->isAttributeCarrierSelected()) {
1607 if (flow->isAttributeCarrierSelected()) {
1620 if (person->isAttributeCarrierSelected()) {
1625 if (personFlow->isAttributeCarrierSelected()) {
1638 for (
const auto& personPlan : person->getChildDemandElements()) {
1639 if (personPlan->getTagProperty().isPersonTrip() && personPlan->isAttributeCarrierSelected()) {
1645 for (
const auto& personPlan : personFlow->getChildDemandElements()) {
1646 if (personPlan->getTagProperty().isPersonTrip() && personPlan->isAttributeCarrierSelected()) {
1660 for (
const auto& personPlan : person->getChildDemandElements()) {
1661 if (personPlan->getTagProperty().isWalk() && personPlan->isAttributeCarrierSelected()) {
1667 for (
const auto& personPlan : personFlow->getChildDemandElements()) {
1668 if (personPlan->getTagProperty().isWalk() && personPlan->isAttributeCarrierSelected()) {
1682 for (
const auto& personPlan : person->getChildDemandElements()) {
1683 if (personPlan->getTagProperty().isRide() && personPlan->isAttributeCarrierSelected()) {
1689 for (
const auto& personPlan : personFlow->getChildDemandElements()) {
1690 if (personPlan->getTagProperty().isRide() && personPlan->isAttributeCarrierSelected()) {
1704 if (container->isAttributeCarrierSelected()) {
1709 if (containerFlow->isAttributeCarrierSelected()) {
1722 for (
const auto& containerPlan : container->getChildDemandElements()) {
1723 if (containerPlan->getTagProperty().isTransportPlan() && containerPlan->isAttributeCarrierSelected()) {
1729 for (
const auto& containerPlan : containerFlow->getChildDemandElements()) {
1730 if (containerPlan->getTagProperty().isTransportPlan() && containerPlan->isAttributeCarrierSelected()) {
1744 for (
const auto& containerPlan : container->getChildDemandElements()) {
1745 if (containerPlan->getTagProperty().isTranshipPlan() && containerPlan->isAttributeCarrierSelected()) {
1751 for (
const auto& containerPlan : containerFlow->getChildDemandElements()) {
1752 if (containerPlan->getTagProperty().isTranshipPlan() && containerPlan->isAttributeCarrierSelected()) {
1766 if (route->isAttributeCarrierSelected()) {
1771 for (
const auto& trip : myDemandElements.at(
SUMO_TAG_TRIP)) {
1772 for (
const auto& stop : trip->getChildDemandElements()) {
1773 if (stop->getTagProperty().isStop() && stop->isAttributeCarrierSelected()) {
1779 for (
const auto& stop : vehicle->getChildDemandElements().front()->getChildDemandElements()) {
1780 if (stop->getTagProperty().isStop() && stop->isAttributeCarrierSelected()) {
1785 for (
const auto& flow : myDemandElements.at(
SUMO_TAG_FLOW)) {
1786 for (
const auto& stop : flow->getChildDemandElements()) {
1787 if (stop->getTagProperty().isStop() && stop->isAttributeCarrierSelected()) {
1793 for (
const auto& stop : flow->getChildDemandElements().front()->getChildDemandElements()) {
1794 if (stop->getTagProperty().isStop() && stop->isAttributeCarrierSelected()) {
1801 for (
const auto& personPlan : person->getChildDemandElements()) {
1802 if (personPlan->getTagProperty().isStopPerson() && personPlan->isAttributeCarrierSelected()) {
1808 for (
const auto& personPlan : personFlow->getChildDemandElements()) {
1809 if (personPlan->getTagProperty().isStopPerson() && personPlan->isAttributeCarrierSelected()) {
1816 for (
const auto& containerPlan : container->getChildDemandElements()) {
1817 if (containerPlan->getTagProperty().isStopContainer() && containerPlan->isAttributeCarrierSelected()) {
1823 for (
const auto& containerPlan : containerFlow->getChildDemandElements()) {
1824 if (containerPlan->getTagProperty().isStopContainer() && containerPlan->isAttributeCarrierSelected()) {
1835 for (
const auto& dataSet : myDataSets) {
1836 if (dataSet->getID() ==
id) {
1841 throw ProcessError(
"Attempted to retrieve non-existant data set");
1852 if (dataSet && (myDataSets.count(dataSet) > 0)) {
1854 }
else if (hardFail) {
1855 throw ProcessError(
"Attempted to retrieve non-existant data set");
1862 const std::set<GNEDataSet*>&
1872 while (retrieveDataSet(prefix + dataSetTagStr +
"_" +
toString(counter),
false) !=
nullptr) {
1875 return (prefix + dataSetTagStr +
"_" +
toString(counter));
1883 if (dataInterval && (myDataIntervals.count(dataInterval) > 0)) {
1884 return dataInterval;
1885 }
else if (hardFail) {
1886 throw ProcessError(
"Attempted to retrieve non-existant data interval");
1893 const std::set<GNEDataInterval*>&
1895 return myDataIntervals;
1901 if (myDataIntervals.insert(dataInterval).second ==
false) {
1909 const auto finder = myDataIntervals.find(dataInterval);
1910 if (finder == myDataIntervals.end()) {
1913 myDataIntervals.erase(finder);
1922 if (genericData && (myGenericDatas.at(AC->
getTagProperty().
getTag()).count(genericData) > 0)) {
1924 }
else if (hardFail) {
1925 throw ProcessError(
"Attempted to retrieve non-existant data set");
1932 std::vector<GNEGenericData*>
1934 std::vector<GNEGenericData*> result;
1936 for (
const auto& genericDataTag : myGenericDatas) {
1937 for (
const auto& genericData : genericDataTag.second) {
1938 if (genericData->isAttributeCarrierSelected()) {
1939 result.push_back(genericData);
1947 const std::map<SumoXMLTag, std::set<GNEGenericData*> >&
1949 return myGenericDatas;
1953 std::vector<GNEGenericData*>
1956 std::vector<GNEGenericData*> genericDatas;
1958 for (
const auto& genericData : myGenericDatas.at(genericDataTag)) {
1960 if ((genericData->getDataIntervalParent()->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) &&
1961 (genericData->getDataIntervalParent()->getAttributeDouble(
SUMO_ATTR_END) <= end)) {
1962 genericDatas.push_back(genericData);
1965 return genericDatas;
1974 if (genericData->isAttributeCarrierSelected()) {
1987 if (genericData->isAttributeCarrierSelected()) {
2000 if (genericData->isAttributeCarrierSelected()) {
2010 if (myGenericDatas.at(genericData->
getTagProperty().
getTag()).insert(genericData).second ==
false) {
2018 const auto finder = myGenericDatas.at(genericData->
getTagProperty().
getTag()).find(genericData);
2027 std::set<std::string>
2030 std::set<std::string> attributesSolution;
2032 std::vector<GNEGenericData*> genericDatas;
2034 for (
const auto& interval : myDataIntervals) {
2038 for (
const auto& genericData : interval->getGenericDataChildren()) {
2039 if (genericDataTag.empty() || (genericData->getTagProperty().getTagStr() == genericDataTag)) {
2040 genericDatas.push_back(genericData);
2046 for (
const auto& genericData : genericDatas) {
2047 for (
const auto& attribute : genericData->getParametersMap()) {
2048 attributesSolution.insert(attribute.first);
2051 return attributesSolution;
2055 std::set<std::string>
2057 const std::string& beginStr,
const std::string& endStr)
const {
2059 std::set<std::string> attributesSolution;
2061 std::vector<GNEDataSet*> dataSets;
2062 std::vector<GNEDataInterval*> dataIntervals;
2064 GNEDataSet* retrievedDataSet = retrieveDataSet(dataSetID,
false);
2066 if (dataSetID.empty()) {
2068 dataSets.reserve(myDataSets.size());
2069 for (
const auto& dataSet : myDataSets) {
2070 dataSets.push_back(dataSet);
2072 }
else if (retrievedDataSet) {
2073 dataSets.push_back(retrievedDataSet);
2075 return attributesSolution;
2078 int numberOfIntervals = 0;
2079 for (
const auto& dataSet : dataSets) {
2080 numberOfIntervals += (int)dataSet->getDataIntervalChildren().size();
2083 dataIntervals.reserve(numberOfIntervals);
2085 for (
const auto& dataSet : dataSets) {
2086 for (
const auto& dataInterval : dataSet->getDataIntervalChildren()) {
2088 if (beginStr.empty() && endStr.empty()) {
2089 dataIntervals.push_back(dataInterval.second);
2090 }
else if (endStr.empty()) {
2092 const double begin = GNEAttributeCarrier::parse<double>(beginStr);
2093 if (dataInterval.second->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) {
2094 dataIntervals.push_back(dataInterval.second);
2096 }
else if (beginStr.empty()) {
2098 const double end = GNEAttributeCarrier::parse<double>(endStr);
2099 if (dataInterval.second->getAttributeDouble(
SUMO_ATTR_END) <= end) {
2100 dataIntervals.push_back(dataInterval.second);
2104 const double begin = GNEAttributeCarrier::parse<double>(beginStr);
2105 const double end = GNEAttributeCarrier::parse<double>(endStr);
2106 if ((dataInterval.second->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) &&
2107 (dataInterval.second->getAttributeDouble(
SUMO_ATTR_END) <= end)) {
2108 dataIntervals.push_back(dataInterval.second);
2114 for (
const auto& dataInterval : dataIntervals) {
2115 for (
const auto& genericData : dataInterval->getGenericDataChildren()) {
2117 if (genericDataTag.empty() || (genericData->getTagProperty().getTagStr() == genericDataTag)) {
2118 for (
const auto& attribute : genericData->getParametersMap()) {
2119 attributesSolution.insert(attribute.first);
2124 return attributesSolution;
2130 myNet->getNetBuilder()->getNodeCont().insert(junction->
getNBNode());
2131 registerJunction(junction);
2138 myNet->getViewNet()->removeFromAttributeCarrierInspected(junction);
2139 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(junction);
2141 myNet->removeGLObjectFromGrid(junction);
2143 myNet->getNetBuilder()->getNodeCont().extract(junction->
getNBNode());
2144 junction->
decRef(
"GNENet::deleteSingleJunction");
2151 return (myEdgeTypes.count(edgeType->
getID()) > 0);
2158 const auto& createEdgeFrame = myNet->getViewNet()->getViewParent()->getCreateEdgeFrame();
2162 if (myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->shown()) {
2163 myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->getEdgeTypeSelector()->refreshEdgeTypeSelector();
2166 createEdgeFrame->getEdgeTypeSelector()->setCurrentEdgeType(edgeType);
2173 const auto& createEdgeFrame = myNet->getViewNet()->getViewParent()->getCreateEdgeFrame();
2175 myNet->getViewNet()->removeFromAttributeCarrierInspected(edgeType);
2176 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(edgeType);
2180 if (createEdgeFrame->getEdgeTypeSelector()->getEdgeTypeSelected() == edgeType) {
2181 createEdgeFrame->getEdgeTypeSelector()->clearEdgeTypeSelected();
2184 createEdgeFrame->getEdgeTypeSelector()->refreshEdgeTypeSelector();
2191 myNet->getNetBuilder()->getEdgeCont().insert(nbe);
2203 myNet->getViewNet()->removeFromAttributeCarrierInspected(edge);
2204 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(edge);
2206 myNet->removeGLObjectFromGrid(edge);
2209 for (
const auto& lane : edge->
getLanes()) {
2213 myNet->getNetBuilder()->getEdgeCont().extract(myNet->getNetBuilder()->getDistrictCont(), edge->
getNBEdge());
2214 edge->
decRef(
"GNENet::deleteSingleEdge");
2235 return std::find(additionalElementTag.begin(), additionalElementTag.end(), additional) != additionalElementTag.end();
2245 if (myAdditionals.at(additional->
getTagProperty().
getTag()).insert(additional).second ==
false) {
2250 myNet->addGLObjectIntoGrid(additional);
2253 if (myNet->isUpdateGeometryEnabled()) {
2257 myNet->requireSaveAdditionals(
true);
2270 myNet->getViewNet()->removeFromAttributeCarrierInspected(additional);
2271 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(additional);
2276 myNet->removeGLObjectFromGrid(additional);
2279 myNet->getPathManager()->removePath(additional);
2281 myNet->requireSaveAdditionals(
true);
2292 return std::find(shapeElementTag.begin(), shapeElementTag.end(), shape) != shapeElementTag.end();
2306 myNet->addGLObjectIntoGrid(shape);
2308 if (myNet->isUpdateGeometryEnabled()) {
2312 myNet->requireSaveAdditionals(
true);
2325 myNet->getViewNet()->removeFromAttributeCarrierInspected(shape);
2326 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(shape);
2330 myNet->removeGLObjectFromGrid(shape);
2332 myNet->requireSaveAdditionals(
true);
2339 if (myTAZElements.at(TAZElement->
getTagProperty().
getTag()).insert(TAZElement).second ==
false) {
2343 myNet->addGLObjectIntoGrid(TAZElement);
2345 if (myNet->isUpdateGeometryEnabled()) {
2349 myNet->requireSaveAdditionals(
true);
2362 myNet->getViewNet()->removeFromAttributeCarrierInspected(TAZElement);
2363 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(TAZElement);
2367 myNet->removeGLObjectFromGrid(TAZElement);
2369 myNet->requireSaveAdditionals(
true);
2376 if (demandElement) {
2380 return std::find(demandElementTag.begin(), demandElementTag.end(), demandElement) != demandElementTag.end();
2390 if (myDemandElements.at(demandElement->
getTagProperty().
getTag()).insert(demandElement).second ==
false) {
2394 myNet->addGLObjectIntoGrid(demandElement);
2396 if (myNet->isUpdateGeometryEnabled()) {
2400 myNet->requireSaveDemandElements(
true);
2407 auto itFind = myDemandElements.at(demandElement->
getTagProperty().
getTag()).find(demandElement);
2413 myNet->getViewNet()->removeFromAttributeCarrierInspected(demandElement);
2414 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(demandElement);
2418 myNet->removeGLObjectFromGrid(demandElement);
2420 myNet->getPathManager()->removePath(demandElement);
2422 myNet->requireSaveDemandElements(
true);
2430 if (myDataSets.find(dataSet) != myDataSets.end()) {
2444 if (myDataSets.insert(dataSet).second ==
false) {
2448 myNet->requireSaveDataElements(
true);
2450 myNet->getViewNet()->getIntervalBar().updateIntervalBar();
2457 const auto itFind = myDataSets.find(dataSet);
2459 if (itFind == myDataSets.end()) {
2463 myNet->getViewNet()->removeFromAttributeCarrierInspected(dataSet);
2464 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(dataSet);
2466 myDataSets.erase(itFind);
2468 myNet->requireSaveDataElements(
true);
2470 myNet->getViewNet()->getIntervalBar().updateIntervalBar();
2480 myReplaced(replaced),
2491 myTllcont.replaceRemoved(myBy, -1, myReplaced, -1,
true);
2498 myTllcont.replaceRemoved(myReplaced, -1, myBy, -1,
true);
2504 return "Redo replace in TLS";
2510 return "Undo replace in TLS";
2516 return myReplaced != myBy;
Supermode
@brie enum for supermodes
@ NETWORK
Network mode (Edges, junctions, etc..)
@ DATA
Data mode (edgeData, LaneData etc..)
@ DEMAND
Demand mode (Routes, Vehicles etc..)
GUISelectedStorage gSelected
A global holder of selected objects.
std::string time2string(SUMOTime t)
convert SUMOTime to string
@ SVC_IGNORING
vehicles ignoring classes
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_TAXI
vehicle is a taxi
@ SVC_PEDESTRIAN
pedestrian
const std::string DEFAULT_TAXITYPE_ID
const std::string DEFAULT_PEDTYPE_ID
const std::set< std::string > DEFAULT_VTYPES
const std::string DEFAULT_VTYPE_ID
const std::string DEFAULT_CONTAINERTYPE_ID
const std::string DEFAULT_BIKETYPE_ID
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_TRIP_JUNCTIONS
a trip between junctions (used in NETEDIT)
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_REROUTER
A rerouter.
@ SUMO_TAG_EDGEREL
a relation between two edges
@ SUMO_TAG_ROUTEPROBE
a routeprobe detector
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_E2DETECTOR
an e2 detector
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_NOTHING
invalid tag
@ SUMO_TAG_CONTAINER_STOP
A container stop.
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ SUMO_TAG_LANECALIBRATOR
A calibrator placed over lane (used in netedit)
@ SUMO_TAG_VEHICLE
description of a vehicle
@ GNE_TAG_FLOW_ROUTE
a flow definition using a route instead of a from-to edges route (used in NETEDIT)
@ GNE_TAG_FLOW_JUNCTIONS
a flow between junctions (used in NETEDIT)
@ GNE_TAG_POIGEO
Point of interest over view with GEO attributes.
@ GNE_TAG_FLOW_WITHROUTE
description of a vehicle with an embedded route (used in NETEDIT)
@ SUMO_TAG_FLOW
a flow definitio nusing a from-to edges instead of a route (used by router)
@ SUMO_TAG_CONNECTION
connectio between two lanes
@ SUMO_TAG_PARKING_AREA
A parking area.
@ GNE_TAG_E2DETECTOR_MULTILANE
an e2 detector over multiple lanes (placed here due create Additional Frame)
@ SUMO_TAG_JUNCTION
begin/end of the description of a junction
@ SUMO_TAG_CROSSING
crossing between edges for pedestrians
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_MEANDATA_EDGE
an edge based mean data detector
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ SUMO_TAG_TRAIN_STOP
A train stop (alias for bus stop)
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_INSTANT_INDUCTION_LOOP
An instantenous induction loop.
@ GNE_TAG_VEHICLE_WITHROUTE
description of a vehicle with an embedded route (used in NETEDIT)
@ GNE_TAG_POILANE
Point of interest over Lane.
@ SUMO_TAG_E1DETECTOR
an e1 detector
@ SUMO_TAG_TAZREL
a relation between two TAZs
@ SUMO_TAG_CALIBRATOR
A calibrator placed over edge.
@ SUMO_TAG_E3DETECTOR
an e3 detector
@ SUMO_TAG_VSS
A variable speed sign.
@ SUMO_TAG_TRIP
a single trip definition (used by router)
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_END
weights: time range end
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
virtual void updateGeometry()=0
update pre-computed geometry information
const GUIGeometry & getAdditionalGeometry() const
obtain additional geometry
virtual Position getPositionInView() const =0
Returns position of additional in view.
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
static const std::vector< GNETagProperties > getTagPropertiesByType(const int tagPropertyCategory)
get tagProperties associated to the given GNETagProperties::TagType (NETWORKELEMENT,...
virtual const std::string & getID() const =0
return ID of object
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
the function-object for an editing operation (abstract base)
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
const std::string & getID() const
get ID
An Element which don't belongs to GNENet but has influency in the simulation.
virtual void updateGeometry()=0
update pre-computed geometry information
const std::string & getID() const
get ID
A road/street connecting two junctions (netedit-version)
GNEJunction * getFromJunction() const
get from Junction (only used to increase readability)
void setResponsible(bool newVal)
set responsibility for deleting internal structures
NBEdge * getNBEdge() const
returns the internal NBEdge
GNEJunction * getToJunction() const
get from Junction (only used to increase readability)
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
void setMicrosimID(const std::string &newID)
override to also set lane ids
const std::string & getID() const
return ID of object
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
void setEdgeTemplate(const GNEEdge *edge)
set edge template
GNEEdgeTemplate * getEdgeTemplate() const
get edge template (to copy attributes from)
void setResponsible(bool newVal)
set responsibility for deleting internal structures
void updateGeometry()
update pre-computed geometry information (including crossings)
void removeOutgoingGNEEdge(GNEEdge *edge)
remove outgoing GNEEdge
void removeIncomingGNEEdge(GNEEdge *edge)
remove incoming GNEEdge
void addIncomingGNEEdge(GNEEdge *edge)
add incoming GNEEdge
NBNode * getNBNode() const
Return net build node.
void addOutgoingGNEEdge(GNEEdge *edge)
add outgoing GNEEdge
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
int getIndex() const
returns the index of the lane
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool hardFail=true) const
get a single attribute carrier based on a GLID
int getNumberOfSelectedAdditionals() const
get number of selected additionals
const std::map< SumoXMLTag, std::set< GNEGenericData * > > & getGenericDatas() const
get all generic datas
const std::set< GNELane * > & getLanes() const
get lanes
const std::set< GNEConnection * > & getConnections() const
get connections
int getNumberOfSelectedConnections() const
get number of selected connections
void deleteDataSet(GNEDataSet *dataSet)
delete demand element element of GNENet container
GNETAZElement * retrieveTAZElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named TAZElement.
void insertLane(GNELane *lane)
insert lane
int getNumberOfSelectedEdgeRelDatas() const
get number of selected edge rel datas
int getNumberOfSelectedCrossings() const
get number of selected crossings
GNEEdgeType * registerEdgeType(GNEEdgeType *edgeType)
registers a edge in GNENet containers
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
std::map< SumoXMLTag, std::set< GNEDemandElement * > > myDemandElements
map with the tag and pointer to demand elements of net
const std::map< SumoXMLTag, std::set< GNEDemandElement * > > & getDemandElements() const
get demand elements
void insertDataSet(GNEDataSet *dataSet)
Insert a demand element element int GNENet container.
bool dataSetExist(GNEDataSet *dataSet) const
return true if given demand element exist
int getNumberOfTAZElements() const
Returns the number of TAZElements of the net.
int getNumberOfSelectedRides() const
get number of selected rides
void clearDemandElements()
clear demand elements
void insertGenericData(GNEGenericData *genericData)
insert generic data
GNEEdge * registerEdge(GNEEdge *edge)
registers an edge with GNENet containers
bool demandElementExist(GNEDemandElement *demandElement) const
return true if given demand element exist
GNEShape * retrieveShape(SumoXMLTag, const std::string &id, bool hardFail=true) const
Returns the named shape.
void deleteShape(GNEShape *shape)
delete shape element of GNENet container
int getNumberOfSelectedPersonTrips() const
get number of selected person trips
std::string generateDemandElementID(SumoXMLTag tag) const
generate demand element id
void remapJunctionAndEdgeIds()
remap junction and edge IDs
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(SumoXMLTag tag=SUMO_TAG_NOTHING)
get the attribute carriers based on Type
void clearEdgeTypes()
clear edgeTypes
int getNumberOfSelectedTranships() const
get number of selected tranships
int getNumberOfSelectedVehicles() const
get number of selected vehicles
int getNumberOfSelectedWalks() const
get number of selected walks
void deleteDemandElement(GNEDemandElement *demandElement)
delete demand element element of GNENet container
void deleteEdgeType(GNEEdgeType *edgeType)
deletes edgeType
std::string generateDataSetID(const std::string &prefix) const
generate data set id
void deleteConnection(GNEConnection *connection)
delete connection
void clearAdditionals()
clear additionals
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
std::vector< GNEGenericData * > retrieveGenericDatas(const SumoXMLTag genericDataTag, const double begin, const double end)
retrieve generic datas within the given interval
std::set< std::string > retrieveGenericDataParameters(const std::string &genericDataTag, const double begin, const double end) const
return a set of parameters for the given data Interval
std::map< SumoXMLTag, std::set< GNEGenericData * > > myGenericDatas
map with the tag and pointer to all generic datas
void deleteSingleJunction(GNEJunction *junction)
deletes a single junction
void insertShape(GNEShape *shape)
Insert a shape element int GNENet container.
GNEJunction * registerJunction(GNEJunction *junction)
registers a junction in GNENet containers
const std::set< GNEDataSet * > & getDataSets() const
get demand elements
bool isNetworkElementAroundShape(GNEAttributeCarrier *AC, const PositionVector &shape) const
check if shape of given AC (network element) is around the given shape
GNEJunction * retrieveJunction(const std::string &id, bool hardFail=true) const
get junction by id
std::vector< GNEDemandElement * > getSelectedDemandElements() const
get selected demand elements
void updateJunctionID(GNEJunction *junction, const std::string &newID)
update junction ID in container
void deleteGenericData(GNEGenericData *genericData)
delete generic data
~AttributeCarriers()
destructor
void insertCrossing(GNECrossing *crossing)
insert crossing
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
int getNumberOfSelectedTAZs() const
get number of selected TAZs
int getNumberOfSelectedTransport() const
get number of selected transports
GNEDataInterval * retrieveDataInterval(GNEAttributeCarrier *AC, bool hardFail=true) const
Returns the data interval.
std::vector< GNELane * > getSelectedLanes() const
get selected lanes
void insertConnection(GNEConnection *connection)
insert connection
std::vector< GNEAdditional * > getSelectedAdditionals() const
get selected additionals
int getNumberOfSelectedJunctions() const
get number of selected junctions
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
void deleteTAZElement(GNETAZElement *TAZElement)
delete TAZElement element of GNENet container
std::string generateTAZElementID(SumoXMLTag TAZElementTag) const
generate TAZElement ID
int getNumberOfSelectedDemandElements() const
get number of selected demand elements
int getNumberOfSelectedPersons() const
get number of selected persons
GNEEdgeType * retrieveEdgeType(const std::string &id, bool hardFail=true) const
get edge type by id
std::map< SumoXMLTag, std::set< GNEShape * > > myShapes
map with the tag and pointer to shape elements of net
int getNumberOfSelectedRoutes() const
get number of selected routes
void addDefaultVTypes()
add default VTypes
int getNumberOfShapes() const
Returns the number of shapes.
int getNumberOfSelectedPOIs() const
get number of selected POIs
void deleteSingleEdge(GNEEdge *edge)
deletes a single edge
const std::map< SumoXMLTag, std::set< GNETAZElement * > > & getTAZElements() const
get TAZElements
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
const std::set< GNEDataInterval * > & getDataIntervals() const
get all data intervals of network
void deleteAdditional(GNEAdditional *additional)
delete additional element of GNENet container
int getNumberOfDemandElements() const
Return the number of demand elements.
int getNumberOfSelectedPolygons() const
get number of selected polygons
std::vector< GNEJunction * > getSelectedJunctions() const
return selected junctions
std::vector< GNETAZElement * > getSelectedTAZElements() const
get selected TAZElements
std::string generateShapeID(SumoXMLTag shapeTag) const
generate Shape ID
const std::map< SumoXMLTag, std::set< GNEShape * > > & getShapes() const
get shapes
int getNumberOfAdditionals() const
get number of additonals
const std::set< GNECrossing * > & getCrossings() const
get crossings
void insertEdge(GNEEdge *edge)
void insertDemandElement(GNEDemandElement *demandElement)
Insert a demand element element int GNENet container.
const std::map< SumoXMLTag, std::set< GNEAdditional * > > & getAdditionals() const
get additionals
std::vector< GNEShape * > getSelectedShapes()
get selected shapes
void clearTAZElements()
clear TAZElements
void updateEdgeID(GNEEdge *edge, const std::string &newID)
update edge ID in container
std::vector< GNECrossing * > getSelectedCrossings() const
return all selected crossings
int getNumberOfSelectedLanes() const
get number of selected lanes
GNEAdditional * retrieveRerouterInterval(const std::string &rerouterID, const SUMOTime begin, const SUMOTime end) const
Returns the rerouter interval defined by given begin and end.
int getNumberOfSelectedEdgeDatas() const
get number of selected edge datas
void updateEdgeTypeID(GNEEdgeType *edgeType, const std::string &newID)
update edgeType ID in container
std::map< SumoXMLTag, std::set< GNETAZElement * > > myTAZElements
map with the tag and pointer to TAZElement elements of net
bool additionalExist(const GNEAdditional *additional) const
return true if given additional exist
bool shapeExist(const GNEShape *shape) const
return true if given shape exist
void insertTAZElement(GNETAZElement *TAZElement)
Insert a TAZElement element int GNENet container.
void insertAdditional(GNEAdditional *additional)
Insert a additional element int GNENet container.
void insertEdgeType(GNEEdgeType *edgeType)
inserts a single edgeType into the net and into the underlying netbuild-container
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
int getNumberOfSelectedEdgeTAZRel() const
get number of selected edge TAZ Rels
std::vector< GNEGenericData * > getSelectedGenericDatas() const
get selected generic datas
void deleteLane(GNELane *lane)
delete lane
void clearEdges()
clear edges
void insertJunction(GNEJunction *junction)
std::vector< GNEEdge * > getSelectedEdges() const
return all edges
std::map< SumoXMLTag, std::set< GNEAdditional * > > myAdditionals
map with the tag and pointer to additional elements of net
void insertDataInterval(GNEDataInterval *dataInterval)
insert data interval
const std::map< std::string, GNEJunction * > & getJunctions() const
get junctions
int getNumberOfSelectedEdges() const
get number of selected edges
const std::map< std::string, GNEEdgeType * > & getEdgeTypes() const
map with the ID and pointer to edgeTypes of net
GNECrossing * retrieveCrossing(GNEAttributeCarrier *AC, bool hardFail=true) const
get Crossing by AC
bool TAZElementExist(const GNETAZElement *TAZElement) const
return true if given TAZElement exist
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
std::vector< GNEConnection * > getSelectedConnections() const
get selected connections
void clearJunctions()
clear junctions
void deleteCrossing(GNECrossing *crossing)
delete crossing
GNEGenericData * retrieveGenericData(GNEAttributeCarrier *AC, bool hardFail=true) const
Returns the generic data.
void clearShapes()
clear shapes
GNEDemandElement * getDefaultType() const
get default type
bool edgeTypeExist(const GNEEdgeType *edgeType) const
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(const bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
int getNumberOfSelectedStops() const
get number of selected stops
AttributeCarriers(GNENet *net)
constructor
std::string generateEdgeTypeID() const
generate edgeType id
void deleteDataInterval(GNEDataInterval *dataInterval)
delete data interval
GNEConnection * retrieveConnection(const std::string &id, bool hardFail=true) const
get Connection by id
int getNumberOfSelectedContainers() const
get number of selected containers
std::string undoName() const
undo name
GNEChange_ReplaceEdgeInTLS(NBTrafficLightLogicCont &tllcont, NBEdge *replaced, NBEdge *by)
constructor
~GNEChange_ReplaceEdgeInTLS()
@bief destructor
std::string redoName() const
get Redo name
bool trueChange()
wether original and new value differ
A NBNetBuilder extended by visualisation and editing capabilities.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
const std::string & getID() const
get ID
void decRef(const std::string &debugMsg="")
Decrease reference.
void incRef(const std::string &debugMsg="")
Increarse reference.
virtual void updateGeometry()=0
update pre-computed geometry information
const std::string & getID() const
get ID (all shapes have one)
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
virtual void updateGeometry()=0
update pre-computed geometry information
bool isShape() const
return true if tag correspond to a shape
bool isTAZElement() const
return true if tag correspond to a TAZ element
bool isNetworkElement() const
return true if tag correspond to a network element
bool isDataElement() const
return true if tag correspond to a data element
bool isPlacedInRTree() const
return true if Tag correspond to an element that has has to be placed in RTREE
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool isDemandElement() const
return true if tag correspond to a demand element
bool isAdditionalElement() const
return true if tag correspond to an additional element
const PositionVector & getShape() const
The shape of the additional element.
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
void unblockObject(GUIGlID id)
Marks an object as unblocked.
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
GUIGlObject * getObjectBlocking(GUIGlID id)
Returns the object from the container locking it.
const std::set< GUIGlID > & getSelected() const
Returns the set of ids of all selected objects.
The representation of a single edge during network building.
const std::string & getID() const
NBNode * getToNode() const
Returns the destination node of the edge.
NBNode * getFromNode() const
Returns the origin node of the edge.
void addIncomingEdge(NBEdge *edge)
adds an incoming edge
Position getCenter() const
Returns a position that is guaranteed to lie within the node shape.
int buildCrossings()
build pedestrian crossings
void addOutgoingEdge(NBEdge *edge)
adds an outgoing edge
const PositionVector & getShape() const
retrieve the junction shape
const Position & getPosition() const
A container for traffic light definitions and built programs.
const std::string & getID() const
Returns the id.
A storage for options typed value containers)
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
static OptionsCont & getOptions()
Retrieves the options.
C++ TraCI client API implementation.
double z() const
Returns the z-position.
bool overlapsWith(const AbstractPoly &poly, double offset=0) const
Returns the information whether the given polygon overlaps with this.
bool around(const Position &p, double offset=0) const
Returns the information whether the position vector describes a polygon lying around the given point.
static std::string getEdgeIDFromLane(const std::string laneID)
return edge id when given the lane ID