87 sourcePlusSinkColor(0),
88 sourceMinusSinkColor(0),
89 myCurrentTAZParent(CurrentTAZParent) {
98 sourceColor = GNEAttributeCarrier::parse<int>(source->getAttribute(
GNE_ATTR_TAZCOLOR));
99 sinkColor = GNEAttributeCarrier::parse<int>(sink->getAttribute(
GNE_ATTR_TAZCOLOR));
101 double sourcePlusSinkWeight = source->getDepartWeight() + sink->getDepartWeight();
103 if ((myCurrentTAZParent->myMaxSourcePlusSinkWeight - myCurrentTAZParent->myMinSourcePlusSinkWeight) == 0) {
104 sourcePlusSinkColor = 0;
107 double percentage = (sourcePlusSinkWeight - myCurrentTAZParent->myMinSourcePlusSinkWeight) /
108 (myCurrentTAZParent->myMaxSourcePlusSinkWeight - myCurrentTAZParent->myMinSourcePlusSinkWeight);
110 if (percentage >= 1) {
111 sourcePlusSinkColor = 9;
112 }
else if (percentage < 0) {
113 sourcePlusSinkColor = 0;
115 sourcePlusSinkColor = (int)(percentage * 10);
119 double sourceMinusSinkWeight = source->getDepartWeight() - sink->getDepartWeight();
121 if ((myCurrentTAZParent->myMaxSourceMinusSinkWeight - myCurrentTAZParent->myMinSourceMinusSinkWeight) == 0) {
122 sourceMinusSinkColor = 0;
125 double percentage = (sourceMinusSinkWeight - myCurrentTAZParent->myMinSourceMinusSinkWeight) /
126 (myCurrentTAZParent->myMaxSourceMinusSinkWeight - myCurrentTAZParent->myMinSourceMinusSinkWeight);
128 if (percentage >= 1) {
129 sourceMinusSinkColor = 9;
130 }
else if (percentage < 0) {
131 sourceMinusSinkColor = 0;
133 sourceMinusSinkColor = (int)(percentage * 10);
145 sourcePlusSinkColor(0),
146 sourceMinusSinkColor(0),
147 myCurrentTAZParent(nullptr) {
170 myEditedTAZ = editedTAZ;
172 if (myEditedTAZ !=
nullptr) {
173 myCurrentTAZLabel->setText((
"Current TAZ: " + myEditedTAZ->getID()).c_str());
179 myTAZFrameParent->myTAZParameters->hideTAZParametersModule();
181 myTAZFrameParent->myDrawingShape->hideDrawingShape();
183 myTAZFrameParent->myTAZCommonStatistics->showTAZCommonStatisticsModule();
185 myTAZFrameParent->myTAZSaveChanges->showTAZSaveChangesModule();
187 myTAZFrameParent->myTAZChildDefaultParameters->extendTAZChildDefaultParameters();
189 myTAZFrameParent->myTAZEdgesGraphic->showTAZEdgesGraphicModule();
192 myTAZFrameParent->myTAZParameters->showTAZParametersModule();
194 myTAZFrameParent->myDrawingShape->showDrawingShape();
196 myTAZFrameParent->myTAZCommonStatistics->hideTAZCommonStatisticsModule();
198 myTAZFrameParent->myTAZChildDefaultParameters->collapseTAZChildDefaultParameters();
200 myTAZFrameParent->myTAZEdgesGraphic->hideTAZEdgesGraphicModule();
202 myTAZFrameParent->myTAZSaveChanges->hideTAZSaveChangesModule();
204 myCurrentTAZLabel->setText(
TL(
"No TAZ selected"));
206 mySelectedEdges.clear();
208 myMaxSourcePlusSinkWeight = 0;
209 myMinSourcePlusSinkWeight = -1;
210 myMaxSourceMinusSinkWeight = 0;
211 myMinSourceMinusSinkWeight = -1;
235const std::vector<GNEEdge*>&
237 return mySelectedEdges;
241const std::vector<GNETAZFrame::CurrentTAZ::TAZEdgeColor>&
243 return myTAZEdgeColors;
250 myTAZEdgeColors.clear();
252 myMaxSourcePlusSinkWeight = 0;
253 myMinSourcePlusSinkWeight = -1;
254 myMaxSourceMinusSinkWeight = 0;
255 myMinSourceMinusSinkWeight = -1;
259 myEditedTAZ->updateTAZStadistic();
260 myTAZFrameParent->myTAZCommonStatistics->updateStatistics();
262 for (
const auto& TAZElement : myEditedTAZ->getChildAdditionals()) {
270 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
281 bool createTAZEdge =
true;
284 createTAZEdge =
false;
296 myTAZEdgeColors.push_back(
TAZEdgeColor(
this, edge, sourceSink,
nullptr));
298 myTAZEdgeColors.push_back(
TAZEdgeColor(
this, edge,
nullptr, sourceSink));
302 myMaxSourcePlusSinkWeight = 0;
303 myMinSourcePlusSinkWeight = -1;
304 myMaxSourceMinusSinkWeight = 0;
305 myMinSourceMinusSinkWeight = -1;
312 if (sourcePlusSink > myMaxSourcePlusSinkWeight) {
313 myMaxSourcePlusSinkWeight = sourcePlusSink;
316 if ((myMinSourcePlusSinkWeight == -1) || (sourcePlusSink < myMinSourcePlusSinkWeight)) {
317 myMinSourcePlusSinkWeight = sourcePlusSink;
322 if (sourceMinusSink < 0) {
323 sourceMinusSink *= -1;
326 if (sourceMinusSink > myMaxSourceMinusSinkWeight) {
327 myMaxSourceMinusSinkWeight = sourceMinusSink;
330 if ((myMinSourceMinusSinkWeight == -1) || (sourceMinusSink < myMinSourceMinusSinkWeight)) {
331 myMinSourceMinusSinkWeight = sourceMinusSink;
346 myTAZFrameParent(TAZFrameParent) {
371 if (myTAZFrameParent->myCurrentTAZ->getTAZ()) {
373 std::ostringstream information;
375 <<
TL(
"- Number of edges: ") <<
toString(myTAZFrameParent->myCurrentTAZ->getTAZ()->getChildAdditionals().size() / 2) <<
"\n"
376 <<
TL(
"- Min source: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MIN_SOURCE) <<
"\n"
377 <<
TL(
"- Max source: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MAX_SOURCE) <<
"\n"
380 <<
TL(
"- Min sink: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MIN_SINK) <<
"\n"
381 <<
TL(
"- Max sink: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MAX_SINK) <<
"\n"
384 myStatisticsLabel->setText(information.str().c_str());
386 myStatisticsLabel->setText(
TL(
"No TAZ Selected"));
396 myTAZFrameParent(TAZFrameParent) {
418 onCmdCancelChanges(0, 0, 0);
426 if (!mySaveChangesButton->isEnabled()) {
428 mySaveChangesButton->enable();
429 myCancelChangesButton->enable();
431 myTAZFrameParent->myViewNet->getUndoList()->begin(
GUIIcon::TAZ,
"TAZ changes");
439 return myTAZFrameParent->shown() && mySaveChangesButton->isEnabled();
446 if (mySaveChangesButton->isEnabled()) {
448 mySaveChangesButton->disable();
449 myCancelChangesButton->disable();
451 myTAZFrameParent->myViewNet->getUndoList()->end();
453 myTAZFrameParent->myCurrentTAZ->refreshTAZEdges();
455 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
465 if (mySaveChangesButton->isEnabled()) {
467 mySaveChangesButton->disable();
468 myCancelChangesButton->disable();
470 myTAZFrameParent->myViewNet->getUndoList()->abortAllChangeGroups();
472 myTAZFrameParent->myCurrentTAZ->refreshTAZEdges();
474 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
485 myTAZFrameParent(TAZFrameParent),
486 myDefaultTAZSourceWeight(1),
487 myDefaultTAZSinkWeight(1) {
509 std::ostringstream information;
511 <<
TL(
"- Toggle Membership:\n")
512 <<
" Create new Sources/Sinks\n"
513 <<
" with given weights.";
526 if (myToggleMembership->getCheck() == FALSE) {
527 myTAZFrameParent->myTAZSelectionStatistics->showTAZSelectionStatisticsModule();
529 myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModule();
532 updateSelectEdgesButton();
534 myToggleMembershipFrame->show();
535 myDefaultTAZSourceFrame->show();
536 myDefaultTAZSinkFrame->show();
537 myUseSelectedEdges->show();
538 myInformationLabel->show();
545 myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModule();
547 myToggleMembershipFrame->hide();
548 myDefaultTAZSourceFrame->hide();
549 myDefaultTAZSinkFrame->hide();
550 myUseSelectedEdges->hide();
551 myInformationLabel->hide();
557 if (myToggleMembership->getCheck() == TRUE) {
559 if (myTAZFrameParent->myCurrentTAZ->getSelectedEdges().size() > 0) {
560 myUseSelectedEdges->setText(
TL(
"Use selected edges"));
561 myUseSelectedEdges->enable();
562 }
else if (myTAZFrameParent->myCurrentTAZ->getTAZEdges().size() > 0) {
563 myUseSelectedEdges->setText(
TL(
"Remove all edges"));
564 myUseSelectedEdges->enable();
566 myUseSelectedEdges->setText(
TL(
"Use selected edges"));
567 myUseSelectedEdges->disable();
569 }
else if (myTAZFrameParent->getCurrentTAZModule()->getTAZEdges().size() > 0) {
571 myUseSelectedEdges->enable();
573 if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size() == 0) {
575 bool allSelected =
true;
576 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
577 if (!TAZEdgeColor.edge->isAttributeCarrierSelected()) {
582 myUseSelectedEdges->setText(
TL(
"Remove all edges from selection"));
584 myUseSelectedEdges->setText(
TL(
"Add all edges to selection"));
586 }
else if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size() == 1) {
587 if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().front().edge->isAttributeCarrierSelected()) {
588 myUseSelectedEdges->setText(
TL(
"Remove edge from selection"));
590 myUseSelectedEdges->setText(
TL(
"Add edge to selection"));
594 bool allSelected =
true;
595 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
596 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
601 myUseSelectedEdges->setText((
"Remove " +
toString(myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size()) +
" from to selection").c_str());
603 myUseSelectedEdges->setText((
"Add " +
toString(myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size()) +
" edges to selection").c_str());
608 myUseSelectedEdges->disable();
615 return myDefaultTAZSourceWeight;
621 return myDefaultTAZSinkWeight;
627 return (myToggleMembership->getCheck() == TRUE);
634 if (obj == myToggleMembership) {
636 myTAZFrameParent->myTAZSelectionStatistics->clearSelectedEdges();
638 if (myToggleMembership->getCheck() == TRUE) {
639 myToggleMembership->setText(
TL(
"toggle"));
641 myDefaultTAZSourceFrame->show();
642 myDefaultTAZSinkFrame->show();
644 std::ostringstream information;
646 <<
TL(
"- Toggle Membership:\n")
647 <<
" Create new Sources/Sinks\n"
648 <<
" with given weights.";
649 myInformationLabel->setText(information.str().c_str());
651 myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModule();
653 if (myTAZFrameParent->myCurrentTAZ->getSelectedEdges().size() > 0) {
654 myUseSelectedEdges->setText(
TL(
"Use selected edges"));
655 }
else if (myTAZFrameParent->myCurrentTAZ->getTAZEdges().size() > 0) {
656 myUseSelectedEdges->setText(
TL(
"Remove all edges"));
658 myUseSelectedEdges->setText(
TL(
"Use selected edges"));
659 myUseSelectedEdges->disable();
662 myToggleMembership->setText(
TL(
"keep"));
664 myDefaultTAZSourceFrame->hide();
665 myDefaultTAZSinkFrame->hide();
667 std::ostringstream information;
669 <<
TL(
"- Keep Membership:\n")
670 <<
" Select Sources/Sinks.\n"
671 <<
TL(
"- Press ESC to clear\n")
672 <<
" current selection.";
673 myInformationLabel->setText(information.str().c_str());
675 myTAZFrameParent->myTAZSelectionStatistics->showTAZSelectionStatisticsModule();
678 updateSelectEdgesButton();
679 }
else if (obj == myTextFieldDefaultValueTAZSources) {
681 if (GNEAttributeCarrier::canParse<double>(myTextFieldDefaultValueTAZSources->getText().text())) {
682 myDefaultTAZSourceWeight = GNEAttributeCarrier::parse<double>(myTextFieldDefaultValueTAZSources->getText().text());
684 if (myDefaultTAZSourceWeight >= 0) {
686 myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(0, 0, 0));
689 myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(255, 0, 0));
690 myDefaultTAZSourceWeight = 1;
694 myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(255, 0, 0));
695 myDefaultTAZSourceWeight = 1;
697 }
else if (obj == myTextFieldDefaultValueTAZSinks) {
699 if (GNEAttributeCarrier::canParse<double>(myTextFieldDefaultValueTAZSinks->getText().text())) {
700 myDefaultTAZSinkWeight = GNEAttributeCarrier::parse<double>(myTextFieldDefaultValueTAZSinks->getText().text());
702 if (myDefaultTAZSinkWeight >= 0) {
704 myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(0, 0, 0));
707 myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(255, 0, 0));
708 myDefaultTAZSinkWeight = 1;
712 myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(255, 0, 0));
713 myDefaultTAZSinkWeight = 1;
723 if (myToggleMembership->getCheck() == TRUE) {
725 myTAZFrameParent->dropTAZMembers();
727 for (
const auto& selectedEdge : myTAZFrameParent->myCurrentTAZ->getSelectedEdges()) {
728 myTAZFrameParent->addOrRemoveTAZMember(selectedEdge);
731 updateSelectEdgesButton();
733 if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size() == 0) {
735 bool allSelected =
true;
736 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
737 if (!TAZEdgeColor.edge->isAttributeCarrierSelected()) {
744 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
746 TAZEdgeColor.edge->unselectAttributeCarrier();
750 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
752 TAZEdgeColor.edge->selectAttributeCarrier();
757 bool allSelected =
true;
758 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
759 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
766 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
767 if (selectedEdge.edge->isAttributeCarrierSelected()) {
769 selectedEdge.edge->unselectAttributeCarrier();
774 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
775 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
777 selectedEdge.edge->selectAttributeCarrier();
784 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
786 myTAZFrameParent->myViewNet->updateViewNet();
795 myTAZFrameParent->getViewNet()->getNet()->computeAndUpdate(oc,
false);
796 myTAZFrameParent->getViewNet()->update();
798 std::vector<GNEAdditional*> sources;
799 std::vector<GNEAdditional*> sinks;
800 std::set<GNEAdditional*> TAZs;
802 if (myTAZFrameParent->myCurrentTAZ->getTAZ() !=
nullptr) {
804 for (
const auto& TAZSourceSink : myTAZFrameParent->myCurrentTAZ->getTAZ()->getChildAdditionals()) {
807 if (!TAZSourceSink->getParentEdges().front()->hasSuccessors() &&
809 sources.push_back(TAZSourceSink);
810 TAZs.insert(myTAZFrameParent->myCurrentTAZ->getTAZ());
814 if (!TAZSourceSink->getParentEdges().front()->hasPredecessors() &&
816 sinks.push_back(TAZSourceSink);
817 TAZs.insert(myTAZFrameParent->myCurrentTAZ->getTAZ());
823 for (
const auto&
TAZ : myTAZFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getAdditionals().at(
SUMO_TAG_TAZ)) {
825 for (
const auto& TAZSourceSink :
TAZ->getChildAdditionals()) {
828 if (!TAZSourceSink->getParentEdges().front()->hasSuccessors() &&
830 sources.push_back(TAZSourceSink);
835 if (!TAZSourceSink->getParentEdges().front()->hasPredecessors() &&
837 sinks.push_back(TAZSourceSink);
845 if ((sources.size() + sinks.size()) > 0) {
847 const std::string text = (TAZs.size() == 1) ?
849 "Set weight 0 in " +
toString(sources.size()) +
" sources and " +
850 toString(sinks.size()) +
" sinks from TAZ '" + (*TAZs.begin())->getID() +
"'?" :
852 "Set weight 0 in " +
toString(sources.size()) +
" sources and " +
855 const FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
TL(
"Set zero fringe probabilities"),
"%s", text.c_str());
857 myTAZFrameParent->myViewNet->getUndoList()->begin(
GUIIcon::TAZ,
"set zero fringe probabilities");
858 for (
const auto& source : sources) {
859 source->setAttribute(
SUMO_ATTR_WEIGHT,
"0", myTAZFrameParent->myViewNet->getUndoList());
861 for (
const auto& sink : sinks) {
862 sink->setAttribute(
SUMO_ATTR_WEIGHT,
"0", myTAZFrameParent->myViewNet->getUndoList());
864 myTAZFrameParent->myViewNet->getUndoList()->end();
868 FXMessageBox::information(
this, MBOX_OK,
TL(
"Set zero fringe probabilities"),
"No source/sinks to update.");
879 myTAZFrameParent(TAZFrameParent) {
909 clearSelectedEdges();
917 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
918 if (selectedEdge.edge == TAZEdgeColor.
edge) {
923 myEdgeAndTAZChildrenSelected.push_back(TAZEdgeColor);
927 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
929 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
938 for (
auto it = myEdgeAndTAZChildrenSelected.begin(); it != myEdgeAndTAZChildrenSelected.end(); it++) {
939 if (it->edge == edge) {
940 myEdgeAndTAZChildrenSelected.erase(it);
944 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
946 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
961 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
962 if (selectedEdge.edge == edge) {
974 myEdgeAndTAZChildrenSelected.clear();
978 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
980 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
984const std::vector<GNETAZFrame::CurrentTAZ::TAZEdgeColor>&
986 return myEdgeAndTAZChildrenSelected;
992 if (obj == myTextFieldTAZSourceWeight) {
994 if (GNEAttributeCarrier::canParse<double>(myTextFieldTAZSourceWeight->getText().text())) {
995 double newTAZSourceWeight = GNEAttributeCarrier::parse<double>(myTextFieldTAZSourceWeight->getText().text());
997 if (newTAZSourceWeight >= 0) {
999 myTextFieldTAZSourceWeight->setTextColor(FXRGB(0, 0, 0));
1001 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1003 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1004 selectedEdge.source->setAttribute(
SUMO_ATTR_WEIGHT, myTextFieldTAZSourceWeight->getText().text(), myTAZFrameParent->myViewNet->getUndoList());
1007 myTAZFrameParent->getCurrentTAZModule()->refreshTAZEdges();
1010 myTextFieldTAZSourceWeight->setTextColor(FXRGB(255, 0, 0));
1014 myTextFieldTAZSourceWeight->setTextColor(FXRGB(255, 0, 0));
1016 }
else if (obj == myTextFieldTAZSinkWeight) {
1018 if (GNEAttributeCarrier::canParse<double>(myTextFieldTAZSinkWeight->getText().text())) {
1019 double newTAZSinkWeight = GNEAttributeCarrier::parse<double>(myTextFieldTAZSinkWeight->getText().text());
1021 if (newTAZSinkWeight >= 0) {
1023 myTextFieldTAZSinkWeight->setTextColor(FXRGB(0, 0, 0));
1025 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1027 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1028 selectedEdge.sink->setAttribute(
SUMO_ATTR_WEIGHT, myTextFieldTAZSinkWeight->getText().text(), myTAZFrameParent->myViewNet->getUndoList());
1031 myTAZFrameParent->getCurrentTAZModule()->refreshTAZEdges();
1034 myTextFieldTAZSinkWeight->setTextColor(FXRGB(255, 0, 0));
1038 myTextFieldTAZSinkWeight->setTextColor(FXRGB(255, 0, 0));
1047 if (myEdgeAndTAZChildrenSelected.size() == 0) {
1049 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
1051 if (!TAZEdgeColor.edge->isAttributeCarrierSelected()) {
1053 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1055 TAZEdgeColor.edge->setAttribute(
GNE_ATTR_SELECTED,
"true", myTAZFrameParent->myViewNet->getUndoList());
1060 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1062 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
1064 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1066 selectedEdge.edge->setAttribute(
GNE_ATTR_SELECTED,
"true", myTAZFrameParent->myViewNet->getUndoList());
1076 if (myEdgeAndTAZChildrenSelected.size() > 0) {
1078 myTAZSourceFrame->show();
1079 myTAZSinkFrame->show();
1081 std::set<std::string> weightSourceSet;
1082 std::set<std::string> weightSinkSet;
1085 double maxWeightSource = 0;
1086 double minWeightSource = -1;
1087 double averageWeightSource = 0;
1088 double maxWeightSink = 0;
1089 double minWeightSink = -1;
1090 double averageWeightSink = 0;
1092 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1094 weight = selectedEdge.source->getDepartWeight();
1096 weightSourceSet.insert(
toString(weight));
1098 if (maxWeightSource < weight) {
1099 maxWeightSource = weight;
1102 if (minWeightSource == -1 || (maxWeightSource < weight)) {
1103 minWeightSource = weight;
1106 averageWeightSource += weight;
1108 weight = selectedEdge.sink->getDepartWeight();
1110 weightSinkSet.insert(
toString(weight));
1112 if (maxWeightSink < weight) {
1113 maxWeightSink = weight;
1116 if (minWeightSink == -1 || (maxWeightSink < weight)) {
1117 minWeightSink = weight;
1120 averageWeightSink += weight;
1123 averageWeightSource /= (double)myEdgeAndTAZChildrenSelected.size();
1124 averageWeightSink /= (double)myEdgeAndTAZChildrenSelected.size();
1126 std::ostringstream information;
1127 std::string edgeInformation;
1129 if (myEdgeAndTAZChildrenSelected.size() == 1) {
1130 edgeInformation =
"- Edge ID: " + myEdgeAndTAZChildrenSelected.begin()->edge->getID();
1132 edgeInformation =
"- Number of edges: " +
toString(myEdgeAndTAZChildrenSelected.size());
1136 << edgeInformation <<
"\n"
1137 <<
TL(
"- Min source: ") <<
toString(minWeightSource) <<
"\n"
1138 <<
TL(
"- Max source: ") <<
toString(maxWeightSource) <<
"\n"
1139 <<
TL(
"- Average source: ") <<
toString(averageWeightSource) <<
"\n"
1141 <<
TL(
"- Min sink: ") <<
toString(minWeightSink) <<
"\n"
1142 <<
TL(
"- Max sink: ") <<
toString(maxWeightSink) <<
"\n"
1143 <<
TL(
"- Average sink: ") <<
toString(averageWeightSink);
1145 myStatisticsLabel->setText(information.str().c_str());
1147 myTextFieldTAZSourceWeight->setText(
joinToString(weightSourceSet,
" ").c_str());
1148 myTextFieldTAZSourceWeight->setTextColor(FXRGB(0, 0, 0));
1149 myTextFieldTAZSinkWeight->setText(
joinToString(weightSinkSet,
" ").c_str());
1150 myTextFieldTAZSinkWeight->setTextColor(FXRGB(0, 0, 0));
1153 myTAZSourceFrame->hide();
1154 myTAZSinkFrame->hide();
1156 myStatisticsLabel->setText(
TL(
"No edges selected"));
1166 myTAZFrameParent(TAZFrameParent),
1167 myTAZTemplate(nullptr) {
1199 delete myTAZTemplate;
1205 MFXGroupBoxModule::show();
1211 MFXGroupBoxModule::hide();
1217 const bool validColor = GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text());
1218 const bool validCenter = myTextFieldCenter->getText().empty() || GNEAttributeCarrier::canParse<Position>(myTextFieldCenter->getText().text());
1220 return (validColor && validCenter && validName);
1226 return (myAddEdgesWithinCheckButton->getCheck() == TRUE);
1233 if (myTAZFrameParent->myBaseTAZ) {
1235 delete myTAZFrameParent->myBaseTAZ;
1242 myTAZFrameParent->myBaseTAZ->addPositionAttribute(
SUMO_ATTR_CENTER, myTextFieldCenter->getText().empty() ?
Position::INVALID : GNEAttributeCarrier::parse<Position>(myTextFieldCenter->getText().text()));
1243 myTAZFrameParent->myBaseTAZ->addBoolAttribute(
SUMO_ATTR_FILL, (myCheckButtonFill->getCheck() == TRUE));
1244 myTAZFrameParent->myBaseTAZ->addColorAttribute(
SUMO_ATTR_COLOR, GNEAttributeCarrier::parse<RGBColor>(myTextFieldColor->getText().text()));
1245 myTAZFrameParent->myBaseTAZ->addStringAttribute(
SUMO_ATTR_NAME, myTextFieldName->getText().text());
1252 FXColorDialog colordialog(getCollapsableFrame(), tr(
"Color Dialog"));
1253 colordialog.setTarget(
this);
1255 if (GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text())) {
1256 colordialog.setRGBA(
MFXUtils::getFXColor(GNEAttributeCarrier::parse<RGBColor>(myTextFieldColor->getText().text())));
1261 if (colordialog.execute()) {
1263 onCmdSetAttribute(0, 0, 0);
1271 if (obj == myTextFieldColor) {
1273 if (GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text())) {
1274 myTextFieldColor->setTextColor(FXRGB(0, 0, 0));
1275 myTextFieldColor->killFocus();
1277 myTextFieldColor->setTextColor(FXRGB(255, 0, 0));
1279 }
else if (obj == myTextFieldCenter) {
1281 if (myTextFieldCenter->getText().empty() || GNEAttributeCarrier::canParse<RGBColor>(myTextFieldCenter->getText().text())) {
1282 myTextFieldCenter->setTextColor(FXRGB(0, 0, 0));
1283 myTextFieldCenter->killFocus();
1285 myTextFieldCenter->setTextColor(FXRGB(255, 0, 0));
1287 }
else if (obj == myTextFieldName) {
1290 myTextFieldName->setTextColor(FXRGB(0, 0, 0));
1291 myTextFieldName->killFocus();
1293 myTextFieldName->setTextColor(FXRGB(255, 0, 0));
1295 }
else if (obj == myAddEdgesWithinCheckButton) {
1297 if (myAddEdgesWithinCheckButton->getCheck() == TRUE) {
1298 myAddEdgesWithinCheckButton->setText(
TL(
"use"));
1300 myAddEdgesWithinCheckButton->setText(
TL(
"not use"));
1302 }
else if (obj == myCheckButtonFill) {
1304 if (myCheckButtonFill->getCheck() == TRUE) {
1305 myCheckButtonFill->setText(
TL(
"true"));
1307 myCheckButtonFill->setText(
TL(
"false"));
1316 myTAZFrameParent->openHelpAttributesDialog(myTAZTemplate);
1326 myTAZFrameParent(TAZFrameParent),
1327 myEdgeDefaultColor(
RGBColor::GREY),
1328 myEdgeSelectedColor(
RGBColor::MAGENTA) {
1365 for (
const auto& edge : myTAZFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
1366 for (
const auto& lane : edge.second->getLanes()) {
1367 lane->setSpecialColor(
nullptr);
1378 for (
const auto& edge : myTAZFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
1379 if (!edge.second->isAttributeCarrierSelected()) {
1381 for (
const auto lane : edge.second->getLanes()) {
1382 lane->setSpecialColor(&myEdgeDefaultColor);
1387 for (
const auto& TAZEdgeColor : myTAZFrameParent->myCurrentTAZ->getTAZEdges()) {
1388 if (!TAZEdgeColor.edge->isAttributeCarrierSelected()) {
1390 for (
const auto& lane : TAZEdgeColor.edge->getLanes()) {
1392 if (myColorBySourceWeight->getCheck() == TRUE) {
1393 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sourceColor), TAZEdgeColor.source->getDepartWeight());
1394 }
else if (myColorBySinkWeight->getCheck() == TRUE) {
1395 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sinkColor), TAZEdgeColor.sink->getDepartWeight());
1396 }
else if (myColorBySourcePlusSinkWeight->getCheck() == TRUE) {
1397 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sourcePlusSinkColor), TAZEdgeColor.source->getDepartWeight() + TAZEdgeColor.sink->getDepartWeight());
1399 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sourceMinusSinkColor), TAZEdgeColor.source->getDepartWeight() - TAZEdgeColor.sink->getDepartWeight());
1405 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
1406 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
1408 for (
const auto& lane : selectedEdge.edge->getLanes()) {
1409 lane->setSpecialColor(&myEdgeSelectedColor);
1414 myTAZFrameParent->myViewNet->updateViewNet();
1421 if (obj == myColorBySourceWeight) {
1422 myColorBySinkWeight->setCheck(FALSE);
1423 myColorBySourcePlusSinkWeight->setCheck(FALSE);
1424 myColorBySourceMinusSinkWeight->setCheck(FALSE);
1425 }
else if (obj == myColorBySinkWeight) {
1426 myColorBySourceWeight->setCheck(FALSE);
1427 myColorBySourcePlusSinkWeight->setCheck(FALSE);
1428 myColorBySourceMinusSinkWeight->setCheck(FALSE);
1429 }
else if (obj == myColorBySourcePlusSinkWeight) {
1430 myColorBySourceWeight->setCheck(FALSE);
1431 myColorBySinkWeight->setCheck(FALSE);
1432 myColorBySourceMinusSinkWeight->setCheck(FALSE);
1433 }
else if (obj == myColorBySourceMinusSinkWeight) {
1434 myColorBySourceWeight->setCheck(FALSE);
1435 myColorBySinkWeight->setCheck(FALSE);
1436 myColorBySourcePlusSinkWeight->setCheck(FALSE);
1448 GNEFrame(viewParent, viewNet,
"TAZs"),
1498 std::map<SumoXMLAttr, std::string> valuesOfElement;
1532 if (TAZEdgeColor.edge == objectsUnderCursor.
getEdgeFront()) {
1559 for (
const auto& edge : edges) {
1568 for (
const auto& edge : edges) {
1573 if (TAZEdgeColor.edge == edge) {
1631 std::vector<std::string> edgeIDs;
1634 for (
const auto& AC : ACsInBoundary) {
1635 if ((AC.second->getTagProperty().getTag() ==
SUMO_TAG_EDGE) &&
1637 edgeIDs.push_back(AC.first);
1661 if (TAZEdgeColor.edge == edge) {
FXDEFMAP(GNETAZFrame::TAZParameters) TAZParametersMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_CANCEL
Cancel-button pressed.
@ MID_GNE_SET_ATTRIBUTE_DIALOG
attribute edited trough dialog
@ MID_CHOOSEN_OPERATION
set type of selection
@ MID_OK
Ok-button pressed.
@ MID_GNE_SELECT
select element
@ MID_GNE_SET_ZEROFRINGEPROB
set zero fringe probabilities (used in TAZ Frame)
#define GUIDesignLabelLeft
#define GUIDesignLabelCenter
label extended over frame without thick and with text justify to center
#define GUIDesignButtonAttribute
button extended over over column with thick and raise frame
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame
#define GUIDesignButtonRectangular
little button rectangula used in frames (For example, in "help" buttons)
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignRadioButton
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
#define WRITE_WARNING(msg)
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
@ SUMO_TAG_TAZSOURCE
a source within a district (connection road)
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ GNE_ATTR_MAX_SOURCE
max source (used only by TAZs)
@ GNE_ATTR_TAZCOLOR
Color of TAZSources/TAZSinks.
@ GNE_ATTR_MAX_SINK
max sink (used only by TAZs)
@ GNE_ATTR_AVERAGE_SINK
average sink (used only by TAZs)
@ GNE_ATTR_SELECTED
element is selected
@ GNE_ATTR_MIN_SINK
min sink (used only by TAZs)
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_SHAPE
edge: the shape in xml-definition
@ SUMO_ATTR_FILL
Fill the polygon.
@ GNE_ATTR_AVERAGE_SOURCE
average source (used only by TAZs)
@ SUMO_ATTR_COLOR
A color information.
@ GNE_ATTR_MIN_SOURCE
min source (used only by TAZs)
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
const Position & getPositionAttribute(const SumoXMLAttr attr) const
get Position attribute
void addPositionVectorAttribute(const SumoXMLAttr attr, const PositionVector &value)
add PositionVector attribute into current SumoBaseObject node
void addStringListAttribute(const SumoXMLAttr attr, const std::vector< std::string > &value)
add string list attribute into current SumoBaseObject node
void addPositionAttribute(const SumoXMLAttr attr, const Position &value)
add Position attribute into current SumoBaseObject node
void addStringAttribute(const SumoXMLAttr attr, const std::string &value)
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc.....
An Element which don't belong to GNENet but has influence in the simulation.
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * getNet() const
get pointer to net
bool isDrawing() const
return true if currently a shape is drawed
void addNewPoint(const Position &P)
add new point to temporal shape
bool getDeleteLastCreatedPoint()
get flag delete last created point
void removeLastPoint()
remove last added point
const PositionVector & getTemporalShape() const
get Temporal shape
A road/street connecting two junctions (netedit-version)
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
GNEViewNet * getViewNet() const
get view net
GNEViewNet * myViewNet
FOX need this.
virtual void show()
show Frame
virtual void hide()
hide Frame
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
bool isNetworkElementAroundShape(GNEAttributeCarrier *AC, const PositionVector &shape) const
check if shape of given AC (network element) is around the given shape
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
std::vector< GNEEdge * > getSelectedEdges() const
return all edges
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
struct for edges and the source/sink colors
GNETAZSourceSink * sink
@brif sink TAZ
void updateColors()
update colors
GNETAZSourceSink * source
source TAZ
TAZEdgeColor()
default color
~TAZEdgeColor()
destructor (needed because RGBColors has to be deleted)
void refreshTAZEdges()
refresh TAZEdges
double myMinSourceMinusSinkWeight
minimum source minus sink value of current TAZ Edges
bool isTAZEdge(GNEEdge *edge) const
check if given edge belongs to current TAZ
GNETAZFrame * myTAZFrameParent
pointer to TAZ Frame
GNETAZ * myEditedTAZ
current edited TAZ
const std::vector< CurrentTAZ::TAZEdgeColor > & getTAZEdges() const
get TAZEdges
void setTAZ(GNETAZ *editedTAZ)
set current TAZ
void addTAZChild(GNETAZSourceSink *additional)
add TAZChild
const std::vector< GNEEdge * > & getSelectedEdges() const
get current selected edges
double myMaxSourceMinusSinkWeight
maximum source minus sink value of current TAZ Edges
FXLabel * myCurrentTAZLabel
Label for current TAZ.
CurrentTAZ(GNETAZFrame *TAZFrameParent)
constructor
double myMaxSourcePlusSinkWeight
maximum source plus sink value of current TAZ Edges
double myMinSourcePlusSinkWeight
minimum source plus sink value of current TAZ Edges
GNETAZ * getTAZ() const
get current TAZ
bool getToggleMembership() const
check if toggle membership is enabled
FXButton * myUseSelectedEdges
button for use selected edges
TAZChildDefaultParameters(GNETAZFrame *TAZFrameParent)
FOX-declaration.
FXCheckButton * myToggleMembership
CheckButton to enable or disable Toggle edge Membership.
void collapseTAZChildDefaultParameters()
collapse TAZ child default parameters Module (if we have selected a TAZ)
FXTextField * myTextFieldDefaultValueTAZSources
textField to set a default value for TAZ Sources
long onCmdUseSelectedEdges(FXObject *obj, FXSelector, void *)
Called when the user press "use selected edges" button.
void updateSelectEdgesButton()
update "select edges button"
double getDefaultTAZSourceWeight() const
get default source weight
void extendTAZChildDefaultParameters()
extend TAZ child default parameters Module (if we have selected a TAZ)
FXLabel * myInformationLabel
information label
FXHorizontalFrame * myDefaultTAZSinkFrame
Horizontal Frame for default TAZ Sink Weight.
FXHorizontalFrame * myDefaultTAZSourceFrame
Horizontal Frame for default TAZ Source Weight.
FXHorizontalFrame * myToggleMembershipFrame
Horizontal Frame toggle membership.
~TAZChildDefaultParameters()
destructor
long onCmdSetZeroFringeProbabilities(FXObject *obj, FXSelector, void *)
Called when the user press "zero fringe probabilities" button.
FXTextField * myTextFieldDefaultValueTAZSinks
textField to set a default value for TAZ Sinks
long onCmdSetDefaultValues(FXObject *obj, FXSelector, void *)
double getDefaultTAZSinkWeight() const
default sink weight
FXButton * myZeroFringeProbabilities
button for setting zero fringe probabilities
void showTAZCommonStatisticsModule()
show TAZ Common Statistics Module
TAZCommonStatistics(GNETAZFrame *TAZFrameParent)
constructor
~TAZCommonStatistics()
destructor
FXLabel * myStatisticsLabel
Statistics labels.
void hideTAZCommonStatisticsModule()
hide TAZ Common Statistics Module
void updateStatistics()
update Statistics label
FXRadioButton * myColorBySourcePlusSinkWeight
add radio button "color source + sink"
RGBColor myEdgeSelectedColor
RGBColor color for selected egdes.
FXRadioButton * myColorBySinkWeight
add radio button "color by sink"
void showTAZEdgesGraphicModule()
show TAZ Edges Graphic Module
void updateEdgeColors()
update edge colors;
FXRadioButton * myColorBySourceWeight
add radio button "color by source"
FXRadioButton * myColorBySourceMinusSinkWeight
add radio button "color source - Sink"
RGBColor myEdgeDefaultColor
default RGBColor for all edges
~TAZEdgesGraphic()
destructor
long onCmdChoosenBy(FXObject *obj, FXSelector, void *)
void hideTAZEdgesGraphicModule()
hide TAZ Edges Graphic Module
TAZEdgesGraphic(GNETAZFrame *TAZFrameParent)
FOX-declaration.
FXTextField * myTextFieldName
textField to modify the default value of name parameter
void getAttributesAndValues() const
get a map with attributes and their values
bool isAddEdgesWithinEnabled() const
check if edges within has to be used after TAZ Creation
void showTAZParametersModule()
show TAZ parameters and set the default value of parameters
TAZParameters(GNETAZFrame *TAZFrameParent)
FOX-declaration.
~TAZParameters()
destructor
FXButton * myHelpTAZAttribute
button for help
FXCheckButton * myAddEdgesWithinCheckButton
CheckButton to enable or disable use edges within TAZ after creation.
long onCmdSetAttribute(FXObject *, FXSelector, void *)
Called when user set a value.
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
void hideTAZParametersModule()
hide TAZ parameters
long onCmdSetColorAttribute(FXObject *, FXSelector, void *)
GNETAZ * myTAZTemplate
TAZ.
FXButton * myColorEditor
Button for open color editor.
FXTextField * myTextFieldCenter
text field center
FXTextField * myTextFieldColor
textField to modify the default value of color parameter
FXCheckButton * myCheckButtonFill
CheckButton to enable or disable fill.
bool isCurrentParametersValid() const
check if current parameters are valid
bool isChangesPending() const
return true if there is changes to save
FXButton * mySaveChangesButton
@field FXButton for save changes in TAZEdges
void showTAZSaveChangesModule()
show TAZ Save Changes Module
FXButton * myCancelChangesButton
@field FXButton for cancel changes in TAZEdges
long onCmdCancelChanges(FXObject *, FXSelector, void *)
Called when the user press the button cancel changes.
TAZSaveChanges(GNETAZFrame *TAZFrameParent)
FOX-declaration.
void hideTAZSaveChangesModule()
hide TAZ Save Changes Module
~TAZSaveChanges()
destructor
long onCmdSaveChanges(FXObject *, FXSelector, void *)
void enableButtonsAndBeginUndoList()
enable buttons save and cancel changes (And begin Undo List)
long onCmdSelectEdges(FXObject *obj, FXSelector, void *)
Called when the user press select edges.
TAZSelectionStatistics(GNETAZFrame *TAZFrameParent)
FOX-declaration.
FXHorizontalFrame * myTAZSourceFrame
Horizontal Frame for default TAZ Source Weight.
~TAZSelectionStatistics()
destructor
void hideTAZSelectionStatisticsModule()
hide TAZ Selection Statistics Module
bool isEdgeSelected(GNEEdge *edge)
check if an edge is selected
FXHorizontalFrame * myTAZSinkFrame
Horizontal Frame for default TAZ Sink Weight.
const std::vector< CurrentTAZ::TAZEdgeColor > & getEdgeAndTAZChildrenSelected() const
get map with edge and TAZChildren
void showTAZSelectionStatisticsModule()
show TAZ Selection Statistics Module
long onCmdSetNewValues(FXObject *obj, FXSelector, void *)
void clearSelectedEdges()
clear current TAZ children
FXTextField * myTextFieldTAZSourceWeight
textField for TAZ Source weight
void updateStatistics()
update TAZSelectionStatistics
FXTextField * myTextFieldTAZSinkWeight
textField for TAZ Sink weight
bool selectEdge(const CurrentTAZ::TAZEdgeColor &edge)
add an edge and their TAZ Children in the list of selected items
bool unselectEdge(GNEEdge *edge)
un select an edge (and their TAZ Children)
FXLabel * myStatisticsLabel
Statistics labels.
TAZSelectionStatistics * myTAZSelectionStatistics
TAZ Edges selection parameters.
TAZSelectionStatistics * getTAZSelectionStatisticsModule() const
get TAZ Selection Statistics modul
TAZSaveChanges * getTAZSaveChangesModule() const
get TAZ Save Changes modul
CurrentTAZ * myCurrentTAZ
current TAZ
TAZEdgesGraphic * myTAZEdgesGraphic
TAZ Edges Graphic.
TAZParameters * myTAZParameters
TAZ parameters.
bool addOrRemoveTAZMember(GNEEdge *edge)
add or remove a source and a sink, or remove it if edge is in the list of TAZ Children
void dropTAZMembers()
drop all TAZSources and TAZ Sinks of current TAZ
GNEDrawingShape * getDrawingShapeModule() const
get drawing mode modul
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet
CurrentTAZ * getCurrentTAZModule() const
get Current TAZ modul
TAZCommonStatistics * myTAZCommonStatistics
TAZ Edges common parameters.
GNEDrawingShape * myDrawingShape
Drawing shape.
bool shapeDrawed()
build a shaped element using the drawed shape return true if was successfully created
~GNETAZFrame()
Destructor.
TAZSaveChanges * myTAZSaveChanges
save TAZ Edges
CommonXMLStructure::SumoBaseObject * myBaseTAZ
SumoBaseObject used for creating TAZ.
void hide()
hide TAZ frame
void processEdgeSelection(const std::vector< GNEEdge * > &edges)
process selection of edges in view net
TAZChildDefaultParameters * myTAZChildDefaultParameters
TAZ child defaults parameters.
GNETAZFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
void updateTAZStadistic()
update TAZ Stadistic
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
double getDepartWeight() const
get depart weight
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
void add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
class used to group all variables related with objects under cursor after a click over view
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
GNETAZ * getTAZFront() const
get front TAZ or a pointer to nullptr
GNENet * getNet() const
get the net object
GNEUndoList * getUndoList() const
get the undoList object
std::set< std::pair< std::string, GNEAttributeCarrier * > > getAttributeCarriersInBoundary(const Boundary &boundary, bool forceSelectEdges=false)
get AttributeCarriers in Boundary
A single child window which contains a view of the simulation area.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
A storage for options typed value containers)
static OptionsCont & getOptions()
Retrieves the options.
A point in 2D or 3D with translation and scaling methods.
static const Position INVALID
used to indicate that a position is valid
void closePolygon()
ensures that the last position equals the first
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
Position getCentroid() const
Returns the centroid (closes the polygon if unclosed)
static const RGBColor WHITE
static const RGBColor BLUE
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
static const std::vector< RGBColor > & getRainbowScaledColors()
get scaled rainbow colors