62 for (
const auto& additionalTagProperty : additionalTagProperties) {
63 myAdditionals.insert(std::make_pair(additionalTagProperty.getTag(), std::unordered_map<const GUIGlObject*, GNEAdditional*>()));
65 myAdditionalIDs.insert(std::make_pair(additionalTagProperty.getTag(), std::map<const std::string, GNEAdditional*>()));
70 for (
const auto& demandElementTagProperty : demandElementTagProperties) {
71 myDemandElements.insert(std::make_pair(demandElementTagProperty.getTag(), std::unordered_map<const GUIGlObject*, GNEDemandElement*>()));
72 if (demandElementTagProperty.hasAttribute(
SUMO_ATTR_ID)) {
73 myDemandElementIDs.insert(std::make_pair(demandElementTagProperty.getTag(), std::map<const std::string, GNEDemandElement*>()));
77 for (
const auto& stopTagProperty : stopTagProperties) {
78 myDemandElements.insert(std::make_pair(stopTagProperty.getTag(), std::unordered_map<const GUIGlObject*, GNEDemandElement*>()));
82 for (
const auto& genericDataElementTagProperty : genericDataElementTagProperties) {
83 myGenericDatas.insert(std::make_pair(genericDataElementTagProperty.getTag(), std::unordered_map<const GUIGlObject*, GNEGenericData*>()));
87 for (
const auto& meanDataTagProperty : meanDataTagProperties) {
88 myMeanDatas.insert(std::make_pair(meanDataTagProperty.getTag(), std::map<const std::string, GNEMeanData*>()));
95 for (
const auto& edgeType : myEdgeTypes) {
96 edgeType.second->decRef(
"GNENetHelper::~GNENet");
98 WRITE_DEBUG(
"Deleting unreferenced " + edgeType.second->getTagStr() +
" '" + edgeType.second->getID() +
"' in AttributeCarriers destructor");
99 delete edgeType.second;
102 for (
const auto& edge : myEdges) {
103 edge.second->decRef(
"GNENetHelper::~GNENet");
105 WRITE_DEBUG(
"Deleting unreferenced " + edge.second->getTagStr() +
" '" + edge.second->getID() +
"' in AttributeCarriers destructor");
109 for (
const auto& junction : myJunctions) {
110 junction.second->decRef(
"GNENetHelper::~GNENet");
112 WRITE_DEBUG(
"Deleting unreferenced " + junction.second->getTagStr() +
" '" + junction.second->getID() +
"' in AttributeCarriers destructor");
113 delete junction.second;
116 for (
const auto& additionalTag : myAdditionals) {
117 for (
const auto& additional : additionalTag.second) {
119 additional.second->decRef();
121 WRITE_DEBUG(
"Deleting unreferenced " + additional.second->getTagStr() +
" in AttributeCarriers destructor");
122 delete additional.second;
126 for (
const auto& demandElementTag : myDemandElements) {
127 for (
const auto& demandElement : demandElementTag.second) {
129 demandElement.second->decRef();
131 if (demandElement.second->getTagProperty().isType()) {
134 WRITE_DEBUG(
"Deleting unreferenced " + demandElement.second->getTagStr() +
" in AttributeCarriers destructor");
137 WRITE_DEBUG(
"Deleting unreferenced " + demandElement.second->getTagStr() +
" in AttributeCarriers destructor");
139 delete demandElement.second;
143 for (
const auto& dataSet : myDataSets) {
145 dataSet.second->decRef();
147 WRITE_DEBUG(
"Deleting unreferenced " + dataSet.second->getTagStr() +
" in AttributeCarriers destructor");
148 delete dataSet.second;
151 for (
const auto& meanDataTag : myMeanDatas) {
152 for (
const auto& meanData : meanDataTag.second) {
154 meanData.second->decRef();
156 WRITE_DEBUG(
"Deleting unreferenced " + meanData.second->getTagStr() +
" in AttributeCarriers destructor");
157 delete meanData.second;
165 std::map<const std::string, GNEEdge*> newEdgeMap;
166 std::map<const std::string, GNEJunction*> newJunctionMap;
168 for (
const auto& edge : myEdges) {
169 edge.second->setEdgeID(edge.second->getNBEdge()->getID());
170 newEdgeMap[edge.second->getNBEdge()->getID()] = edge.second;
172 for (
const auto& junction : myJunctions) {
173 newJunctionMap[junction.second->getNBNode()->getID()] = junction.second;
174 junction.second->setNetworkElementID(junction.second->getNBNode()->getID());
176 myEdges = newEdgeMap;
177 myJunctions = newJunctionMap;
194 for (
const auto& lane : myEdges.at(AC->
getID())->getLanes()) {
225 return myNumberOfNetworkElements;
231 return myNumberOfDemandElements;
237 return myNumberOfDataElements;
246 if (
object !=
nullptr) {
252 throw ProcessError(
"GUIGlObject does not match the declared type");
256 }
else if (hardFail) {
257 throw ProcessError(
"Attempted to retrieve non-existant GUIGlObject");
264std::vector<GNEAttributeCarrier*>
266 std::vector<GNEAttributeCarrier*> result;
268 for (
const auto& junction : myJunctions) {
269 result.push_back(junction.second);
272 for (
const auto& edge : myEdges) {
273 result.push_back(edge.second);
276 for (
const auto& lane : myLanes) {
277 result.push_back(lane.second);
280 for (
const auto& connection : myConnections) {
281 result.push_back(connection.second);
284 for (
const auto& crossing : myCrossings) {
285 result.push_back(crossing.second);
288 for (
const auto& walkingArea : myWalkingAreas) {
289 result.push_back(walkingArea.second);
292 for (
const auto& additional : myAdditionals.at(tag)) {
293 result.push_back(additional.second);
297 if (mergingPlans.size() > 0) {
298 for (
const auto& mergingPlan : mergingPlans) {
299 for (
const auto& demandElemet : myDemandElements.at(mergingPlan.getTag())) {
300 result.push_back(demandElemet.second);
304 for (
const auto& demandElemet : myDemandElements.at(tag)) {
305 result.push_back(demandElemet.second);
309 for (
const auto& dataSet : myDataSets) {
310 result.push_back(dataSet.second);
313 for (
const auto& dataInterval : myDataIntervals) {
314 result.push_back(dataInterval.second);
317 for (
const auto& genericData : myGenericDatas.at(tag)) {
318 result.push_back(genericData.second);
321 for (
const auto& meanData : myMeanDatas.at(tag)) {
322 result.push_back(meanData.second);
329std::vector<GNEAttributeCarrier*>
331 std::vector<GNEAttributeCarrier*> result;
335 for (
const auto& junction : myJunctions) {
336 if (!onlySelected || junction.second->isAttributeCarrierSelected()) {
337 result.push_back(junction.second);
340 for (
const auto& crossing : myCrossings) {
341 if (!onlySelected || crossing.second->isAttributeCarrierSelected()) {
342 result.push_back(crossing.second);
345 for (
const auto& edge : myEdges) {
346 if (!onlySelected || edge.second->isAttributeCarrierSelected()) {
347 result.push_back(edge.second);
350 for (
const auto& lane : myLanes) {
351 if (!onlySelected || lane.second->isAttributeCarrierSelected()) {
352 result.push_back(lane.second);
355 for (
const auto& connection : myConnections) {
356 if (!onlySelected || connection.second->isAttributeCarrierSelected()) {
357 result.push_back(connection.second);
360 for (
const auto& additionalSet : myAdditionals) {
361 for (
const auto& additional : additionalSet.second) {
362 if (!onlySelected || additional.second->isAttributeCarrierSelected()) {
363 result.push_back(additional.second);
368 for (
const auto& demandElementSet : myDemandElements) {
369 for (
const auto& demandElement : demandElementSet.second) {
370 if (!onlySelected || demandElement.second->isAttributeCarrierSelected()) {
371 result.push_back(demandElement.second);
376 for (
const auto& dataSet : myDataSets) {
377 if (!onlySelected || dataSet.second->isAttributeCarrierSelected()) {
378 result.push_back(dataSet.second);
381 for (
const auto& dataInterval : myDataIntervals) {
382 if (!onlySelected || dataInterval.second->isAttributeCarrierSelected()) {
383 result.push_back(dataInterval.second);
386 for (
const auto& genericDataSet : myGenericDatas) {
387 for (
const auto& genericData : genericDataSet.second) {
388 if (!onlySelected || genericData.second->isAttributeCarrierSelected()) {
389 result.push_back(genericData.second);
393 for (
const auto& meanDataSet : myMeanDatas) {
394 for (
const auto& meanData : meanDataSet.second) {
395 if (!onlySelected || meanData.second->isAttributeCarrierSelected()) {
396 result.push_back(meanData.second);
405std::vector<GNEAttributeCarrier*>
408 const auto& editModes = myNet->getViewNet()->getEditModes();
410 std::vector<GNEAttributeCarrier*> result;
418 if (ignoreCurrentSupermode) {
419 result.push_back(AC);
421 result.push_back(AC);
423 result.push_back(AC);
425 result.push_back(AC);
435 auto it = myJunctions.find(
id);
436 if (it != myJunctions.end()) {
441 throw UnknownElement(
"Attempted to retrieve non-existant junction " +
id);
448const std::map<const std::string, GNEJunction*>&
454std::vector<GNEJunction*>
456 std::vector<GNEJunction*> result;
458 for (
const auto& junction : myJunctions) {
459 if (junction.second->isAttributeCarrierSelected()) {
460 result.push_back(junction.second);
470 junction->
incRef(
"GNENet::registerJunction");
473 myNumberOfNetworkElements++;
477 myNet->addGLObjectIntoGrid(junction);
495 auto junctionCopy = myJunctions;
499 for (
const auto& junction : junctionCopy) {
503 myJunctions[prefix + junction.first] = junction.second;
510 if (myJunctions.count(junction->
getID()) == 0) {
511 throw ProcessError(junction->
getTagStr() +
" with ID='" + junction->
getID() +
"' doesn't exist in AttributeCarriers.junction");
512 }
else if (myJunctions.count(newID) != 0) {
513 throw ProcessError(
"There is another " + junction->
getTagStr() +
" with new ID='" + newID +
"' in myJunctions");
518 myNet->getNetBuilder()->getNodeCont().rename(junction->
getNBNode(), newID);
522 myJunctions[junction->
getID()] = junction;
526 myNet->getSavingStatus()->requireSaveNetwork();
534 for (
const auto& junction : myJunctions) {
535 if (junction.second->isAttributeCarrierSelected()) {
545 auto it = myCrossings.find(glObject);
546 if (it != myCrossings.end()) {
558const std::unordered_map<const GUIGlObject*, GNECrossing*>&
564std::vector<GNECrossing*>
566 std::vector<GNECrossing*> result;
568 for (
const auto& crossing : myCrossings) {
569 if (crossing.second->isAttributeCarrierSelected()) {
570 result.push_back(crossing.second);
580 for (
const auto& crossing : myCrossings) {
581 if (crossing.second->isAttributeCarrierSelected()) {
591 auto it = myWalkingAreas.find(glObject);
592 if (it != myWalkingAreas.end()) {
604const std::unordered_map<const GUIGlObject*, GNEWalkingArea*>&
606 return myWalkingAreas;
610std::vector<GNEWalkingArea*>
612 std::vector<GNEWalkingArea*> result;
614 for (
const auto& walkingArea : myWalkingAreas) {
615 if (walkingArea.second->isAttributeCarrierSelected()) {
616 result.push_back(walkingArea.second);
626 for (
const auto& walkingArea : myWalkingAreas) {
627 if (walkingArea.second->isAttributeCarrierSelected()) {
637 if (myEdgeTypes.count(
id) > 0) {
638 return myEdgeTypes.at(
id);
639 }
else if (hardFail) {
641 throw UnknownElement(
"Attempted to retrieve non-existant EdgeType " +
id);
651 edgeType->
incRef(
"GNENet::registerEdgeType");
658const std::map<const std::string, GNEEdgeType*>&
671 if (myEdgeTypes.count(edgeType->
getID()) == 0) {
672 throw ProcessError(edgeType->
getTagStr() +
" with ID='" + edgeType->
getID() +
"' doesn't exist in AttributeCarriers.edgeType");
673 }
else if (myEdgeTypes.count(newID) != 0) {
674 throw ProcessError(
"There is another " + edgeType->
getTagStr() +
" with new ID='" + newID +
"' in myEdgeTypes");
677 myEdgeTypes.erase(edgeType->
getID());
679 myNet->getNetBuilder()->getTypeCont().updateEdgeTypeID(edgeType->
getID(), newID);
683 myEdgeTypes[edgeType->
getID()] = edgeType;
685 myNet->getSavingStatus()->requireSaveNetwork();
693 while (myEdgeTypes.count(
"edgeType_" +
toString(counter)) != 0) {
696 return (
"edgeType_" +
toString(counter));
702 auto it = myEdges.find(
id);
703 if (it != myEdges.end()) {
708 throw UnknownElement(
"Attempted to retrieve non-existant edge " +
id);
717 if ((from ==
nullptr) || (to ==
nullptr)) {
720 std::vector<GNEEdge*> edges;
723 if (edgeTo->getToJunction() == to) {
724 edges.push_back(edgeTo);
731const std::map<const std::string, GNEEdge*>&
739 std::vector<GNEEdge*> result;
741 for (
const auto& edge : myEdges) {
742 if (edge.second->isAttributeCarrierSelected()) {
743 result.push_back(edge.second);
752 edge->
incRef(
"GNENet::registerEdge");
756 myNumberOfNetworkElements++;
758 for (
const auto& lane : edge->
getLanes()) {
772 myNet->addGLObjectIntoGrid(edge);
786 auto edgeCopy = myEdges;
790 for (
const auto& edge : edgeCopy) {
794 myEdges[prefix + edge.first] = edge.second;
801 if (myEdges.count(edge->
getID()) == 0) {
803 }
else if (myEdges.count(newID) != 0) {
804 throw ProcessError(
"There is another " + edge->
getTagStr() +
" with new ID='" + newID +
"' in myEdges");
809 myNet->getNetBuilder()->getEdgeCont().rename(edge->
getNBEdge(), newID);
813 myEdges[edge->
getID()] = edge;
815 for (
const auto& lane : edge->
getLanes()) {
816 lane->updateConnectionIDs();
819 myNet->getSavingStatus()->requireSaveNetwork();
827 for (
const auto& edge : myEdges) {
828 if (edge.second->isAttributeCarrierSelected()) {
839 const GNEEdge* edge = retrieveEdge(edge_id,
false);
840 if (edge !=
nullptr) {
843 for (
auto laneIt : edge->
getLanes()) {
844 if (laneIt->getID() == id) {
849 if (lane ==
nullptr) {
856 if (checkVolatileChange && (myNet->getEdgesAndNumberOfLanes().count(edge_id) == 1) &&
857 myNet->getEdgesAndNumberOfLanes().at(edge_id) != (
int)edge->
getLanes().size()) {
862 }
else if (hardFail) {
872 auto it = myLanes.find(glObject);
873 if (it != myLanes.end()) {
885const std::unordered_map<const GUIGlObject*, GNELane*>&
893 std::vector<GNELane*> result;
895 for (
const auto& lane : myLanes) {
896 if (lane.second->isAttributeCarrierSelected()) {
897 result.push_back(lane.second);
907 for (
const auto& lane : myLanes) {
908 if (lane.second->isAttributeCarrierSelected()) {
919 for (
const auto& connection : myConnections) {
920 if (connection.second->getID() == id) {
921 return connection.second;
926 throw UnknownElement(
"Attempted to retrieve non-existant connection " +
id);
935 auto it = myConnections.find(glObject);
936 if (it != myConnections.end()) {
948const std::unordered_map<const GUIGlObject*, GNEConnection*>&
950 return myConnections;
954std::vector<GNEConnection*>
956 std::vector<GNEConnection*> result;
958 for (
const auto& connection : myConnections) {
959 if (connection.second->isAttributeCarrierSelected()) {
960 result.push_back(connection.second);
970 for (
const auto& connection : myConnections) {
971 if (connection.second->isAttributeCarrierSelected()) {
981 auto it = myInternalLanes.find(glObject);
982 if (it != myInternalLanes.end()) {
996 auto it = myAdditionalIDs.at(type).find(
id);
997 if (it != myAdditionalIDs.at(type).end()) {
1001 throw ProcessError(
"Attempted to retrieve non-existant additional (string)");
1010 for (
const auto& type : types) {
1011 auto it = myAdditionalIDs.at(type).find(
id);
1012 if (it != myAdditionalIDs.at(type).end()) {
1017 throw ProcessError(
"Attempted to retrieve non-existant additional (string)");
1027 for (
const auto& additionalTag : myAdditionals) {
1028 auto it = additionalTag.second.find(glObject);
1029 if (it != additionalTag.second.end()) {
1034 throw ProcessError(
"Attempted to retrieve non-existant additional (glObject)");
1060 throw ProcessError(
"Attempted to retrieve non-existant rerouter interval");
1064const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEAdditional*> >&
1066 return myAdditionals;
1070std::vector<GNEAdditional*>
1072 std::vector<GNEAdditional*> result;
1074 for (
const auto& additionalsTags : myAdditionals) {
1075 for (
const auto& additional : additionalsTags.second) {
1076 if (additional.second->isAttributeCarrierSelected()) {
1077 result.push_back(additional.second);
1085std::vector<GNEAdditional*>
1087 std::vector<GNEAdditional*> result;
1089 for (
const auto& additionalsTags : myAdditionals) {
1090 for (
const auto& additional : additionalsTags.second) {
1091 if (additional.second->getTagProperty().isShapeElement() && additional.second->isAttributeCarrierSelected()) {
1092 result.push_back(additional.second);
1103 for (
const auto& additionalsTag : myAdditionals) {
1104 counter += (int)additionalsTag.second.size();
1113 for (
const auto& additionalsTags : myAdditionals) {
1114 for (
const auto& additional : additionalsTags.second) {
1115 myNet->removeGLObjectFromGrid(additional.second);
1119 for (
auto& additionals : myAdditionals) {
1120 additionals.second.clear();
1122 for (
auto& additionals : myAdditionalIDs) {
1123 additionals.second.clear();
1131 const auto it = myAdditionalIDs.at(tag).find(additional->
getID());
1132 if (it == myAdditionalIDs.at(tag).end()) {
1133 throw ProcessError(additional->
getTagStr() +
" with ID='" + additional->
getID() +
"' doesn't exist in AttributeCarriers.additionals");
1136 myAdditionalIDs.at(tag).erase(it);
1139 myAdditionalIDs.at(tag)[newID] = additional;
1151 prefix = neteditOptions.getString(
"busStop-prefix");
1153 prefix = neteditOptions.getString(
"trainStop-prefix");
1155 prefix = neteditOptions.getString(
"containerStop-prefix");
1157 prefix = neteditOptions.getString(
"chargingStation-prefix");
1159 prefix = neteditOptions.getString(
"parkingArea-prefix");
1161 prefix = neteditOptions.getString(
"e1Detector-prefix");
1163 prefix = neteditOptions.getString(
"e2Detector-prefix");
1165 prefix = neteditOptions.getString(
"e3Detector-prefix");
1167 prefix = neteditOptions.getString(
"e1InstantDetector-prefix");
1169 prefix = neteditOptions.getString(
"rerouter-prefix");
1171 prefix = neteditOptions.getString(
"calibrator-prefix");
1173 prefix = neteditOptions.getString(
"routeProbe-prefix");
1175 prefix = neteditOptions.getString(
"vss-prefix");
1177 prefix = neteditOptions.getString(
"tractionSubstation-prefix");
1179 prefix = neteditOptions.getString(
"overheadWire-prefix");
1181 prefix = neteditOptions.getString(
"polygon-prefix");
1183 prefix = neteditOptions.getString(
"poi-prefix");
1187 prefix = neteditOptions.getString(
"jps.walkableArea-prefix");
1189 prefix = neteditOptions.getString(
"jps.obstacle-prefix");
1214 while (retrieveAdditional(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
1219 return (prefix +
"_" +
toString(counter));
1226 for (
const auto& additionalsTags : myAdditionals) {
1227 for (
const auto& additional : additionalsTags.second) {
1228 if (additional.second->isAttributeCarrierSelected()) {
1239 return getNumberOfSelectedAdditionals() -
1241 getNumberOfSelectedPolygons() - getNumberOfSelectedPOIs() -
1243 getNumberOfSelectedJpsWalkableAreas() - getNumberOfSelectedJpsObstacles() -
1245 getNumberOfSelectedTAZs() - getNumberOfSelectedTAZSources() - getNumberOfSelectedTAZSinks() -
1247 getNumberOfSelectedWires();
1255 if (poly.second->isAttributeCarrierSelected()) {
1267 if (walkableArea.second->isAttributeCarrierSelected()) {
1279 if (obstacle.second->isAttributeCarrierSelected()) {
1291 if (
POI.second->isAttributeCarrierSelected()) {
1296 if (POILane.second->isAttributeCarrierSelected()) {
1301 if (
POIGEO.second->isAttributeCarrierSelected()) {
1313 if (
TAZ.second->isAttributeCarrierSelected()) {
1325 if (TAZSource.second->isAttributeCarrierSelected()) {
1337 if (TAZSink.second->isAttributeCarrierSelected()) {
1348 for (
const auto& additionalsTags : myAdditionals) {
1349 for (
const auto& additional : additionalsTags.second) {
1350 if (additional.second->isAttributeCarrierSelected() && additional.second->getTagProperty().isWireElement()) {
1361 auto it = myDemandElementIDs.at(type).find(
id);
1362 if (it != myDemandElementIDs.at(type).end()) {
1366 throw ProcessError(
"Attempted to retrieve non-existant demand element (string)");
1375 for (
const auto& type : types) {
1376 auto it = myDemandElementIDs.at(type).find(
id);
1377 if (it != myDemandElementIDs.at(type).end()) {
1382 throw ProcessError(
"Attempted to retrieve non-existant demand element (string)");
1392 for (
const auto& demandElementTag : myDemandElements) {
1393 auto it = demandElementTag.second.find(glObject);
1394 if (it != demandElementTag.second.end()) {
1399 throw ProcessError(
"Attempted to retrieve non-existant demandElement (glObject)");
1406std::vector<GNEDemandElement*>
1408 std::vector<GNEDemandElement*> result;
1410 for (
const auto& demandElementTag : myDemandElements) {
1411 for (
const auto& demandElement : demandElementTag.second) {
1412 if (demandElement.second->isAttributeCarrierSelected()) {
1413 result.push_back(demandElement.second);
1421const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEDemandElement*> >&
1423 return myDemandElements;
1436 prefix = neteditOptions.getString(
"route-prefix");
1438 prefix = neteditOptions.getString(
"routeDistribution-prefix");
1440 prefix = neteditOptions.getString(
"vType-prefix");
1442 prefix = neteditOptions.getString(
"vTypeDistribution-prefix");
1444 prefix = neteditOptions.getString(
"trip-prefix");
1445 }
else if (tagProperty.isVehicle() && !tagProperty.isFlow()) {
1446 prefix = neteditOptions.getString(
"vehicle-prefix");
1447 }
else if (tagProperty.isPerson()) {
1448 if (tagProperty.isFlow()) {
1449 prefix = neteditOptions.getString(
"personflow-prefix");
1451 prefix = neteditOptions.getString(
"person-prefix");
1453 }
else if (tagProperty.isContainer()) {
1454 if (tagProperty.isFlow()) {
1455 prefix = neteditOptions.getString(
"containerflow-prefix");
1457 prefix = neteditOptions.getString(
"container-prefix");
1459 }
else if (tagProperty.isFlow()) {
1460 prefix = neteditOptions.getString(
"flow-prefix");
1485 while (retrieveDemandElement(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
1490 return (prefix +
"_" +
toString(counter));
1508 for (
const auto& demandElementsTags : myDemandElements) {
1509 for (
const auto& demandElement : demandElementsTags.second) {
1510 myNet->removeGLObjectFromGrid(demandElement.second);
1514 for (
auto& demandElements : myDemandElements) {
1515 demandElements.second.clear();
1517 for (
auto& demandElements : myDemandElementIDs) {
1518 demandElements.second.clear();
1526 const auto it = myDemandElementIDs.at(tag).find(demandElement->
getID());
1527 if (it == myDemandElementIDs.at(tag).end()) {
1528 throw ProcessError(demandElement->
getTagStr() +
" with ID='" + demandElement->
getID() +
"' doesn't exist in AttributeCarriers.demandElements");
1531 myDemandElementIDs.at(tag).erase(it);
1534 myDemandElementIDs.at(tag)[newID] = demandElement;
1544 myDemandElementIDs.at(defaultVehicleType->
getTagProperty().
getTag()).insert(std::make_pair(defaultVehicleType->
getID(), defaultVehicleType));
1545 defaultVehicleType->
incRef(
"GNENet::DEFAULT_VEHTYPE");
1550 myDemandElementIDs.at(defaultBikeType->
getTagProperty().
getTag()).insert(std::make_pair(defaultBikeType->
getID(), defaultBikeType));
1552 defaultBikeType->
incRef(
"GNENet::DEFAULT_BIKETYPE_ID");
1557 myDemandElementIDs.at(defaultTaxiType->
getTagProperty().
getTag()).insert(std::make_pair(defaultTaxiType->
getID(), defaultTaxiType));
1559 defaultTaxiType->
incRef(
"GNENet::DEFAULT_TAXITYPE_ID");
1564 myDemandElementIDs.at(defaultRailType->
getTagProperty().
getTag()).insert(std::make_pair(defaultRailType->
getID(), defaultRailType));
1566 defaultRailType->
incRef(
"GNENet::DEFAULT_RAILTYPE_ID");
1571 myDemandElementIDs.at(defaultPersonType->
getTagProperty().
getTag()).insert(std::make_pair(defaultPersonType->
getID(), defaultPersonType));
1573 defaultPersonType->
incRef(
"GNENet::DEFAULT_PEDTYPE_ID");
1578 myDemandElementIDs.at(defaultContainerType->
getTagProperty().
getTag()).insert(std::make_pair(defaultContainerType->
getID(), defaultContainerType));
1580 defaultContainerType->
incRef(
"GNENet::DEFAULT_CONTAINERTYPE_ID");
1586 return myStopIndex++;
1593 for (
const auto& demandElementsTags : myDemandElements) {
1594 for (
const auto& demandElement : demandElementsTags.second) {
1595 if (demandElement.second->isAttributeCarrierSelected()) {
1609 if (route.second->isAttributeCarrierSelected()) {
1615 if (vehicle.second->getChildDemandElements().front()->isAttributeCarrierSelected()) {
1620 if (flow.second->getChildDemandElements().front()->isAttributeCarrierSelected()) {
1633 if (vehicle.second->isAttributeCarrierSelected()) {
1637 for (
const auto& trip : myDemandElements.at(
SUMO_TAG_TRIP)) {
1638 if (trip.second->isAttributeCarrierSelected()) {
1643 if (vehicle.second->isAttributeCarrierSelected()) {
1647 for (
const auto& flow : myDemandElements.at(
SUMO_TAG_FLOW)) {
1648 if (flow.second->isAttributeCarrierSelected()) {
1653 if (flow.second->isAttributeCarrierSelected()) {
1658 if (flow.second->isAttributeCarrierSelected()) {
1671 if (person.second->isAttributeCarrierSelected()) {
1676 if (personFlow.second->isAttributeCarrierSelected()) {
1689 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1690 if (personPlan->getTagProperty().isPlanPersonTrip() && personPlan->isAttributeCarrierSelected()) {
1696 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1697 if (personPlan->getTagProperty().isPlanPersonTrip() && personPlan->isAttributeCarrierSelected()) {
1711 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1712 if (personPlan->getTagProperty().isPlanWalk() && personPlan->isAttributeCarrierSelected()) {
1718 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1719 if (personPlan->getTagProperty().isPlanWalk() && personPlan->isAttributeCarrierSelected()) {
1733 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1734 if (personPlan->getTagProperty().isPlanRide() && personPlan->isAttributeCarrierSelected()) {
1740 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1741 if (personPlan->getTagProperty().isPlanRide() && personPlan->isAttributeCarrierSelected()) {
1755 if (container.second->isAttributeCarrierSelected()) {
1760 if (containerFlow.second->isAttributeCarrierSelected()) {
1773 for (
const auto& containerPlan : container.second->getChildDemandElements()) {
1774 if (containerPlan->getTagProperty().isPlanTransport() && containerPlan->isAttributeCarrierSelected()) {
1780 for (
const auto& containerPlan : containerFlow.second->getChildDemandElements()) {
1781 if (containerPlan->getTagProperty().isPlanTransport() && containerPlan->isAttributeCarrierSelected()) {
1795 for (
const auto& containerPlan : container.second->getChildDemandElements()) {
1796 if (containerPlan->getTagProperty().isPlanTranship() && containerPlan->isAttributeCarrierSelected()) {
1802 for (
const auto& containerPlan : containerFlow.second->getChildDemandElements()) {
1803 if (containerPlan->getTagProperty().isPlanTranship() && containerPlan->isAttributeCarrierSelected()) {
1817 if (route.second->isAttributeCarrierSelected()) {
1822 for (
const auto& trip : myDemandElements.at(
SUMO_TAG_TRIP)) {
1823 for (
const auto& stop : trip.second->getChildDemandElements()) {
1824 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1830 for (
const auto& stop : vehicle.second->getChildDemandElements().front()->getChildDemandElements()) {
1831 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1836 for (
const auto& flow : myDemandElements.at(
SUMO_TAG_FLOW)) {
1837 for (
const auto& stop : flow.second->getChildDemandElements()) {
1838 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1844 for (
const auto& stop : flow.second->getChildDemandElements().front()->getChildDemandElements()) {
1845 if (stop->getTagProperty().isVehicleStop() && stop->isAttributeCarrierSelected()) {
1852 for (
const auto& personPlan : person.second->getChildDemandElements()) {
1853 if (personPlan->getTagProperty().isPlanStopPerson() && personPlan->isAttributeCarrierSelected()) {
1859 for (
const auto& personPlan : personFlow.second->getChildDemandElements()) {
1860 if (personPlan->getTagProperty().isPlanStopPerson() && personPlan->isAttributeCarrierSelected()) {
1867 for (
const auto& containerPlan : container.second->getChildDemandElements()) {
1868 if (containerPlan->getTagProperty().isPlanStopContainer() && containerPlan->isAttributeCarrierSelected()) {
1874 for (
const auto& containerPlan : containerFlow.second->getChildDemandElements()) {
1875 if (containerPlan->getTagProperty().isPlanStopContainer() && containerPlan->isAttributeCarrierSelected()) {
1886 for (
const auto& dataSet : myDataSets) {
1887 if (dataSet.second->getID() == id) {
1888 return dataSet.second;
1892 throw ProcessError(
"Attempted to retrieve non-existant data set");
1899const std::map<const std::string, GNEDataSet*>&
1909 while (retrieveDataSet(prefix + dataSetTagStr +
"_" +
toString(counter),
false) !=
nullptr) {
1912 return (prefix + dataSetTagStr +
"_" +
toString(counter));
1918 if (myDataIntervals.count(AC)) {
1919 return myDataIntervals.at(AC);
1920 }
else if (hardFail) {
1921 throw ProcessError(
"Attempted to retrieve non-existant data interval");
1928const std::unordered_map<const GNEAttributeCarrier*, GNEDataInterval*>&
1930 return myDataIntervals;
1936 if (myDataIntervals.count(AC) > 0) {
1939 myDataIntervals[AC] = dataInterval;
1942 myNet->getViewNet()->getIntervalBar().markForUpdate();
1948 const auto finder = myDataIntervals.find(dataInterval);
1949 if (finder == myDataIntervals.end()) {
1952 myDataIntervals.erase(finder);
1955 myNet->getViewNet()->getInspectedElements().uninspectAC(dataInterval);
1956 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(dataInterval);
1958 myNet->getViewNet()->getIntervalBar().markForUpdate();
1965 for (
const auto& genericDataTag : myGenericDatas) {
1966 auto it = genericDataTag.second.find(glObject);
1967 if (it != genericDataTag.second.end()) {
1972 throw ProcessError(
"Attempted to retrieve non-existant generic (glObject)");
1979std::vector<GNEGenericData*>
1981 std::vector<GNEGenericData*> result;
1983 for (
const auto& genericDataTag : myGenericDatas) {
1984 for (
const auto& genericData : genericDataTag.second) {
1985 if (genericData.second->isAttributeCarrierSelected()) {
1986 result.push_back(genericData.second);
1994const std::unordered_map<SumoXMLTag, std::unordered_map<const GUIGlObject*, GNEGenericData*> >&
1996 return myGenericDatas;
2000std::vector<GNEGenericData*>
2003 std::vector<GNEGenericData*> genericDatas;
2005 for (
const auto& genericData : myGenericDatas.at(genericDataTag)) {
2007 if ((genericData.second->getDataIntervalParent()->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) &&
2008 (genericData.second->getDataIntervalParent()->getAttributeDouble(
SUMO_ATTR_END) <= end)) {
2009 genericDatas.push_back(genericData.second);
2012 return genericDatas;
2020 for (
const auto& genericDataTag : myGenericDatas) {
2021 counter += (int)genericDataTag.second.size();
2032 if (genericData.second->isAttributeCarrierSelected()) {
2045 if (genericData.second->isAttributeCarrierSelected()) {
2058 if (genericData.second->isAttributeCarrierSelected()) {
2074 myNet->getViewNet()->getIntervalBar().markForUpdate();
2080 const auto finder = myGenericDatas.at(genericData->
getTagProperty().
getTag()).find(genericData);
2087 myNet->getViewNet()->getInspectedElements().uninspectAC(genericData);
2088 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(genericData);
2090 myNet->getDataPathManager()->removePath(genericData);
2092 myNet->getViewNet()->getIntervalBar().markForUpdate();
2096std::set<std::string>
2099 std::set<std::string> attributesSolution;
2101 std::vector<GNEGenericData*> genericDatas;
2103 for (
const auto& interval : myDataIntervals) {
2107 for (
const auto& genericData : interval.second->getGenericDataChildren()) {
2108 if (genericDataTag.empty() || (genericData->getTagProperty().getTagStr() == genericDataTag)) {
2109 genericDatas.push_back(genericData);
2115 for (
const auto& genericData : genericDatas) {
2116 for (
const auto& attribute : genericData->getParametersMap()) {
2117 attributesSolution.insert(attribute.first);
2120 return attributesSolution;
2124std::set<std::string>
2126 const std::string& beginStr,
const std::string& endStr)
const {
2128 std::set<std::string> attributesSolution;
2130 std::vector<GNEDataSet*> dataSets;
2131 std::vector<GNEDataInterval*> dataIntervals;
2133 GNEDataSet* retrievedDataSet = retrieveDataSet(dataSetID,
false);
2135 if (dataSetID.empty()) {
2137 dataSets.reserve(myDataSets.size());
2138 for (
const auto& dataSet : myDataSets) {
2139 dataSets.push_back(dataSet.second);
2141 }
else if (retrievedDataSet) {
2142 dataSets.push_back(retrievedDataSet);
2144 return attributesSolution;
2147 int numberOfIntervals = 0;
2148 for (
const auto& dataSet : dataSets) {
2149 numberOfIntervals += (int)dataSet->getDataIntervalChildren().size();
2152 dataIntervals.reserve(numberOfIntervals);
2154 for (
const auto& dataSet : dataSets) {
2155 for (
const auto& dataInterval : dataSet->getDataIntervalChildren()) {
2157 if (beginStr.empty() && endStr.empty()) {
2158 dataIntervals.push_back(dataInterval.second);
2159 }
else if (endStr.empty()) {
2161 const double begin = GNEAttributeCarrier::parse<double>(beginStr);
2162 if (dataInterval.second->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) {
2163 dataIntervals.push_back(dataInterval.second);
2165 }
else if (beginStr.empty()) {
2167 const double end = GNEAttributeCarrier::parse<double>(endStr);
2168 if (dataInterval.second->getAttributeDouble(
SUMO_ATTR_END) <= end) {
2169 dataIntervals.push_back(dataInterval.second);
2173 const double begin = GNEAttributeCarrier::parse<double>(beginStr);
2174 const double end = GNEAttributeCarrier::parse<double>(endStr);
2175 if ((dataInterval.second->getAttributeDouble(
SUMO_ATTR_BEGIN) >= begin) &&
2176 (dataInterval.second->getAttributeDouble(
SUMO_ATTR_END) <= end)) {
2177 dataIntervals.push_back(dataInterval.second);
2183 for (
const auto& dataInterval : dataIntervals) {
2184 for (
const auto& genericData : dataInterval->getGenericDataChildren()) {
2186 if (genericDataTag.empty() || (genericData->getTagProperty().getTagStr() == genericDataTag)) {
2187 for (
const auto& attribute : genericData->getParametersMap()) {
2188 attributesSolution.insert(attribute.first);
2193 return attributesSolution;
2199 for (
const auto& meanData : myMeanDatas.at(type)) {
2200 if (meanData.second->getID() == id) {
2201 return meanData.second;
2205 throw ProcessError(
"Attempted to retrieve non-existant meanData (string)");
2212const std::unordered_map<SumoXMLTag, std::map<const std::string, GNEMeanData*> >&
2221 for (
const auto& meanDatasTag : myMeanDatas) {
2222 counter += (int)meanDatasTag.second.size();
2231 for (
auto& meanDatas : myMeanDatas) {
2232 meanDatas.second.clear();
2244 prefix = neteditOptions.getString(
"meanDataEdge-prefix");
2246 prefix = neteditOptions.getString(
"meanDataLane-prefix");
2249 while (retrieveMeanData(tag, prefix +
"_" +
toString(counter),
false) !=
nullptr) {
2252 return (prefix +
"_" +
toString(counter));
2258 myNet->getNetBuilder()->getNodeCont().insert(junction->
getNBNode());
2259 registerJunction(junction);
2266 myNet->getViewNet()->getInspectedElements().uninspectAC(junction);
2267 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(junction);
2269 myNet->removeGLObjectFromGrid(junction);
2271 myNumberOfNetworkElements--;
2272 myNet->getNetBuilder()->getNodeCont().extract(junction->
getNBNode());
2273 junction->
decRef(
"GNENet::deleteSingleJunction");
2281 const auto& createEdgeFrame = myNet->getViewNet()->getViewParent()->getCreateEdgeFrame();
2284 myNumberOfNetworkElements++;
2286 if (myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->shown()) {
2287 myNet->getViewNet()->getViewParent()->getCreateEdgeFrame()->getEdgeTypeSelector()->refreshEdgeTypeSelector();
2290 createEdgeFrame->getEdgeTypeSelector()->setCurrentEdgeType(edgeType);
2297 const auto& createEdgeFrame = myNet->getViewNet()->getViewParent()->getCreateEdgeFrame();
2299 myNet->getViewNet()->getInspectedElements().uninspectAC(edgeType);
2300 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(edgeType);
2303 myNumberOfNetworkElements--;
2305 if (createEdgeFrame->getEdgeTypeSelector()->getEdgeTypeSelected() == edgeType) {
2306 createEdgeFrame->getEdgeTypeSelector()->clearEdgeTypeSelected();
2309 createEdgeFrame->getEdgeTypeSelector()->refreshEdgeTypeSelector();
2316 myNet->getNetBuilder()->getEdgeCont().insert(nbe);
2328 myNet->getViewNet()->getInspectedElements().uninspectAC(edge);
2329 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(edge);
2331 myNet->removeGLObjectFromGrid(edge);
2333 myNumberOfNetworkElements--;
2335 for (
const auto& lane : edge->
getLanes()) {
2339 myNet->getNetBuilder()->getEdgeCont().extract(myNet->getNetBuilder()->getDistrictCont(), edge->
getNBEdge());
2340 edge->
decRef(
"GNENet::deleteSingleEdge");
2363 myNumberOfNetworkElements++;
2371 if (finder == myLanes.end()) {
2374 myLanes.erase(finder);
2375 myNumberOfNetworkElements--;
2377 myNet->getViewNet()->getInspectedElements().uninspectAC(lane);
2378 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(lane);
2389 myNumberOfNetworkElements++;
2396 const auto finder = myCrossings.find(crossing->
getGUIGlObject());
2397 if (finder == myCrossings.end()) {
2400 myCrossings.erase(finder);
2401 myNumberOfNetworkElements--;
2403 myNet->getViewNet()->getInspectedElements().uninspectAC(crossing);
2404 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(crossing);
2415 myNumberOfNetworkElements++;
2422 const auto finder = myWalkingAreas.find(walkingArea->
getGUIGlObject());
2423 if (finder == myWalkingAreas.end()) {
2426 myWalkingAreas.erase(finder);
2427 myNumberOfNetworkElements--;
2429 myNet->getViewNet()->getInspectedElements().uninspectAC(walkingArea);
2430 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(walkingArea);
2441 myNumberOfNetworkElements++;
2448 const auto finder = myConnections.find(connection->
getGUIGlObject());
2449 if (finder == myConnections.end()) {
2452 myConnections.erase(finder);
2453 myNumberOfNetworkElements--;
2455 myNet->getViewNet()->getInspectedElements().uninspectAC(connection);
2456 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(connection);
2467 myNumberOfNetworkElements++;
2474 const auto finder = myInternalLanes.find(internalLane->
getGUIGlObject());
2475 if (finder == myInternalLanes.end()) {
2478 myInternalLanes.erase(finder);
2479 myNumberOfNetworkElements--;
2487 if (myAdditionals.at(tag).count(additional) > 0) {
2490 myAdditionals.at(tag)[additional->
getGUIGlObject()] = additional;
2492 myAdditionalIDs.at(tag)[additional->
getID()] = additional;
2494 myNumberOfNetworkElements++;
2497 myNet->addGLObjectIntoGrid(additional);
2500 if (myNet->isUpdateGeometryEnabled()) {
2504 myNet->getSavingStatus()->requireSaveAdditionals();
2513 auto itFind = myAdditionals.at(tag).find(additional->
getGUIGlObject());
2515 if (itFind == myAdditionals.at(tag).end()) {
2519 myAdditionals.at(tag).erase(itFind);
2521 myAdditionalIDs.at(tag).erase(myAdditionalIDs.at(tag).find(additional->
getID()));
2523 myNumberOfNetworkElements--;
2525 myNet->getViewNet()->getInspectedElements().uninspectAC(additional);
2526 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(additional);
2529 myNet->removeGLObjectFromGrid(additional);
2532 myNet->getNetworkPathManager()->removePath(additional);
2534 myNet->getSavingStatus()->requireSaveAdditionals();
2542 if (myDemandElements.at(tag).count(demandElement) > 0) {
2545 myDemandElements.at(tag)[demandElement->
getGUIGlObject()] = demandElement;
2546 myNumberOfDemandElements++;
2548 myDemandElementIDs.at(tag)[demandElement->
getID()] = demandElement;
2551 myNet->addGLObjectIntoGrid(demandElement);
2553 if (myNet->isUpdateGeometryEnabled()) {
2557 if (myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
2563 myNet->getSavingStatus()->requireSaveDemandElements();
2571 auto viewParent = myNet->getViewNet()->getViewParent();
2573 auto itFind = myDemandElements.at(tag).find(demandElement->
getGUIGlObject());
2575 if (itFind == myDemandElements.at(tag).end()) {
2579 myDemandElements.at(tag).erase(itFind);
2581 myDemandElementIDs.at(tag).erase(myDemandElementIDs.at(tag).find(demandElement->
getID()));
2583 myNumberOfDemandElements--;
2585 myNet->removeGLObjectFromGrid(demandElement);
2587 myNet->getViewNet()->getInspectedElements().uninspectAC(demandElement);
2588 viewParent->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(demandElement);
2589 viewParent->getPersonPlanFrame()->getPersonHierarchy()->removeCurrentEditedAttributeCarrier(demandElement);
2590 viewParent->getContainerPlanFrame()->getContainerHierarchy()->removeCurrentEditedAttributeCarrier(demandElement);
2591 if (viewParent->getRouteDistributionFrame()->getDistributionSelector()->getCurrentDistribution() == demandElement) {
2592 viewParent->getRouteDistributionFrame()->getDistributionSelector()->setDistribution(
nullptr);
2594 if (viewParent->getTypeDistributionFrame()->getDistributionSelector()->getCurrentDistribution() == demandElement) {
2595 viewParent->getTypeDistributionFrame()->getDistributionSelector()->setDistribution(
nullptr);
2598 if (myNet->getViewNet()->getLastCreatedRoute() == demandElement) {
2599 myNet->getViewNet()->setLastCreatedRoute(
nullptr);
2602 myNet->getDemandPathManager()->removePath(demandElement);
2608 myNet->getSavingStatus()->requireSaveDemandElements();
2615 if (myDataSets.count(dataSet->
getID()) > 0) {
2618 myDataSets[dataSet->
getID()] = dataSet;
2619 myNumberOfDataElements++;
2621 myNet->getSavingStatus()->requireSaveDataElements();
2623 myNet->getViewNet()->getIntervalBar().markForUpdate();
2630 const auto finder = myDataSets.find(dataSet->
getID());
2631 if (finder == myDataSets.end()) {
2634 myDataSets.erase(finder);
2635 myNumberOfDataElements--;
2637 myNet->getViewNet()->getInspectedElements().uninspectAC(dataSet);
2638 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(dataSet);
2640 myNet->getSavingStatus()->requireSaveDataElements();
2642 myNet->getViewNet()->getIntervalBar().markForUpdate();
2653 myNumberOfDataElements++;
2655 myNet->getSavingStatus()->requireSaveMeanDatas();
2669 myNet->getViewNet()->getInspectedElements().uninspectAC(meanData);
2670 myNet->getViewNet()->getViewParent()->getInspectorFrame()->getHierarchicalElementTree()->removeCurrentEditedAttributeCarrier(meanData);
2673 myNumberOfDataElements--;
2676 myNet->removeGLObjectFromGrid(meanData);
2679 myNet->getSavingStatus()->requireSaveMeanDatas();
2686 if (myNet->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
2688 switch (myNet->getViewNet()->getEditModes().demandEditMode) {
2690 if (tagProperty.
isType()) {
2691 myNet->getViewNet()->getViewParent()->getVehicleFrame()->getTypeSelector()->refreshDemandElementSelector();
2695 if (tagProperty.
isType()) {
2696 myNet->getViewNet()->getViewParent()->getTypeFrame()->getTypeSelector()->refreshTypeSelector(
true);
2700 if (tagProperty.
isType()) {
2701 myNet->getViewNet()->getViewParent()->getTypeDistributionFrame()->getDistributionSelector()->refreshDistributionSelector();
2706 myNet->getViewNet()->getViewParent()->getRouteDistributionFrame()->getDistributionSelector()->refreshDistributionSelector();
2710 if (tagProperty.
isType()) {
2711 myNet->getViewNet()->getViewParent()->getPersonFrame()->getTypeSelector()->refreshDemandElementSelector();
2716 myNet->getViewNet()->getViewParent()->getPersonPlanFrame()->getPersonSelector()->refreshDemandElementSelector();
2720 if (tagProperty.
isType()) {
2721 myNet->getViewNet()->getViewParent()->getContainerFrame()->getTypeSelector()->refreshDemandElementSelector();
2726 myNet->getViewNet()->getViewParent()->getContainerPlanFrame()->getContainerSelector()->refreshDemandElementSelector();
2730 myNet->getViewNet()->getViewParent()->getStopFrame()->getStopParentSelector()->refreshDemandElementSelector();
2749 mySumoConfigSaved =
false;
2755 mySumoConfigSaved =
true;
2761 return mySumoConfigSaved;
2768 myNeteditConfigSaved =
false;
2774 myNeteditConfigSaved =
true;
2780 return myNeteditConfigSaved;
2786 myNetworkSaved =
false;
2788 myNeteditConfigSaved =
false;
2789 mySumoConfigSaved =
false;
2795 myNetworkSaved =
true;
2801 return myNetworkSaved;
2825 myEdgeTypeSaved =
false;
2831 myEdgeTypeSaved =
true;
2837 return myEdgeTypeSaved;
2843 myAdditionalSaved =
false;
2845 myNeteditConfigSaved =
false;
2846 mySumoConfigSaved =
false;
2852 myAdditionalSaved =
true;
2858 return myAdditionalSaved;
2864 myDemandElementSaved =
false;
2866 myNeteditConfigSaved =
false;
2867 mySumoConfigSaved =
false;
2873 myDemandElementSaved =
true;
2879 return myDemandElementSaved;
2885 myDataElementSaved =
false;
2887 myNeteditConfigSaved =
false;
2888 mySumoConfigSaved =
false;
2894 myDataElementSaved =
true;
2900 return myDataElementSaved;
2906 myMeanDataElementSaved =
false;
2908 myNeteditConfigSaved =
false;
2909 mySumoConfigSaved =
false;
2915 myMeanDataElementSaved =
true;
2921 return myMeanDataElementSaved;
2931 myReplaced(replaced),
2942 myTllcont.replaceRemoved(myBy, -1, myReplaced, -1,
true);
2949 myTllcont.replaceRemoved(myReplaced, -1, myBy, -1,
true);
2955 return TL(
"Redo replace in TLS");
2961 return TL(
"Undo replace in TLS");
2967 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..)
@ DEMAND_PERSONPLAN
Mode for editing person plan.
@ DEMAND_CONTAINER
Mode for editing container.
@ DEMAND_ROUTEDISTRIBUTION
Mode for editing route distributions.
@ DEMAND_PERSON
Mode for editing person.
@ DEMAND_TYPEDISTRIBUTION
Mode for editing type distributions.
@ DEMAND_VEHICLE
Mode for editing vehicles.
@ DEMAND_STOP
Mode for editing stops.
@ DEMAND_CONTAINERPLAN
Mode for editing container plan.
@ DEMAND_TYPE
Mode for editing types.
GUISelectedStorage gSelected
A global holder of selected objects.
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
const long long int VTYPEPARS_VEHICLECLASS_SET
const std::string DEFAULT_TAXITYPE_ID
const std::string DEFAULT_RAILTYPE_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
@ SVC_IGNORING
vehicles ignoring classes
@ SVC_RAIL
vehicle is a not electrified rail
@ 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_BIKETYPE_ID
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_TRIP_JUNCTIONS
a trip between junctions
@ SUMO_TAG_TRACTION_SUBSTATION
A traction substation.
@ GNE_TAG_TRIP_TAZS
a single trip definition that uses TAZs
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_REROUTER
A rerouter.
@ SUMO_TAG_EDGEREL
a relation between two edges
@ GNE_TAG_MULTI_LANE_AREA_DETECTOR
an e2 detector over multiple lanes (placed here due create Additional Frame)
@ SUMO_TAG_ROUTEPROBE
a routeprobe detector
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
@ SUMO_TAG_CONTAINER_STOP
A container stop.
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ SUMO_TAG_MEANDATA_LANE
a lane based mean data detector
@ SUMO_TAG_VEHICLE
description of a vehicle
@ GNE_TAG_FLOW_ROUTE
a flow definition using a route instead of a from-to edges route
@ SUMO_TAG_ROUTE_DISTRIBUTION
distribution of a route
@ GNE_TAG_POIGEO
Point of interest over view with GEO attributes.
@ GNE_TAG_FLOW_WITHROUTE
description of a vehicle with an embedded route
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ SUMO_TAG_CONNECTION
connectioon between two lanes
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_WALKINGAREA
walking area for pedestrians
@ GNE_TAG_CALIBRATOR_LANE
A calibrator placed over lane.
@ 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_OVERHEAD_WIRE_SECTION
An overhead wire section.
@ SUMO_TAG_TRAIN_STOP
A train stop (alias for bus stop)
@ SUMO_TAG_VTYPE_DISTRIBUTION
distribution of a vehicle type
@ 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
@ GNE_TAG_POILANE
Point of interest over Lane.
@ GNE_TAG_JPS_OBSTACLE
polygon used for draw juPedSim obstacles
@ SUMO_TAG_LANE_AREA_DETECTOR
alternative tag for e2 detector
@ SUMO_TAG_TAZREL
a relation between two TAZs
@ SUMO_TAG_TAZSOURCE
a source within a district (connection road)
@ SUMO_TAG_INDUCTION_LOOP
alternative tag for e1 detector
@ GNE_TAG_JPS_WALKABLEAREA
polygon used for draw juPedSim walkable areas
@ SUMO_TAG_CALIBRATOR
A calibrator placed over edge.
@ SUMO_TAG_ENTRY_EXIT_DETECTOR
alternative tag for 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 belong to GNENet but has influence in the simulation.
virtual void updateGeometry()=0
update pre-computed geometry information
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
const GUIGeometry & getAdditionalGeometry() const
obtain additional geometry
virtual Position getPositionInView() const =0
Returns position of additional in view.
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
static const std::vector< GNETagProperties > getTagPropertiesByType(const int tagPropertyCategory, const bool mergeCommonPlans)
get tagProperties associated to the given GNETagProperties::TagType (NETWORKELEMENT,...
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
static const std::vector< GNETagProperties > getTagPropertiesByMergingTag(SumoXMLTag mergingTag)
get tagProperties associated to the given merging tag
virtual GUIGlObject * getGUIGlObject()=0
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 belong to GNENet but has influence in the simulation.
virtual void updateGeometry()=0
update pre-computed geometry information
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
virtual void computePathElement()=0
compute pathElement
A road/street connecting two junctions (netedit-version)
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
void setResponsible(bool newVal)
set responsibility for deleting internal structures
NBEdge * getNBEdge() const
returns the internal NBEdge
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
void setEdgeID(const std::string &newID)
set edge ID
GNEJunction * getFromJunction() const
get from Junction (only used to increase readability)
GNEJunction * getToJunction() const
get from Junction (only used to increase readability)
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
An Element which don't belong to GNENet but has influence in the simulation.
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
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)
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
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
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void addIncomingGNEEdge(GNEEdge *edge)
add incoming GNEEdge
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
const std::vector< GNEEdge * > & getGNEOutgoingEdges() const
Returns incoming GNEEdges.
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
An Element which don't belong to GNENet but has influence in the simulation.
std::vector< GNEEdge * > retrieveEdges(GNEJunction *from, GNEJunction *to) const
get all edges by from and to GNEJunction
void insertWalkingArea(GNEWalkingArea *walkingArea)
insert walkingArea in container
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 (Including POIs, Polygons, TAZs and Wires)
const std::unordered_map< const GUIGlObject *, GNEConnection * > & getConnections() const
get connections
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEDemandElement * > > & getDemandElements() const
get demand elements
int getNumberOfSelectedJpsObstacles() const
get number of selected obstacles
int getNumberOfSelectedConnections() const
get number of selected connections
void deleteDataSet(GNEDataSet *dataSet)
delete data set of container
void addPrefixToJunctions(const std::string &prefix)
add prefix to all junctions
void insertLane(GNELane *lane)
insert lane in container
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 containers
std::vector< GNEAdditional * > getSelectedShapes() const
get selected shapes
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
std::unordered_map< SumoXMLTag, std::map< const std::string, GNEMeanData * > > myMeanDatas
map with the tag and pointer to meanData elements of net
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEAdditional * > > & getAdditionals() const
get additionals
void insertDataSet(GNEDataSet *dataSet)
Insert a data set in container.
int getNumberOfSelectedRides() const
get number of selected rides
void clearDemandElements()
clear demand elements
const std::unordered_map< const GUIGlObject *, GNECrossing * > & getCrossings() const
get crossings
void insertGenericData(GNEGenericData *genericData)
insert generic data in container
GNEEdge * registerEdge(GNEEdge *edge)
registers an edge with containers
void deleteDemandElement(GNEDemandElement *demandElement, const bool updateFrames)
delete demand element of container
void insertDataInterval(const GNEAttributeCarrier *AC, GNEDataInterval *dataInterval)
insert data interval in container
int getNumberOfSelectedPersonTrips() const
get number of selected person trips
std::string generateDemandElementID(SumoXMLTag tag) const
generate demand element id
int getNumberOfMeanDatas() const
get number of meanDatas
GNECrossing * retrieveCrossing(const GUIGlObject *glObject, bool hardFail=true) const
get Crossing by AC
void addPrefixToEdges(const std::string &prefix)
add prefix to all edges
void remapJunctionAndEdgeIds()
remap junction and edge IDs
const std::map< const std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
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 deleteEdgeType(GNEEdgeType *edgeType)
delete edge type from container
int getNumberOfSelectedJpsWalkableAreas() const
get number of selected walkable areas
std::string generateDataSetID(const std::string &prefix) const
generate data set id
void deleteInternalLane(GNEInternalLane *internalLane)
delete internalLane from container
void deleteConnection(GNEConnection *connection)
delete connection from container
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
void insertInternalLane(GNEInternalLane *internalLane)
insert internalLane in container
int getStopIndex()
get (and update) stop index
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::vector< GNEWalkingArea * > getSelectedWalkingAreas() const
return all selected walkingAreas
void deleteSingleJunction(GNEJunction *junction)
delete junction from container
GNEMeanData * retrieveMeanData(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named meanData.
GNEJunction * registerJunction(GNEJunction *junction)
registers a junction in containers
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEGenericData * > > & getGenericDatas() const
get all generic datas
int getNumberOfSelectedWalkingAreas() const
get number of selected walkingAreas
GNEWalkingArea * retrieveWalkingArea(const GUIGlObject *glObject, bool hardFail=true) const
get WalkingArea by GlObject
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
const std::map< const std::string, GNEDataSet * > & getDataSets() const
get demand elements
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 of container
~AttributeCarriers()
destructor
void insertCrossing(GNECrossing *crossing)
insert crossing in container
int getNumberOfSelectedWires() const
get number of selected Wires
std::string generateMeanDataID(SumoXMLTag type) const
generate meanData id
void insertMeanData(GNEMeanData *meanData)
Insert a meanData element in container.
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
int getNumberOfSelectedTAZs() const
get number of selected TAZs
void deleteWalkingArea(GNEWalkingArea *walkingArea)
delete walkingArea from container
int getNumberOfSelectedTransport() const
get number of selected transports
std::vector< GNELane * > getSelectedLanes() const
get selected lanes
void insertConnection(GNEConnection *connection)
insert connection in container
std::vector< GNEAdditional * > getSelectedAdditionals() const
get selected additionals
int getNumberOfSelectedJunctions() const
get number of selected junctions
int getNumberOfDataElements() const
get number of current data elements saved in AttributeCarriers
int getNumberOfGenericDatas() const
Return the number of generic datas.
void updateAdditionalID(GNEAdditional *additional, const std::string &newID)
update additional ID in container
int getNumberOfSelectedDemandElements() const
get number of selected demand elements
int getNumberOfSelectedPersons() const
get number of selected persons
int getNumberOfSelectedPureAdditionals() const
get number of selected pure additionals (Except POIs, Polygons, TAZs and Wires)
GNEEdgeType * retrieveEdgeType(const std::string &id, bool hardFail=true) const
get edge type by id
void deleteMeanData(GNEMeanData *meanData)
delete meanData element of container
GNEAdditional * retrieveAdditionals(const std::vector< SumoXMLTag > types, const std::string &id, bool hardFail=true) const
Returns the named additional.
int getNumberOfSelectedRoutes() const
get number of selected routes
void addDefaultVTypes()
add default VTypes
int getNumberOfSelectedPOIs() const
get number of selected POIs
void deleteSingleEdge(GNEEdge *edge)
delete edge from container
GNEDemandElement * retrieveDemandElements(const std::vector< SumoXMLTag > types, const std::string &id, bool hardFail=true) const
Returns the named demand element.
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
void deleteAdditional(GNEAdditional *additional)
delete additional element of container
int getNumberOfDemandElements() const
get number of current demand elements saved in AttributeCarriers (default vTypes are NOT included)
const std::unordered_map< SumoXMLTag, std::map< const std::string, GNEMeanData * > > & getMeanDatas() const
get meanDatas
int getNumberOfSelectedPolygons() const
get number of selected polygons
std::vector< GNEJunction * > getSelectedJunctions() const
return selected junctions
std::unordered_map< SumoXMLTag, std::map< const std::string, GNEAdditional * > > myAdditionalIDs
map with the tag and pointer to additional elements of net, sorted by IDs
int getNumberOfAdditionals() const
get number of additionals
void updateDemandElementID(GNEDemandElement *demandElement, const std::string &newID)
update demand element ID in container
void insertEdge(GNEEdge *edge)
void insertDemandElement(GNEDemandElement *demandElement)
Insert a demand element in container.
const std::map< const std::string, GNEJunction * > & getJunctions() const
get junctions
void updateEdgeID(GNEEdge *edge, const std::string &newID)
update edge ID in container
GNEDataInterval * retrieveDataInterval(const GNEAttributeCarrier *AC, bool hardFail=true) const
Returns the data interval.
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
GNEInternalLane * retrieveInternalLane(const GUIGlObject *glObject, bool hardFail=true) const
get InternalLane by GUIGlObject
int getNumberOfSelectedTAZSources() const
get number of selected TAZSources
void insertAdditional(GNEAdditional *additional)
Insert a additional element in container.
std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEDemandElement * > > myDemandElements
map with the tag and pointer to additional elements of net
void insertEdgeType(GNEEdgeType *edgeType)
insert edge type in container
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
const std::unordered_map< const GUIGlObject *, GNELane * > & getLanes() const
get lanes
const std::unordered_map< const GNEAttributeCarrier *, GNEDataInterval * > & getDataIntervals() const
get all data intervals of network
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 from container
void clearEdges()
clear edges
void insertJunction(GNEJunction *junction)
insert junction in container
std::vector< GNEEdge * > getSelectedEdges() const
return all edges
int getNumberOfNetworkElements() const
functions related with number of elements sorted by categories
std::unordered_map< SumoXMLTag, std::map< const std::string, GNEDemandElement * > > myDemandElementIDs
map with the tag and pointer to demand elements of net, sorted by IDs
int getNumberOfSelectedTAZSinks() const
get number of selected TAZSinks
void updateDemandElementFrames(const GNETagProperties &tagProperty)
update demand element frames (called after insert/delete demand element)
int getNumberOfSelectedEdges() const
get number of selected edges
void clearMeanDatas()
clear meanDatas
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
const std::unordered_map< const GUIGlObject *, GNEWalkingArea * > & getWalkingAreas() const
get walkingAreas
void deleteCrossing(GNECrossing *crossing)
delete crossing from container
GNEDemandElement * getDefaultType() const
get default type
const std::map< const std::string, GNEEdgeType * > & getEdgeTypes() const
map with the ID and pointer to edgeTypes of net
GNEGenericData * retrieveGenericData(const GUIGlObject *glObject, bool hardFail=true) const
Returns the generic data.
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
std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEGenericData * > > myGenericDatas
map with the tag and pointer to all generic datas
void deleteDataInterval(GNEDataInterval *dataInterval)
delete data interval of container
std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEAdditional * > > myAdditionals
map with the tag and pointer to additional elements of net
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()
destructor
std::string redoName() const
get Redo name
bool trueChange()
wether original and new value differ
void requireSaveTLS()
inform that TLS has to be saved
void dataElementsSaved()
mark demand elements as saved
bool isEdgeTypeSaved() const
check if edgeType are saved
SavingStatus()
constructor
void requireSaveNetwork()
inform that network has to be saved
void requireSaveEdgeType()
inform that edgeType has to be saved
bool isTLSSaved() const
check if TLS are saved
void demandElementsSaved()
mark demand elements as saved
void SumoConfigSaved()
mark SumoConfig as saved
void additionalsSaved()
mark additionals as saved
void requireSaveNeteditConfig()
inform that netedit config has to be saved
void requireSaveSumoConfig()
inform that SumoConfig has to be saved
void TLSSaved()
mark TLS as saved
bool isSumoConfigSaved() const
check if SumoConfig is saved
void neteditConfigSaved()
mark netedit config as saved
void requireSaveMeanDatas()
inform that mean data elements has to be saved
void meanDatasSaved()
mark mean data elements as saved
bool isDemandElementsSaved() const
check if demand elements are saved
void requireSaveAdditionals()
inform that additionals has to be saved
bool isDataElementsSaved() const
check if data elements are saved
bool isNetworkSaved() const
check if network is saved
bool isMeanDatasSaved() const
check if mean data elements are saved
void requireSaveDataElements()
inform that data elements has to be saved
bool isNeteditConfigSaved() const
check if netedit config is saved
void networkSaved()
mark network as saved
bool isAdditionalsSaved() const
check if additionals are saved
void requireSaveDemandElements()
inform that demand elements has to be saved
void edgeTypeSaved()
mark edgeType as saved
A NBNetBuilder extended by visualisation and editing capabilities.
void setNetworkElementID(const std::string &newID)
set network element id
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
void decRef(const std::string &debugMsg="")
Decrease reference.
void incRef(const std::string &debugMsg="")
Increase reference.
bool isMeanData() const
return true if tag correspond to a mean data element
bool isContainer() const
return true if tag correspond to a container element
bool isGenericData() const
data elements
bool isNetworkElement() const
element sets
bool isDataElement() const
return true if tag correspond to a data element
bool isType() const
demand elements
bool isRoute() const
return true if tag correspond to a route element
bool isPlacedInRTree() const
return true if Tag correspond to an element that 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 (note: this include TAZ, shapes and wires)
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
bool isPerson() const
return true if tag correspond to a person element
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
const PositionVector & getShape() const
The shape of the additional element.
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.
GUIGlObject * getObjectBlocking(GUIGlID id) const
Returns the object from the container locking it.
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
const std::unordered_set< GUIGlID > & getSelected() const
Returns the set of ids of all selected objects.
The representation of a single edge during network building.
NBNode * getToNode() const
Returns the destination node of the edge.
const std::string & getID() const
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 Position & getPosition() const
const PositionVector & getShape() const
retrieve the junction shape
A container for traffic light definitions and built programs.
const std::string & getID() const
Returns the id.
static const std::vector< SumoXMLTag > types
type namespace
static const std::vector< SumoXMLTag > busStops
busStops namespace
static const std::vector< SumoXMLTag > vehicles
vehicles namespace
static const std::vector< SumoXMLTag > laneAreaDetectors
lane area detectors namespace
static const std::vector< SumoXMLTag > POIs
POIs namespace.
static const std::vector< SumoXMLTag > routes
route namespace
static const std::vector< SumoXMLTag > persons
persons namespace
static const std::vector< SumoXMLTag > calibrators
calibrators namespace
static const std::vector< SumoXMLTag > polygons
polygon namespace
static const std::vector< SumoXMLTag > containers
containers namespace
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.
long long int parametersSet
Information for the router which parameter were set.
static std::string getEdgeIDFromLane(const std::string laneID)
return edge id when given the lane ID