88 sourcePlusSinkColor(0),
89 sourceMinusSinkColor(0),
90 myCurrentTAZParent(CurrentTAZParent) {
99 sourceColor = GNEAttributeCarrier::parse<int>(source->getAttribute(
GNE_ATTR_TAZCOLOR));
100 sinkColor = GNEAttributeCarrier::parse<int>(sink->getAttribute(
GNE_ATTR_TAZCOLOR));
102 double sourcePlusSinkWeight = source->getDepartWeight() + sink->getDepartWeight();
104 if ((myCurrentTAZParent->myMaxSourcePlusSinkWeight - myCurrentTAZParent->myMinSourcePlusSinkWeight) == 0) {
105 sourcePlusSinkColor = 0;
108 double percentage = (sourcePlusSinkWeight - myCurrentTAZParent->myMinSourcePlusSinkWeight) /
109 (myCurrentTAZParent->myMaxSourcePlusSinkWeight - myCurrentTAZParent->myMinSourcePlusSinkWeight);
111 if (percentage >= 1) {
112 sourcePlusSinkColor = 9;
113 }
else if (percentage < 0) {
114 sourcePlusSinkColor = 0;
116 sourcePlusSinkColor = (int)(percentage * 10);
120 double sourceMinusSinkWeight = source->getDepartWeight() - sink->getDepartWeight();
122 if ((myCurrentTAZParent->myMaxSourceMinusSinkWeight - myCurrentTAZParent->myMinSourceMinusSinkWeight) == 0) {
123 sourceMinusSinkColor = 0;
126 double percentage = (sourceMinusSinkWeight - myCurrentTAZParent->myMinSourceMinusSinkWeight) /
127 (myCurrentTAZParent->myMaxSourceMinusSinkWeight - myCurrentTAZParent->myMinSourceMinusSinkWeight);
129 if (percentage >= 1) {
130 sourceMinusSinkColor = 9;
131 }
else if (percentage < 0) {
132 sourceMinusSinkColor = 0;
134 sourceMinusSinkColor = (int)(percentage * 10);
146 sourcePlusSinkColor(0),
147 sourceMinusSinkColor(0),
148 myCurrentTAZParent(nullptr) {
171 myEditedTAZ = editedTAZ;
173 if (myEditedTAZ !=
nullptr) {
174 myCurrentTAZLabel->setText((
TL(
"Current TAZ: ") + myEditedTAZ->getID()).c_str());
180 myTAZFrameParent->myTAZParameters->hideTAZParametersModule();
182 myTAZFrameParent->myDrawingShape->hideDrawingShape();
184 myTAZFrameParent->myTAZCommonStatistics->showTAZCommonStatisticsModule();
186 myTAZFrameParent->myTAZSaveChanges->showTAZSaveChangesModule();
188 myTAZFrameParent->myTAZChildDefaultParameters->extendTAZChildDefaultParameters();
190 myTAZFrameParent->myTAZEdgesGraphic->showTAZEdgesGraphicModule();
193 myTAZFrameParent->myTAZParameters->showTAZParametersModule();
195 myTAZFrameParent->myDrawingShape->showDrawingShape();
197 myTAZFrameParent->myTAZCommonStatistics->hideTAZCommonStatisticsModule();
199 myTAZFrameParent->myTAZChildDefaultParameters->collapseTAZChildDefaultParameters();
201 myTAZFrameParent->myTAZEdgesGraphic->hideTAZEdgesGraphicModule();
203 myTAZFrameParent->myTAZSaveChanges->hideTAZSaveChangesModule();
205 myCurrentTAZLabel->setText(
TL(
"No TAZ selected"));
207 mySelectedEdges.clear();
209 myMaxSourcePlusSinkWeight = 0;
210 myMinSourcePlusSinkWeight = -1;
211 myMaxSourceMinusSinkWeight = 0;
212 myMinSourceMinusSinkWeight = -1;
236 const std::vector<GNEEdge*>&
238 return mySelectedEdges;
242 const std::vector<GNETAZFrame::CurrentTAZ::TAZEdgeColor>&
244 return myTAZEdgeColors;
251 myTAZEdgeColors.clear();
253 myMaxSourcePlusSinkWeight = 0;
254 myMinSourcePlusSinkWeight = -1;
255 myMaxSourceMinusSinkWeight = 0;
256 myMinSourceMinusSinkWeight = -1;
260 myEditedTAZ->updateTAZStatistic();
261 myTAZFrameParent->myTAZCommonStatistics->updateStatistics();
263 for (
const auto& TAZElement : myEditedTAZ->getChildAdditionals()) {
271 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
282 bool createTAZEdge =
true;
285 createTAZEdge =
false;
297 myTAZEdgeColors.push_back(
TAZEdgeColor(
this, edge, sourceSink,
nullptr));
299 myTAZEdgeColors.push_back(
TAZEdgeColor(
this, edge,
nullptr, sourceSink));
303 myMaxSourcePlusSinkWeight = 0;
304 myMinSourcePlusSinkWeight = -1;
305 myMaxSourceMinusSinkWeight = 0;
306 myMinSourceMinusSinkWeight = -1;
313 if (sourcePlusSink > myMaxSourcePlusSinkWeight) {
314 myMaxSourcePlusSinkWeight = sourcePlusSink;
317 if ((myMinSourcePlusSinkWeight == -1) || (sourcePlusSink < myMinSourcePlusSinkWeight)) {
318 myMinSourcePlusSinkWeight = sourcePlusSink;
323 if (sourceMinusSink < 0) {
324 sourceMinusSink *= -1;
327 if (sourceMinusSink > myMaxSourceMinusSinkWeight) {
328 myMaxSourceMinusSinkWeight = sourceMinusSink;
331 if ((myMinSourceMinusSinkWeight == -1) || (sourceMinusSink < myMinSourceMinusSinkWeight)) {
332 myMinSourceMinusSinkWeight = sourceMinusSink;
347 myTAZFrameParent(TAZFrameParent) {
372 if (myTAZFrameParent->myCurrentTAZ->getTAZ()) {
374 std::ostringstream information;
376 <<
TL(
"- Number of edges: ") <<
toString(myTAZFrameParent->myCurrentTAZ->getTAZ()->getChildAdditionals().size() / 2) <<
"\n"
377 <<
TL(
"- Min source: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MIN_SOURCE) <<
"\n"
378 <<
TL(
"- Max source: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MAX_SOURCE) <<
"\n"
381 <<
TL(
"- Min sink: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MIN_SINK) <<
"\n"
382 <<
TL(
"- Max sink: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MAX_SINK) <<
"\n"
385 myStatisticsLabel->setText(information.str().c_str());
387 myStatisticsLabel->setText(
TL(
"No TAZ Selected"));
397 myTAZFrameParent(TAZFrameParent) {
419 onCmdCancelChanges(0, 0, 0);
427 if (!mySaveChangesButton->isEnabled()) {
429 mySaveChangesButton->enable();
430 myCancelChangesButton->enable();
432 myTAZFrameParent->myViewNet->getUndoList()->begin(
GUIIcon::TAZ,
TL(
"TAZ changes"));
440 return myTAZFrameParent->shown() && mySaveChangesButton->isEnabled();
447 if (mySaveChangesButton->isEnabled()) {
449 mySaveChangesButton->disable();
450 myCancelChangesButton->disable();
452 myTAZFrameParent->myViewNet->getUndoList()->end();
454 myTAZFrameParent->myCurrentTAZ->refreshTAZEdges();
456 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
466 if (mySaveChangesButton->isEnabled()) {
468 mySaveChangesButton->disable();
469 myCancelChangesButton->disable();
471 myTAZFrameParent->myViewNet->getUndoList()->abortAllChangeGroups();
473 myTAZFrameParent->myCurrentTAZ->refreshTAZEdges();
475 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
486 myTAZFrameParent(TAZFrameParent),
487 myDefaultTAZSourceWeight(1),
488 myDefaultTAZSinkWeight(1) {
510 std::ostringstream information;
512 << std::string(
"- ") <<
TL(
"Toggle Membership:") <<
"\n"
513 << std::string(
" ") <<
TL(
"Create new Sources/Sinks 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((
TL(
"Remove ") +
toString(myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size()) +
TL(
" edges from to selection")).c_str());
603 myUseSelectedEdges->setText((
TL(
"Add ") +
toString(myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size()) +
TL(
" 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 << std::string(
"- ") <<
TL(
"Toggle Membership:") <<
"\n"
647 << std::string(
" ") <<
TL(
"Create new Sources/Sinks with given weights.");
648 myInformationLabel->setText(information.str().c_str());
650 myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModule();
652 if (myTAZFrameParent->myCurrentTAZ->getSelectedEdges().size() > 0) {
653 myUseSelectedEdges->setText(
TL(
"Use selected edges"));
654 }
else if (myTAZFrameParent->myCurrentTAZ->getTAZEdges().size() > 0) {
655 myUseSelectedEdges->setText(
TL(
"Remove all edges"));
657 myUseSelectedEdges->setText(
TL(
"Use selected edges"));
658 myUseSelectedEdges->disable();
661 myToggleMembership->setText(
TL(
"keep"));
663 myDefaultTAZSourceFrame->hide();
664 myDefaultTAZSinkFrame->hide();
666 std::ostringstream information;
668 << std::string(
"- ") <<
TL(
"Keep Membership:") <<
TL(
" Select Sources/Sinks.") <<
"\n"
669 << std::string(
"- ") <<
TL(
"Press ESC to clear the current selection.");
670 myInformationLabel->setText(information.str().c_str());
672 myTAZFrameParent->myTAZSelectionStatistics->showTAZSelectionStatisticsModule();
675 updateSelectEdgesButton();
676 }
else if (obj == myTextFieldDefaultValueTAZSources) {
678 if (GNEAttributeCarrier::canParse<double>(myTextFieldDefaultValueTAZSources->getText().text())) {
679 myDefaultTAZSourceWeight = GNEAttributeCarrier::parse<double>(myTextFieldDefaultValueTAZSources->getText().text());
681 if (myDefaultTAZSourceWeight >= 0) {
683 myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(0, 0, 0));
686 myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(255, 0, 0));
687 myDefaultTAZSourceWeight = 1;
691 myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(255, 0, 0));
692 myDefaultTAZSourceWeight = 1;
694 }
else if (obj == myTextFieldDefaultValueTAZSinks) {
696 if (GNEAttributeCarrier::canParse<double>(myTextFieldDefaultValueTAZSinks->getText().text())) {
697 myDefaultTAZSinkWeight = GNEAttributeCarrier::parse<double>(myTextFieldDefaultValueTAZSinks->getText().text());
699 if (myDefaultTAZSinkWeight >= 0) {
701 myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(0, 0, 0));
704 myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(255, 0, 0));
705 myDefaultTAZSinkWeight = 1;
709 myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(255, 0, 0));
710 myDefaultTAZSinkWeight = 1;
720 if (myToggleMembership->getCheck() == TRUE) {
722 myTAZFrameParent->dropTAZMembers();
724 for (
const auto& selectedEdge : myTAZFrameParent->myCurrentTAZ->getSelectedEdges()) {
725 myTAZFrameParent->addOrRemoveTAZMember(selectedEdge);
728 updateSelectEdgesButton();
730 if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size() == 0) {
732 bool allSelected =
true;
733 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
734 if (!TAZEdgeColor.edge->isAttributeCarrierSelected()) {
741 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
743 TAZEdgeColor.edge->unselectAttributeCarrier();
747 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
749 TAZEdgeColor.edge->selectAttributeCarrier();
754 bool allSelected =
true;
755 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
756 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
763 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
764 if (selectedEdge.edge->isAttributeCarrierSelected()) {
766 selectedEdge.edge->unselectAttributeCarrier();
771 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
772 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
774 selectedEdge.edge->selectAttributeCarrier();
781 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
783 myTAZFrameParent->myViewNet->updateViewNet();
792 myTAZFrameParent->getViewNet()->getNet()->computeAndUpdate(neteditOptions,
false);
793 myTAZFrameParent->getViewNet()->update();
795 std::vector<GNEAdditional*> sources;
796 std::vector<GNEAdditional*> sinks;
797 std::set<GNEAdditional*> TAZs;
799 if (myTAZFrameParent->myCurrentTAZ->getTAZ() !=
nullptr) {
801 for (
const auto& TAZSourceSink : myTAZFrameParent->myCurrentTAZ->getTAZ()->getChildAdditionals()) {
804 if (!TAZSourceSink->getParentEdges().front()->hasSuccessors() &&
806 sources.push_back(TAZSourceSink);
807 TAZs.insert(myTAZFrameParent->myCurrentTAZ->getTAZ());
811 if (!TAZSourceSink->getParentEdges().front()->hasPredecessors() &&
813 sinks.push_back(TAZSourceSink);
814 TAZs.insert(myTAZFrameParent->myCurrentTAZ->getTAZ());
820 for (
const auto&
TAZ : myTAZFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getAdditionals().at(
SUMO_TAG_TAZ)) {
822 for (
const auto& TAZSourceSink :
TAZ.second->getChildAdditionals()) {
825 if (!TAZSourceSink->getParentEdges().front()->hasSuccessors() &&
827 sources.push_back(TAZSourceSink);
828 TAZs.insert(
TAZ.second);
832 if (!TAZSourceSink->getParentEdges().front()->hasPredecessors() &&
834 sinks.push_back(TAZSourceSink);
835 TAZs.insert(
TAZ.second);
842 if ((sources.size() + sinks.size()) > 0) {
844 const std::string text = (TAZs.size() == 1) ?
846 TL(
"Set weight 0 in ") +
toString(sources.size()) +
TL(
" sources and ") +
847 toString(sinks.size()) +
TL(
" sinks from TAZ '") + (*TAZs.begin())->getID() +
"'?" :
849 TL(
"Set weight 0 in ") +
toString(sources.size()) +
TL(
" sources and ") +
852 const FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
TL(
"Set zero fringe probabilities"),
"%s", text.c_str());
854 myTAZFrameParent->myViewNet->getUndoList()->begin(
GUIIcon::TAZ,
TL(
"set zero fringe probabilities"));
855 for (
const auto& source : sources) {
856 source->setAttribute(
SUMO_ATTR_WEIGHT,
"0", myTAZFrameParent->myViewNet->getUndoList());
858 for (
const auto& sink : sinks) {
859 sink->setAttribute(
SUMO_ATTR_WEIGHT,
"0", myTAZFrameParent->myViewNet->getUndoList());
861 myTAZFrameParent->myViewNet->getUndoList()->end();
865 FXMessageBox::information(
this, MBOX_OK,
TL(
"Set zero fringe probabilities"),
TL(
"No source/sinks to update."));
876 myTAZFrameParent(TAZFrameParent) {
906 clearSelectedEdges();
914 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
915 if (selectedEdge.edge == TAZEdgeColor.
edge) {
920 myEdgeAndTAZChildrenSelected.push_back(TAZEdgeColor);
924 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
926 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
935 for (
auto it = myEdgeAndTAZChildrenSelected.begin(); it != myEdgeAndTAZChildrenSelected.end(); it++) {
936 if (it->edge == edge) {
937 myEdgeAndTAZChildrenSelected.erase(it);
941 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
943 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
958 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
959 if (selectedEdge.edge == edge) {
971 myEdgeAndTAZChildrenSelected.clear();
975 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
977 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
981 const std::vector<GNETAZFrame::CurrentTAZ::TAZEdgeColor>&
983 return myEdgeAndTAZChildrenSelected;
989 if (obj == myTextFieldTAZSourceWeight) {
991 if (GNEAttributeCarrier::canParse<double>(myTextFieldTAZSourceWeight->getText().text())) {
992 double newTAZSourceWeight = GNEAttributeCarrier::parse<double>(myTextFieldTAZSourceWeight->getText().text());
994 if (newTAZSourceWeight >= 0) {
996 myTextFieldTAZSourceWeight->setTextColor(FXRGB(0, 0, 0));
998 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1000 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1001 selectedEdge.source->setAttribute(
SUMO_ATTR_WEIGHT, myTextFieldTAZSourceWeight->getText().text(), myTAZFrameParent->myViewNet->getUndoList());
1004 myTAZFrameParent->getCurrentTAZModule()->refreshTAZEdges();
1007 myTextFieldTAZSourceWeight->setTextColor(FXRGB(255, 0, 0));
1011 myTextFieldTAZSourceWeight->setTextColor(FXRGB(255, 0, 0));
1013 }
else if (obj == myTextFieldTAZSinkWeight) {
1015 if (GNEAttributeCarrier::canParse<double>(myTextFieldTAZSinkWeight->getText().text())) {
1016 double newTAZSinkWeight = GNEAttributeCarrier::parse<double>(myTextFieldTAZSinkWeight->getText().text());
1018 if (newTAZSinkWeight >= 0) {
1020 myTextFieldTAZSinkWeight->setTextColor(FXRGB(0, 0, 0));
1022 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1024 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1025 selectedEdge.sink->setAttribute(
SUMO_ATTR_WEIGHT, myTextFieldTAZSinkWeight->getText().text(), myTAZFrameParent->myViewNet->getUndoList());
1028 myTAZFrameParent->getCurrentTAZModule()->refreshTAZEdges();
1031 myTextFieldTAZSinkWeight->setTextColor(FXRGB(255, 0, 0));
1035 myTextFieldTAZSinkWeight->setTextColor(FXRGB(255, 0, 0));
1044 if (myEdgeAndTAZChildrenSelected.size() == 0) {
1046 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
1048 if (!TAZEdgeColor.edge->isAttributeCarrierSelected()) {
1050 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1052 TAZEdgeColor.edge->setAttribute(
GNE_ATTR_SELECTED,
"true", myTAZFrameParent->myViewNet->getUndoList());
1057 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1059 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
1061 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1063 selectedEdge.edge->setAttribute(
GNE_ATTR_SELECTED,
"true", myTAZFrameParent->myViewNet->getUndoList());
1073 if (myEdgeAndTAZChildrenSelected.size() > 0) {
1075 myTAZSourceFrame->show();
1076 myTAZSinkFrame->show();
1078 std::set<std::string> weightSourceSet;
1079 std::set<std::string> weightSinkSet;
1082 double maxWeightSource = 0;
1083 double minWeightSource = -1;
1084 double averageWeightSource = 0;
1085 double maxWeightSink = 0;
1086 double minWeightSink = -1;
1087 double averageWeightSink = 0;
1089 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1091 weight = selectedEdge.source->getDepartWeight();
1093 weightSourceSet.insert(
toString(weight));
1095 if (maxWeightSource < weight) {
1096 maxWeightSource = weight;
1099 if (minWeightSource == -1 || (maxWeightSource < weight)) {
1100 minWeightSource = weight;
1103 averageWeightSource += weight;
1105 weight = selectedEdge.sink->getDepartWeight();
1107 weightSinkSet.insert(
toString(weight));
1109 if (maxWeightSink < weight) {
1110 maxWeightSink = weight;
1113 if (minWeightSink == -1 || (maxWeightSink < weight)) {
1114 minWeightSink = weight;
1117 averageWeightSink += weight;
1120 averageWeightSource /= (double)myEdgeAndTAZChildrenSelected.size();
1121 averageWeightSink /= (double)myEdgeAndTAZChildrenSelected.size();
1123 std::ostringstream information;
1124 std::string edgeInformation;
1126 if (myEdgeAndTAZChildrenSelected.size() == 1) {
1127 edgeInformation =
TL(
"- Edge ID: ") + myEdgeAndTAZChildrenSelected.begin()->edge->getID();
1129 edgeInformation =
TL(
"- Number of edges: ") +
toString(myEdgeAndTAZChildrenSelected.size());
1133 << edgeInformation <<
"\n"
1134 <<
TL(
"- Min source: ") <<
toString(minWeightSource) <<
"\n"
1135 <<
TL(
"- Max source: ") <<
toString(maxWeightSource) <<
"\n"
1136 <<
TL(
"- Average source: ") <<
toString(averageWeightSource) <<
"\n"
1138 <<
TL(
"- Min sink: ") <<
toString(minWeightSink) <<
"\n"
1139 <<
TL(
"- Max sink: ") <<
toString(maxWeightSink) <<
"\n"
1140 <<
TL(
"- Average sink: ") <<
toString(averageWeightSink);
1142 myStatisticsLabel->setText(information.str().c_str());
1144 myTextFieldTAZSourceWeight->setText(
joinToString(weightSourceSet,
" ").c_str());
1145 myTextFieldTAZSourceWeight->setTextColor(FXRGB(0, 0, 0));
1146 myTextFieldTAZSinkWeight->setText(
joinToString(weightSinkSet,
" ").c_str());
1147 myTextFieldTAZSinkWeight->setTextColor(FXRGB(0, 0, 0));
1150 myTAZSourceFrame->hide();
1151 myTAZSinkFrame->hide();
1153 myStatisticsLabel->setText(
TL(
"No edges selected"));
1163 myTAZFrameParent(TAZFrameParent),
1164 myTAZTemplate(nullptr) {
1197 delete myTAZTemplate;
1203 MFXGroupBoxModule::show();
1209 MFXGroupBoxModule::hide();
1215 const bool validColor = GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text());
1216 const bool validCenter = myTextFieldCenter->getText().empty() || GNEAttributeCarrier::canParse<Position>(myTextFieldCenter->getText().text());
1218 return (validColor && validCenter && validName);
1224 return (myAddEdgesWithinCheckButton->getCheck() == TRUE);
1231 if (myTAZFrameParent->myBaseTAZ) {
1233 delete myTAZFrameParent->myBaseTAZ;
1240 myTAZFrameParent->myBaseTAZ->addPositionAttribute(
SUMO_ATTR_CENTER, myTextFieldCenter->getText().empty() ?
Position::INVALID : GNEAttributeCarrier::parse<Position>(myTextFieldCenter->getText().text()));
1241 myTAZFrameParent->myBaseTAZ->addBoolAttribute(
SUMO_ATTR_FILL, (myCheckButtonFill->getCheck() == TRUE));
1242 myTAZFrameParent->myBaseTAZ->addColorAttribute(
SUMO_ATTR_COLOR, GNEAttributeCarrier::parse<RGBColor>(myTextFieldColor->getText().text()));
1243 myTAZFrameParent->myBaseTAZ->addStringAttribute(
SUMO_ATTR_NAME, myTextFieldName->getText().text());
1250 FXColorDialog colordialog(getCollapsableFrame(),
TL(
"Color Dialog"));
1251 colordialog.setTarget(
this);
1254 if (GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text())) {
1255 colordialog.setRGBA(
MFXUtils::getFXColor(GNEAttributeCarrier::parse<RGBColor>(myTextFieldColor->getText().text())));
1260 if (colordialog.execute()) {
1262 onCmdSetAttribute(0, 0, 0);
1270 if (obj == myTextFieldColor) {
1272 if (GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text())) {
1273 myTextFieldColor->setTextColor(FXRGB(0, 0, 0));
1274 myTextFieldColor->killFocus();
1276 myTextFieldColor->setTextColor(FXRGB(255, 0, 0));
1278 }
else if (obj == myTextFieldCenter) {
1280 if (myTextFieldCenter->getText().empty() || GNEAttributeCarrier::canParse<RGBColor>(myTextFieldCenter->getText().text())) {
1281 myTextFieldCenter->setTextColor(FXRGB(0, 0, 0));
1282 myTextFieldCenter->killFocus();
1284 myTextFieldCenter->setTextColor(FXRGB(255, 0, 0));
1286 }
else if (obj == myTextFieldName) {
1289 myTextFieldName->setTextColor(FXRGB(0, 0, 0));
1290 myTextFieldName->killFocus();
1292 myTextFieldName->setTextColor(FXRGB(255, 0, 0));
1294 }
else if (obj == myAddEdgesWithinCheckButton) {
1296 if (myAddEdgesWithinCheckButton->getCheck() == TRUE) {
1297 myAddEdgesWithinCheckButton->setText(
TL(
"use"));
1299 myAddEdgesWithinCheckButton->setText(
TL(
"not use"));
1301 }
else if (obj == myCheckButtonFill) {
1303 if (myCheckButtonFill->getCheck() == TRUE) {
1304 myCheckButtonFill->setText(
"true");
1306 myCheckButtonFill->setText(
"false");
1315 myTAZFrameParent->openHelpAttributesDialog(myTAZTemplate);
1325 myTAZFrameParent(TAZFrameParent),
1326 myEdgeDefaultColor(
RGBColor::GREY),
1327 myEdgeSelectedColor(
RGBColor::MAGENTA) {
1364 for (
const auto& edge : myTAZFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
1365 for (
const auto& lane : edge.second->getLanes()) {
1366 lane->setSpecialColor(
nullptr);
1377 for (
const auto& edge : myTAZFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
1378 if (!edge.second->isAttributeCarrierSelected()) {
1380 for (
const auto lane : edge.second->getLanes()) {
1381 lane->setSpecialColor(&myEdgeDefaultColor);
1386 for (
const auto& TAZEdgeColor : myTAZFrameParent->myCurrentTAZ->getTAZEdges()) {
1387 if (!TAZEdgeColor.edge->isAttributeCarrierSelected()) {
1389 for (
const auto& lane : TAZEdgeColor.edge->getLanes()) {
1391 if (myColorBySourceWeight->getCheck() == TRUE) {
1392 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sourceColor), TAZEdgeColor.source->getDepartWeight());
1393 }
else if (myColorBySinkWeight->getCheck() == TRUE) {
1394 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sinkColor), TAZEdgeColor.sink->getDepartWeight());
1395 }
else if (myColorBySourcePlusSinkWeight->getCheck() == TRUE) {
1396 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sourcePlusSinkColor), TAZEdgeColor.source->getDepartWeight() + TAZEdgeColor.sink->getDepartWeight());
1398 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sourceMinusSinkColor), TAZEdgeColor.source->getDepartWeight() - TAZEdgeColor.sink->getDepartWeight());
1404 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
1405 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
1407 for (
const auto& lane : selectedEdge.edge->getLanes()) {
1408 lane->setSpecialColor(&myEdgeSelectedColor);
1413 myTAZFrameParent->myViewNet->updateViewNet();
1420 if (obj == myColorBySourceWeight) {
1421 myColorBySinkWeight->setCheck(FALSE);
1422 myColorBySourcePlusSinkWeight->setCheck(FALSE);
1423 myColorBySourceMinusSinkWeight->setCheck(FALSE);
1424 }
else if (obj == myColorBySinkWeight) {
1425 myColorBySourceWeight->setCheck(FALSE);
1426 myColorBySourcePlusSinkWeight->setCheck(FALSE);
1427 myColorBySourceMinusSinkWeight->setCheck(FALSE);
1428 }
else if (obj == myColorBySourcePlusSinkWeight) {
1429 myColorBySourceWeight->setCheck(FALSE);
1430 myColorBySinkWeight->setCheck(FALSE);
1431 myColorBySourceMinusSinkWeight->setCheck(FALSE);
1432 }
else if (obj == myColorBySourceMinusSinkWeight) {
1433 myColorBySourceWeight->setCheck(FALSE);
1434 myColorBySinkWeight->setCheck(FALSE);
1435 myColorBySourcePlusSinkWeight->setCheck(FALSE);
1497 std::map<SumoXMLAttr, std::string> valuesOfElement;
1558 for (
const auto& edge : edges) {
1567 for (
const auto& edge : edges) {
1572 if (TAZEdgeColor.edge == edge) {
1633 std::vector<std::string> edgeIDs;
1637 edgeIDs.push_back(edge->getID());
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 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 GUIDesignButtonRectangular
little rectangular button used in frames (For example, in "help" buttons)
#define GUIDesignLabel(justify)
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignRadioButton
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
#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)
@ 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)
add string attribute into current SumoBaseObject node
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
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
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
process click over Viewnet
TAZChildDefaultParameters * myTAZChildDefaultParameters
TAZ child defaults parameters.
GNETAZFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
void updateTAZStatistic()
update TAZ Statistic
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
const std::vector< GNEEdge * > & getEdges() const
get vector with edges
GNENet * getNet() const
get the net object
void updateObjectsInBoundary(const Boundary &boundary)
get objects in the given boundary
GNEUndoList * getUndoList() const
get the undoList object
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
A single child window which contains a view of the simulation area.
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
A list item which allows for custom coloring.
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
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