diff options
114 files changed, 13404 insertions, 1848 deletions
diff --git a/Project/Bus.cpp b/Project/Bus.cpp index 69bca6d..c366d76 100644 --- a/Project/Bus.cpp +++ b/Project/Bus.cpp @@ -3,12 +3,8 @@ #include "DegreesAndRadians.h" #endif -Bus::Bus() - : PowerElement() -{ -} -Bus::Bus(wxPoint2DDouble position) - : PowerElement() +Bus::Bus() : PowerElement() {} +Bus::Bus(wxPoint2DDouble position) : PowerElement() { m_width = 100.0; m_height = 5.0; @@ -39,16 +35,16 @@ void Bus::Draw(wxPoint2DDouble translation, double scale) const glRotated(m_angle, 0.0, 0.0, 1.0); glTranslated(-screenPt.m_x, -screenPt.m_y, 0.0); - glColor4d(0.0, 0.5, 1.0, 0.5); + glColor4dv(m_selectionColour.GetRGBA()); - wxPoint2DDouble pts[4] = { WorldToScreen(translation, scale, -(m_width / 2.0), -(m_height / 2.0)) - - wxPoint2DDouble(m_borderSize, m_borderSize), - WorldToScreen(translation, scale, -(m_width / 2.0), (m_height / 2.0)) - - wxPoint2DDouble(m_borderSize, -m_borderSize), - WorldToScreen(translation, scale, (m_width / 2.0), (m_height / 2.0)) - - wxPoint2DDouble(-m_borderSize, -m_borderSize), - WorldToScreen(translation, scale, (m_width / 2.0), -(m_height / 2.0)) - - wxPoint2DDouble(-m_borderSize, m_borderSize) }; + wxPoint2DDouble pts[4] = {WorldToScreen(translation, scale, -(m_width / 2.0), -(m_height / 2.0)) - + wxPoint2DDouble(m_borderSize, m_borderSize), + WorldToScreen(translation, scale, -(m_width / 2.0), (m_height / 2.0)) - + wxPoint2DDouble(m_borderSize, -m_borderSize), + WorldToScreen(translation, scale, (m_width / 2.0), (m_height / 2.0)) - + wxPoint2DDouble(-m_borderSize, -m_borderSize), + WorldToScreen(translation, scale, (m_width / 2.0), -(m_height / 2.0)) - + wxPoint2DDouble(-m_borderSize, m_borderSize)}; DrawRectangle(pts); glPopMatrix(); } @@ -60,7 +56,11 @@ void Bus::Draw(wxPoint2DDouble translation, double scale) const glRotated(m_angle, 0.0, 0.0, 1.0); glTranslated(-m_position.m_x, -m_position.m_y, 0.0); - glColor4dv(m_busColour.GetRGBA()); + if(m_dynEvent) + glColor4dv(m_dynamicEventColour.GetRGBA()); + else + glColor4dv(m_busColour.GetRGBA()); + DrawRectangle(m_position, m_width, m_height); // Pop the old matrix back. glPopMatrix(); @@ -75,8 +75,8 @@ void Bus::Draw(wxPoint2DDouble translation, double scale) const glRotated(m_angle, 0.0, 0.0, 1.0); glTranslated(-screenPt.m_x, -screenPt.m_y, 0.0); - wxPoint2DDouble pbPosition[2] = { WorldToScreen(translation, scale, m_width / 2.0), - WorldToScreen(translation, scale, -m_width / 2.0) }; + wxPoint2DDouble pbPosition[2] = {WorldToScreen(translation, scale, m_width / 2.0), + WorldToScreen(translation, scale, -m_width / 2.0)}; DrawPickbox(pbPosition[0]); DrawPickbox(pbPosition[1]); @@ -204,12 +204,12 @@ wxString Bus::GetTipText() const tipText += wxString::Format(" (%d)", m_electricalData.number + 1); tipText += "\n"; tipText += StringFromDouble(m_electricalData.nominalVoltage, 1) + - (m_electricalData.nominalVoltageUnit == UNIT_V ? _(" V") : _(" kV")); + (m_electricalData.nominalVoltageUnit == UNIT_V ? _(" V") : _(" kV")); tipText += "\n"; tipText += _("\nV = ") + wxString::FromDouble(std::abs(m_electricalData.voltage), 5) + _(" p.u."); tipText += "\n"; tipText += wxString(L'\u03B8') + " = " + wxString::FromDouble(wxRadToDeg(std::arg(m_electricalData.voltage)), 5) + - " " + wxString(L'\u00B0'); + " " + wxString(L'\u00B0'); tipText += _("\n\nFault info:"); tipText += _("\nVa = ") + wxString::FromDouble(std::abs(m_electricalData.faultVoltage[0]), 5) + _(" p.u."); @@ -220,8 +220,24 @@ wxString Bus::GetTipText() const tipText += _("\nIb = ") + wxString::FromDouble(std::abs(m_electricalData.faultCurrent[1]), 5) + _(" p.u."); tipText += _("\nIc = ") + wxString::FromDouble(std::abs(m_electricalData.faultCurrent[2]), 5) + _(" p.u."); } - + tipText += _("\n\nSsc = ") + wxString::FromDouble(std::abs(m_electricalData.scPower), 5) + _(" p.u."); return tipText; } + +bool Bus::GetPlotData(ElementPlotData& plotData) +{ + if(!m_electricalData.plotBus) return false; + plotData.SetName(m_electricalData.name); + plotData.SetCurveType(ElementPlotData::CT_BUS); + + std::vector<double> absVoltage, argVoltage; + for(unsigned int i = 0; i < m_electricalData.stabVoltageVector.size(); ++i) { + absVoltage.push_back(std::abs(m_electricalData.stabVoltageVector[i])); + argVoltage.push_back(wxRadToDeg(std::arg(m_electricalData.stabVoltageVector[i]))); + } + plotData.AddData(absVoltage, _("Voltage")); + plotData.AddData(argVoltage, _("Angle")); + return true; +} diff --git a/Project/Bus.h b/Project/Bus.h index 2522be3..cbc8287 100644 --- a/Project/Bus.h +++ b/Project/Bus.h @@ -11,7 +11,7 @@ struct BusElectricalData { ElectricalUnit nominalVoltageUnit = UNIT_kV; bool isVoltageControlled = false; double controlledVoltage = 1.0; - int controlledVoltageUnitChoice = 0; // 0 = p.u., 1 = same as nominalVoltageUnit (UNIT_V or UNIT_kV). + int controlledVoltageUnitChoice = 0; // 0 = p.u., 1 = same as nominalVoltageUnit (UNIT_V or UNIT_kV). bool slackBus = false; // Power flow (p.u.) @@ -24,10 +24,10 @@ struct BusElectricalData { // p.u. fault data double faultResistance = 0.0; double faultReactance = 0.0; - std::complex<double> faultCurrent[3] = { std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0), - std::complex<double>(0.0, 0.0) }; - std::complex<double> faultVoltage[3] = { std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0), - std::complex<double>(0.0, 0.0) }; + std::complex<double> faultCurrent[3] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0), + std::complex<double>(0.0, 0.0)}; + std::complex<double> faultVoltage[3] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0), + std::complex<double>(0.0, 0.0)}; double scPower = 0.0; // Stability @@ -37,11 +37,12 @@ struct BusElectricalData { double stabFaultLength = 0.0; double stabFaultResistance = 0.0; double stabFaultReactance = 0.0; + std::vector<std::complex<double> > stabVoltageVector; }; class Bus : public PowerElement { -public: + public: Bus(); Bus(wxPoint2DDouble position); Bus(wxPoint2DDouble position, wxString name); @@ -57,12 +58,13 @@ public: virtual bool PickboxContains(wxPoint2DDouble position); virtual bool GetContextMenu(wxMenu& menu); virtual wxString GetTipText() const; - virtual BusElectricalData GetEletricalData() const { return m_electricalData; } + virtual BusElectricalData GetElectricalData() const { return m_electricalData; } virtual void SetElectricalData(BusElectricalData electricalData) { m_electricalData = electricalData; } virtual bool ShowForm(wxWindow* parent, Element* element); + virtual bool GetPlotData(ElementPlotData& plotData); -protected: + protected: BusElectricalData m_electricalData; }; -#endif // BUS_H +#endif // BUS_H diff --git a/Project/BusForm.cpp b/Project/BusForm.cpp index d7d622e..113dd24 100644 --- a/Project/BusForm.cpp +++ b/Project/BusForm.cpp @@ -1,29 +1,28 @@ #include "BusForm.h" #include "Bus.h" -BusForm::BusForm(wxWindow* parent, Bus* bus) - : BusFormBase(parent) +BusForm::BusForm(wxWindow* parent, Bus* bus) : BusFormBase(parent) { SetSize(GetBestSize()); m_parent = parent; m_bus = bus; - m_textCtrlName->SetValue(bus->GetEletricalData().name); - m_textCtrlNomVoltage->SetValue(bus->StringFromDouble(bus->GetEletricalData().nominalVoltage)); + m_textCtrlName->SetValue(bus->GetElectricalData().name); + m_textCtrlNomVoltage->SetValue(bus->StringFromDouble(bus->GetElectricalData().nominalVoltage)); - if(bus->GetEletricalData().nominalVoltageUnit == UNIT_V) + if(bus->GetElectricalData().nominalVoltageUnit == UNIT_V) m_choiceNomVoltage->SetSelection(0); else m_choiceNomVoltage->SetSelection(1); - m_checkBoxCtrlVoltage->SetValue(bus->GetEletricalData().isVoltageControlled); - m_textCtrlCtrlVoltage->SetValue(bus->StringFromDouble(bus->GetEletricalData().controlledVoltage)); - m_choiceCtrlVoltage->SetSelection(bus->GetEletricalData().controlledVoltageUnitChoice); - m_checkBoxSlackBus->SetValue(bus->GetEletricalData().slackBus); + m_checkBoxCtrlVoltage->SetValue(bus->GetElectricalData().isVoltageControlled); + m_textCtrlCtrlVoltage->SetValue(bus->StringFromDouble(bus->GetElectricalData().controlledVoltage)); + m_choiceCtrlVoltage->SetSelection(bus->GetElectricalData().controlledVoltageUnitChoice); + m_checkBoxSlackBus->SetValue(bus->GetElectricalData().slackBus); - m_checkBoxFault->SetValue(bus->GetEletricalData().hasFault); - switch(bus->GetEletricalData().faultType) { + m_checkBoxFault->SetValue(bus->GetElectricalData().hasFault); + switch(bus->GetElectricalData().faultType) { case FAULT_THREEPHASE: { m_choiceFaultType->SetSelection(0); } break; @@ -39,7 +38,7 @@ BusForm::BusForm(wxWindow* parent, Bus* bus) default: break; } - switch(bus->GetEletricalData().faultLocation) { + switch(bus->GetElectricalData().faultLocation) { case FAULT_LINE_A: { m_choiceFaultPlace->SetSelection(0); } break; @@ -52,35 +51,35 @@ BusForm::BusForm(wxWindow* parent, Bus* bus) default: break; } - m_textCtrlFaultResistance->SetValue(bus->StringFromDouble(bus->GetEletricalData().faultResistance)); - m_textCtrlFaultReactance->SetValue(bus->StringFromDouble(bus->GetEletricalData().faultReactance)); - - m_checkBoxPlotData->SetValue(bus->GetEletricalData().plotBus); - m_checkBoxStabFault->SetValue(bus->GetEletricalData().stabHasFault); - m_textCtrlStabFaultTime->SetValue(bus->StringFromDouble(bus->GetEletricalData().stabFaultTime)); - m_textCtrlStabFaultLength->SetValue(bus->StringFromDouble(bus->GetEletricalData().stabFaultLength)); - m_textCtrlStabFaultResistance->SetValue(bus->StringFromDouble(bus->GetEletricalData().stabFaultResistance)); - m_textCtrlStabFaultReactance->SetValue(bus->StringFromDouble(bus->GetEletricalData().stabFaultReactance)); - - EnableCtrlVoltageFields(bus->GetEletricalData().isVoltageControlled); - EnableFaultFields(bus->GetEletricalData().hasFault); - EnableStabFaultFields(bus->GetEletricalData().stabHasFault); + m_textCtrlFaultResistance->SetValue(bus->StringFromDouble(bus->GetElectricalData().faultResistance)); + m_textCtrlFaultReactance->SetValue(bus->StringFromDouble(bus->GetElectricalData().faultReactance)); + + m_checkBoxPlotData->SetValue(bus->GetElectricalData().plotBus); + m_checkBoxStabFault->SetValue(bus->GetElectricalData().stabHasFault); + m_textCtrlStabFaultTime->SetValue(bus->StringFromDouble(bus->GetElectricalData().stabFaultTime)); + m_textCtrlStabFaultLength->SetValue(bus->StringFromDouble(bus->GetElectricalData().stabFaultLength)); + m_textCtrlStabFaultResistance->SetValue(bus->StringFromDouble(bus->GetElectricalData().stabFaultResistance)); + m_textCtrlStabFaultReactance->SetValue(bus->StringFromDouble(bus->GetElectricalData().stabFaultReactance)); + + EnableCtrlVoltageFields(bus->GetElectricalData().isVoltageControlled); + EnableFaultFields(bus->GetElectricalData().hasFault); + EnableStabFaultFields(bus->GetElectricalData().stabHasFault); } BusForm::~BusForm() {} void BusForm::OnButtonCancelClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); } void BusForm::OnButtonOKClick(wxCommandEvent& event) { - BusElectricalData data = m_bus->GetEletricalData(); + BusElectricalData data = m_bus->GetElectricalData(); data.name = m_textCtrlName->GetValue(); if(!m_bus->DoubleFromString(m_parent, m_textCtrlNomVoltage->GetValue(), data.nominalVoltage, - _("Value entered incorrectly in the field \"Rated voltage\"."))) + _("Value entered incorrectly in the field \"Rated voltage\"."))) return; data.nominalVoltageUnit = m_choiceNomVoltage->GetSelection() == 0 ? UNIT_V : UNIT_kV; data.isVoltageControlled = m_checkBoxCtrlVoltage->GetValue(); if(data.isVoltageControlled) { if(!m_bus->DoubleFromString(m_parent, m_textCtrlCtrlVoltage->GetValue(), data.controlledVoltage, - _("Value entered incorrectly in the field \"Controlled voltage\"."))) + _("Value entered incorrectly in the field \"Controlled voltage\"."))) return; data.controlledVoltageUnitChoice = m_choiceCtrlVoltage->GetSelection(); } @@ -115,34 +114,39 @@ void BusForm::OnButtonOKClick(wxCommandEvent& event) } if(!m_bus->DoubleFromString(m_parent, m_textCtrlFaultResistance->GetValue(), data.faultResistance, - _("Value entered incorrectly in the field \"Fault resistance\"."))) + _("Value entered incorrectly in the field \"Fault resistance\"."))) return; if(!m_bus->DoubleFromString(m_parent, m_textCtrlFaultReactance->GetValue(), data.faultReactance, - _("Value entered incorrectly in the field \"Fault reactance\"."))) + _("Value entered incorrectly in the field \"Fault reactance\"."))) return; data.plotBus = m_checkBoxPlotData->GetValue(); data.stabHasFault = m_checkBoxStabFault->GetValue(); if(!m_bus->DoubleFromString(m_parent, m_textCtrlStabFaultTime->GetValue(), data.stabFaultTime, - _("Value entered incorrectly in the field \"Time\"."))) + _("Value entered incorrectly in the field \"Time\"."))) return; if(!m_bus->DoubleFromString(m_parent, m_textCtrlStabFaultLength->GetValue(), data.stabFaultLength, - _("Value entered incorrectly in the field \"Fault lenght\"."))) + _("Value entered incorrectly in the field \"Fault lenght\"."))) return; if(!m_bus->DoubleFromString(m_parent, m_textCtrlStabFaultResistance->GetValue(), data.stabFaultResistance, - _("Value entered incorrectly in the field \"Fault resistence (stability)\"."))) + _("Value entered incorrectly in the field \"Fault resistence (stability)\"."))) return; if(!m_bus->DoubleFromString(m_parent, m_textCtrlStabFaultReactance->GetValue(), data.stabFaultReactance, - _("Value entered incorrectly in the field \"Fault reactance (stability)\"."))) + _("Value entered incorrectly in the field \"Fault reactance (stability)\"."))) return; m_bus->SetElectricalData(data); + if(data.stabHasFault) + m_bus->SetDynamicEvent(true); + else + m_bus->SetDynamicEvent(false); + EndModal(wxID_OK); } @@ -189,19 +193,19 @@ void BusForm::EnableStabFaultFields(bool enable) void BusForm::UpdateChoiceBoxes() { switch(m_choiceFaultType->GetSelection()) { - case 0: // three-phase + case 0: // three-phase { m_choiceFaultPlace->Enable(false); } break; - case 1: // line-to-line - case 2: // double line-to-line + case 1: // line-to-line + case 2: // double line-to-line { if(m_checkBoxFault->GetValue()) m_choiceFaultPlace->Enable(true); m_choiceFaultPlace->SetString(0, _("Lines AB")); m_choiceFaultPlace->SetString(1, _("Lines BC")); m_choiceFaultPlace->SetString(2, _("Lines CA")); } break; - case 3: // line-to-ground + case 3: // line-to-ground { if(m_checkBoxFault->GetValue()) m_choiceFaultPlace->Enable(true); m_choiceFaultPlace->SetString(0, _("Line A")); diff --git a/Project/Capacitor.cpp b/Project/Capacitor.cpp index 4bf595b..75b74f4 100644 --- a/Project/Capacitor.cpp +++ b/Project/Capacitor.cpp @@ -1,15 +1,8 @@ #include "ReactiveShuntElementForm.h" #include "Capacitor.h" -Capacitor::Capacitor() - : Shunt() -{ -} -Capacitor::Capacitor(wxString name) - : Shunt() -{ - m_electricalData.name = name; -} +Capacitor::Capacitor() : Shunt() {} +Capacitor::Capacitor(wxString name) : Shunt() { m_electricalData.name = name; } Capacitor::~Capacitor() {} bool Capacitor::AddParent(Element* parent, wxPoint2DDouble position) { @@ -17,11 +10,11 @@ bool Capacitor::AddParent(Element* parent, wxPoint2DDouble position) m_parentList.push_back(parent); parent->AddChild(this); wxPoint2DDouble parentPt = - parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. - parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. - parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. + parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. + parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. + parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. - m_position = parentPt + wxPoint2DDouble(0.0, 100.0); // Shifts the position to the down of the bus. + m_position = parentPt + wxPoint2DDouble(0.0, 100.0); // Shifts the position to the down of the bus. m_width = 40; m_height = 30; m_rect = wxRect2DDouble(m_position.m_x - m_width / 2.0, m_position.m_y - m_height / 2.0, m_width, m_height); @@ -34,7 +27,7 @@ bool Capacitor::AddParent(Element* parent, wxPoint2DDouble position) m_inserted = true; wxRect2DDouble genRect(0, 0, 0, 0); - m_switchRect.push_back(genRect); // Push a general rectangle. + m_switchRect.push_back(genRect); // Push a general rectangle. UpdateSwitches(); return true; @@ -45,9 +38,12 @@ bool Capacitor::AddParent(Element* parent, wxPoint2DDouble position) void Capacitor::Draw(wxPoint2DDouble translation, double scale) const { OpenGLColour elementColour; - if(m_online) - elementColour = m_onlineElementColour; - else + if(m_online) { + if(m_dynEvent) + elementColour = m_dynamicEventColour; + else + elementColour = m_onlineElementColour; + } else elementColour = m_offlineElementColour; if(m_inserted) { @@ -180,7 +176,7 @@ wxString Capacitor::GetTipText() const if(!m_online) reactivePower = 0.0; else { - std::complex<double> v = static_cast<Bus*>(m_parentList[0])->GetEletricalData().voltage; + std::complex<double> v = static_cast<Bus*>(m_parentList[0])->GetElectricalData().voltage; reactivePower *= std::pow(std::abs(v), 2); } tipText += "\n"; diff --git a/Project/ChartView.cpp b/Project/ChartView.cpp index 2f3f70d..acfc939 100644 --- a/Project/ChartView.cpp +++ b/Project/ChartView.cpp @@ -45,7 +45,7 @@ ChartView::~ChartView() {} void ChartView::SetMPWindow() { m_mpWindow = new mpWindow(this, wxID_ANY); - + m_mpWindow->SetDoubleBuffered(true); m_mpWindow->SetMargins(20, 10, 40, 60); @@ -96,6 +96,7 @@ void ChartView::SetTreectrl() rootElementName[ElementPlotData::CT_SYNC_COMPENSATOR] = _("Synchronous compensator"); rootElementName[ElementPlotData::CT_SYNC_GENERATOR] = _("Synchronous generator"); rootElementName[ElementPlotData::CT_TRANSFORMER] = _("Transformer"); + rootElementName[ElementPlotData::CT_TEST] = _("Test"); wxTreeItemId rootItemID[ElementPlotData::NUM_ELEMENTS]; @@ -127,6 +128,9 @@ void ChartView::OnPropertyGridChange(wxPropertyGridEvent& event) wxColour colour = GetNextColour(); data->SetColour(colour); m_pgPropColor->SetValue(static_cast<wxVariant>(colour)); + m_treeCtrl->SetItemBold(m_treeCtrl->GetSelection(), true); + } else { + m_treeCtrl->SetItemBold(m_treeCtrl->GetSelection(), false); } fit = true; } else if(event.GetPropertyName() == _("Color")) { @@ -336,6 +340,9 @@ void ChartView::OnTreeItemActivated(wxTreeEvent& event) wxColour colour = GetNextColour(); data->SetColour(colour); m_pgPropColor->SetValue(static_cast<wxVariant>(colour)); + m_treeCtrl->SetItemBold(m_treeCtrl->GetSelection(), true); + } else { + m_treeCtrl->SetItemBold(m_treeCtrl->GetSelection(), false); } UpdatePlot(true); } @@ -446,3 +453,111 @@ wxTreeItemId ChartView::UpdateAllPlots(wxTreeItemId root) wxTreeItemId dummyID; return dummyID; } + +void ChartView::OnMenuExpCSVClick(wxCommandEvent& event) +{ + wxFileDialog saveFileDialog(this, _("Save CSV file"), "", "", "CSV file (*.csv)|*.csv", + wxFD_SAVE | wxFD_OVERWRITE_PROMPT); + if(saveFileDialog.ShowModal() == wxID_CANCEL) return; + + wxTextFile csvFile(saveFileDialog.GetPath()); + if(!csvFile.Create()) { + if(!csvFile.Open()) { + wxMessageDialog msgDialog(this, _("It was not possible to open or create the selected file."), _("Error"), + wxOK | wxCENTRE | wxICON_ERROR); + msgDialog.ShowModal(); + } + } else + csvFile.Open(); + if(csvFile.IsOpened()) { + csvFile.Clear(); + csvFile.AddLine(GetActiveCurvesCSV()); + csvFile.Write(); + csvFile.Close(); + } +} + +wxString ChartView::GetActiveCurvesCSV() +{ + std::vector<PlotData*> activePlotDataList; + GetActivePlotData(m_treeCtrl->GetRootItem(), activePlotDataList); + + std::vector<double> xValues; + wxString xName = ""; + + // Find X axis curve, if none is found, X is the m_time. + bool foundXAxis = false; + for(auto it = activePlotDataList.begin(), itEnd = activePlotDataList.end(); it != itEnd; ++it) { + PlotData* data = *it; + if(data->GetAxis() == 1) { + xValues = data->GetValues(); + xName = data->GetName(); + foundXAxis = true; + activePlotDataList.erase(it); + delete data; + break; + } + } + if(!foundXAxis) { + xValues = m_time; + xName = _("Time"); + } + + // Build CSV text. + wxString csvText = xName + ";"; + // Header + for(auto it = activePlotDataList.begin(), itEnd = activePlotDataList.end(); it != itEnd; ++it) { + PlotData* data = *it; + csvText += data->GetName() + ";"; + } + csvText[csvText.length() - 1] = '\n'; + // Values + for(unsigned int i = 0; i < xValues.size(); ++i) { + csvText += wxString::FromCDouble(xValues[i], 13) + ";"; + for(unsigned int j = 0; j < activePlotDataList.size(); ++j) { + double value = 0.0; + if(i < activePlotDataList[j]->GetValues().size()) { + value = activePlotDataList[j]->GetValues()[i]; + } + csvText += wxString::FromCDouble(value, 13) + ";"; + } + csvText[csvText.length() - 1] = '\n'; + } + + // Clear active plot data vector. + for(auto it = activePlotDataList.begin(); it != activePlotDataList.end(); ++it) { + delete(*it); + } + activePlotDataList.clear(); + + return csvText; +} + +wxTreeItemId ChartView::GetActivePlotData(wxTreeItemId root, std::vector<PlotData*>& plotDataList) +{ + wxTreeItemIdValue cookie; + wxTreeItemId item = m_treeCtrl->GetFirstChild(root, cookie); + wxTreeItemId child; + + while(item.IsOk()) { + if(PlotData* data = dynamic_cast<PlotData*>(m_treeCtrl->GetItemData(item))) { + if(data->IsPlot() || data->GetAxis() == 1) { + wxString parentName = m_treeCtrl->GetItemText(m_treeCtrl->GetItemParent(item)); + + PlotData* dataCopy = new PlotData(); + *dataCopy = *data; + dataCopy->SetName(data->GetName() + " (" + parentName + ")"); + plotDataList.push_back(dataCopy); + } + } + + if(m_treeCtrl->ItemHasChildren(item)) { + wxTreeItemId nextChild = GetActivePlotData(item, plotDataList); + if(nextChild.IsOk()) return nextChild; + } + item = m_treeCtrl->GetNextChild(root, cookie); + } + + wxTreeItemId dummyID; + return dummyID; +} diff --git a/Project/ChartView.h b/Project/ChartView.h index 741ffe2..8f5c3d9 100644 --- a/Project/ChartView.h +++ b/Project/ChartView.h @@ -8,7 +8,9 @@ #include <wx/bitmap.h> #include <wx/dcscreen.h> #include <wx/filedlg.h> +#include <wx/textfile.h> +class PlotData; class ElementPlotData; class ChartView : public ChartViewBase @@ -21,6 +23,7 @@ class ChartView : public ChartViewBase void UpdatePlot(bool fit = true); protected: + virtual void OnMenuExpCSVClick(wxCommandEvent& event); virtual void OnTreeItemActivated(wxTreeEvent& event); virtual void OnTreeItemSelectionChanged(wxTreeEvent& event); virtual void OnMenuDarkThemeClick(wxCommandEvent& event); @@ -38,6 +41,8 @@ class ChartView : public ChartViewBase virtual wxColour GetNextColour(); virtual wxTreeItemId AllToYAxis(wxTreeItemId root); virtual wxTreeItemId UpdateAllPlots(wxTreeItemId root); + virtual wxString GetActiveCurvesCSV(); + virtual wxTreeItemId GetActivePlotData(wxTreeItemId root, std::vector<PlotData*>& plotDataList); wxPGProperty* m_pgPropColor = NULL; @@ -55,7 +60,7 @@ class ChartView : public ChartViewBase mpInfoLegend* m_leg = NULL; bool m_hideGrid = true; - bool m_showLeg = false; + bool m_showLeg = true; bool m_showCoords = false; bool m_darkTheme = false; diff --git a/Project/ChartView.wxcp b/Project/ChartView.wxcp index c1d3cfc..db8c3a2 100644 --- a/Project/ChartView.wxcp +++ b/Project/ChartView.wxcp @@ -1,7 +1,7 @@ { "metadata": { "m_generatedFilesDir": ".", - "m_objCounter": 80, + "m_objCounter": 82, "m_includeFiles": [], "m_bitmapFunction": "wxCE3EBInitBitmapResources", "m_bitmapsFile": "ChartViewBitmaps.cpp", @@ -80,7 +80,7 @@ }, { "type": "string", "m_label": "Title:", - "m_value": "Chart view" + "m_value": "Chart viewer" }, { "type": "virtualFolderPicker", "m_label": "Virtual Folder:", @@ -110,23 +110,23 @@ }, { "type": "bitmapPicker", "m_label": "Bitmap File (16x16) :", - "m_path": "" + "m_path": "data/images/chart16.png" }, { "type": "bitmapPicker", "m_label": "Bitmap File (32x32) :", - "m_path": "" + "m_path": "data/images/chart32.png" }, { "type": "bitmapPicker", "m_label": "Bitmap File (64x64) :", - "m_path": "" + "m_path": "data/images/chart64.png" }, { "type": "bitmapPicker", "m_label": "Bitmap File (128x128):", - "m_path": "" + "m_path": "data/images/chart128.png" }, { "type": "bitmapPicker", "m_label": "Bitmap File (256x256):", - "m_path": "" + "m_path": "data/images/chart256.png" }], "m_events": [], "m_children": [{ @@ -330,6 +330,57 @@ }, { "type": "string", "m_label": "Name:", + "m_value": "m_menuItemExportCSV" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Export CSV..." + }, { + "type": "string", + "m_label": "Shortcut:", + "m_value": "" + }, { + "type": "string", + "m_label": "Help String:", + "m_value": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Kind:", + "m_selection": 0, + "m_options": ["normal", "checkable", "radio", "separator"] + }, { + "type": "bool", + "m_label": "Checked", + "m_value": false + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_MENU_SELECTED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnMenuExpCSVClick(wxCommandEvent& event)", + "m_description": "Menu item has been clicked", + "m_noBody": false + }], + "m_children": [] + }, { + "m_type": 4459, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": [], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Name:", "m_value": "m_menuItemSeparator_1" }, { "type": "string", diff --git a/Project/ChartViewBase.cpp b/Project/ChartViewBase.cpp index 4b33d5c..42e9beb 100644 --- a/Project/ChartViewBase.cpp +++ b/Project/ChartViewBase.cpp @@ -22,6 +22,40 @@ ChartViewBase::ChartViewBase(wxWindow* parent, wxWindowID id, const wxString& ti wxCE3EBInitBitmapResources(); bBitmapLoaded = true; } + // Set icon(s) to the application/dialog + wxIconBundle app_icons; + { + wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart16")); + wxIcon icn; + icn.CopyFromBitmap(iconBmp); + app_icons.AddIcon( icn ); + } + { + wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart32")); + wxIcon icn; + icn.CopyFromBitmap(iconBmp); + app_icons.AddIcon( icn ); + } + { + wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart64")); + wxIcon icn; + icn.CopyFromBitmap(iconBmp); + app_icons.AddIcon( icn ); + } + { + wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart128")); + wxIcon icn; + icn.CopyFromBitmap(iconBmp); + app_icons.AddIcon( icn ); + } + { + wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart256")); + wxIcon icn; + icn.CopyFromBitmap(iconBmp); + app_icons.AddIcon( icn ); + } + SetIcons( app_icons ); + m_menuBar = new wxMenuBar(0); this->SetMenuBar(m_menuBar); @@ -35,6 +69,9 @@ ChartViewBase::ChartViewBase(wxWindow* parent, wxWindowID id, const wxString& ti m_menuItemSendToClipboard = new wxMenuItem(m_menuFile, wxID_ANY, _("Send to clipboard"), wxT(""), wxITEM_NORMAL); m_menuFile->Append(m_menuItemSendToClipboard); + m_menuItemExportCSV = new wxMenuItem(m_menuFile, wxID_ANY, _("Export CSV..."), wxT(""), wxITEM_NORMAL); + m_menuFile->Append(m_menuItemExportCSV); + m_menuFile->AppendSeparator(); m_menuItemExit = new wxMenuItem(m_menuFile, wxID_ANY, _("Exit"), wxT(""), wxITEM_NORMAL); @@ -171,6 +208,7 @@ ChartViewBase::ChartViewBase(wxWindow* parent, wxWindowID id, const wxString& ti // Connect events this->Connect(m_menuItemSaveImage->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuSaveImageClick), NULL, this); this->Connect(m_menuItemSendToClipboard->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuSendClipClick), NULL, this); + this->Connect(m_menuItemExportCSV->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuExpCSVClick), NULL, this); this->Connect(m_menuItemExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuExitClick), NULL, this); this->Connect(m_menuItemFit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuFitClick), NULL, this); this->Connect(m_menuItemShowGrid->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuShowGridClick), NULL, this); @@ -187,6 +225,7 @@ ChartViewBase::~ChartViewBase() { this->Disconnect(m_menuItemSaveImage->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuSaveImageClick), NULL, this); this->Disconnect(m_menuItemSendToClipboard->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuSendClipClick), NULL, this); + this->Disconnect(m_menuItemExportCSV->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuExpCSVClick), NULL, this); this->Disconnect(m_menuItemExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuExitClick), NULL, this); this->Disconnect(m_menuItemFit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuFitClick), NULL, this); this->Disconnect(m_menuItemShowGrid->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuShowGridClick), NULL, this); diff --git a/Project/ChartViewBase.h b/Project/ChartViewBase.h index 2c7af3c..5801081 100644 --- a/Project/ChartViewBase.h +++ b/Project/ChartViewBase.h @@ -43,6 +43,7 @@ protected: wxMenu* m_menuFile; wxMenuItem* m_menuItemSaveImage; wxMenuItem* m_menuItemSendToClipboard; + wxMenuItem* m_menuItemExportCSV; wxMenuItem* m_menuItemSeparator_1; wxMenuItem* m_menuItemExit; wxMenu* m_menuView; @@ -77,6 +78,7 @@ protected: protected: virtual void OnMenuSaveImageClick(wxCommandEvent& event) { event.Skip(); } virtual void OnMenuSendClipClick(wxCommandEvent& event) { event.Skip(); } + virtual void OnMenuExpCSVClick(wxCommandEvent& event) { event.Skip(); } virtual void OnMenuExitClick(wxCommandEvent& event) { event.Skip(); } virtual void OnMenuFitClick(wxCommandEvent& event) { event.Skip(); } virtual void OnMenuShowGridClick(wxCommandEvent& event) { event.Skip(); } @@ -91,7 +93,7 @@ public: wxMenuBar* GetMenuBar() { return m_menuBar; } wxTreeCtrl* GetTreeCtrl() { return m_treeCtrl; } wxPropertyGridManager* GetPgMgr() { return m_pgMgr; } - ChartViewBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Chart view"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_FRAME_STYLE); + ChartViewBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Chart viewer"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_FRAME_STYLE); virtual ~ChartViewBase(); }; diff --git a/Project/ChartViewBitmaps.cpp b/Project/ChartViewBitmaps.cpp index 274e17e..ef6907a 100644 --- a/Project/ChartViewBitmaps.cpp +++ b/Project/ChartViewBitmaps.cpp @@ -21,15 +21,685 @@ wxMemoryFSHandler::AddFile(name, data, size) #endif -static size_t xml_res_size_0 = 137; +static size_t xml_res_size_0 = 3278; static unsigned char xml_res_file_0[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,128,0,0,0,128,8,6,0, +0,0,195,62,97,203,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112, +72,89,115,0,0,21,211,0,0,21,211,1,251,209,60,11,0,0,0,25,116,69,88,116, +83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112, +101,46,111,114,103,155,238,60,26,0,0,12,75,73,68,65,84,120,156,237,157, +121,116,21,213,25,192,127,55,9,33,33,160,64,136,85,64,212,82,168,162,162, +30,212,163,7,212,138,130,27,214,106,177,5,165,81,17,194,86,15,160,213,138, +138,68,20,42,10,138,11,178,184,69,80,118,227,82,177,238,90,197,189,173, +82,80,4,142,82,203,81,34,88,1,129,188,240,150,220,254,17,34,9,121,239,101, +238,125,119,150,100,238,239,63,242,230,155,249,14,243,155,111,230,125,247, +206,187,130,73,31,74,178,178,176,132,147,44,98,17,168,174,246,59,15,139, +79,100,33,37,86,130,240,82,83,251,173,4,161,101,223,205,223,74,16,74,234, +63,253,89,9,66,71,78,131,191,236,149,160,251,193,237,24,126,226,65,142, +118,178,112,245,15,124,82,81,105,58,55,139,7,52,20,0,64,74,58,231,199,25, +127,114,17,217,217,217,141,238,100,85,69,196,10,208,68,73,221,0,144,146, +221,187,119,147,72,36,60,76,199,226,53,105,59,64,210,74,16,40,218,178,147, +92,98,70,247,217,104,11,208,74,16,28,238,22,247,179,65,92,194,88,177,152, +150,68,141,236,211,81,15,216,74,224,63,135,179,153,98,86,208,133,10,102, +50,131,117,98,32,37,60,67,14,153,157,19,199,131,0,86,2,127,41,21,243,234, +149,255,195,216,204,92,49,149,245,226,18,74,120,134,108,244,190,186,43, +141,2,213,74,16,143,199,181,14,102,209,163,27,155,184,156,191,37,253,236, +8,190,101,174,152,202,106,49,136,98,86,40,139,160,60,12,40,165,164,178, +178,210,74,224,33,147,196,188,70,75,253,81,108,228,9,81,202,191,247,138, +144,229,80,4,173,113,96,43,129,119,28,197,70,6,241,138,227,237,123,236, +21,225,53,49,198,209,246,218,19,1,172,4,222,80,42,230,105,221,223,223,164, +151,163,237,50,154,9,82,43,129,180,15,134,174,112,52,95,49,144,55,148,227, +254,199,129,220,39,7,59,218,54,227,169,64,82,74,226,123,34,80,109,37,48, +205,100,230,56,190,151,215,101,6,67,248,145,2,71,219,26,154,11,38,33,86, +101,37,48,200,9,172,227,98,241,150,114,220,247,180,229,65,249,59,199,219, +155,155,12,40,173,4,38,185,77,204,69,32,149,227,166,201,43,216,73,43,199, +219,155,157,13,106,37,48,66,47,214,50,128,149,202,113,21,20,242,16,3,149, +98,204,79,7,182,18,100,204,237,98,142,246,213,95,73,158,82,140,59,243,193, +173,4,218,156,202,106,206,227,61,229,184,205,116,96,46,151,40,199,185,247, +66,128,149,64,139,201,204,209,138,155,194,80,34,180,84,142,115,247,141, +16,43,129,18,189,89,197,217,226,35,229,184,77,252,140,71,228,69,90,199, +116,255,149,32,43,129,99,238,96,182,86,220,20,134,178,135,92,173,88,111, +222,9,179,18,52,74,95,241,49,191,18,255,84,142,251,154,67,120,92,94,168, +125,92,239,94,10,148,18,162,182,99,152,138,73,242,97,173,184,201,114,24, +81,90,104,31,215,251,183,66,173,4,13,56,135,247,57,93,124,162,28,247,37, +157,153,207,5,25,29,219,159,215,130,173,4,245,40,69,255,234,143,211,248, +180,253,116,248,247,94,120,52,2,9,59,148,124,1,43,57,69,172,86,142,219, +192,161,44,228,220,140,143,239,239,15,3,196,170,66,47,193,36,161,119,245, +79,146,35,50,190,250,193,111,1,32,212,18,252,70,188,197,73,124,174,28,247, +57,71,176,132,126,70,114,240,95,0,8,165,4,2,201,36,205,123,127,169,44,161, +218,208,169,11,134,0,16,58,9,126,43,222,224,120,214,43,199,173,161,43,79, +211,215,88,30,193,17,0,66,35,65,22,213,76,228,81,173,216,137,140,52,118, +245,215,228,18,52,66,32,193,239,121,149,158,108,80,142,251,23,71,242,156, +60,195,104,46,193,19,0,154,181,4,217,84,51,81,232,93,253,147,40,65,34,140, +230,147,252,247,1,130,64,172,10,200,131,236,250,41,150,240,12,125,196,167, +188,207,177,188,39,143,99,13,93,73,4,212,227,100,92,198,75,28,197,70,229, +184,143,228,209,188,192,105,198,243,9,174,0,80,79,130,150,68,121,80,220, +205,48,158,5,224,15,188,8,2,118,147,207,167,116,103,165,60,158,119,57,142, +247,57,150,239,105,235,111,222,41,200,166,154,155,197,99,90,177,183,50, +194,112,54,53,4,91,0,128,88,21,93,216,78,121,206,77,244,98,109,131,143, +11,136,208,155,85,244,22,171,0,144,8,214,114,56,15,113,41,179,228,165,94, +103,155,150,98,86,240,75,190,86,142,123,79,246,228,101,78,117,33,163,160, +62,3,212,161,143,248,148,215,227,67,233,153,104,120,242,147,33,144,244, +96,35,211,120,128,131,248,193,229,236,156,211,130,56,183,104,222,251,111, +101,164,225,108,246,17,88,1,4,146,113,98,17,207,113,29,69,108,163,50,6, +49,133,241,163,2,34,252,137,39,221,75,80,145,171,248,43,63,231,27,229,184, +149,242,120,94,231,36,23,50,170,33,144,2,180,161,146,5,226,86,74,169,255, +94,156,170,4,163,197,242,64,84,129,150,68,181,239,253,55,139,209,134,179, +169,79,224,4,232,198,38,94,21,163,83,206,139,87,145,160,128,8,215,137,167, +12,102,167,199,48,241,28,93,168,80,142,123,77,158,204,219,242,4,23,50,218, +71,160,4,56,159,119,121,93,140,226,200,70,30,148,84,36,24,195,50,95,171, +64,30,81,110,164,76,43,118,50,195,204,38,147,132,64,8,144,77,53,165,204, +227,41,49,145,3,216,237,40,198,169,4,126,87,129,17,162,156,206,108,81,142, +123,73,158,202,59,184,123,245,67,0,4,40,100,7,79,115,3,227,196,34,229,183, +97,156,74,224,87,21,200,35,202,245,204,215,138,45,165,196,112,54,201,241, +85,128,19,89,203,59,98,184,214,108,216,90,156,72,224,215,55,130,49,98,41, +157,216,170,28,247,130,236,195,135,28,227,66,70,13,241,77,128,65,188,204, +11,98,60,29,53,254,131,246,199,137,4,94,127,35,40,32,194,13,44,80,142,147, +8,38,51,220,133,140,146,227,185,0,45,137,114,191,152,206,28,113,39,121, +236,49,182,223,198,36,240,250,89,224,26,150,104,9,247,44,103,240,49,61, +92,200,40,57,158,10,208,137,45,188,200,88,138,89,225,202,254,43,99,16,77, +35,129,87,207,2,173,169,228,90,177,80,57,78,34,184,77,122,115,239,175,197, +51,1,206,228,31,188,45,74,232,37,190,48,178,191,84,195,162,145,52,18,120, +85,5,198,177,136,34,182,41,199,45,231,44,86,209,205,133,140,82,227,186, +0,181,45,221,229,226,207,20,178,195,200,62,215,208,149,115,121,128,72,138, +119,225,211,73,224,118,21,56,144,93,140,215,184,250,171,201,226,118,121, +181,11,25,165,199,85,1,90,19,161,140,219,26,180,116,51,97,25,103,211,79, +206,226,67,121,116,218,119,226,82,73,80,64,132,107,81,63,65,78,25,207,66, +218,243,163,114,220,98,250,179,154,95,184,144,81,122,92,19,160,27,155,120, +77,140,226,34,241,119,35,251,139,147,77,41,37,12,151,55,255,244,30,252, +125,12,74,89,5,32,181,4,127,20,75,93,169,2,109,217,201,88,177,88,57,46, +225,211,213,15,46,9,224,180,165,235,148,173,180,227,98,121,55,51,247,251, +237,187,239,104,79,25,3,210,198,38,147,192,173,42,112,189,88,64,91,118, +42,199,61,201,249,124,193,225,198,243,113,130,81,1,116,90,186,141,241,129, +60,150,211,228,195,41,219,162,51,229,224,180,85,0,146,75,96,186,10,20,178, +131,107,88,162,28,151,32,139,169,242,42,99,121,168,98,76,128,76,90,186, +169,40,99,0,191,102,6,21,20,166,220,198,73,21,128,134,18,20,16,97,188,88, +100,34,77,0,110,16,243,105,131,250,186,73,101,92,200,122,186,24,203,67, +21,35,2,116,97,51,111,137,145,25,181,116,235,82,69,46,163,229,141,140,147, +215,57,122,247,221,73,21,128,134,18,232,54,107,246,167,136,109,140,102, +185,114,92,140,28,166,200,161,25,31,63,19,140,8,112,189,152,207,161,26, +227,221,201,248,138,78,156,37,31,98,33,231,56,142,113,90,5,160,190,4,166, +170,192,4,202,104,173,113,245,63,202,69,108,164,99,198,199,207,4,35,2,228, +102,184,108,73,45,175,200,83,232,43,103,243,25,93,149,99,157,86,1,168,47, +65,166,85,224,16,190,103,132,40,87,142,139,210,130,105,242,10,237,227,154, +194,247,225,96,168,233,234,205,148,131,25,196,20,182,211,70,107,31,42,85, +0,246,73,144,105,21,152,64,25,173,168,82,142,155,199,197,252,135,67,180, +143,107,10,223,5,216,73,43,134,48,153,82,50,127,227,117,166,28,76,149,194, +111,229,213,74,160,91,5,58,178,149,97,226,89,229,184,42,114,185,83,94,169, +28,231,6,190,10,176,134,174,156,46,31,102,133,236,99,100,127,223,209,158, +50,233,188,10,64,141,4,45,18,122,85,96,162,120,148,124,141,17,205,217,114, +32,223,80,164,28,231,6,190,9,176,132,126,244,147,179,140,63,4,205,68,173, +10,64,141,4,37,137,165,116,96,187,227,152,195,216,204,80,158,87,77,143, +74,242,184,139,98,229,56,183,240,92,128,218,150,238,8,121,147,214,79,155, +54,70,5,133,202,85,0,32,59,86,201,216,132,243,9,28,183,136,199,180,86,241, +156,37,47,77,219,215,240,26,79,5,72,213,210,53,205,189,92,166,92,5,0,174, +142,47,165,40,209,248,12,165,218,69,28,85,217,77,62,211,25,162,28,231,38, +158,9,208,88,75,215,36,58,207,2,0,173,168,98,84,236,73,72,164,191,178,247, +95,196,209,41,247,49,136,45,180,87,142,115,19,79,4,112,210,210,53,141,110, +21,24,41,202,233,16,251,14,226,201,215,230,77,183,136,99,58,118,209,202, +245,202,167,131,171,2,168,182,116,77,162,218,23,168,165,21,85,140,102,89, +141,0,73,36,112,178,136,99,50,238,225,50,182,210,78,57,206,109,92,19,64, +167,165,107,26,213,190,64,45,35,69,121,205,55,130,253,36,232,206,127,149, +22,113,172,101,7,173,3,121,245,131,75,2,100,210,210,53,73,5,133,218,85, +96,148,216,59,184,83,71,130,219,197,108,173,153,77,51,184,156,109,28,160, +28,231,5,70,5,48,209,210,53,141,118,21,160,124,95,95,32,30,165,71,124,157, +235,139,56,250,129,49,1,76,182,116,77,162,91,5,10,136,236,171,2,192,132, +248,92,98,113,245,171,127,186,116,190,136,163,31,24,57,83,203,101,95,78, +147,143,24,107,233,154,102,166,28,68,149,198,138,26,35,40,167,61,63,210, +147,13,12,16,43,169,138,195,30,133,31,47,219,74,59,30,196,249,34,142,126, +96,68,128,87,57,37,16,35,91,169,168,160,3,79,104,244,5,90,19,97,140,88, +202,77,226,241,159,102,57,169,72,112,151,44,102,151,194,34,142,126,16,156, +90,237,50,247,50,88,171,10,140,97,57,231,240,65,189,191,57,145,64,103,17, +71,63,8,141,0,186,85,32,143,61,73,231,56,54,38,129,206,34,142,126,16,26, +1,64,191,59,152,138,84,18,232,46,226,232,7,161,18,160,130,66,158,144,153, +173,177,179,63,201,36,208,93,196,209,15,66,37,0,152,175,2,80,95,130,76, +22,113,244,131,208,9,224,70,21,128,125,18,100,178,136,163,31,132,78,0,112, +167,10,0,108,136,31,204,227,177,204,23,114,242,146,80,10,80,65,33,243,57, +223,248,126,167,201,98,162,241,234,148,67,201,65,36,148,2,0,220,35,47,55, +90,5,54,210,145,197,244,175,249,71,138,161,228,32,18,90,1,76,87,129,105, +178,184,254,50,110,77,68,130,208,10,0,230,170,192,151,116,98,57,103,55, +252,160,9,72,16,106,1,76,85,129,191,200,171,82,47,226,24,112,9,66,45,0, +100,94,5,190,224,48,202,57,51,253,70,1,150,32,244,2,84,80,200,2,121,158, +118,252,157,242,74,103,243,31,2,42,65,232,5,128,154,190,128,78,243,230, +51,186,242,60,167,59,15,8,160,4,86,0,224,91,138,152,47,213,159,5,166,226, +240,234,175,75,192,36,176,2,236,101,6,67,148,158,5,86,209,157,23,101,111, +189,131,5,72,130,224,175,26,230,17,21,20,114,164,92,70,91,118,57,218,126, +7,173,51,91,196,177,86,128,28,127,199,13,172,0,117,216,78,27,111,103,51, +7,64,2,123,11,240,27,159,111,7,86,128,32,224,163,4,86,128,160,224,147,4, +86,128,32,17,143,66,204,220,34,26,78,176,2,4,141,68,204,83,9,172,0,65,196, +67,9,172,0,65,197,35,9,172,0,65,198,3,9,172,0,65,199,101,9,172,0,77,1,23, +37,176,2,52,21,92,146,192,10,208,148,112,65,2,43,64,83,195,176,4,41,71, +3,115,178,156,15,117,182,201,205,166,168,192,14,44,122,135,132,236,4,162, +133,179,249,11,219,171,18,68,19,201,151,241,73,121,214,142,57,40,223,113, +58,211,251,119,102,122,255,206,142,183,183,152,33,55,55,151,252,252,198, +207,211,185,79,173,231,229,47,147,175,101,104,111,1,77,152,104,52,74,36, +18,201,104,31,86,128,38,78,166,18,88,1,154,1,209,104,148,202,74,245,69, +171,192,10,208,108,136,197,98,90,18,88,1,154,17,58,18,88,1,154,25,170,18, +88,1,154,33,42,18,88,1,154,41,78,37,176,2,52,99,156,72,144,178,19,248,252, +186,29,180,207,115,214,222,149,134,86,11,183,184,195,87,91,146,119,1,1, +4,19,222,180,103,47,12,100,231,64,139,134,63,93,107,111,1,97,33,17,135, +88,195,53,142,173,0,97,34,137,4,86,128,176,177,159,4,86,128,48,82,71,2, +59,139,35,172,36,226,64,21,255,7,181,153,56,45,184,129,88,206,0,0,0,0,73, +69,78,68,174,66,96,130}; + +static size_t xml_res_size_1 = 560; +static unsigned char xml_res_file_1[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112, +72,89,115,0,0,2,186,0,0,2,186,1,219,5,165,194,0,0,0,25,116,69,88,116,83, +111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101, +46,111,114,103,155,238,60,26,0,0,1,173,73,68,65,84,56,141,149,147,63,72, +28,65,28,133,191,209,185,91,148,104,226,33,130,160,32,92,115,136,141,145, +112,130,85,42,17,141,40,241,76,229,191,78,33,54,169,44,130,70,16,212,11, +8,130,162,156,26,8,4,133,96,170,84,73,8,136,49,218,120,133,34,8,162,22, +34,68,137,133,38,81,55,187,115,55,22,114,171,203,90,172,175,154,249,189, +121,31,143,97,70,24,111,86,117,121,241,67,182,79,76,76,149,230,190,202, +42,123,32,88,235,8,19,46,48,124,135,6,196,12,79,89,191,6,0,152,166,137, +86,150,175,112,5,123,244,51,75,139,248,126,3,0,72,219,22,248,128,12,137, +41,108,36,195,186,203,13,0,174,1,202,34,136,125,103,184,138,109,26,89,38, +161,155,57,164,232,14,0,80,157,74,178,147,122,198,174,104,38,143,11,151, +55,40,18,152,4,25,166,211,153,185,0,221,124,226,51,175,200,86,151,148,168, +67,94,138,143,142,23,101,139,122,86,152,162,133,95,20,122,1,175,197,28, +35,98,130,36,17,158,232,247,252,180,35,244,170,15,78,139,65,145,224,156, +28,226,186,221,213,202,1,52,240,131,25,221,68,163,30,227,136,66,70,69,39, +185,234,140,158,212,2,53,108,80,203,26,147,196,56,38,228,2,200,204,162, +143,94,166,41,119,140,175,58,74,146,8,221,106,158,58,86,249,43,115,121, +171,219,60,23,235,52,88,210,85,30,51,78,7,33,254,80,169,54,25,179,99,156, +240,200,115,70,122,38,183,244,133,106,190,17,165,148,35,198,213,115,192, +2,25,244,15,0,136,233,145,155,77,230,161,221,130,200,236,44,1,64,73,94, +128,255,62,63,147,144,32,2,6,7,103,22,178,52,63,0,192,98,107,216,87,56, +35,195,48,120,252,110,23,185,114,240,143,23,139,251,252,190,176,81,105, +125,47,200,254,105,154,43,206,33,140,175,150,245,39,228,0,0,0,0,73,69,78, +68,174,66,96,130}; + +static size_t xml_res_size_2 = 6410; +static unsigned char xml_res_file_2[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,0,0,0,1,0,8,6,0,0,0, +92,114,168,102,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72, +89,115,0,0,43,165,0,0,43,165,1,137,102,26,50,0,0,0,25,116,69,88,116,83, +111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101, +46,111,114,103,155,238,60,26,0,0,24,135,73,68,65,84,120,156,237,221,105, +120,85,213,185,192,241,255,10,73,152,81,68,20,84,174,181,22,171,32,85,107, +181,173,15,125,180,74,65,64,133,130,85,164,14,113,66,172,94,161,106,69, +171,64,64,173,120,169,138,67,85,16,209,160,12,82,172,114,11,181,181,150, +58,161,60,90,43,215,214,129,50,22,28,65,40,40,25,200,25,214,253,16,3,9, +156,36,103,88,251,221,211,251,251,210,199,152,179,223,45,37,255,189,206, +201,58,251,24,38,189,153,2,138,80,74,197,78,17,181,213,126,159,131,82,202, +39,69,164,147,104,4,148,138,167,186,165,127,58,165,17,80,42,134,118,63, +247,215,8,40,21,59,141,95,252,211,8,40,21,43,123,191,250,175,17,80,42,54, +50,255,250,79,35,160,84,44,52,253,251,255,250,8,88,43,120,58,74,41,73,205, +111,0,74,167,32,81,163,17,80,42,162,90,222,1,168,17,80,42,178,178,219,2, +172,17,80,42,146,138,179,254,206,250,8,148,180,161,67,235,86,180,47,105, +229,244,68,118,166,210,108,171,73,57,61,166,82,170,121,217,7,0,118,69,96, +226,143,122,114,253,73,221,156,158,200,31,87,111,103,224,220,85,78,143, +169,148,106,94,238,239,2,76,167,72,212,84,99,245,233,128,82,161,151,215, +219,128,211,169,36,85,85,85,26,1,165,66,46,239,251,0,36,147,26,1,165,194, +174,160,27,129,104,4,148,10,183,130,239,4,164,17,80,42,188,156,220,10,76, +35,160,212,222,78,53,111,114,32,91,253,62,141,102,57,187,23,96,50,153,164, +178,178,82,35,160,20,208,158,106,230,113,11,107,205,16,238,53,119,209,141, +45,126,159,82,70,78,111,6,154,74,165,52,2,74,1,99,152,207,1,108,165,29, +53,92,195,124,86,155,31,115,175,185,43,112,43,2,231,119,3,214,8,168,184, +235,68,37,215,153,39,27,125,173,61,213,187,66,48,133,7,232,204,23,62,157, +93,99,158,220,14,92,35,160,226,108,44,243,216,175,137,31,240,14,84,49,206, +84,240,111,115,38,83,120,128,125,249,82,248,236,26,243,236,243,0,52,2,42, +142,246,97,7,99,205,188,22,191,175,227,87,33,88,99,134,82,206,12,246,97, +135,192,217,237,205,211,15,4,209,8,168,184,185,142,57,57,45,239,247,227, +11,38,154,71,118,133,160,19,149,30,158,221,222,60,255,68,32,141,128,138, +139,46,108,103,76,22,87,255,166,30,91,31,130,113,166,130,182,236,116,124, +118,153,137,124,36,152,70,64,197,193,245,230,201,130,175,224,251,179,141, +41,60,192,122,115,22,227,76,5,109,168,117,116,118,153,137,125,38,160,70, +64,69,217,254,108,227,42,22,56,59,222,1,108,101,10,15,240,47,51,140,49, +102,190,103,33,16,253,80,80,141,128,138,170,113,166,130,142,84,57,63,110, +15,62,99,26,119,177,210,12,103,140,153,79,107,199,33,16,255,84,96,141,128, +138,154,110,108,225,103,44,244,116,198,127,241,41,211,184,139,119,205,185, +92,200,18,12,110,126,126,124,249,88,112,141,128,138,146,27,121,156,118, +212,136,204,58,156,15,185,208,44,193,98,156,28,207,151,0,128,70,64,69,67, +119,62,103,148,121,70,116,230,100,46,119,118,44,223,2,0,26,1,21,126,55, +51,75,236,87,118,0,127,226,251,188,108,143,115,118,60,95,3,0,26,1,21,94, +61,248,140,203,204,34,209,153,229,14,175,254,16,128,0,64,93,4,106,170,171, +244,115,7,84,168,220,98,30,117,254,170,124,115,22,219,190,44,183,125,156, +30,51,16,1,0,72,167,82,144,208,207,34,84,225,112,40,159,80,198,98,209,153, +46,159,251,215,11,76,0,0,72,167,53,2,42,20,38,152,153,148,146,16,155,247, +172,61,133,55,233,229,252,184,193,10,0,104,4,84,224,29,206,135,92,200,18, +177,121,22,195,36,15,174,254,16,196,0,128,70,64,5,218,4,51,147,98,228,62, +198,110,33,167,177,130,35,60,57,118,48,3,0,26,1,21,72,61,217,200,72,254, +40,54,47,77,17,183,217,75,60,59,126,112,3,0,117,17,168,213,8,168,224,152, +100,166,139,94,253,159,226,71,188,67,79,207,142,31,236,0,0,88,141,128,10, +134,94,172,227,92,254,44,54,47,69,17,183,218,75,61,157,17,252,0,128,70, +64,5,66,185,153,65,17,105,177,121,115,24,200,251,28,230,233,140,112,4,0, +52,2,202,87,71,179,134,225,44,21,155,151,162,136,95,217,139,61,159,19,158, +0,128,70,64,249,230,86,30,22,189,250,87,112,6,43,57,212,243,57,225,10,0, +104,4,148,184,111,243,1,67,204,75,98,243,18,20,115,187,135,175,252,55,20, +190,0,64,131,8,200,21,89,197,215,36,166,59,187,1,71,54,102,217,179,88,203, +193,34,179,194,25,0,248,42,2,53,26,1,229,169,239,152,247,25,108,150,137, +205,171,165,132,41,148,137,205,11,111,0,64,35,160,60,119,27,15,137,94,253, +31,177,67,89,79,119,177,121,225,14,0,104,4,148,103,78,50,239,48,128,215, +197,230,213,80,42,122,245,135,40,4,0,52,2,202,19,147,121,88,116,222,195, +12,231,67,14,16,157,25,141,0,128,70,64,57,213,215,172,224,52,222,20,155, +87,67,41,83,237,5,98,243,234,69,39,0,160,17,80,206,220,198,67,162,243,30, +224,28,62,166,171,232,76,136,90,0,64,35,160,10,214,207,188,193,201,252, +93,108,94,37,109,125,185,250,67,20,3,0,26,1,85,144,9,204,20,157,119,63, +231,178,137,253,68,103,214,139,102,0,64,35,160,242,114,186,121,157,31,240, +182,216,188,29,180,227,110,59,82,108,222,158,162,27,0,208,8,168,156,149, +51,67,116,222,61,118,36,155,233,44,58,179,161,104,7,0,52,2,42,107,103,242, +10,223,229,159,98,243,182,211,129,105,156,39,54,47,147,232,7,0,52,2,170, +69,6,203,120,35,251,220,255,110,251,83,182,210,73,116,230,158,226,17,0, +208,8,168,102,13,229,37,78,224,61,177,121,219,232,200,125,156,43,54,175, +41,241,9,0,104,4,84,70,6,203,68,35,251,220,127,170,189,128,109,116,20,157, +153,73,188,2,0,26,1,181,151,159,240,23,142,97,149,216,188,45,236,195,253, +1,184,250,67,28,3,0,26,1,181,75,17,105,110,49,143,138,206,188,147,139,248, +146,118,162,51,155,18,207,0,128,70,64,1,48,130,231,233,195,106,177,121, +155,233,204,67,118,184,216,188,150,196,55,0,160,17,136,185,86,164,25,47, +124,245,191,131,50,118,4,228,234,15,113,15,0,104,4,98,236,124,254,192,145, +172,23,155,247,9,251,51,221,14,19,155,151,13,13,0,104,4,98,168,21,105,126, +105,30,19,157,249,43,123,49,85,180,17,157,217,18,13,64,61,141,64,172,148, +241,123,142,96,131,216,188,143,233,202,163,12,17,155,151,45,13,64,67,26, +129,88,40,33,41,126,245,191,213,94,74,53,173,69,103,102,67,3,176,39,141, +64,228,93,202,34,190,206,71,98,243,54,208,141,89,156,37,54,47,23,26,128, +76,244,115,7,34,171,148,4,227,76,133,232,204,201,246,50,106,41,17,157,153, +45,13,64,83,172,213,8,68,208,40,158,225,107,124,34,54,111,61,221,121,130, +65,98,243,114,165,1,104,142,70,32,82,218,80,43,126,245,47,183,163,2,123, +245,7,13,64,203,52,2,145,113,165,89,200,33,108,18,155,183,138,30,204,97, +160,216,188,124,104,0,178,81,31,129,180,70,32,172,218,178,147,235,121,82, +116,102,185,29,69,146,86,162,51,115,165,1,200,150,181,144,208,8,132,213, +213,102,1,7,177,89,108,222,123,28,198,124,250,139,205,203,151,6,32,23,26, +129,80,106,79,181,248,213,127,146,29,69,58,4,63,94,193,63,195,160,201,35, +2,39,154,119,185,136,197,162,59,207,212,110,215,152,167,56,128,173,98,243, +254,193,55,88,200,169,98,243,10,81,236,247,9,132,82,125,4,74,218,66,81, +243,13,29,197,51,220,207,84,74,77,2,128,47,104,207,27,182,55,203,56,134, +183,56,138,87,56,54,16,119,134,137,170,14,84,241,115,230,138,206,44,39, +28,87,127,208,0,228,175,133,8,180,161,150,251,205,84,46,227,217,70,95,239, +68,37,253,204,27,244,227,13,0,82,20,177,146,67,121,149,99,89,102,235,162, +240,30,135,97,49,34,255,25,81,119,45,115,233,202,127,196,230,189,205,55, +121,198,158,34,54,175,80,26,128,66,52,17,129,30,124,198,66,198,113,34,239, +182,120,136,86,164,233,197,58,122,177,142,81,230,25,0,62,165,11,127,179, +71,241,22,71,241,170,169,11,67,16,247,145,7,221,62,236,96,172,153,39,58, +115,162,189,34,84,241,214,0,20,106,143,8,244,55,203,153,203,45,116,97,123, +222,135,236,198,22,206,48,175,114,6,175,2,80,107,74,248,187,61,146,229, +230,104,94,179,223,226,105,78,13,205,18,211,79,215,49,135,206,124,33,54, +239,77,122,177,152,190,98,243,92,208,191,69,46,88,139,73,84,113,131,125, +156,63,48,166,160,31,254,76,74,73,240,61,243,15,198,50,143,5,230,38,206, +102,169,211,227,71,81,23,182,51,70,175,254,45,210,0,56,208,129,106,42,152, +200,205,137,223,136,252,138,112,162,153,65,17,250,171,200,230,92,199,147, +116,162,82,108,222,235,244,225,57,78,18,155,231,138,6,160,64,61,217,200, +11,230,74,206,226,101,172,133,202,4,164,60,254,217,236,197,58,93,5,52,99, +127,182,113,181,89,32,58,115,2,163,69,231,185,162,1,40,192,32,150,177,212, +140,230,72,254,189,235,107,82,17,208,85,64,211,198,153,10,58,82,37,54,111, +25,199,240,130,61,81,108,158,75,26,128,60,20,147,162,156,25,204,49,227, +51,254,69,147,136,128,174,2,50,235,198,22,126,198,66,209,153,183,112,165, +232,60,151,52,0,57,234,202,127,120,150,235,25,107,230,97,176,77,126,159, +68,4,38,152,71,116,21,176,135,113,166,130,118,212,136,205,91,106,79,224, +69,123,188,216,60,215,52,0,57,56,150,149,44,53,63,163,175,89,145,213,247, +123,29,129,222,172,213,85,64,3,221,249,156,43,248,157,232,204,73,230,114, +209,121,174,105,0,178,84,198,98,158,55,255,77,15,62,205,233,113,94,71,64, +95,11,216,237,102,102,209,150,157,98,243,254,196,247,121,217,30,39,54,207, +11,26,128,22,180,161,150,251,204,175,153,102,238,162,148,68,94,199,240, +50,2,189,88,199,112,93,5,208,131,207,184,204,44,18,157,89,78,184,175,254, +160,1,104,214,193,108,98,9,99,184,144,37,5,31,203,203,8,76,212,215,2,184, +153,89,180,166,86,108,222,18,250,178,220,246,17,155,231,21,13,64,19,250, +154,21,188,104,70,115,188,249,192,217,49,189,138,64,111,214,198,122,21, +112,40,159,112,177,249,189,232,204,73,54,252,87,127,208,0,236,197,96,185, +142,57,44,226,58,79,222,69,230,85,4,38,152,153,177,93,5,140,55,143,230, +253,244,44,31,139,56,153,55,233,37,54,207,75,26,128,6,58,80,77,133,41,103, +188,153,73,43,15,127,152,188,136,192,209,172,137,229,42,224,112,62,228, +34,22,139,205,179,24,202,237,40,177,121,94,211,0,124,165,225,150,94,9,94, +68,32,142,175,5,76,48,51,41,38,37,54,239,105,123,42,43,56,66,108,158,215, +52,0,100,222,210,43,193,117,4,226,246,90,64,79,54,50,146,63,138,205,75, +83,196,173,92,42,54,79,66,172,3,80,76,138,219,205,67,77,110,233,149,224, +58,2,227,205,163,177,89,5,148,155,25,162,87,255,5,244,227,29,122,138,205, +147,16,219,0,116,97,59,11,25,199,85,44,104,118,75,175,4,151,17,232,195, +106,134,153,191,22,126,160,128,235,197,58,70,240,188,216,188,20,69,76,182, +151,137,205,147,18,203,0,28,203,74,94,52,163,57,197,188,229,247,169,236, +82,31,129,164,131,8,148,19,253,221,129,229,194,59,32,231,114,58,239,115, +152,216,60,41,177,11,64,190,91,122,37,88,11,85,14,34,208,155,181,145,94, +5,72,255,198,35,69,17,183,219,75,196,230,73,138,77,0,92,108,233,149,224, +42,2,81,94,5,220,202,195,162,255,109,21,156,193,74,14,21,155,39,41,22,1, +112,185,165,87,130,139,8,68,117,21,240,109,62,96,136,121,73,108,94,130, +226,200,94,253,33,6,1,240,98,75,175,4,23,17,136,226,42,96,18,211,69,95, +180,125,140,51,89,203,193,98,243,164,69,54,0,6,203,88,51,207,179,45,189, +18,10,141,64,111,214,242,99,94,116,122,78,126,58,158,247,25,108,150,137, +205,171,165,132,41,182,76,108,158,31,34,25,128,250,45,189,229,204,240,116, +75,175,132,66,35,48,201,76,143,204,42,224,118,243,144,232,213,255,17,59, +148,117,28,36,54,207,15,145,11,192,145,172,231,69,51,74,108,75,111,62,82, +57,254,177,23,18,129,168,172,2,78,50,239,48,128,215,197,230,213,80,202, +29,92,44,54,207,47,145,10,192,32,150,241,103,115,21,223,224,67,191,79,37, +35,139,225,97,134,243,115,123,109,238,143,45,32,2,81,88,5,76,230,97,209, +121,211,237,48,62,162,171,232,76,63,68,34,0,173,72,55,123,151,222,32,216, +65,91,202,152,200,141,246,106,230,48,144,213,28,146,243,49,242,141,64,216, +87,1,125,205,10,78,227,77,177,121,53,148,50,149,11,197,230,249,41,244,1, +232,194,118,158,230,134,22,239,210,235,167,213,28,66,63,251,32,139,236, +201,64,221,83,128,123,236,79,243,58,86,190,17,8,243,42,224,86,43,123,245, +127,128,115,98,113,245,135,144,7,32,136,91,122,247,244,156,61,137,83,237, +195,124,192,215,26,125,125,62,253,243,90,5,64,126,17,8,235,42,160,159,121, +67,244,255,223,74,218,50,213,94,32,54,207,111,161,13,64,144,183,244,66, +221,85,190,156,81,140,228,54,190,160,125,198,127,159,239,42,0,242,139,64, +24,87,1,19,152,41,58,239,126,206,101,19,251,137,206,244,83,232,2,208,58, +4,91,122,183,176,15,103,219,59,153,102,207,107,246,211,98,11,89,5,64,238, +17,232,205,90,134,10,238,162,43,212,233,230,117,126,192,219,98,243,118, +208,142,187,237,72,177,121,65,16,170,0,28,204,38,254,16,240,45,189,255, +199,17,252,208,78,231,175,124,167,197,239,45,116,21,0,95,189,139,176,54, +251,8,76,34,60,171,128,114,102,136,206,187,199,142,100,51,157,69,103,250, +45,52,1,8,195,150,222,249,244,103,128,189,143,13,28,152,211,99,10,89,5, +212,203,54,2,71,179,38,20,171,128,51,204,43,124,151,127,138,205,219,78, +7,166,113,158,216,188,160,8,124,0,194,176,165,119,39,165,140,177,215,51, +218,222,68,13,173,115,122,172,139,85,64,189,108,35,16,244,85,128,193,138, +63,247,191,135,145,108,165,147,232,204,32,8,116,0,194,176,165,247,99,186, +50,216,78,163,130,193,121,31,99,62,253,89,227,232,13,39,149,181,144,104, +225,46,89,65,95,5,12,229,37,78,224,61,177,121,219,232,200,189,118,132,216, +188,32,9,108,0,164,239,210,155,143,101,28,195,41,118,58,127,227,168,130, +142,227,114,21,0,117,47,12,182,20,129,160,174,2,12,150,137,70,246,185,255, +84,123,1,219,232,40,58,51,40,2,25,128,65,44,227,47,230,74,241,187,244,102, +171,126,75,239,16,123,23,155,28,189,104,52,143,1,206,86,1,208,114,4,130, +186,10,56,155,191,112,12,171,196,230,109,97,31,238,231,92,177,121,65,19, +168,0,52,220,210,219,137,74,191,79,39,163,134,91,122,147,180,114,118,92, +215,171,0,104,57,2,65,91,5,20,145,102,188,121,84,116,230,255,216,11,249, +146,118,162,51,131,36,48,1,40,37,25,186,45,189,174,185,94,5,64,243,17,56, +154,53,12,9,208,83,172,17,60,79,31,86,139,205,219,76,103,30,228,108,177, +121,65,20,152,0,156,104,222,13,229,150,94,151,188,88,5,64,243,17,152,108, +100,239,175,215,148,86,62,92,253,239,160,140,29,49,190,250,67,128,2,208, +134,157,126,159,66,70,45,109,233,117,205,139,85,0,52,29,129,160,172,2,126, +202,115,28,201,122,177,121,159,176,63,211,237,48,177,121,65,21,152,0,4, +81,182,91,122,93,242,106,21,0,77,71,192,239,85,64,43,210,220,108,102,137, +206,188,131,50,170,104,35,58,51,136,52,0,77,200,101,75,175,107,94,173,2, +32,115,4,252,94,5,148,241,123,142,96,131,216,188,143,233,202,76,59,84,108, +94,144,105,0,50,200,103,75,175,75,41,138,152,230,225,155,82,50,69,192,175, +85,64,9,73,126,105,30,19,157,121,171,189,148,234,28,119,108,70,149,6,160, +129,66,182,244,186,54,159,254,172,167,187,103,199,223,51,2,126,173,2,46, +49,255,203,215,249,72,108,222,6,186,49,139,179,196,230,5,157,6,224,43,46, +182,244,186,148,160,152,187,236,249,158,206,216,51,2,19,204,35,162,191, +130,45,37,193,141,60,46,54,15,234,174,254,181,148,136,206,12,50,13,0,238, +182,244,186,230,245,42,0,26,71,224,88,254,37,250,169,59,163,120,134,175, +241,137,216,188,245,116,103,118,64,2,31,20,177,14,128,23,91,122,93,146, +88,5,64,227,8,76,68,102,21,208,134,90,198,153,10,207,231,52,84,110,71,233, +213,127,15,177,13,128,87,91,122,93,147,88,5,192,238,8,72,173,2,70,243,52, +135,176,201,243,57,245,86,209,131,57,12,20,155,23,22,177,12,128,215,91, +122,93,146,90,5,192,238,8,120,189,10,104,203,78,126,97,158,240,236,248, +153,76,178,163,2,29,122,191,196,46,0,139,236,201,156,98,103,120,186,165, +215,181,249,244,231,223,116,19,153,85,149,128,222,41,111,87,1,87,241,91, +14,98,179,103,199,223,211,251,28,198,124,250,139,205,11,147,216,4,160,126, +75,111,25,19,217,65,91,191,79,39,39,146,171,0,168,139,192,205,169,25,158, +172,2,218,83,45,126,245,47,183,163,114,254,56,182,184,136,197,159,138,31, +91,122,93,155,199,0,145,215,2,234,245,76,172,226,204,244,82,231,199,189, +198,60,197,1,108,117,126,220,166,188,203,215,89,200,169,98,243,194,38,242, +1,240,115,75,175,75,9,138,185,219,163,247,8,52,229,23,137,153,152,148,187, +91,175,119,160,138,159,51,215,217,241,178,49,129,209,164,163,255,215,60, +111,145,254,147,241,123,75,175,107,210,171,128,62,172,102,96,98,41,164, +146,78,142,119,45,115,69,111,236,250,54,223,228,25,123,138,216,188,48,138, +100,0,130,180,165,215,37,63,86,1,55,154,10,76,162,26,10,92,9,236,195,14, +198,154,121,142,206,42,59,19,237,21,161,125,202,39,37,114,1,8,218,150,94, +215,164,87,1,223,98,21,3,121,13,18,59,11,138,192,181,102,14,157,249,194, +225,153,53,239,45,142,98,49,125,197,230,133,85,164,2,16,212,45,189,46,249, +182,10,192,230,29,129,125,249,146,107,120,202,131,51,107,218,120,59,90, +175,254,89,136,68,0,130,190,165,215,181,121,12,16,219,23,0,13,86,1,144, +87,4,110,96,54,251,242,165,7,103,150,217,235,244,225,57,78,18,155,23,102, +161,15,64,88,182,244,186,84,183,10,144,219,23,0,13,86,1,144,83,4,246,103, +27,87,155,5,30,158,217,222,38,48,90,116,94,152,133,58,0,97,218,210,235, +218,92,63,87,1,144,117,4,110,96,54,29,169,242,240,204,26,91,198,49,188, +96,79,20,155,23,118,161,13,128,196,93,122,131,204,247,85,0,180,24,129,110, +108,225,42,243,91,129,51,219,237,22,174,20,157,23,118,161,11,64,138,34, +166,216,139,196,238,210,27,100,126,172,2,78,55,175,55,254,98,51,17,24,103, +42,104,71,141,192,153,213,89,106,79,224,69,123,188,216,188,40,8,85,0,234, +183,244,78,161,76,95,225,197,159,85,192,77,60,190,247,123,4,50,68,160,59, +159,115,5,191,19,60,51,152,100,46,23,157,23,5,161,9,64,84,182,244,186,22, +136,85,0,236,21,129,95,154,199,104,43,248,89,15,127,226,251,188,108,143, +19,155,23,21,161,8,64,212,182,244,186,148,160,216,179,207,17,104,74,198, +85,0,236,138,64,15,62,227,114,158,21,61,167,114,244,234,159,143,64,7,32, +170,91,122,93,155,195,233,193,88,5,0,36,118,50,46,53,147,214,212,138,157, +207,18,250,178,220,246,17,155,23,37,129,13,64,212,183,244,186,20,164,85, +64,15,62,227,156,228,18,106,155,249,84,98,215,38,115,153,220,176,136,9, +100,0,226,176,165,215,181,160,172,2,110,48,179,41,37,65,117,2,145,8,60, +107,79,225,13,219,219,251,65,17,21,152,0,108,176,221,99,183,165,215,165, +32,172,2,14,227,99,70,240,252,174,127,246,58,2,22,195,36,125,238,95,144, +192,4,96,21,135,48,132,95,199,106,75,175,107,115,56,157,13,194,171,128, +1,44,223,245,207,227,204,108,74,104,124,239,0,47,35,240,59,126,200,10,142, +240,230,224,49,17,152,0,88,12,47,219,111,251,125,26,161,230,199,59,5,111, +50,117,171,128,195,249,136,179,121,33,227,247,120,17,129,52,69,76,182,250, +220,191,80,129,9,128,114,67,250,181,128,99,248,23,3,88,206,141,230,113, +138,105,250,167,220,117,4,22,208,143,119,232,233,238,128,49,165,1,136,24, +63,94,11,184,195,60,192,112,90,190,129,104,117,2,118,58,184,187,88,138, +34,38,89,125,238,239,130,6,32,130,164,87,1,135,241,113,214,31,45,94,147, +44,60,2,115,57,61,182,111,2,115,77,3,16,65,9,138,153,198,72,191,79,163, +73,133,68,32,69,17,183,219,75,220,158,80,140,105,0,34,234,73,59,80,116, +21,144,171,124,35,48,155,193,172,228,80,247,39,20,83,26,128,136,10,250, +42,0,114,143,64,130,98,110,179,151,122,119,66,49,164,1,136,176,160,175, +2,32,183,8,60,198,153,172,229,96,111,79,40,102,52,0,17,22,134,85,0,100, +23,129,4,197,76,177,101,34,231,19,39,26,128,136,123,210,14,20,221,29,152, +175,150,34,240,8,67,89,199,65,114,39,20,19,26,128,136,75,80,204,52,123, +158,223,167,145,149,166,34,80,67,41,119,216,139,229,79,40,6,52,0,49,240, +4,131,66,177,10,128,204,17,152,110,135,241,33,7,248,115,66,17,167,1,136, +129,48,173,2,160,113,4,106,40,101,42,23,250,123,66,17,166,1,136,137,48, +173,2,96,119,4,126,99,207,225,35,186,250,125,58,145,165,1,136,137,176,173, +2,0,182,38,219,112,103,114,132,223,167,17,105,26,128,24,9,219,42,96,58, +195,216,156,108,15,73,185,251,11,198,141,6,32,70,194,180,10,168,164,45, +191,177,63,169,251,135,100,173,70,192,35,26,128,152,9,203,42,224,65,206, +230,115,246,221,253,5,141,128,39,52,0,49,147,160,152,123,9,246,243,234, +47,104,207,131,245,87,255,134,52,2,206,105,0,98,104,182,29,28,232,85,192, +131,252,132,255,208,49,243,191,212,8,56,165,1,136,161,32,175,2,182,211, +129,135,236,240,230,191,73,35,224,140,6,32,166,130,186,10,184,207,142,96, +59,29,90,254,70,141,128,19,26,128,152,10,226,42,96,43,157,152,206,176,236, +31,160,17,40,152,6,32,198,130,182,10,184,215,158,199,14,218,230,246,32, +141,64,65,52,0,49,22,164,85,192,38,58,243,8,67,243,123,176,70,32,111,26, +128,152,123,194,14,98,99,0,86,1,247,218,17,84,209,38,255,3,104,4,242,162, +1,136,185,90,74,184,215,250,187,10,248,148,46,204,98,72,225,7,210,8,228, +76,3,160,152,141,191,171,128,123,24,73,53,173,221,28,76,35,144,19,13,128, +242,117,21,240,41,251,83,97,7,187,61,168,70,32,107,26,0,5,248,183,10,152, +202,249,212,184,186,250,55,164,17,200,138,6,64,1,117,171,128,105,194,191, +17,216,72,55,158,176,131,188,27,160,17,104,145,6,64,237,34,253,27,129,169, +246,124,106,41,241,118,136,70,160,89,26,0,181,139,228,107,1,27,232,198, +124,250,139,204,34,89,11,137,157,50,179,66,70,3,160,26,145,122,45,96,138, +45,243,254,234,223,80,42,161,17,200,64,3,160,26,169,165,132,251,56,215, +211,25,107,56,152,5,244,243,116,70,70,26,129,189,104,0,212,94,42,236,96, +79,87,1,119,218,50,146,180,242,236,248,205,210,8,52,82,236,247,9,168,224, +169,165,132,65,118,26,93,216,214,236,247,181,50,150,142,84,230,124,252, +87,56,46,223,83,115,35,149,168,251,223,18,15,126,253,24,50,26,0,149,209, +70,14,100,35,7,54,255,77,86,230,92,60,161,17,0,244,41,128,138,51,125,58, +160,1,80,49,23,243,8,104,0,148,138,113,4,52,0,74,65,108,35,160,1,80,170, +94,12,35,160,1,80,170,161,152,69,64,3,160,212,158,98,20,1,13,128,82,153, +196,36,2,26,0,165,154,18,131,8,104,0,148,106,78,42,1,137,26,191,207,194, +51,26,0,165,90,146,74,70,54,2,26,0,165,178,17,209,8,104,0,148,202,86,4, +35,160,1,80,42,23,17,139,128,6,64,169,92,69,40,2,26,0,165,242,17,145,8, +104,0,148,202,87,4,34,160,1,80,170,16,33,143,128,6,64,169,66,133,56,2,26, +0,165,92,8,105,4,52,0,74,185,18,194,8,104,0,148,114,41,100,17,208,0,40, +229,90,136,34,160,1,80,202,11,169,36,212,86,251,125,22,45,210,0,40,229, +149,116,42,240,17,208,0,40,229,165,128,71,64,3,160,148,215,2,28,1,13,128, +82,18,2,26,1,13,128,82,82,2,24,129,188,62,29,184,93,137,251,110,116,40, +109,69,175,174,109,157,31,87,169,160,49,69,80,212,218,237,223,245,205,85, +73,62,221,145,200,249,113,121,5,224,184,238,237,243,121,88,179,190,119, +72,123,94,187,228,72,231,199,85,42,136,138,139,139,105,223,222,221,207, +209,61,203,63,227,218,231,55,230,252,56,125,10,160,148,15,146,201,36,149, +149,149,126,159,134,6,64,41,191,4,33,2,26,0,165,124,228,119,4,52,0,74,249, +172,62,2,214,90,241,217,26,0,165,2,32,153,76,82,85,85,37,30,1,13,128,82, +1,225,71,4,52,0,74,5,136,116,4,52,0,74,5,140,100,4,52,0,74,5,144,84,4,52, +0,74,5,148,68,4,52,0,74,5,152,215,17,208,0,40,21,112,94,70,64,3,160,84, +8,120,21,1,13,128,82,33,225,69,4,52,0,74,133,136,235,8,104,0,148,10,25, +151,239,29,208,0,40,21,66,169,84,202,73,4,52,0,74,133,148,139,8,104,0,148, +10,177,66,35,144,87,0,94,219,248,101,94,195,148,82,238,165,82,41,106,107, +170,32,143,8,24,110,90,154,170,187,79,105,246,218,151,22,121,114,103,96, +165,84,126,170,18,105,42,147,64,73,91,48,38,235,199,229,117,87,224,202, +218,52,149,181,233,124,30,170,148,242,82,162,58,167,8,232,101,92,169,40, +73,167,235,34,144,229,211,1,13,128,82,81,147,67,4,52,0,74,69,81,150,17, +208,0,40,21,85,89,68,64,3,160,84,148,181,16,1,13,128,82,81,215,76,4,52, +0,74,197,65,19,17,208,0,40,21,23,25,34,160,1,80,42,78,246,136,128,6,64, +169,184,105,16,1,13,128,82,113,244,85,4,254,31,121,241,55,153,214,40,101, +56,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_3 = 987; +static unsigned char xml_res_file_3[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0, +0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112, +72,89,115,0,0,5,98,0,0,5,98,1,172,97,92,156,0,0,0,25,116,69,88,116,83,111, +102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46, +111,114,103,155,238,60,26,0,0,3,88,73,68,65,84,88,133,197,151,123,104,141, +97,24,192,127,239,217,185,76,10,209,140,105,229,210,92,74,174,115,89,91, +20,139,134,48,127,80,194,220,134,63,8,145,63,196,54,119,43,33,252,97,182, +154,40,162,200,106,214,148,132,153,68,211,102,180,37,119,25,67,238,235, +236,59,231,59,123,253,113,182,119,59,190,239,59,151,156,195,243,215,251, +60,207,251,188,207,239,125,222,219,247,9,242,238,74,226,28,252,47,177,227, +213,72,238,233,100,250,144,62,0,220,122,253,147,151,223,180,127,6,96,3, +24,213,219,70,81,86,18,165,243,6,50,105,64,247,152,36,74,166,153,25,226, +158,57,0,128,219,237,198,227,241,196,36,57,192,78,81,194,53,54,80,69,46, +233,212,25,1,58,32,218,116,111,212,147,15,162,137,229,148,3,144,33,106, +25,79,131,57,0,128,207,211,10,122,116,43,145,39,138,113,160,3,240,142,4, +138,88,96,13,0,248,1,162,4,145,194,91,150,82,161,244,253,114,37,26,206, +16,0,81,132,200,19,197,196,209,6,192,27,250,81,194,188,0,191,53,64,20,32, +134,243,138,197,92,83,250,94,185,10,15,129,119,78,112,128,63,32,250,243, +57,34,128,2,113,10,91,251,236,95,146,196,105,230,24,250,132,6,0,156,122, +11,39,244,125,52,137,44,62,136,153,28,17,135,67,198,140,228,57,11,185,174, +244,61,114,53,94,236,145,3,36,241,137,10,177,145,37,190,43,104,58,36,242, +133,77,156,39,85,52,4,141,219,69,17,2,9,192,51,146,57,195,108,211,126,65, +1,50,68,45,183,196,90,82,219,207,109,171,14,154,255,52,145,47,139,45,227, +198,240,148,108,113,179,19,70,230,226,179,72,101,9,176,94,92,160,140,45, +36,240,85,217,170,25,173,32,230,136,170,128,11,165,171,116,157,125,35,3, +57,199,76,75,88,3,128,11,141,82,177,139,189,156,84,199,199,131,131,77,114, +11,179,229,81,106,25,166,32,242,133,177,10,169,162,129,185,226,118,39,140, +204,165,45,72,161,13,158,29,162,148,108,110,42,189,137,4,178,56,166,118, +240,65,153,3,248,151,99,134,94,197,56,26,3,226,119,115,82,181,159,48,152, +139,100,90,38,55,5,72,226,147,106,87,49,150,41,242,20,53,114,184,178,85, +146,70,29,67,21,196,118,189,72,249,210,168,39,139,187,74,47,96,77,208,217, +155,2,116,200,113,22,49,95,30,226,51,189,12,190,66,185,76,181,51,125,119, +24,163,63,6,2,103,95,71,10,151,228,180,160,201,77,1,126,208,157,28,10,216, +41,215,89,238,220,10,210,121,68,138,210,183,249,74,72,215,31,144,41,238, +43,91,190,92,139,68,68,14,176,77,110,160,76,78,13,25,88,72,103,21,102,81, +205,81,223,1,90,219,143,104,13,35,40,35,244,24,166,0,94,194,251,62,172, +144,233,60,102,136,210,83,120,139,166,251,247,69,190,92,19,214,24,166,0, +225,138,68,80,72,142,193,94,173,143,224,170,62,49,246,0,0,229,50,131,39, +93,170,0,176,159,21,17,189,162,198,215,33,2,145,8,246,176,138,173,156,5, +224,5,3,184,33,39,248,157,29,0,118,167,69,116,20,0,0,42,101,26,149,164, +153,59,195,128,248,171,37,8,75,66,44,71,236,1,66,64,216,1,122,184,226,148, +97,100,223,110,124,215,124,49,225,176,57,156,216,28,46,0,30,190,111,225, +99,139,238,7,24,218,59,94,117,218,60,57,145,205,147,19,99,2,0,224,114,185, +136,143,143,39,251,226,51,174,52,126,251,251,77,24,169,104,90,224,127,167, +29,224,114,227,87,117,107,127,248,229,229,135,167,45,230,32,53,239,90,1, +225,7,168,111,118,83,223,236,142,121,82,131,216,157,252,6,173,114,47,95, +172,143,154,9,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_4 = 1881; +static unsigned char xml_res_file_4[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,64,0,0,0,64,8,6,0,0, +0,170,105,113,222,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112, +72,89,115,0,0,10,233,0,0,10,233,1,253,117,206,211,0,0,0,25,116,69,88,116, +83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112, +101,46,111,114,103,155,238,60,26,0,0,6,214,73,68,65,84,120,156,229,155, +121,108,84,69,28,199,63,211,61,186,96,57,228,80,17,84,130,136,8,65,140, +26,60,162,81,84,98,168,128,130,130,45,32,10,4,80,140,114,41,90,64,40,162, +65,81,20,8,162,128,66,41,8,114,40,209,152,200,81,4,131,9,40,136,26,84,136, +86,228,16,139,128,96,45,236,118,119,223,238,248,199,186,237,110,119,222, +219,247,246,173,108,91,190,255,237,252,126,111,102,222,103,102,126,115, +188,89,193,212,29,18,135,147,243,85,89,4,43,33,164,101,186,30,25,83,22, +192,249,12,161,186,239,7,43,153,114,123,59,114,59,54,139,115,216,118,176, +130,73,159,31,61,215,245,58,103,138,27,252,151,93,16,226,198,139,179,113, +185,92,85,105,199,206,4,207,121,165,236,202,73,136,16,89,72,68,82,223,172, +154,9,94,175,151,96,176,238,189,116,172,158,20,107,217,43,242,232,79,9, +2,105,232,155,0,0,234,54,4,15,1,158,165,152,206,28,96,141,40,224,123,49, +208,16,132,18,0,212,93,8,163,89,75,107,78,84,253,238,66,41,107,68,1,59, +196,48,186,242,75,130,191,46,0,136,64,8,105,117,7,194,5,248,152,40,138, +149,182,235,217,79,5,13,19,210,13,1,0,248,125,62,8,213,13,8,79,177,154, +139,57,165,180,21,209,139,3,180,78,72,79,10,0,128,160,191,214,67,200,193, +203,120,177,82,105,11,226,100,166,28,170,180,153,3,0,181,30,194,88,86,209, +146,211,74,219,98,30,224,55,46,85,218,204,3,128,90,11,161,9,103,24,167, +211,250,126,220,186,173,15,86,1,64,173,132,48,142,149,52,227,31,165,109, +33,253,248,157,139,116,159,181,14,0,106,21,132,166,84,48,70,124,160,180, +85,226,102,150,28,98,248,124,106,0,160,214,64,120,134,21,52,165,66,105, +123,75,14,224,40,45,13,159,79,29,0,100,28,66,115,202,121,90,167,245,207, +210,128,215,120,36,105,30,246,0,64,70,33,76,20,197,52,194,171,180,205,151, +3,248,147,102,74,91,172,236,3,128,140,64,104,193,223,140,102,157,210,118, +134,134,188,193,64,83,249,164,7,0,36,64,184,75,236,162,3,135,211,150,125, +77,21,136,34,114,116,90,127,174,204,227,184,137,214,135,26,231,1,182,21, +244,227,33,192,91,206,55,24,198,39,32,224,36,77,217,65,23,118,202,46,44, +163,87,210,160,100,70,173,56,201,19,58,173,95,78,14,179,25,100,58,175,180, +2,184,148,19,20,107,211,184,93,236,3,71,36,173,5,127,211,155,237,244,22, +219,233,196,1,6,203,25,182,203,41,160,136,6,248,149,182,57,50,159,211,52, +54,157,87,218,134,64,119,118,179,93,140,224,70,246,225,11,66,32,148,232, +147,199,38,58,114,208,86,57,109,56,206,8,177,94,105,59,77,99,222,52,57, +246,163,178,13,64,32,25,199,74,214,137,231,104,78,121,85,186,10,130,131, +48,47,136,247,108,149,55,137,165,120,8,40,109,179,25,68,57,57,150,242,179, +5,160,17,94,150,139,169,76,19,139,113,16,78,176,171,32,60,108,163,23,92, +65,25,195,197,199,74,219,73,154,50,79,230,89,206,51,101,0,87,113,132,205, +98,52,189,248,210,208,175,38,4,7,97,38,139,37,41,149,57,69,44,193,141,122, +186,125,157,193,202,3,143,100,74,9,192,253,226,11,182,138,81,116,228,144, +41,255,154,16,242,217,200,213,38,159,141,170,29,71,121,148,79,149,182,227, +52,99,190,28,96,41,191,168,44,1,112,16,166,144,69,20,49,157,28,124,134, +190,171,233,193,100,249,68,213,111,95,16,252,90,117,62,83,44,198,130,23, +196,187,184,80,127,188,121,85,14,225,44,13,44,229,23,149,105,0,205,41,231, +67,38,50,86,172,50,60,106,214,112,80,200,72,70,201,73,44,162,31,135,185, +164,202,86,169,85,67,200,103,163,233,88,208,158,35,12,230,51,165,237,24, +205,121,135,7,205,190,70,130,76,1,232,202,207,108,21,143,115,167,248,198, +208,175,140,22,228,202,121,204,145,249,64,228,40,106,46,241,129,41,10,193, +74,44,40,20,139,112,162,152,87,129,153,242,49,188,120,76,229,163,82,82, +0,109,56,206,70,241,52,151,115,204,208,111,7,215,114,167,92,200,215,116, +138,75,47,150,247,197,245,2,168,134,96,166,23,116,224,48,121,108,82,218, +202,104,193,98,250,38,123,5,67,37,5,112,29,63,227,209,89,117,69,85,68,47, +250,200,217,202,221,151,170,23,64,4,130,166,37,239,5,47,138,119,148,83, +44,192,12,134,227,35,219,240,249,100,178,181,14,56,75,3,134,201,169,140, +149,19,8,26,172,170,85,189,0,34,16,250,105,250,51,66,103,14,208,159,45, +74,219,97,46,97,137,236,147,90,197,99,148,50,128,82,218,112,183,92,192, +71,116,79,234,27,196,89,21,23,18,108,90,152,231,67,139,149,182,233,98,33, +89,58,173,255,146,28,142,31,183,249,10,235,40,37,0,27,228,205,220,45,223, +102,63,109,77,63,179,156,92,101,47,0,232,163,109,166,131,86,26,151,214, +133,82,250,178,77,233,127,136,86,44,227,62,211,101,27,201,18,0,137,96,142, +204,103,32,47,91,94,115,235,197,2,136,204,8,227,67,75,65,171,94,227,191, +196,219,186,173,95,40,71,18,192,165,180,89,149,105,0,167,104,204,67,242, +21,10,25,73,56,197,145,179,92,230,114,68,167,23,244,167,132,171,180,95, +65,11,112,3,251,232,45,182,43,253,74,185,140,21,244,76,169,124,149,146, +190,73,5,13,217,75,123,186,203,133,108,161,155,173,194,2,184,152,171,179, +97,113,16,102,130,88,1,90,128,169,161,5,186,139,173,233,114,4,90,244,176, +33,13,74,10,224,43,58,211,67,206,231,144,78,203,89,213,114,122,114,84,231, +67,69,127,74,200,99,35,119,104,59,171,86,140,177,218,79,91,86,113,111,90, +234,17,85,82,0,149,100,83,105,115,174,141,149,31,183,238,129,165,131,48, +11,196,172,72,185,49,203,230,168,166,203,17,132,210,120,140,9,233,60,20, +181,32,163,88,16,27,248,98,33,252,72,59,214,112,79,218,235,146,17,0,70, +177,160,166,162,16,166,201,81,41,7,95,35,101,4,0,64,49,250,189,160,166, +246,104,237,88,175,221,250,191,212,35,99,0,172,244,130,25,12,39,172,105, +113,235,132,116,41,99,0,192,120,70,136,234,91,121,53,27,228,45,145,31,90, +32,237,16,50,10,192,143,155,57,168,247,8,81,205,20,67,227,47,60,166,25, +66,70,1,0,20,203,92,221,94,176,75,118,98,147,188,41,209,144,70,8,25,191, +39,239,199,205,24,38,112,155,252,46,46,189,17,94,214,136,30,232,158,190, +69,1,56,237,237,8,51,14,0,160,68,118,163,68,181,204,54,190,229,154,22,8, +25,31,2,182,101,115,56,212,125,0,96,11,66,253,0,0,41,67,168,63,0,32,37, +8,245,11,0,88,134,80,255,0,128,37,8,113,211,224,21,77,18,247,253,215,180, +244,48,163,187,250,158,109,109,151,211,157,141,211,29,255,78,123,202,188, +172,250,161,250,70,121,28,128,86,57,137,203,130,43,47,244,240,84,183,212, +63,61,101,90,217,217,217,120,60,213,245,127,127,239,95,113,0,234,231,16, +136,145,223,239,199,231,211,255,146,93,239,1,0,4,2,1,93,8,181,98,41,124, +46,20,8,168,131,98,28,128,221,101,94,92,89,241,255,181,243,6,195,156,170, +84,127,154,174,123,58,203,79,127,84,198,165,8,10,182,38,219,114,212,63, +57,92,224,138,204,14,231,69,12,72,80,40,24,185,218,203,121,20,3,18,244, +223,189,230,127,1,145,119,128,141,62,61,149,199,0,0,0,0,73,69,78,68,174, +66,96,130}; + +static size_t xml_res_size_5 = 621; +static unsigned char xml_res_file_5[] = { 60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101, 110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101, 115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58, 47,47,119,119,119,46,119,120,119,105,100,103,101,116,115,46,111,114,103, 47,119,120,120,114,99,34,62,10,32,32,60,33,45,45,32,72,97,110,100,108,101, 114,32,71,101,110,101,114,97,116,105,111,110,32,105,115,32,79,78,32,45, -45,62,10,60,47,114,101,115,111,117,114,99,101,62,10}; +45,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119, +120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,104,97,114,116, +49,50,56,34,62,67,104,97,114,116,86,105,101,119,66,105,116,109,97,112,115, +46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,99,104,97,114, +116,49,50,56,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60, +111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109, +97,112,34,32,110,97,109,101,61,34,99,104,97,114,116,49,54,34,62,67,104, +97,114,116,86,105,101,119,66,105,116,109,97,112,115,46,99,112,112,36,100, +97,116,97,95,105,109,97,103,101,115,95,99,104,97,114,116,49,54,46,112,110, +103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32, +99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,99,104,97,114,116,50,53,54,34,62,67,104,97,114,116,86,105,101, +119,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109, +97,103,101,115,95,99,104,97,114,116,50,53,54,46,112,110,103,60,47,111,98, +106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115, +61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,104,97, +114,116,51,50,34,62,67,104,97,114,116,86,105,101,119,66,105,116,109,97, +112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,99, +104,97,114,116,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32, +32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116, +109,97,112,34,32,110,97,109,101,61,34,99,104,97,114,116,54,52,34,62,67, +104,97,114,116,86,105,101,119,66,105,116,109,97,112,115,46,99,112,112,36, +100,97,116,97,95,105,109,97,103,101,115,95,99,104,97,114,116,54,52,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,60,47,114,101,115,111,117,114, +99,101,62,10}; void wxCE3EBInitBitmapResources() { @@ -44,6 +714,11 @@ void wxCE3EBInitBitmapResources() else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase); } - XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ChartViewBitmaps.xrc"), xml_res_file_0, xml_res_size_0, wxT("text/xml")); + XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$data_images_chart128.png"), xml_res_file_0, xml_res_size_0, wxT("image/png")); + XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$data_images_chart16.png"), xml_res_file_1, xml_res_size_1, wxT("image/png")); + XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$data_images_chart256.png"), xml_res_file_2, xml_res_size_2, wxT("image/png")); + XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$data_images_chart32.png"), xml_res_file_3, xml_res_size_3, wxT("image/png")); + XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$data_images_chart64.png"), xml_res_file_4, xml_res_size_4, wxT("image/png")); + XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ChartViewBitmaps.xrc"), xml_res_file_5, xml_res_size_5, wxT("text/xml")); wxXmlResource::Get()->Load(wxT("memory:XRC_resource/ChartViewBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ChartViewBitmaps.xrc")); } diff --git a/Project/ConnectionLine.cpp b/Project/ConnectionLine.cpp index ea04e5e..0258f2e 100644 --- a/Project/ConnectionLine.cpp +++ b/Project/ConnectionLine.cpp @@ -184,3 +184,10 @@ void ConnectionLine::RemoveParent(Element* parent) if(element == parent) m_parentList.erase(it--); } } + +Element* ConnectionLine::GetCopy() +{ + ConnectionLine* copy = new ConnectionLine(); + *copy = *this; + return copy; +} diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h index 98e3098..c0355cd 100644 --- a/Project/ConnectionLine.h +++ b/Project/ConnectionLine.h @@ -32,6 +32,8 @@ class ConnectionLine : public ControlElement virtual double GetValue() const { return m_value; } virtual void SetValue(double value) { m_value = value; } + + Element* GetCopy(); protected: double m_lineOffset = 0.0; diff --git a/Project/Constant.cpp b/Project/Constant.cpp index ff0ae02..f0c90fc 100644 --- a/Project/Constant.cpp +++ b/Project/Constant.cpp @@ -101,4 +101,13 @@ void Constant::SetValue(double value) m_height = m_glStringValue->getheight() + 6 + 2 * m_borderSize; UpdatePoints(); -}
\ No newline at end of file +} + +Element* Constant::GetCopy() +{ + Constant* copy = new Constant(m_elementID); + *copy = *this; + m_glStringValue = NULL; + SetValue(m_value); + return copy; +} diff --git a/Project/Constant.h b/Project/Constant.h index 9868627..3f84b91 100644 --- a/Project/Constant.h +++ b/Project/Constant.h @@ -19,10 +19,13 @@ class Constant : public ControlElement virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); } virtual bool ShowForm(wxWindow* parent, Element* element); virtual void Rotate(bool clockwise = true); + virtual void UpdateText() { SetValue(m_value); } virtual void SetValue(double value); virtual double GetValue() const { return m_value; } virtual void UpdatePoints(); + + virtual Element* GetCopy(); protected: double m_value = 1.0; diff --git a/Project/ConstantForm.cpp b/Project/ConstantForm.cpp index 4406d63..f7d29d1 100644 --- a/Project/ConstantForm.cpp +++ b/Project/ConstantForm.cpp @@ -3,6 +3,8 @@ ConstantForm::ConstantForm(wxWindow* parent, Constant* constant) : ConstantFormBase(parent) { + SetSize(GetBestSize()); + m_parent = parent; m_constant = constant; diff --git a/Project/ControlEditor.cpp b/Project/ControlEditor.cpp index 12a9bd1..c86477d 100644 --- a/Project/ControlEditor.cpp +++ b/Project/ControlEditor.cpp @@ -17,6 +17,7 @@ #include "Gain.h" #include "ControlElementSolver.h" +#include "ControlElementContainer.h" #include "ChartView.h" #include "ElementPlotData.h" @@ -593,19 +594,7 @@ void ControlEditor::OnScroll(wxMouseEvent& event) Redraw(); } -void ControlEditor::OnIdle(wxIdleEvent& event) -{ - // Solve wxGLString bug. - if(m_firstDraw) { - TransferFunction* tf = new TransferFunction(0); - m_elementList.push_back(tf); - Redraw(); - m_elementList.pop_back(); - delete tf; - m_firstDraw = false; - } -} - +void ControlEditor::OnIdle(wxIdleEvent& event) { ConsolidateTexts(); } void ControlEditor::OnKeyDown(wxKeyEvent& event) { char key = event.GetUnicodeKey(); @@ -621,73 +610,7 @@ void ControlEditor::OnKeyDown(wxKeyEvent& event) } break; case 'L': { // tests - if(event.ControlDown() && event.ShiftDown()) { - double timeStep = 1e-4; - double integrationError = 1e-5; - double simTime = 10.0; - double printStep = 1e-3; - double pdbStep = 1e-1; - - double pulsePer = 5.0; - - wxProgressDialog pbd(_("Test"), _("Initializing..."), 100, this, - wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_CAN_ABORT | wxPD_SMOOTH); - pbd.SetDoubleBuffered(true); - ControlElementSolver solver(this, timeStep, integrationError, false, 0.0); - if(solver.IsOK()) { - bool simStopped = false; - double currentTime = 0.0; - double printTime = 0.0; - double pulseTime = 0.0; - double pdbTime = 0.0; - std::vector<double> time; - std::vector<double> solution; - std::vector<double> inputV; - while(currentTime <= simTime) { - double input = 0.0; - if(pulseTime >= pulsePer * 2.0) pulseTime = 0.0; - if(pulseTime >= pulsePer) input = 1.0; - - solver.SolveNextStep(input); - if(printTime >= printStep) { - time.push_back(currentTime); - solution.push_back(solver.GetLastSolution()); - inputV.push_back(input); - printTime = 0.0; - } - if((pdbTime > pdbStep)) { - if(!pbd.Update((currentTime / simTime) * 100, - wxString::Format("Time = %.2fs", currentTime))) { - pbd.Update(100); - simStopped = true; - currentTime = simTime; - } - pbd.Refresh(); - pbd.Update(); - pdbTime = 0.0; - } - printTime += timeStep; - currentTime += timeStep; - pulseTime += timeStep; - pdbTime += timeStep; - } - if(!simStopped) { - std::vector<ElementPlotData> epdList; - ElementPlotData curve1Data(_("TESTES"), ElementPlotData::CT_BUS); - curve1Data.AddData(inputV, _("Entrada")); - curve1Data.AddData(solution, _("Saida")); - epdList.push_back(curve1Data); - - ChartView* cView = new ChartView(this, epdList, time); - cView->Show(); - } - } else { - wxMessageDialog msgDialog(this, _("It was not possible to solve the control system"), - _("Error"), wxOK | wxCENTRE | wxICON_ERROR); - msgDialog.ShowModal(); - } - } - } + } break; } } } @@ -812,27 +735,131 @@ void ControlEditor::OnImportClick(wxCommandEvent& event) msgDialog.ShowModal(); } - // Get the highest id number - int majorElementID = 0; - for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) { - ControlElement* element = *it; - if(element->GetID() > majorElementID) majorElementID = element->GetID(); - } - for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) { - ConnectionLine* line = *it; - if(line->GetID() > majorElementID) majorElementID = line->GetID(); + SetLastElementID(); + Redraw(); + event.Skip(); +} + +void ControlEditor::OnTestClick(wxCommandEvent& event) +{ + ControlSystemTest csTest(this, &m_inputType, &m_startTime, &m_slope, &m_timeStep, &m_simTime); + if(csTest.ShowModal() == wxID_OK) { + double printStep = 1e-3; + double pdbStep = 1e-1; + + wxProgressDialog pbd(_("Test"), _("Initializing..."), 100, this, + wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_CAN_ABORT | wxPD_SMOOTH); + ControlElementSolver solver(this, m_timeStep, 1e-5); + if(solver.IsOK()) { + bool simStopped = false; + double currentTime = 0.0; + double printTime = 0.0; + double pdbTime = 0.0; + std::vector<double> time; + std::vector<double> solution; + std::vector<double> inputV; + while(currentTime <= m_simTime) { + double input = 0.0; + if(currentTime >= m_startTime) { + switch(m_inputType) { + case 0: { + input = m_slope; + } break; + case 1: { + input = m_slope * (currentTime - m_startTime); + } break; + case 2: { + input = m_slope * std::pow(currentTime - m_startTime, 2); + } break; + default: { + input = 0.0; + break; + } + } + } + + solver.SolveNextStep(input); + + if(printTime >= printStep) { + time.push_back(currentTime); + solution.push_back(solver.GetLastSolution()); + inputV.push_back(input); + printTime = 0.0; + } + + if(pdbTime > pdbStep) { + if(!pbd.Update((currentTime / m_simTime) * 100, wxString::Format("Time = %.2fs", currentTime))) { + pbd.Update(100); + simStopped = true; + currentTime = m_simTime; + } + pdbTime = 0.0; + } + + printTime += m_timeStep; + currentTime += m_timeStep; + pdbTime += m_timeStep; + } + if(!simStopped) { + std::vector<ElementPlotData> epdList; + ElementPlotData curveData(_("I/O"), ElementPlotData::CT_TEST); + curveData.AddData(inputV, _("Input")); + curveData.AddData(solution, _("Output")); + + curveData.SetPlot(0); + curveData.SetColour(0, *wxRED); + curveData.SetPlot(1); + curveData.SetColour(1, *wxBLUE); + + epdList.push_back(curveData); + + ChartView* cView = new ChartView(this, epdList, time); + cView->Show(); + cView->UpdatePlot(); + } + } else { + wxMessageDialog msgDialog(this, _("It was not possible to solve the control system"), _("Error"), + wxOK | wxCENTRE | wxICON_ERROR); + msgDialog.ShowModal(); + } } - m_lastElementID = ++majorElementID; +} - Redraw(); +void ControlEditor::OnClose(wxCloseEvent& event) +{ + if(m_ctrlContainer) { + m_ctrlContainer->FillContainer(this); + } event.Skip(); } -/*void ControlEditor::SetElementsList(std::vector<ControlElement*> elementList) +void ControlEditor::ConsolidateTexts() { - m_elementList.clear(); - for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) { - ControlElement* element = *it; - m_elementList.push_back(element); + // Solve wxGLString bug. + if(m_firstDraw) { + TransferFunction* tf = new TransferFunction(0); + m_elementList.push_back(tf); + for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) { + ControlElement* element = *it; + element->UpdateText(); + } + Redraw(); + m_elementList.pop_back(); + delete tf; + m_firstDraw = false; } -}*/ +} + +void ControlEditor::SetLastElementID() +{ + int id = 0; + for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) { + int elementID = (*it)->GetID(); + if(id < elementID) id = elementID; + } + for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) { + int elementID = (*it)->GetID(); + if(id < elementID) id = elementID; + } + m_lastElementID = ++id; +} diff --git a/Project/ControlEditor.h b/Project/ControlEditor.h index 9de5a1f..674ed5d 100644 --- a/Project/ControlEditor.h +++ b/Project/ControlEditor.h @@ -12,6 +12,7 @@ #include <wx/progdlg.h> #include "IOControl.h" +#include "ControlSystemTest.h" class FileHanding; class Camera; @@ -28,6 +29,7 @@ class Constant; class Gain; class ControlElementSolver; +class ControlElementContainer; class ChartView; class ElementDataObject; @@ -92,8 +94,11 @@ class ControlEditor : public ControlEditorBase virtual std::vector<ControlElement*> GetControlElementList() const { return m_elementList; } virtual void SetElementsList(std::vector<ControlElement*> elementList) { m_elementList = elementList; } virtual void SetConnectionsList(std::vector<ConnectionLine*> connectionList) { m_connectionList = connectionList; } - + virtual void SetControlContainer(ControlElementContainer* ctrlContainer) { m_ctrlContainer = ctrlContainer; } protected: + virtual void OnClose(wxCloseEvent& event); + virtual void OnTestClick(wxCommandEvent& event); + virtual void OnButtonOKClick(wxCommandEvent& event) { Close(); } virtual void OnImportClick(wxCommandEvent& event); virtual void OnExportClick(wxCommandEvent& event); virtual void OnKeyDown(wxKeyEvent& event); @@ -110,6 +115,8 @@ class ControlEditor : public ControlEditorBase void BuildControlElementPanel(); void SetViewport(); + void ConsolidateTexts(); + void SetLastElementID(); std::vector<ConnectionLine*>::iterator DeleteLineFromList(std::vector<ConnectionLine*>::iterator& it); @@ -124,9 +131,17 @@ class ControlEditor : public ControlEditorBase std::vector<ControlElement*> m_elementList; std::vector<ConnectionLine*> m_connectionList; + ControlElementContainer* m_ctrlContainer = NULL; + bool m_firstDraw = true; int m_ioFlags; - + int m_lastElementID = 0; + + int m_inputType = 0; + double m_startTime = 1.0; + double m_slope = 1.0; + double m_timeStep = 1e-4; + double m_simTime = 10.0; }; #endif // CONTROLEDITOR_H diff --git a/Project/ControlEditor.wxcp b/Project/ControlEditor.wxcp index 7952614..d83f53c 100644 --- a/Project/ControlEditor.wxcp +++ b/Project/ControlEditor.wxcp @@ -1,7 +1,7 @@ { "metadata": { "m_generatedFilesDir": ".", - "m_objCounter": 301, + "m_objCounter": 423, "m_includeFiles": [], "m_bitmapFunction": "wxC870InitBitmapResources", "m_bitmapsFile": "ControlEditorBitmaps.cpp", @@ -135,6 +135,13 @@ "m_functionNameAndSignature": "OnKeyDown(wxKeyEvent& event)", "m_description": "Process a wxEVT_KEY_DOWN event (any key has been pressed)", "m_noBody": false + }, { + "m_eventName": "wxEVT_CLOSE_WINDOW", + "m_eventClass": "wxCloseEvent", + "m_eventHandler": "wxCloseEventHandler", + "m_functionNameAndSignature": "OnClose(wxCloseEvent& event)", + "m_description": "Process a close event. This event applies to wxFrame and wxDialog classes", + "m_noBody": false }], "m_children": [{ "m_type": 4461, @@ -1179,78 +1186,2020 @@ "m_children": [] }] }] + }, { + "m_type": 4408, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxTAB_TRAVERSAL"], + "wxAuiPaneInfo": { + "m_name": "", + "m_caption": "", + "m_dockDirection": "wxAUI_DOCK_BOTTOM", + "m_layer": 0, + "m_row": 0, + "m_position": 0, + "m_bestSize": "100,-1", + "m_minSize": "100,-1", + "m_maxSize": "100,-1", + "m_resizable": false, + "m_captionVisible": false, + "m_closeButton": false, + "m_minButton": false, + "m_maxButton": false, + "m_pinButton": false, + "m_toolbarPane": false + }, + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_panelButtons" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerBottomButtons" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 1, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4400, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_buttonTest" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Test system..." + }, { + "type": "bool", + "m_label": "Default Button", + "m_value": false + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Direction", + "m_selection": 0, + "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] + }, { + "type": "string", + "m_label": "Margins:", + "m_value": "2,2" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnTestClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.", + "m_noBody": false + }], + "m_children": [] + }, { + "m_type": 4454, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "string", + "m_label": "Name:", + "m_value": "Spacer_1" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "0,0" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4400, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_buttonOK" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "OK" + }, { + "type": "bool", + "m_label": "Default Button", + "m_value": false + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Direction", + "m_selection": 0, + "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] + }, { + "type": "string", + "m_label": "Margins:", + "m_value": "2,2" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnButtonOKClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.", + "m_noBody": false + }], + "m_children": [] + }] + }] }] + }] + }, { + "m_type": 4421, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxDEFAULT_DIALOG_STYLE"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" }, { - "m_type": 4464, - "proportion": 0, + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "ControlSystemTestBase" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Enable Window Persistency:", + "m_value": true + }, { + "type": "string", + "m_label": "Title:", + "m_value": "Control system test" + }, { + "type": "virtualFolderPicker", + "m_label": "Virtual Folder:", + "m_path": "Project:wxcrafter" + }, { + "type": "choice", + "m_label": "Centre:", + "m_selection": 1, + "m_options": ["", "wxBOTH", "wxVERTICAL", "wxHORIZONTAL"] + }, { + "type": "string", + "m_label": "Inherited Class", + "m_value": "ControlSystemTest" + }, { + "type": "string", + "m_label": "File:", + "m_value": "ControlSystemTest" + }, { + "type": "string", + "m_label": "Class Decorator", + "m_value": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (16x16) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (32x32) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (64x64) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (128x128):", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (256x256):", + "m_path": "" + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 1, "border": 5, "gbSpan": "1,1", "gbPosition": "0,0", - "m_styles": ["wxSTB_DEFAULT_STYLE"], - "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], "m_properties": [{ - "type": "winid", - "m_label": "ID:", - "m_winid": "wxID_ANY" - }, { - "type": "string", - "m_label": "Size:", - "m_value": "-1,-1" - }, { "type": "string", "m_label": "Minimum Size:", "m_value": "-1,-1" }, { "type": "string", "m_label": "Name:", - "m_value": "m_statusBarMain" - }, { - "type": "multi-string", - "m_label": "Tooltip:", - "m_value": "" - }, { - "type": "colour", - "m_label": "Bg Colour:", - "colour": "<Default>" - }, { - "type": "colour", - "m_label": "Fg Colour:", - "colour": "<Default>" - }, { - "type": "font", - "m_label": "Font:", - "m_value": "" - }, { - "type": "bool", - "m_label": "Hidden", - "m_value": false - }, { - "type": "bool", - "m_label": "Disabled", - "m_value": false - }, { - "type": "bool", - "m_label": "Focused", - "m_value": false - }, { - "type": "string", - "m_label": "Class Name:", - "m_value": "" - }, { - "type": "string", - "m_label": "Include File:", - "m_value": "" + "m_value": "boxSizerLvl1_1" }, { "type": "string", "m_label": "Style:", "m_value": "" }, { - "type": "string", - "m_label": "Field Count:", - "m_value": "1" + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] }], "m_events": [], - "m_children": [] + "m_children": [{ + "m_type": 4442, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxBK_DEFAULT"], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_notebook" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }], + "m_events": [], + "m_children": [{ + "m_type": 4441, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxTAB_TRAVERSAL"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_panelGeneral" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "General" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "bool", + "m_label": "Selected", + "m_value": false + }, { + "type": "bool", + "m_label": "Null Page", + "m_value": false + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl2_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextInput" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Input type:" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4411, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_choiceInput" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Choices:", + "m_value": "Step;Ramp;Quadratic" + }, { + "type": "string", + "m_label": "Selection:", + "m_value": "0" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4452, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "gridSizerLvl3_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "# Columns:", + "m_value": "2" + }, { + "type": "string", + "m_label": "# Rows:", + "m_value": "0" + }, { + "type": "string", + "m_label": "Horizontal gap:", + "m_value": "0" + }, { + "type": "string", + "m_label": "Vertical gap:", + "m_value": "0" + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextStartTime" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Start time" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl5_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 1, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4406, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlStartTime" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "1,0" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_BOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextSec_1" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "s" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_2" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextSlope" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Slope" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4406, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlSlope" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "1,0" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_3" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextStep" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Time step" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4406, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlTimeStep" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "0,0001" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_4" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextSimTime" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Simulation time" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl5_2" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 1, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4406, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlSimTime" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "10,0" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_BOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextSec_2" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "s" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }] + }] + }] + }] + }] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerBotomButtons" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 1, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4400, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_buttonRun" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Run" + }, { + "type": "bool", + "m_label": "Default Button", + "m_value": false + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Direction", + "m_selection": 0, + "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] + }, { + "type": "string", + "m_label": "Margins:", + "m_value": "2,2" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnRunButtonClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.", + "m_noBody": false + }], + "m_children": [] + }, { + "m_type": 4400, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_buttonCancel" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Cancel" + }, { + "type": "bool", + "m_label": "Default Button", + "m_value": false + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Direction", + "m_selection": 0, + "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] + }, { + "type": "string", + "m_label": "Margins:", + "m_value": "2,2" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnCancelButtonClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.", + "m_noBody": false + }], + "m_children": [] + }] + }] }] }] }
\ No newline at end of file diff --git a/Project/ControlEditorBase.cpp b/Project/ControlEditorBase.cpp index 6489c0f..cf391b7 100644 --- a/Project/ControlEditorBase.cpp +++ b/Project/ControlEditorBase.cpp @@ -98,7 +98,6 @@ ControlEditorBase::ControlEditorBase(wxWindow* parent, wxWindowID id, const wxSt m_panelWorkspace = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxTAB_TRAVERSAL); m_auimgr->AddPane(m_panelWorkspace, wxAuiPaneInfo().Direction(wxAUI_DOCK_CENTER).Layer(0).Row(0).Position(0).BestSize(100,100).MinSize(100,100).MaxSize(100,100).Fixed().CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false)); - m_auimgr->Update(); wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL); m_panelWorkspace->SetSizer(boxSizerLvl2_1); @@ -114,9 +113,23 @@ ControlEditorBase::ControlEditorBase(wxWindow* parent, wxWindowID id, const wxSt boxSizerLvl2_1->Add(m_glCanvas, 1, wxEXPAND, WXC_FROM_DIP(5)); - m_statusBarMain = new wxStatusBar(this, wxID_ANY, wxSTB_DEFAULT_STYLE); - m_statusBarMain->SetFieldsCount(1); - this->SetStatusBar(m_statusBarMain); + m_panelButtons = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxTAB_TRAVERSAL); + + m_auimgr->AddPane(m_panelButtons, wxAuiPaneInfo().Direction(wxAUI_DOCK_BOTTOM).Layer(0).Row(0).Position(0).BestSize(100,-1).MinSize(100,-1).MaxSize(100,-1).Fixed().CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false)); + m_auimgr->Update(); + + wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL); + m_panelButtons->SetSizer(boxSizerBottomButtons); + + m_buttonTest = new wxButton(m_panelButtons, wxID_ANY, _("Test system..."), wxDefaultPosition, wxDLG_UNIT(m_panelButtons, wxSize(-1,-1)), 0); + + boxSizerBottomButtons->Add(m_buttonTest, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5)); + + boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5)); + + m_buttonOK = new wxButton(m_panelButtons, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(m_panelButtons, wxSize(-1,-1)), 0); + + boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5)); SetName(wxT("ControlEditorBase")); SetSize(800,600); @@ -137,6 +150,7 @@ ControlEditorBase::ControlEditorBase(wxWindow* parent, wxWindowID id, const wxSt #endif // Connect events this->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this); + this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(ControlEditorBase::OnClose), NULL, this); this->Connect(ID_RIBBON_IMPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnImportClick), NULL, this); this->Connect(ID_RIBBON_EXPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnExportClick), NULL, this); m_glCanvas->Connect(wxEVT_PAINT, wxPaintEventHandler(ControlEditorBase::OnPaint), NULL, this); @@ -149,12 +163,15 @@ ControlEditorBase::ControlEditorBase(wxWindow* parent, wxWindowID id, const wxSt m_glCanvas->Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(ControlEditorBase::OnScroll), NULL, this); m_glCanvas->Connect(wxEVT_IDLE, wxIdleEventHandler(ControlEditorBase::OnIdle), NULL, this); m_glCanvas->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this); + m_buttonTest->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlEditorBase::OnTestClick), NULL, this); + m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlEditorBase::OnButtonOKClick), NULL, this); } ControlEditorBase::~ControlEditorBase() { this->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this); + this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(ControlEditorBase::OnClose), NULL, this); this->Disconnect(ID_RIBBON_IMPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnImportClick), NULL, this); this->Disconnect(ID_RIBBON_EXPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnExportClick), NULL, this); m_glCanvas->Disconnect(wxEVT_PAINT, wxPaintEventHandler(ControlEditorBase::OnPaint), NULL, this); @@ -167,8 +184,178 @@ ControlEditorBase::~ControlEditorBase() m_glCanvas->Disconnect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(ControlEditorBase::OnScroll), NULL, this); m_glCanvas->Disconnect(wxEVT_IDLE, wxIdleEventHandler(ControlEditorBase::OnIdle), NULL, this); m_glCanvas->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this); + m_buttonTest->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlEditorBase::OnTestClick), NULL, this); + m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlEditorBase::OnButtonOKClick), NULL, this); m_auimgr->UnInit(); delete m_auimgr; } + +ControlSystemTestBase::ControlSystemTestBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) + : wxDialog(parent, id, title, pos, size, style) +{ + if ( !bBitmapLoaded ) { + // We need to initialise the default bitmap handler + wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); + wxC870InitBitmapResources(); + bBitmapLoaded = true; + } + + wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL); + this->SetSizer(boxSizerLvl1_1); + + m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT); + m_notebook->SetName(wxT("m_notebook")); + + boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5)); + + m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL); + m_notebook->AddPage(m_panelGeneral, _("General"), false); + + wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL); + m_panelGeneral->SetSizer(boxSizerLvl2_1); + + m_staticTextInput = new wxStaticText(m_panelGeneral, wxID_ANY, _("Input type:"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl2_1->Add(m_staticTextInput, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxArrayString m_choiceInputArr; + m_choiceInputArr.Add(wxT("Step")); + m_choiceInputArr.Add(wxT("Ramp")); + m_choiceInputArr.Add(wxT("Quadratic")); + m_choiceInput = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceInputArr, 0); + m_choiceInput->SetSelection(0); + + boxSizerLvl2_1->Add(m_choiceInput, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5)); + + wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0); + + boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextStartTime = new wxStaticText(m_panelGeneral, wxID_ANY, _("Start time"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl4_1->Add(m_staticTextStartTime, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlStartTime = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT("1,0"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlStartTime->SetHint(wxT("")); + #endif + + boxSizerLvl5_1->Add(m_textCtrlStartTime, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_staticTextSec_1 = new wxStaticText(m_panelGeneral, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl5_1->Add(m_staticTextSec_1, 0, wxRIGHT|wxTOP|wxBOTTOM|wxALIGN_BOTTOM, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextSlope = new wxStaticText(m_panelGeneral, wxID_ANY, _("Slope"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl4_2->Add(m_staticTextSlope, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_textCtrlSlope = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT("1,0"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlSlope->SetHint(wxT("")); + #endif + + boxSizerLvl4_2->Add(m_textCtrlSlope, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_1->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextStep = new wxStaticText(m_panelGeneral, wxID_ANY, _("Time step"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl4_3->Add(m_staticTextStep, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_textCtrlTimeStep = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT("0,0001"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlTimeStep->SetHint(wxT("")); + #endif + + boxSizerLvl4_3->Add(m_textCtrlTimeStep, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl3_1->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextSimTime = new wxStaticText(m_panelGeneral, wxID_ANY, _("Simulation time"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl4_4->Add(m_staticTextSimTime, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl4_4->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlSimTime = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT("10,0"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlSimTime->SetHint(wxT("")); + #endif + + boxSizerLvl5_2->Add(m_textCtrlSimTime, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_staticTextSec_2 = new wxStaticText(m_panelGeneral, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl5_2->Add(m_staticTextSec_2, 0, wxRIGHT|wxTOP|wxBOTTOM|wxALIGN_BOTTOM, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerBotomButtons = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl1_1->Add(boxSizerBotomButtons, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5)); + + m_buttonRun = new wxButton(this, wxID_ANY, _("Run"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0); + + boxSizerBotomButtons->Add(m_buttonRun, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5)); + + m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0); + + boxSizerBotomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5)); + + + #if wxVERSION_NUMBER >= 2900 + if(!wxPersistenceManager::Get().Find(m_notebook)){ + wxPersistenceManager::Get().RegisterAndRestore(m_notebook); + } else { + wxPersistenceManager::Get().Restore(m_notebook); + } + #endif + + SetName(wxT("ControlSystemTestBase")); + SetSize(-1,-1); + if (GetSizer()) { + GetSizer()->Fit(this); + } + if(GetParent()) { + CentreOnParent(wxBOTH); + } else { + CentreOnScreen(wxBOTH); + } +#if wxVERSION_NUMBER >= 2900 + if(!wxPersistenceManager::Get().Find(this)) { + wxPersistenceManager::Get().RegisterAndRestore(this); + } else { + wxPersistenceManager::Get().Restore(this); + } +#endif + // Connect events + m_buttonRun->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlSystemTestBase::OnRunButtonClick), NULL, this); + m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlSystemTestBase::OnCancelButtonClick), NULL, this); + +} + +ControlSystemTestBase::~ControlSystemTestBase() +{ + m_buttonRun->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlSystemTestBase::OnRunButtonClick), NULL, this); + m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlSystemTestBase::OnCancelButtonClick), NULL, this); + +} diff --git a/Project/ControlEditorBase.h b/Project/ControlEditorBase.h index c23aa64..6580e73 100644 --- a/Project/ControlEditorBase.h +++ b/Project/ControlEditorBase.h @@ -19,7 +19,14 @@ #include <wx/aui/dockart.h> #include <wx/panel.h> #include <wx/glcanvas.h> -#include <wx/statusbr.h> +#include <wx/button.h> +#include <wx/dialog.h> +#include <wx/notebook.h> +#include <wx/imaglist.h> +#include <wx/stattext.h> +#include <wx/choice.h> +#include <wx/arrstr.h> +#include <wx/textctrl.h> #if wxVERSION_NUMBER >= 2900 #include <wx/persist.h> #include <wx/persist/toplevel.h> @@ -50,10 +57,13 @@ protected: wxPanel* m_panelControlElements; wxPanel* m_panelWorkspace; wxGLCanvas* m_glCanvas; - wxStatusBar* m_statusBarMain; + wxPanel* m_panelButtons; + wxButton* m_buttonTest; + wxButton* m_buttonOK; protected: virtual void OnKeyDown(wxKeyEvent& event) { event.Skip(); } + virtual void OnClose(wxCloseEvent& event) { event.Skip(); } virtual void OnImportClick(wxCommandEvent& event) { event.Skip(); } virtual void OnExportClick(wxCommandEvent& event) { event.Skip(); } virtual void OnPaint(wxPaintEvent& event) { event.Skip(); } @@ -65,16 +75,66 @@ protected: virtual void OnMouseMotion(wxMouseEvent& event) { event.Skip(); } virtual void OnScroll(wxMouseEvent& event) { event.Skip(); } virtual void OnIdle(wxIdleEvent& event) { event.Skip(); } + virtual void OnTestClick(wxCommandEvent& event) { event.Skip(); } + virtual void OnButtonOKClick(wxCommandEvent& event) { event.Skip(); } public: wxToolBar* GetToolbarMain() { return m_toolbarMain; } wxPanel* GetPanelControlElements() { return m_panelControlElements; } wxGLCanvas* GetGlCanvas() { return m_glCanvas; } wxPanel* GetPanelWorkspace() { return m_panelWorkspace; } + wxButton* GetButtonTest() { return m_buttonTest; } + wxButton* GetButtonOK() { return m_buttonOK; } + wxPanel* GetPanelButtons() { return m_panelButtons; } wxAuiManager* GetAuimgr() { return m_auimgr; } - wxStatusBar* GetStatusBarMain() { return m_statusBarMain; } ControlEditorBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Control editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(800,600), long style = wxDEFAULT_FRAME_STYLE); virtual ~ControlEditorBase(); }; + +class ControlSystemTestBase : public wxDialog +{ +protected: + wxNotebook* m_notebook; + wxPanel* m_panelGeneral; + wxStaticText* m_staticTextInput; + wxChoice* m_choiceInput; + wxStaticText* m_staticTextStartTime; + wxTextCtrl* m_textCtrlStartTime; + wxStaticText* m_staticTextSec_1; + wxStaticText* m_staticTextSlope; + wxTextCtrl* m_textCtrlSlope; + wxStaticText* m_staticTextStep; + wxTextCtrl* m_textCtrlTimeStep; + wxStaticText* m_staticTextSimTime; + wxTextCtrl* m_textCtrlSimTime; + wxStaticText* m_staticTextSec_2; + wxButton* m_buttonRun; + wxButton* m_buttonCancel; + +protected: + virtual void OnRunButtonClick(wxCommandEvent& event) { event.Skip(); } + virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); } + +public: + wxStaticText* GetStaticTextInput() { return m_staticTextInput; } + wxChoice* GetChoiceInput() { return m_choiceInput; } + wxStaticText* GetStaticTextStartTime() { return m_staticTextStartTime; } + wxTextCtrl* GetTextCtrlStartTime() { return m_textCtrlStartTime; } + wxStaticText* GetStaticTextSec_1() { return m_staticTextSec_1; } + wxStaticText* GetStaticTextSlope() { return m_staticTextSlope; } + wxTextCtrl* GetTextCtrlSlope() { return m_textCtrlSlope; } + wxStaticText* GetStaticTextStep() { return m_staticTextStep; } + wxTextCtrl* GetTextCtrlTimeStep() { return m_textCtrlTimeStep; } + wxStaticText* GetStaticTextSimTime() { return m_staticTextSimTime; } + wxTextCtrl* GetTextCtrlSimTime() { return m_textCtrlSimTime; } + wxStaticText* GetStaticTextSec_2() { return m_staticTextSec_2; } + wxPanel* GetPanelGeneral() { return m_panelGeneral; } + wxNotebook* GetNotebook() { return m_notebook; } + wxButton* GetButtonRun() { return m_buttonRun; } + wxButton* GetButtonCancel() { return m_buttonCancel; } + ControlSystemTestBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Control system test"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE); + virtual ~ControlSystemTestBase(); +}; + #endif diff --git a/Project/ControlElement.cpp b/Project/ControlElement.cpp index 8df534a..29a1fec 100644 --- a/Project/ControlElement.cpp +++ b/Project/ControlElement.cpp @@ -15,11 +15,10 @@ Node::Node(wxPoint2DDouble position, NodeType nodeType, double borderSize) } Node::~Node() {} - void Node::SetPosition(wxPoint2DDouble position) { - m_rect = wxRect2DDouble( - position.m_x - m_rect.m_width / 2, position.m_y - m_rect.m_height / 2, m_rect.m_width, m_rect.m_height); + m_rect = wxRect2DDouble(position.m_x - m_rect.m_width / 2, position.m_y - m_rect.m_height / 2, m_rect.m_width, + m_rect.m_height); m_triPts[0] = GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, m_radius); m_triPts[1] = GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, -m_radius); m_triPts[2] = GetPosition() + wxPoint2DDouble(-m_radius + 1, 0); @@ -35,7 +34,6 @@ void Node::StartMove(wxPoint2DDouble position) } void Node::Move(wxPoint2DDouble position) { SetPosition(m_movePos + position - m_moveStartPt); } - wxPoint2DDouble Node::GetPosition() const { return m_rect.GetPosition() + wxPoint2DDouble(m_rect.GetSize().GetWidth() / 2, m_rect.GetSize().GetHeight() / 2); @@ -47,17 +45,17 @@ void Node::RotateTriPt(double angle) wxPoint2DDouble rectCenter = m_rect.GetPosition() + wxPoint2DDouble(m_rect.GetSize().GetWidth() / 2.0, m_rect.GetSize().GetHeight() / 2.0); m_triPts[0] = wxPoint2DDouble(std::cos(radAngle) * (m_triPts[0].m_x - rectCenter.m_x) - - std::sin(radAngle) * (m_triPts[0].m_y - rectCenter.m_y) + rectCenter.m_x, - std::sin(radAngle) * (m_triPts[0].m_x - rectCenter.m_x) + - std::cos(radAngle) * (m_triPts[0].m_y - rectCenter.m_y) + rectCenter.m_y); + std::sin(radAngle) * (m_triPts[0].m_y - rectCenter.m_y) + rectCenter.m_x, + std::sin(radAngle) * (m_triPts[0].m_x - rectCenter.m_x) + + std::cos(radAngle) * (m_triPts[0].m_y - rectCenter.m_y) + rectCenter.m_y); m_triPts[1] = wxPoint2DDouble(std::cos(radAngle) * (m_triPts[1].m_x - rectCenter.m_x) - - std::sin(radAngle) * (m_triPts[1].m_y - rectCenter.m_y) + rectCenter.m_x, - std::sin(radAngle) * (m_triPts[1].m_x - rectCenter.m_x) + - std::cos(radAngle) * (m_triPts[1].m_y - rectCenter.m_y) + rectCenter.m_y); + std::sin(radAngle) * (m_triPts[1].m_y - rectCenter.m_y) + rectCenter.m_x, + std::sin(radAngle) * (m_triPts[1].m_x - rectCenter.m_x) + + std::cos(radAngle) * (m_triPts[1].m_y - rectCenter.m_y) + rectCenter.m_y); m_triPts[2] = wxPoint2DDouble(std::cos(radAngle) * (m_triPts[2].m_x - rectCenter.m_x) - - std::sin(radAngle) * (m_triPts[2].m_y - rectCenter.m_y) + rectCenter.m_x, - std::sin(radAngle) * (m_triPts[2].m_x - rectCenter.m_x) + - std::cos(radAngle) * (m_triPts[2].m_y - rectCenter.m_y) + rectCenter.m_y); + std::sin(radAngle) * (m_triPts[2].m_y - rectCenter.m_y) + rectCenter.m_x, + std::sin(radAngle) * (m_triPts[2].m_x - rectCenter.m_x) + + std::cos(radAngle) * (m_triPts[2].m_y - rectCenter.m_y) + rectCenter.m_y); } void Node::Rotate(bool clockwise) @@ -86,14 +84,8 @@ bool Node::Contains(wxPoint2DDouble position) const return m_rect.Contains(position); } -ControlElement::ControlElement(int id) - : Element() -{ - m_elementID = id; -} - +ControlElement::ControlElement(int id) : Element() { m_elementID = id; } ControlElement::~ControlElement() {} - void ControlElement::DrawNodes() const { for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) { @@ -127,3 +119,10 @@ bool ControlElement::Solve(double input, double timeStep) m_output = input; return true; } + +void ControlElement::ReplaceNode(Node* oldNode, Node* newNode) +{ + for(unsigned int i = 0; i < m_nodeList.size(); i++) { + if(m_nodeList[i] == oldNode) m_nodeList[i] = newNode; + } +} diff --git a/Project/ControlElement.h b/Project/ControlElement.h index 1e60f97..7d0e620 100644 --- a/Project/ControlElement.h +++ b/Project/ControlElement.h @@ -62,7 +62,8 @@ class ControlElement : public Element void SetNodeList(std::vector<Node*> nodeList) { m_nodeList = nodeList; } std::vector<Node*> GetNodeList() const { return m_nodeList; } virtual void DrawNodes() const; - + virtual void ReplaceNode(Node* oldNode, Node* newNode); + virtual void UpdateText() {} virtual bool IsSolved() const { return m_solved; } virtual void SetSolved(bool solved = true) { m_solved = solved; } virtual bool Solve(double input, double timeStep); diff --git a/Project/ControlElementContainer.cpp b/Project/ControlElementContainer.cpp index e461529..edfe684 100644 --- a/Project/ControlElementContainer.cpp +++ b/Project/ControlElementContainer.cpp @@ -50,6 +50,88 @@ void ControlElementContainer::ClearContainer() void ControlElementContainer::FillContainer(std::vector<ControlElement*> controlElementList, std::vector<ConnectionLine*> connectionLineList) { + ClearContainer(); m_ctrlElementsList = controlElementList; m_cLineList = connectionLineList; + + for(auto it = controlElementList.begin(), itEnd = controlElementList.end(); it != itEnd; ++it) { + if(Constant* constant = dynamic_cast<Constant*>(*it)) { + m_constantList.push_back(constant); + } else if(Exponential* exponential = dynamic_cast<Exponential*>(*it)) { + m_exponentialList.push_back(exponential); + } else if(Gain* gain = dynamic_cast<Gain*>(*it)) { + m_gainList.push_back(gain); + } else if(IOControl* ioControl = dynamic_cast<IOControl*>(*it)) { + m_ioControlList.push_back(ioControl); + } else if(Limiter* limiter = dynamic_cast<Limiter*>(*it)) { + m_limiterList.push_back(limiter); + } else if(Multiplier* multiplier = dynamic_cast<Multiplier*>(*it)) { + m_multiplierList.push_back(multiplier); + } else if(RateLimiter* rateLimiter = dynamic_cast<RateLimiter*>(*it)) { + m_rateLimiterList.push_back(rateLimiter); + } else if(Sum* sum = dynamic_cast<Sum*>(*it)) { + m_sumList.push_back(sum); + } else if(TransferFunction* tf = dynamic_cast<TransferFunction*>(*it)) { + m_tfList.push_back(tf); + } + } +} + +void ControlElementContainer::GetContainerCopy(std::vector<ControlElement*>& controlElementList, + std::vector<ConnectionLine*>& connectionLineList) +{ + controlElementList.clear(); + connectionLineList.clear(); + + // Copy connection lines + for(auto it = m_cLineList.begin(), itEnd = m_cLineList.end(); it != itEnd; ++it) { + ConnectionLine* copy = static_cast<ConnectionLine*>((*it)->GetCopy()); + connectionLineList.push_back(copy); + } + + // Copy elements (exept connection line). + int nodeID = 0; + for(auto it = m_ctrlElementsList.begin(), itEnd = m_ctrlElementsList.end(); it != itEnd; ++it) { + Element* oldElement = *it; + ControlElement* copy = static_cast<ControlElement*>(oldElement->GetCopy()); + controlElementList.push_back(copy); + // Copy nodes. + std::vector<Node*> nodeList = copy->GetNodeList(); + std::vector<Node*> nodeListCopy; + for(auto itN = nodeList.begin(), itEndN = nodeList.end(); itN != itEndN; ++itN) { + Node* node = *itN; + node->SetID(nodeID); + Node* copyNode = new Node(); + *copyNode = *node; + nodeListCopy.push_back(copyNode); + nodeID++; + } + copy->SetNodeList(nodeListCopy); + + // Replace children to copies. + auto childList = copy->GetChildList(); + for(auto itC = childList.begin(), itEndC = childList.end(); itC != itEndC; ++itC) { + ConnectionLine* child = static_cast<ConnectionLine*>(*itC); + // Replace child's parent to copy. + for(auto itCL = connectionLineList.begin(), itEndCL = connectionLineList.end(); itCL != itEndCL; ++itCL) { + ConnectionLine* copyLine = *itCL; + if(copyLine->GetID() == child->GetID()) { + // Replace node. + nodeList = child->GetNodeList(); + for(auto itN = nodeList.begin(), itEndN = nodeList.end(); itN != itEndN; ++itN) { + Node* node = *itN; + for(auto itCN = nodeListCopy.begin(), itEndCN = nodeListCopy.end(); itCN != itEndCN; ++itCN) { + Node* nodeCopy = *itCN; + if(node->GetID() == nodeCopy->GetID()) { + copyLine->ReplaceNode(node, nodeCopy); + break; + } + } + } + copyLine->ReplaceParent(oldElement, copy); + copy->ReplaceChild(child, copyLine); + } + } + } + } } diff --git a/Project/ControlElementContainer.h b/Project/ControlElementContainer.h index 119ba82..62b63e3 100644 --- a/Project/ControlElementContainer.h +++ b/Project/ControlElementContainer.h @@ -24,9 +24,12 @@ class ControlElementContainer ~ControlElementContainer(); virtual void FillContainer(ControlEditor* editor); - virtual void FillContainer(std::vector<ControlElement*> controlElementList, std::vector<ConnectionLine*> connectionLineList); + virtual void FillContainer(std::vector<ControlElement*> controlElementList, + std::vector<ConnectionLine*> connectionLineList); + virtual void GetContainerCopy(std::vector<ControlElement*>& controlElementList, + std::vector<ConnectionLine*>& connectionLineList); virtual void ClearContainer(); - + std::vector<ControlElement*> GetControlElementsList() const { return m_ctrlElementsList; } std::vector<ConnectionLine*> GetConnectionLineList() const { return m_cLineList; } std::vector<Constant*> GetConstantList() const { return m_constantList; } diff --git a/Project/ControlElementSolver.cpp b/Project/ControlElementSolver.cpp index e67cb9a..7c58512 100644 --- a/Project/ControlElementSolver.cpp +++ b/Project/ControlElementSolver.cpp @@ -21,7 +21,26 @@ ControlElementSolver::ControlElementSolver(ControlEditor* controlEditor, { m_ctrlContainer = new ControlElementContainer(); m_ctrlContainer->FillContainer(controlEditor); + Initialize(controlEditor, timeStep, integrationError, startAllZero, input); +} + +ControlElementSolver::ControlElementSolver(ControlElementContainer* ctrlContainer, + double timeStep, + double integrationError, + bool startAllZero, + double input, + wxWindow* parent) +{ + m_ctrlContainer = ctrlContainer; + Initialize(parent, timeStep, integrationError, startAllZero, input); +} +void ControlElementSolver::Initialize(wxWindow* parent, + double timeStep, + double integrationError, + bool startAllZero, + double input) +{ // Check if the sistem have one input and one output bool fail = false; wxString failMessage = ""; @@ -67,7 +86,7 @@ ControlElementSolver::ControlElementSolver(ControlEditor* controlEditor, } if(fail) { - wxMessageDialog msgDialog(controlEditor, failMessage, _("Error"), wxOK | wxCENTRE | wxICON_ERROR); + wxMessageDialog msgDialog(parent, failMessage, _("Error"), wxOK | wxCENTRE | wxICON_ERROR); msgDialog.ShowModal(); } else { m_isOK = true; diff --git a/Project/ControlElementSolver.h b/Project/ControlElementSolver.h index 6d0ad3f..26b8ec5 100644 --- a/Project/ControlElementSolver.h +++ b/Project/ControlElementSolver.h @@ -1,7 +1,7 @@ #ifndef CONTROLELEMENTSOLVER_H #define CONTROLELEMENTSOLVER_H -#include <stddef.h> // NULL definition +#include <wx/window.h> #include <vector> class ControlElementContainer; @@ -24,15 +24,22 @@ class ControlElementSolver ControlElementSolver(ControlEditor* controlEditor, double timeStep = 1e-3, double integrationError = 1e-3, - bool startAllZero = false, + bool startAllZero = true, double input = 0.0); - ~ControlElementSolver() {} + ControlElementSolver(ControlElementContainer* ctrlContainer, + double timeStep = 1e-3, + double integrationError = 1e-3, + bool startAllZero = true, + double input = 0.0, + wxWindow* parent = NULL); + virtual ~ControlElementSolver() {} virtual bool InitializeValues(double input, bool startAllZero); virtual void SolveNextStep(double input); virtual std::vector<double> GetSolutions() { return m_solutions; } virtual double GetLastSolution() { return m_solutions[m_solutions.size() - 1]; } virtual bool IsOK() const { return m_isOK; } protected: + void Initialize(wxWindow* parent, double timeStep, double integrationError, bool startAllZero, double input); void FillAllConnectedChildren(ConnectionLine* parent); ConnectionLine* SolveNextElement(ConnectionLine* currentLine); diff --git a/Project/ControlSystemTest.cpp b/Project/ControlSystemTest.cpp new file mode 100644 index 0000000..ed1ea39 --- /dev/null +++ b/Project/ControlSystemTest.cpp @@ -0,0 +1,70 @@ +#include "ControlSystemTest.h" +#include "ControlEditor.h" + +ControlSystemTest::ControlSystemTest(ControlEditor* parent, + int* inputType, + double* startTime, + double* slope, + double* timeStep, + double* simTime) + : ControlSystemTestBase(parent) +{ + SetSize(GetBestSize()); + + m_inputType = inputType; + m_startTime = startTime; + m_slope = slope; + m_timeStep = timeStep; + m_simTime = simTime; + + m_choiceInput->SetSelection(*m_inputType); + m_textCtrlStartTime->SetValue(wxString::FromDouble(*m_startTime)); + m_textCtrlSlope->SetValue(wxString::FromDouble(*m_slope)); + m_textCtrlTimeStep->SetValue(wxString::FromDouble(*m_timeStep)); + m_textCtrlSimTime->SetValue(wxString::FromDouble(*m_simTime)); +} + +ControlSystemTest::~ControlSystemTest() {} +void ControlSystemTest::OnRunButtonClick(wxCommandEvent& event) +{ + int inputType; + double startTime, slope, timeStep, simTime; + + inputType = m_choiceInput->GetSelection(); + + if(!m_textCtrlStartTime->GetValue().ToDouble(&startTime)) { + wxMessageDialog msgDialog(this, _("Value entered incorrectly in the field \"Start time\"."), _("Error"), + wxOK | wxCENTRE | wxICON_ERROR); + msgDialog.ShowModal(); + return; + } + + if(!m_textCtrlSlope->GetValue().ToDouble(&slope)) { + wxMessageDialog msgDialog(this, _("Value entered incorrectly in the field \"Slope\"."), _("Error"), + wxOK | wxCENTRE | wxICON_ERROR); + msgDialog.ShowModal(); + return; + } + + if(!m_textCtrlTimeStep->GetValue().ToDouble(&timeStep)) { + wxMessageDialog msgDialog(this, _("Value entered incorrectly in the field \"Time step\"."), _("Error"), + wxOK | wxCENTRE | wxICON_ERROR); + msgDialog.ShowModal(); + return; + } + + if(!m_textCtrlSimTime->GetValue().ToDouble(&simTime)) { + wxMessageDialog msgDialog(this, _("Value entered incorrectly in the field \"Simulation time\"."), _("Error"), + wxOK | wxCENTRE | wxICON_ERROR); + msgDialog.ShowModal(); + return; + } + + *m_inputType = inputType; + *m_startTime = startTime; + *m_slope = slope; + *m_timeStep = timeStep; + *m_simTime = simTime; + + EndModal(wxID_OK); +} diff --git a/Project/ControlSystemTest.h b/Project/ControlSystemTest.h new file mode 100644 index 0000000..0a66ae3 --- /dev/null +++ b/Project/ControlSystemTest.h @@ -0,0 +1,23 @@ +#ifndef CONTROLSYSTEMTEST_H +#define CONTROLSYSTEMTEST_H + +#include "ControlEditorBase.h" + +class ControlEditor; + +class ControlSystemTest : public ControlSystemTestBase +{ +public: + ControlSystemTest(ControlEditor* parent, int* inputType, double* startTime, double* slope, double* timeStep, double* simTime); + virtual ~ControlSystemTest(); + +protected: + virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); } + virtual void OnRunButtonClick(wxCommandEvent& event); + int* m_inputType = NULL; + double* m_startTime = NULL; + double* m_slope = NULL; + double* m_timeStep = NULL; + double* m_simTime = NULL; +}; +#endif // CONTROLSYSTEMTEST_H diff --git a/Project/ElectricCalculation.cpp b/Project/ElectricCalculation.cpp index d024364..e67c9b4 100644 --- a/Project/ElectricCalculation.cpp +++ b/Project/ElectricCalculation.cpp @@ -7,6 +7,7 @@ ElectricCalculation::ElectricCalculation() {} ElectricCalculation::~ElectricCalculation() {} void ElectricCalculation::GetElementsFromList(std::vector<Element*> elementList) { + m_powerElementList.clear(); m_busList.clear(); m_capacitorList.clear(); m_indMotorList.clear(); @@ -19,6 +20,8 @@ void ElectricCalculation::GetElementsFromList(std::vector<Element*> elementList) // TODO: Bad design? for(auto it = elementList.begin(); it != elementList.end(); it++) { Element* element = *it; + m_powerElementList.push_back(static_cast<PowerElement*>(element)); + if(Bus* bus = dynamic_cast<Bus*>(element)) m_busList.push_back(bus); else if(Capacitor* capacitor = dynamic_cast<Capacitor*>(element)) @@ -41,9 +44,10 @@ void ElectricCalculation::GetElementsFromList(std::vector<Element*> elementList) } bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > >& yBus, - double systemPowerBase, - YBusSequence sequence, - bool includeSyncMachines) + double systemPowerBase, + YBusSequence sequence, + bool includeSyncMachines, + bool allLoadsAsImpedances) { if(m_busList.size() == 0) return false; @@ -61,7 +65,7 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > int busNumber = 0; for(auto itb = m_busList.begin(); itb != m_busList.end(); itb++) { Bus* bus = *itb; - BusElectricalData data = bus->GetEletricalData(); + BusElectricalData data = bus->GetElectricalData(); data.number = busNumber; bus->SetElectricalData(data); busNumber++; @@ -71,10 +75,16 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > for(auto it = m_loadList.begin(), itEnd = m_loadList.end(); it != itEnd; ++it) { Load* load = *it; if(load->IsOnline()) { - int n = static_cast<Bus*>(load->GetParentList()[0])->GetEletricalData().number; + int n = static_cast<Bus*>(load->GetParentList()[0])->GetElectricalData().number; LoadElectricalData data = load->GetPUElectricalData(systemPowerBase); - if(data.loadType == CONST_IMPEDANCE) - yBus[n][n] += std::complex<double>(data.activePower, -data.reactivePower); + if(data.loadType == CONST_IMPEDANCE || allLoadsAsImpedances) { + std::complex<double> yLoad = std::complex<double>(data.activePower, -data.reactivePower); + if(allLoadsAsImpedances) { + std::complex<double> v = static_cast<Bus*>(load->GetParentList()[0])->GetElectricalData().voltage; + yLoad /= (std::abs(v) * std::abs(v)); + } + yBus[n][n] += yLoad; + } } } @@ -82,7 +92,7 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > for(auto it = m_capacitorList.begin(), itEnd = m_capacitorList.end(); it != itEnd; ++it) { Capacitor* capacitor = *it; if(capacitor->IsOnline()) { - int n = static_cast<Bus*>(capacitor->GetParentList()[0])->GetEletricalData().number; + int n = static_cast<Bus*>(capacitor->GetParentList()[0])->GetElectricalData().number; CapacitorElectricalData data = capacitor->GetPUElectricalData(systemPowerBase); yBus[n][n] += std::complex<double>(0.0, data.reactivePower); } @@ -92,7 +102,7 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > for(auto it = m_inductorList.begin(), itEnd = m_inductorList.end(); it != itEnd; ++it) { Inductor* inductor = *it; if(inductor->IsOnline()) { - int n = static_cast<Bus*>(inductor->GetParentList()[0])->GetEletricalData().number; + int n = static_cast<Bus*>(inductor->GetParentList()[0])->GetElectricalData().number; InductorElectricalData data = inductor->GetPUElectricalData(systemPowerBase); yBus[n][n] += std::complex<double>(0.0, -data.reactivePower); } @@ -104,8 +114,8 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > if(line->IsOnline()) { LineElectricalData data = line->GetElectricalData(); - int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetEletricalData().number; - int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetEletricalData().number; + int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().number; + int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().number; switch(sequence) { case POSITIVE_SEQ: @@ -140,8 +150,8 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > if(transformer->IsOnline()) { TransformerElectricalData data = transformer->GetElectricalData(); - int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetEletricalData().number; - int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetEletricalData().number; + int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().number; + int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().number; // If the transformer have nominal turns ratio (1.0) and no phase shifting, it will be modelled as series // impedance. @@ -160,8 +170,8 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > else if(sequence != ZERO_SEQ) { // Complex turns ratio double radPhaseShift = wxDegToRad(data.phaseShift); - std::complex<double> a = std::complex<double>( - data.turnsRatio * std::cos(radPhaseShift), -data.turnsRatio * std::sin(radPhaseShift)); + std::complex<double> a = std::complex<double>(data.turnsRatio * std::cos(radPhaseShift), + -data.turnsRatio * std::sin(radPhaseShift)); // Transformer admitance std::complex<double> y = 1.0 / std::complex<double>(data.resistance, data.indReactance); @@ -181,10 +191,11 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > switch(data.connection) { case GWYE_GWYE: { std::complex<double> y = - 1.0 / std::complex<double>(data.zeroResistance + - 3.0 * (data.primaryGrndResistance + data.secondaryGrndResistance), - data.zeroIndReactance + - 3.0 * (data.primaryGrndReactance + data.secondaryGrndReactance)); + 1.0 / + std::complex<double>( + data.zeroResistance + 3.0 * (data.primaryGrndResistance + data.secondaryGrndResistance), + data.zeroIndReactance + + 3.0 * (data.primaryGrndReactance + data.secondaryGrndReactance)); std::complex<double> a = std::complex<double>(data.turnsRatio, 0.0); yBus[n1][n1] += y / (a * a); @@ -195,14 +206,14 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > case DELTA_GWYE: { std::complex<double> y = 1.0 / std::complex<double>(data.zeroResistance + 3.0 * (data.secondaryGrndResistance), - data.zeroIndReactance + 3.0 * (data.secondaryGrndReactance)); + data.zeroIndReactance + 3.0 * (data.secondaryGrndReactance)); yBus[n2][n2] += y; break; } case GWYE_DELTA: { std::complex<double> y = 1.0 / std::complex<double>(data.zeroResistance + 3.0 * (data.primaryGrndResistance), - data.zeroIndReactance + 3.0 * (data.primaryGrndReactance)); + data.zeroIndReactance + 3.0 * (data.primaryGrndReactance)); yBus[n1][n1] += y; break; } @@ -218,7 +229,7 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) { SyncGenerator* syncGenerator = *it; if(syncGenerator->IsOnline()) { - int n = static_cast<Bus*>(syncGenerator->GetParentList()[0])->GetEletricalData().number; + int n = static_cast<Bus*>(syncGenerator->GetParentList()[0])->GetElectricalData().number; SyncGeneratorElectricalData data = syncGenerator->GetPUElectricalData(systemPowerBase); switch(sequence) { case POSITIVE_SEQ: { @@ -237,7 +248,7 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > for(auto it = m_syncMotorList.begin(), itEnd = m_syncMotorList.end(); it != itEnd; ++it) { SyncMotor* syncMotor = *it; if(syncMotor->IsOnline()) { - int n = static_cast<Bus*>(syncMotor->GetParentList()[0])->GetEletricalData().number; + int n = static_cast<Bus*>(syncMotor->GetParentList()[0])->GetElectricalData().number; SyncMotorElectricalData data = syncMotor->GetPUElectricalData(systemPowerBase); switch(sequence) { case POSITIVE_SEQ: { @@ -258,10 +269,10 @@ bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > } void ElectricCalculation::UpdateElementsPowerFlow(std::vector<std::complex<double> > voltage, - std::vector<std::complex<double> > power, - std::vector<BusType> busType, - std::vector<ReactiveLimits> reactiveLimit, - double systemPowerBase) + std::vector<std::complex<double> > power, + std::vector<BusType> busType, + std::vector<ReactiveLimits> reactiveLimit, + double systemPowerBase) { for(int i = 0; i < (int)reactiveLimit.size(); ++i) { if(reactiveLimit[i].maxLimit > -1e-5 && reactiveLimit[i].maxLimit < 1e-5) reactiveLimit[i].maxLimit = 1e-5; @@ -270,7 +281,7 @@ void ElectricCalculation::UpdateElementsPowerFlow(std::vector<std::complex<doubl // Buses voltages for(int i = 0; i < (int)m_busList.size(); i++) { Bus* bus = m_busList[i]; - BusElectricalData data = bus->GetEletricalData(); + BusElectricalData data = bus->GetElectricalData(); data.voltage = voltage[i]; bus->SetElectricalData(data); } @@ -279,17 +290,17 @@ void ElectricCalculation::UpdateElementsPowerFlow(std::vector<std::complex<doubl for(int i = 0; i < (int)m_lineList.size(); i++) { Line* line = m_lineList[i]; if(line->IsOnline()) { - int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetEletricalData().number; - int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetEletricalData().number; + int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().number; + int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().number; LineElectricalData data = line->GetElectricalData(); std::complex<double> v1 = voltage[n1]; std::complex<double> v2 = voltage[n2]; data.current[0] = (v1 - v2) / std::complex<double>(data.resistance, data.indReactance) + - v1 * std::complex<double>(0.0, data.capSusceptance / 2.0); + v1 * std::complex<double>(0.0, data.capSusceptance / 2.0); data.current[1] = (v2 - v1) / std::complex<double>(data.resistance, data.indReactance) + - v2 * std::complex<double>(0.0, data.capSusceptance / 2.0); + v2 * std::complex<double>(0.0, data.capSusceptance / 2.0); data.powerFlow[0] = v1 * std::conj(data.current[0]); data.powerFlow[1] = v2 * std::conj(data.current[1]); @@ -308,10 +319,10 @@ void ElectricCalculation::UpdateElementsPowerFlow(std::vector<std::complex<doubl Transformer* transformer = m_transformerList[i]; if(transformer->IsOnline()) { TransformerElectricalData data = transformer->GetElectricalData(); - int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetEletricalData().number; - int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetEletricalData().number; - std::complex<double> v1 = voltage[n1]; // Primary voltage - std::complex<double> v2 = voltage[n2]; // Secondary voltage + int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().number; + int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().number; + std::complex<double> v1 = voltage[n1]; // Primary voltage + std::complex<double> v2 = voltage[n2]; // Secondary voltage // Transformer admitance std::complex<double> y = 1.0 / std::complex<double>(data.resistance, data.indReactance); @@ -343,7 +354,7 @@ void ElectricCalculation::UpdateElementsPowerFlow(std::vector<std::complex<doubl // Synchronous machines for(int i = 0; i < (int)m_busList.size(); i++) { Bus* bus = m_busList[i]; - BusElectricalData data = bus->GetEletricalData(); + BusElectricalData data = bus->GetElectricalData(); // Get the synchronous machines connected and calculate the load power on the bus. std::vector<SyncGenerator*> syncGeneratorsOnBus; @@ -491,8 +502,8 @@ void ElectricCalculation::UpdateElementsPowerFlow(std::vector<std::complex<doubl reactivePower = childData_PU.minReactive; reachedMachineLimit = true; } else if((!childData_PU.haveMaxReactive && reactiveLimit[i].limitReached == RL_MAX_REACHED) || - (!childData_PU.haveMinReactive && reactiveLimit[i].limitReached == RL_MIN_REACHED) || - (!childData_PU.haveMaxReactive && !childData_PU.haveMaxReactive)) { + (!childData_PU.haveMinReactive && reactiveLimit[i].limitReached == RL_MIN_REACHED) || + (!childData_PU.haveMaxReactive && !childData_PU.haveMaxReactive)) { reactivePower += exceededReactive; exceededReactive = 0.0; } @@ -532,7 +543,7 @@ void ElectricCalculation::UpdateElementsPowerFlow(std::vector<std::complex<doubl } bool ElectricCalculation::InvertMatrix(std::vector<std::vector<std::complex<double> > > matrix, - std::vector<std::vector<std::complex<double> > >& inverse) + std::vector<std::vector<std::complex<double> > >& inverse) { int order = static_cast<int>(matrix.size()); @@ -599,3 +610,194 @@ bool ElectricCalculation::InvertMatrix(std::vector<std::vector<std::complex<doub return true; } + +void ElectricCalculation::ABCtoDQ0(std::complex<double> complexValue, double angle, double& dValue, double& qValue) +{ + dValue = -std::real(complexValue) * std::sin(angle) + std::imag(complexValue) * std::cos(angle); + qValue = std::real(complexValue) * std::cos(angle) + std::imag(complexValue) * std::sin(angle); +} + +void ElectricCalculation::DQ0toABC(double dValue, double qValue, double angle, std::complex<double>& complexValue) +{ + double real = qValue * std::cos(angle) - dValue * std::sin(angle); + double imag = qValue * std::sin(angle) + dValue * std::cos(angle); + complexValue = std::complex<double>(real, imag); +} + +std::vector<std::complex<double> > ElectricCalculation::GaussianElimination( + std::vector<std::vector<std::complex<double> > > matrix, + std::vector<std::complex<double> > array) +{ + //[Ref] http://pt.wikipedia.org/wiki/Elimina%C3%A7%C3%A3o_de_Gauss + + std::vector<std::complex<double> > solution; + + std::vector<std::vector<std::complex<double> > > triangMatrix; + triangMatrix.resize(matrix.size()); + for(unsigned int i = 0; i < matrix.size(); i++) { + triangMatrix[i].resize(matrix.size()); + } + + for(unsigned int i = 0; i < matrix.size(); i++) { + solution.push_back(array[i]); + } + + for(unsigned int i = 0; i < matrix.size(); i++) { + for(unsigned int j = 0; j < matrix.size(); j++) { + triangMatrix[i][j] = matrix[i][j]; + } + } + + for(unsigned int k = 0; k < matrix.size(); k++) { + unsigned int k1 = k + 1; + for(unsigned int i = k; i < matrix.size(); i++) { + if(triangMatrix[i][k] != std::complex<double>(0.0, 0.0)) { + for(unsigned int j = k1; j < matrix.size(); j++) { + triangMatrix[i][j] = triangMatrix[i][j] / triangMatrix[i][k]; + } + solution[i] = solution[i] / triangMatrix[i][k]; + } + } + for(unsigned int i = k1; i < matrix.size(); i++) { + if(triangMatrix[i][k] != std::complex<double>(0.0, 0.0)) { + for(unsigned int j = k1; j < matrix.size(); j++) { + triangMatrix[i][j] -= triangMatrix[k][j]; + } + solution[i] -= solution[k]; + } + } + } + for(unsigned int i = matrix.size() - 2; i >= 0; i--) { + for(unsigned int j = matrix.size() - 1; j >= i + 1; j--) { + solution[i] -= triangMatrix[i][j] * solution[j]; + } + } + + return solution; +} + +Machines::SyncMachineModel ElectricCalculation::GetMachineModel(SyncGenerator* generator) +{ + auto data = generator->GetElectricalData(); + if(data.transTd0 != 0.0) { + if(data.transTq0 != 0.0) { + if(data.subTd0 != 0.0 || data.subTq0 != 0.0) { + return Machines::SM_MODEL_5; + } + return Machines::SM_MODEL_3; + } else { + if(data.subTd0 != 0.0 || data.subTq0 != 0.0) { + return Machines::SM_MODEL_4; + } + return Machines::SM_MODEL_2; + } + } + + return Machines::SM_MODEL_1; +} + +std::vector<std::complex<double> > ElectricCalculation::ComplexMatrixTimesVector( + std::vector<std::vector<std::complex<double> > > matrix, + std::vector<std::complex<double> > vector) +{ + std::vector<std::complex<double> > solution; + for(unsigned int i = 0; i < matrix.size(); i++) { + solution.push_back(std::complex<double>(0.0, 0.0)); + + for(unsigned int j = 0; j < matrix.size(); j++) { + solution[i] += matrix[i][j] * vector[j]; + } + } + + return solution; +} + +void ElectricCalculation::GetLUDecomposition(std::vector<std::vector<std::complex<double> > > matrix, + std::vector<std::vector<std::complex<double> > >& matrixL, + std::vector<std::vector<std::complex<double> > >& matrixU) +{ + // Doolittle method + // [Ref] http://www3.nd.edu/~zxu2/acms40390F11/Alg-LU-Crout.pdf + // [Ref] http://www.engr.colostate.edu/~thompson/hPage/CourseMat/Tutorials/CompMethods/doolittle.pdf + + int size = static_cast<int>(matrix.size()); // Decomposed matrix size. + + // Set upper and lower matrices sizes. + matrixL.resize(size); + matrixU.resize(size); + for(int i = 0; i < size; i++) { + matrixL[i].resize(size); + matrixU[i].resize(size); + } + + // First row of upper matrix and first column of lower matrix. + for(int i = 0; i < size; i++) { + matrixU[0][i] = matrix[0][i]; + matrixL[i][0] = matrix[i][0] / matrixU[0][0]; + } + + // Lower matrix main diagonal. + for(int i = 1; i < size; i++) { + matrixL[i][i] = std::complex<double>(1.0, 0.0); + } + + for(int i = 1; i < size - 1; i++) { + // Upper matrix main diagonal. + matrixU[i][i] = matrix[i][i]; + for(int k = 0; k < i; k++) { + matrixU[i][i] -= matrixL[i][k] * matrixU[k][i]; + } + + // Others elements of upper matrix + for(int j = i + 1; j < size; j++) { + matrixU[i][j] = matrix[i][j]; + for(int k = 0; k < i; k++) { + matrixU[i][j] -= matrixL[i][k] * matrixU[k][j]; + } + } + + // Lower matrix elements + for(int j = i + 1; j < size; j++) { + matrixL[j][i] = matrix[j][i]; + for(int k = 0; k < i; k++) { + matrixL[j][i] -= matrixL[j][k] * matrixU[k][i]; + } + matrixL[j][i] = matrixL[j][i] / matrixU[i][i]; + } + } + + // Last element of upper matrix. + matrixU[size - 1][size - 1] = matrix[size - 1][size - 1]; + for(int k = 0; k < size - 1; k++) { + matrixU[size - 1][size - 1] -= matrixL[size - 1][k] * matrixU[k][size - 1]; + } +} + +std::vector<std::complex<double> > ElectricCalculation::LUEvaluate(std::vector<std::vector<std::complex<double> > > u, + std::vector<std::vector<std::complex<double> > > l, + std::vector<std::complex<double> > b) +{ + int size = static_cast<int>(b.size()); + std::vector<std::complex<double> > x; + std::vector<std::complex<double> > y; + x.resize(size); + y.resize(size); + + // Forward + for(int i = 0; i < size; i++) { + y[i] = b[i]; + for(int j = 0; j < i; j++) { + y[i] -= l[i][j] * y[j]; + } + y[i] /= l[i][i]; + } + // Backward + for(int i = size - 1; i >= 0; i--) { + x[i] = y[i]; + for(int j = i + 1; j < size; j++) { + x[i] -= u[i][j] * x[j]; + } + x[i] /= u[i][i]; + } + return x; +} diff --git a/Project/ElectricCalculation.h b/Project/ElectricCalculation.h index 3eea5dd..93c422b 100644 --- a/Project/ElectricCalculation.h +++ b/Project/ElectricCalculation.h @@ -5,6 +5,7 @@ #include <complex> #include "Element.h" +#include "PowerElement.h" #include "Bus.h" #include "Capacitor.h" #include "IndMotor.h" @@ -15,15 +16,17 @@ #include "SyncMotor.h" #include "Transformer.h" +#include "PropertiesData.h" + enum BusType { BUS_SLACK = 0, BUS_PV, BUS_PQ }; enum ReactiveLimitsType { - RL_UNLIMITED = 0, // The bus can generate any ammount of reactive power. - RL_LIMITED, // The bus reactive power generation is limited. - RL_UNLIMITED_SOURCE, // The bus have at least one source of infinite reative power. - RL_MAX_REACHED, // Max limit reached - RL_MIN_REACHED, // Min limit reached - RL_NONE_REACHED // No limits reached + RL_UNLIMITED = 0, // The bus can generate any ammount of reactive power. + RL_LIMITED, // The bus reactive power generation is limited. + RL_UNLIMITED_SOURCE, // The bus have at least one source of infinite reative power. + RL_MAX_REACHED, // Max limit reached + RL_MIN_REACHED, // Min limit reached + RL_NONE_REACHED // No limits reached }; enum YBusSequence { POSITIVE_SEQ = 0, NEGATIVE_SEQ, ZERO_SEQ }; @@ -45,7 +48,7 @@ struct ReactiveLimits { */ class ElectricCalculation { -public: + public: /** * @brief Constructor. */ @@ -57,7 +60,7 @@ public: ~ElectricCalculation(); /** - * @brief Separate the elements from a generic list. + * @brief Separate the power elements from a generic list. * @param elementList List of generic elements. */ virtual void GetElementsFromList(std::vector<Element*> elementList); @@ -71,9 +74,10 @@ public: * @return Return true if was possible to build the admittance matrix. */ virtual bool GetYBus(std::vector<std::vector<std::complex<double> > >& yBus, - double systemPowerBase, - YBusSequence sequence = POSITIVE_SEQ, - bool includeSyncMachines = false); + double systemPowerBase, + YBusSequence sequence = POSITIVE_SEQ, + bool includeSyncMachines = false, + bool allLoadsAsImpedances = false); /** * @brief Invert a matrix. @@ -82,7 +86,7 @@ public: * @return Return true if was possible to invert the matrix. */ virtual bool InvertMatrix(std::vector<std::vector<std::complex<double> > > matrix, - std::vector<std::vector<std::complex<double> > >& inverse); + std::vector<std::vector<std::complex<double> > >& inverse); /** * @brief Update the elements after the power flow calculation. @@ -93,66 +97,77 @@ public: * @param systemPowerBase Base power of the system. */ virtual void UpdateElementsPowerFlow(std::vector<std::complex<double> > voltage, - std::vector<std::complex<double> > power, - std::vector<BusType> busType, - std::vector<ReactiveLimits> reactiveLimit, - double systemPowerBase); + std::vector<std::complex<double> > power, + std::vector<BusType> busType, + std::vector<ReactiveLimits> reactiveLimit, + double systemPowerBase); + + void ABCtoDQ0(std::complex<double> complexValue, double angle, double& dValue, double& qValue); + void DQ0toABC(double dValue, double qValue, double angle, std::complex<double>& complexValue); + + std::vector<std::complex<double> > GaussianElimination(std::vector<std::vector<std::complex<double> > > matrix, + std::vector<std::complex<double> > array); + + Machines::SyncMachineModel GetMachineModel(SyncGenerator* generator); + + std::vector<std::complex<double> > ComplexMatrixTimesVector(std::vector<std::vector<std::complex<double> > > matrix, + std::vector<std::complex<double> > vector); + + void GetLUDecomposition(std::vector<std::vector<std::complex<double> > > matrix, + std::vector<std::vector<std::complex<double> > >& matrixL, + std::vector<std::vector<std::complex<double> > >& matrixU); + + std::vector<std::complex<double> > LUEvaluate(std::vector<std::vector<std::complex<double> > > u, + std::vector<std::vector<std::complex<double> > > l, + std::vector<std::complex<double> > b); /** * @brief Get the buses of the system (use GetElementsFromList first). * @return A list of bus elements. */ const std::vector<Bus*> GetBusList() const { return m_busList; } - /** * @brief Get the capacitors of the system (use GetElementsFromList first). * @return A list of capacitor elements. */ const std::vector<Capacitor*> GetCapacitorList() const { return m_capacitorList; } - /** * @brief Get the induction motors of the system (use GetElementsFromList first). * @return A list of induction motor elements. */ const std::vector<IndMotor*> GetIndMotorList() const { return m_indMotorList; } - /** * @brief Get the inductors of the system (use GetElementsFromList first). * @return A list of inductor elements. */ const std::vector<Inductor*> GetInductorList() const { return m_inductorList; } - /** * @brief Get the lines of the system (use GetElementsFromList first). * @return A list of line elements. */ const std::vector<Line*> GetLineList() const { return m_lineList; } - /** * @brief Get the loads of the system (use GetElementsFromList first). * @return A list of load elements. */ const std::vector<Load*> GetLoadList() const { return m_loadList; } - /** * @brief Get the synchronous generators of the system (use GetElementsFromList first). * @return A list of synchronous generator elements. */ const std::vector<SyncGenerator*> GetSyncGeneratorList() const { return m_syncGeneratorList; } - /** * @brief Get the synchronous motors of the system (use GetElementsFromList first). * @return A list of synchronous motor elements. */ const std::vector<SyncMotor*> GetSyncMotorList() const { return m_syncMotorList; } - /** * @brief Get the transformers of the system (use GetElementsFromList first). * @return A list of transformer elements. */ const std::vector<Transformer*> GetTransformerList() const { return m_transformerList; } - -protected: + protected: + std::vector<PowerElement*> m_powerElementList; std::vector<Bus*> m_busList; std::vector<Capacitor*> m_capacitorList; std::vector<IndMotor*> m_indMotorList; @@ -164,4 +179,4 @@ protected: std::vector<Transformer*> m_transformerList; }; -#endif // ELECTRICCALCULATION_H +#endif // ELECTRICCALCULATION_H diff --git a/Project/Electromechanical.cpp b/Project/Electromechanical.cpp new file mode 100644 index 0000000..57a275a --- /dev/null +++ b/Project/Electromechanical.cpp @@ -0,0 +1,1094 @@ +#include "Electromechanical.h" +#include "ControlElementSolver.h" + +Electromechanical::Electromechanical(wxWindow* parent, std::vector<Element*> elementList, SimulationData data) +{ + m_parent = parent; + GetElementsFromList(elementList); + SetEventTimeList(); + + m_powerSystemBase = GetPowerValue(data.basePower, data.basePowerUnit); + m_systemFreq = data.stabilityFrequency; + m_simTime = data.stabilitySimulationTime; + m_timeStep = data.timeStep; + m_tolerance = data.stabilityTolerance; + m_maxIterations = data.stabilityMaxIterations; + + m_ctrlTimeStepMultiplier = 1.0 / static_cast<double>(data.controlTimeStepRatio); + + m_plotTime = data.plotTime; + m_useCOI = data.useCOI; +} + +Electromechanical::~Electromechanical() {} +bool Electromechanical::RunStabilityCalculation() +{ + wxProgressDialog pbd(_("Running simulation"), _("Initializing..."), 100, m_parent, + wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_CAN_ABORT | wxPD_SMOOTH); + + SetSyncMachinesModel(); + + // Calculate the admittance matrix with the synchronous machines. + if(!GetYBus(m_yBus, m_powerSystemBase, POSITIVE_SEQ, false, true)) { + m_errorMsg = _("It was not possible to build the admittance matrix."); + return false; + } + InsertSyncMachinesOnYBus(); + GetLUDecomposition(m_yBus, m_yBusL, m_yBusU); + + // Get buses voltages. + m_vBus.clear(); + m_vBus.resize(m_busList.size()); + for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) { + Bus* bus = *it; + auto data = bus->GetElectricalData(); + m_vBus[data.number] = data.voltage; + } + + // Calculate injected currents + m_iBus = ComplexMatrixTimesVector(m_yBus, m_vBus); + for(unsigned int i = 0; i < m_iBus.size(); ++i) { + if(std::abs(m_iBus[i]) < 1e-5) m_iBus[i] = std::complex<double>(0.0, 0.0); + } + + if(!InitializeDynamicElements()) return false; + + double pbdTime = m_plotTime; + double currentTime = 0.0; + double currentPlotTime = 0.0; + double currentPbdTime = 0.0; + while(currentTime < m_simTime) { + if(HasEvent(currentTime)) { + SetEvent(currentTime); + GetLUDecomposition(m_yBus, m_yBusL, m_yBusU); + } + + if(currentPlotTime >= m_plotTime || currentTime == 0.0) { + m_timeVector.push_back(currentTime); + SaveData(); + currentPlotTime = 0.0; + } + + if(currentPbdTime > pbdTime) { + if(!pbd.Update((currentTime / m_simTime) * 100, wxString::Format("Time = %.2fs", currentTime))) { + m_errorMsg = wxString::Format(_("Simulation cancelled at %.2fs."), currentTime); + pbd.Update(100); + return false; + } + currentPbdTime = 0.0; + } + + if(!SolveSynchronousMachines()) return false; + + currentTime += m_timeStep; + currentPlotTime += m_timeStep; + currentPbdTime += m_timeStep; + } + return true; +} + +void Electromechanical::SetEventTimeList() +{ + // Fault + for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) { + Bus* bus = *it; + auto data = bus->GetElectricalData(); + if(data.stabHasFault) { + m_eventTimeList.push_back(data.stabFaultTime); + m_eventOccurrenceList.push_back(false); + m_eventTimeList.push_back(data.stabFaultTime + data.stabFaultLength); + m_eventOccurrenceList.push_back(false); + } + } + // Switching + for(auto it = m_powerElementList.begin(), itEnd = m_powerElementList.end(); it != itEnd; ++it) { + PowerElement* element = *it; + SwitchingData swData = element->GetSwitchingData(); + for(unsigned int i = 0; i < swData.swTime.size(); ++i) { + m_eventTimeList.push_back(swData.swTime[i]); + m_eventOccurrenceList.push_back(false); + } + } +} + +bool Electromechanical::HasEvent(double currentTime) +{ + for(unsigned int i = 0; i < m_eventTimeList.size(); ++i) { + if(!m_eventOccurrenceList[i]) { + if(EventTrigger(m_eventTimeList[i], currentTime)) { + m_eventOccurrenceList[i] = true; + return true; + } + } + } + return false; +} + +void Electromechanical::SetEvent(double currentTime) +{ + // Fault + for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) { + Bus* bus = *it; + auto data = bus->GetElectricalData(); + if(data.stabHasFault) { + int n = data.number; + + // Insert fault + if(EventTrigger(data.stabFaultTime, currentTime)) { + double r, x; + r = data.stabFaultResistance; + x = data.stabFaultReactance; + if(x < 1e-5) x = 1e-5; + m_yBus[n][n] += std::complex<double>(1.0, 0.0) / std::complex<double>(r, x); + } + + // Remove fault + else if(EventTrigger(data.stabFaultTime + data.stabFaultLength, currentTime)) { + double r, x; + r = data.stabFaultResistance; + x = data.stabFaultReactance; + if(x < 1e-5) x = 1e-5; + m_yBus[n][n] -= std::complex<double>(1.0, 0.0) / std::complex<double>(r, x); + } + } + } + + // SyncGenerator switching + for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) { + SyncGenerator* generator = *it; + auto swData = generator->GetSwitchingData(); + for(unsigned int i = 0; i < swData.swType.size(); ++i) { + if(EventTrigger(swData.swTime[i], currentTime)) { + // Remove machine (only connected machines) + if(swData.swType[i] == SW_REMOVE && generator->IsOnline()) { + generator->SetOnline(false); + int n = static_cast<Bus*>(generator->GetParentList()[0])->GetElectricalData().number; + m_yBus[n][n] -= GetSyncMachineAdmittance(generator); + } + + // Insert machine (only disconnected machines) + if(swData.swType[i] == SW_INSERT && !generator->IsOnline() && generator->GetParentList().size() == 1) { + if(generator->SetOnline(true)) { + int n = static_cast<Bus*>(generator->GetParentList()[0])->GetElectricalData().number; + m_yBus[n][n] += GetSyncMachineAdmittance(generator); + } + } + } + } + } + + // Load switching + for(auto it = m_loadList.begin(), itEnd = m_loadList.end(); it != itEnd; ++it) { + Load* load = *it; + auto swData = load->GetSwitchingData(); + for(unsigned int i = 0; i < swData.swType.size(); ++i) { + if(EventTrigger(swData.swTime[i], currentTime)) { + // Remove load (only connected loads) + if(swData.swType[i] == SW_REMOVE && load->IsOnline()) { + load->SetOnline(false); + auto data = load->GetPUElectricalData(m_powerSystemBase); + Bus* parentBus = static_cast<Bus*>(load->GetParentList()[0]); + int n = parentBus->GetElectricalData().number; + std::complex<double> v = parentBus->GetElectricalData().voltage; + m_yBus[n][n] -= std::complex<double>(data.activePower, -data.reactivePower) / (v * v); + } + + // Insert load (only disconnected load) + if(swData.swType[i] == SW_INSERT && !load->IsOnline() && load->GetParentList().size() == 1) { + if(load->SetOnline(true)) { + auto data = load->GetPUElectricalData(m_powerSystemBase); + Bus* parentBus = static_cast<Bus*>(load->GetParentList()[0]); + int n = parentBus->GetElectricalData().number; + std::complex<double> v = parentBus->GetElectricalData().voltage; + m_yBus[n][n] += std::complex<double>(data.activePower, -data.reactivePower) / (v * v); + } + } + } + } + } + + // Line switching + for(auto it = m_lineList.begin(), itEnd = m_lineList.end(); it != itEnd; ++it) { + Line* line = *it; + auto swData = line->GetSwitchingData(); + for(unsigned int i = 0; i < swData.swType.size(); ++i) { + if(EventTrigger(swData.swTime[i], currentTime)) { + // Remove line (only connected lines) + if(swData.swType[i] == SW_REMOVE && line->IsOnline()) { + line->SetOnline(false); + auto data = line->GetElectricalData(); + + int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().number; + int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().number; + + m_yBus[n1][n2] += 1.0 / std::complex<double>(data.resistance, data.indReactance); + m_yBus[n2][n1] += 1.0 / std::complex<double>(data.resistance, data.indReactance); + + m_yBus[n1][n1] -= 1.0 / std::complex<double>(data.resistance, data.indReactance); + m_yBus[n2][n2] -= 1.0 / std::complex<double>(data.resistance, data.indReactance); + + m_yBus[n1][n1] -= std::complex<double>(0.0, data.capSusceptance / 2.0); + m_yBus[n2][n2] -= std::complex<double>(0.0, data.capSusceptance / 2.0); + } + + // Insert line (only disconnected lines) + if(swData.swType[i] == SW_INSERT && !line->IsOnline() && line->GetParentList().size() == 2) { + if(line->SetOnline(true)) { + auto data = line->GetElectricalData(); + + int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().number; + int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().number; + + m_yBus[n1][n2] -= 1.0 / std::complex<double>(data.resistance, data.indReactance); + m_yBus[n2][n1] -= 1.0 / std::complex<double>(data.resistance, data.indReactance); + + m_yBus[n1][n1] += 1.0 / std::complex<double>(data.resistance, data.indReactance); + m_yBus[n2][n2] += 1.0 / std::complex<double>(data.resistance, data.indReactance); + + m_yBus[n1][n1] += std::complex<double>(0.0, data.capSusceptance / 2.0); + m_yBus[n2][n2] += std::complex<double>(0.0, data.capSusceptance / 2.0); + } + } + } + } + } + + // Transformer switching + for(auto it = m_transformerList.begin(), itEnd = m_transformerList.end(); it != itEnd; ++it) { + Transformer* transformer = *it; + auto swData = transformer->GetSwitchingData(); + for(unsigned int i = 0; i < swData.swType.size(); ++i) { + if(EventTrigger(swData.swTime[i], currentTime)) { + // Remove transformer (only connected transformers) + if(swData.swType[i] == SW_REMOVE && transformer->IsOnline()) { + transformer->SetOnline(false); + auto data = transformer->GetElectricalData(); + + int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().number; + int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().number; + + if(data.turnsRatio == 1.0 && data.phaseShift == 0.0) { + m_yBus[n1][n2] -= -1.0 / std::complex<double>(data.resistance, data.indReactance); + m_yBus[n2][n1] -= -1.0 / std::complex<double>(data.resistance, data.indReactance); + + m_yBus[n1][n1] -= 1.0 / std::complex<double>(data.resistance, data.indReactance); + m_yBus[n2][n2] -= 1.0 / std::complex<double>(data.resistance, data.indReactance); + } else { + // Complex turns ratio + double radPhaseShift = wxDegToRad(data.phaseShift); + std::complex<double> a = std::complex<double>(data.turnsRatio * std::cos(radPhaseShift), + -data.turnsRatio * std::sin(radPhaseShift)); + + // Transformer admitance + std::complex<double> y = 1.0 / std::complex<double>(data.resistance, data.indReactance); + m_yBus[n1][n1] -= y / std::pow(std::abs(a), 2.0); + m_yBus[n1][n2] -= -(y / std::conj(a)); + m_yBus[n2][n1] -= -(y / a); + m_yBus[n2][n2] -= y; + } + } + + // Insert transformer (only disconnected transformers) + if(swData.swType[i] == SW_INSERT && !transformer->IsOnline() && + transformer->GetParentList().size() == 2) { + if(transformer->SetOnline(true)) { + auto data = transformer->GetElectricalData(); + + int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().number; + int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().number; + + if(data.turnsRatio == 1.0 && data.phaseShift == 0.0) { + m_yBus[n1][n2] += -1.0 / std::complex<double>(data.resistance, data.indReactance); + m_yBus[n2][n1] += -1.0 / std::complex<double>(data.resistance, data.indReactance); + + m_yBus[n1][n1] += 1.0 / std::complex<double>(data.resistance, data.indReactance); + m_yBus[n2][n2] += 1.0 / std::complex<double>(data.resistance, data.indReactance); + } else { + // Complex turns ratio + double radPhaseShift = wxDegToRad(data.phaseShift); + std::complex<double> a = std::complex<double>(data.turnsRatio * std::cos(radPhaseShift), + -data.turnsRatio * std::sin(radPhaseShift)); + + // Transformer admitance + std::complex<double> y = 1.0 / std::complex<double>(data.resistance, data.indReactance); + m_yBus[n1][n1] += y / std::pow(std::abs(a), 2.0); + m_yBus[n1][n2] += -(y / std::conj(a)); + m_yBus[n2][n1] += -(y / a); + m_yBus[n2][n2] += y; + } + } + } + } + } + } + + // Capacitor switching + for(auto it = m_capacitorList.begin(), itEnd = m_capacitorList.end(); it != itEnd; ++it) { + Capacitor* capacitor = *it; + auto swData = capacitor->GetSwitchingData(); + for(unsigned int i = 0; i < swData.swType.size(); ++i) { + if(EventTrigger(swData.swTime[i], currentTime)) { + // Remove capacitor (only connected capacitors) + if(swData.swType[i] == SW_REMOVE && capacitor->IsOnline()) { + capacitor->SetOnline(false); + auto data = capacitor->GetPUElectricalData(m_powerSystemBase); + int n = static_cast<Bus*>(capacitor->GetParentList()[0])->GetElectricalData().number; + m_yBus[n][n] -= std::complex<double>(0.0, data.reactivePower); + } + + // Insert capacitor (only disconnected capacitors) + if(swData.swType[i] == SW_INSERT && !capacitor->IsOnline() && capacitor->GetParentList().size() == 1) { + if(capacitor->SetOnline(true)) { + auto data = capacitor->GetPUElectricalData(m_powerSystemBase); + int n = static_cast<Bus*>(capacitor->GetParentList()[0])->GetElectricalData().number; + m_yBus[n][n] += std::complex<double>(0.0, data.reactivePower); + } + } + } + } + } + + // Inductor switching + for(auto it = m_inductorList.begin(), itEnd = m_inductorList.end(); it != itEnd; ++it) { + Inductor* inductor = *it; + auto swData = inductor->GetSwitchingData(); + for(unsigned int i = 0; i < swData.swType.size(); ++i) { + if(EventTrigger(swData.swTime[i], currentTime)) { + // Remove inductor (only connected inductors) + if(swData.swType[i] == SW_REMOVE && inductor->IsOnline()) { + inductor->SetOnline(false); + auto data = inductor->GetPUElectricalData(m_powerSystemBase); + int n = static_cast<Bus*>(inductor->GetParentList()[0])->GetElectricalData().number; + m_yBus[n][n] -= std::complex<double>(0.0, -data.reactivePower); + } + + // Insert inductor (only disconnected inductors) + if(swData.swType[i] == SW_INSERT && !inductor->IsOnline() && inductor->GetParentList().size() == 1) { + if(inductor->SetOnline(true)) { + auto data = inductor->GetPUElectricalData(m_powerSystemBase); + int n = static_cast<Bus*>(inductor->GetParentList()[0])->GetElectricalData().number; + m_yBus[n][n] += std::complex<double>(0.0, -data.reactivePower); + } + } + } + } + } +} + +void Electromechanical::InsertSyncMachinesOnYBus() +{ + for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) { + SyncGenerator* generator = *it; + if(generator->IsOnline()) { + auto data = generator->GetElectricalData(); + int n = static_cast<Bus*>(generator->GetParentList()[0])->GetElectricalData().number; + m_yBus[n][n] += GetSyncMachineAdmittance(generator); + } + } +} + +bool Electromechanical::EventTrigger(double eventTime, double currentTime) +{ + return (((eventTime - m_timeStep) < currentTime) && (eventTime >= currentTime)); +} + +std::complex<double> Electromechanical::GetSyncMachineAdmittance(SyncGenerator* generator) +{ + auto data = generator->GetElectricalData(); + double k = 1.0; // Power base change factor. + if(data.useMachineBase) { + double oldBase = GetPowerValue(data.nominalPower, data.nominalPowerUnit); + k = m_powerSystemBase / oldBase; + } + + double xd = 0.0; + double xq = 0.0; + double ra = data.armResistance * k; + + switch(data.model) { + case Machines::SM_MODEL_1: { + xq = data.transXd * k; + xd = xq; + } break; + case Machines::SM_MODEL_2: { + xd = data.transXd * k; + xq = data.transXq * k; + if(xq == 0.0) { + xq = data.syncXq * k; + if(xq == 0.0) { + xq = data.syncXd * k; + } + } + } break; + case Machines::SM_MODEL_3: { + xd = data.transXd * k; + xq = data.transXq * k; + if(xq == 0.0) xq = xd; + } break; + case Machines::SM_MODEL_4: + case Machines::SM_MODEL_5: { + xd = data.subXd * k; + xq = data.subXq * k; + if(xd == 0.0) xd = xq; + if(xq == 0.0) xq = xd; + } break; + } + double xdq = 0.5 * (xd + xq); + return (std::complex<double>(ra, -xdq) / std::complex<double>(ra * ra + xd * xq, 0.0)); +} + +bool Electromechanical::InitializeDynamicElements() +{ + // Buses + for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) { + Bus* bus = *it; + auto data = bus->GetElectricalData(); + data.stabVoltageVector.clear(); + bus->SetElectricalData(data); + } + // Synchronous generators + for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) { + SyncGenerator* syncGenerator = *it; + auto dataPU = syncGenerator->GetPUElectricalData(m_powerSystemBase); + auto data = syncGenerator->GetElectricalData(); + if(syncGenerator->IsOnline()) { + double k = 1.0; // Power base change factor. + if(data.useMachineBase) { + double oldBase = GetPowerValue(data.nominalPower, data.nominalPowerUnit); + k = m_powerSystemBase / oldBase; + } + data.terminalVoltage = static_cast<Bus*>(syncGenerator->GetParentList()[0])->GetElectricalData().voltage; + + std::complex<double> conjS(dataPU.activePower, -dataPU.reactivePower); + std::complex<double> conjV = std::conj(data.terminalVoltage); + std::complex<double> ia = conjS / conjV; + + double xd = data.syncXd * k; + double xq = data.syncXq * k; + double ra = data.armResistance * k; + + if(data.model == Machines::SM_MODEL_1) { + xq = data.transXd * k; + xd = xq; + } else if(data.syncXq == 0.0) + xq = data.syncXd * k; + + // Initialize state variables + std::complex<double> eq0 = data.terminalVoltage + std::complex<double>(ra, xq) * ia; + data.delta = std::arg(eq0); + + double fi0 = std::arg(ia); + double id0, iq0; + // ABCtoDQ0(ia, data.delta - fi0, id0, iq0); + iq0 = std::abs(ia) * std::cos(data.delta - fi0); + id0 = -std::abs(ia) * std::sin(data.delta - fi0); + + data.initialFieldVoltage = std::abs(eq0) - (xd - xq) * id0; + data.fieldVoltage = data.initialFieldVoltage; + data.pm = std::real((data.terminalVoltage * std::conj(ia)) + (std::abs(ia) * std::abs(ia) * ra)); + data.speed = 2.0 * M_PI * m_systemFreq; + + data.pe = data.pm; + data.electricalPower = std::complex<double>(dataPU.activePower, dataPU.reactivePower); + + // Variables to extrapolate. + data.oldIq = iq0; + data.oldId = id0; + data.oldPe = data.pe; + + switch(data.model) { + case Machines::SM_MODEL_1: { + // double tranXd = data.transXd * k; + + // data.tranEq = data.initialFieldVoltage + (xd - tranXd) * id0; + data.tranEq = std::abs(eq0); + + data.tranEd = 0.0; + data.subEq = 0.0; + data.subEd = 0.0; + } break; + case Machines::SM_MODEL_2: { + double tranXd = data.transXd * k; + + data.tranEq = data.initialFieldVoltage + (xd - tranXd) * id0; + data.tranEd = 0.0; + data.subEd = 0.0; + data.subEq = 0.0; + } break; + case Machines::SM_MODEL_3: { + double tranXd = data.transXd * k; + double tranXq = data.transXq * k; + if(tranXq == 0.0) tranXq = tranXd; + + data.tranEq = data.initialFieldVoltage + (xd - tranXd) * id0; + data.tranEd = -(xq - tranXq) * iq0; + + data.subEd = 0.0; + data.subEq = 0.0; + } break; + case Machines::SM_MODEL_4: { + double tranXd = data.transXd * k; + double subXd = data.subXd * k; + double subXq = data.subXq * k; + if(subXd == 0.0) subXd = subXq; + if(subXq == 0.0) subXq = subXd; + + data.tranEq = data.initialFieldVoltage + (xd - tranXd) * id0; + data.tranEd = 0.0; + data.subEq = data.tranEq + (tranXd - subXd) * id0; + data.subEd = -(xq - subXq) * iq0; + } break; + case Machines::SM_MODEL_5: { + double tranXd = data.transXd * k; + double tranXq = data.transXq * k; + double subXd = data.subXd * k; + double subXq = data.subXq * k; + if(subXd == 0.0) subXd = subXq; + if(subXq == 0.0) subXq = subXd; + + data.tranEq = data.initialFieldVoltage + (xd - tranXd) * id0; + data.tranEd = -(xq - tranXq) * iq0; + data.subEq = data.tranEq + (tranXd - subXd) * id0; + data.subEd = data.tranEd - (tranXq - subXq) * iq0; + } break; + default: + break; + } + + // Initialize controllers + if(data.useAVR) { + if(data.avrSolver) delete data.avrSolver; + data.avrSolver = new ControlElementSolver(data.avr, m_timeStep * m_ctrlTimeStepMultiplier, m_tolerance, + false, std::abs(data.terminalVoltage), m_parent); + if(!data.avrSolver->IsOK()) { + m_errorMsg = _("Error on initializate the AVR of \"") + data.name + _("\"."); + syncGenerator->SetElectricalData(data); + return false; + } + } + if(data.useSpeedGovernor) { + if(data.speedGovSolver) delete data.speedGovSolver; + data.speedGovSolver = new ControlElementSolver(data.speedGov, m_timeStep * m_ctrlTimeStepMultiplier, + m_tolerance, false, data.speed, m_parent); + if(!data.speedGovSolver->IsOK()) { + m_errorMsg = _("Error on initializate the speed governor of \"") + data.name + _("\"."); + syncGenerator->SetElectricalData(data); + return false; + } + } + } else { + // Initialize open circuit machine. + } + // Reset plot data + data.terminalVoltageVector.clear(); + data.electricalPowerVector.clear(); + data.mechanicalPowerVector.clear(); + data.freqVector.clear(); + data.fieldVoltageVector.clear(); + data.deltaVector.clear(); + + syncGenerator->SetElectricalData(data); + } + CalculateReferenceSpeed(); + return true; +} + +void Electromechanical::CalculateMachinesCurrents() +{ + // Reset injected currents vector + for(unsigned int i = 0; i < m_iBus.size(); ++i) m_iBus[i] = std::complex<double>(0.0, 0.0); + + for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) { + SyncGenerator* syncGenerator = *it; + auto data = syncGenerator->GetElectricalData(); + if(syncGenerator->IsOnline()) { + double k = 1.0; // Power base change factor. + if(data.useMachineBase) { + double oldBase = GetPowerValue(data.nominalPower, data.nominalPowerUnit); + k = m_powerSystemBase / oldBase; + } + + double xd = 0.0; + double xq = 0.0; + double ra = data.armResistance * k; + int n = static_cast<Bus*>(syncGenerator->GetParentList()[0])->GetElectricalData().number; + std::complex<double> e = std::complex<double>(0.0, 0.0); + std::complex<double> v = m_vBus[n]; + std::complex<double> iInj = m_iBus[n]; + double xdq = 0.0; + + switch(data.model) { + case Machines::SM_MODEL_1: { + DQ0toABC(data.tranEd, data.tranEq, data.delta, e); + xq = data.transXd * k; + xd = xq; + } break; + case Machines::SM_MODEL_2: { + DQ0toABC(data.tranEd, data.tranEq, data.delta, e); + xd = data.transXd * k; + xq = data.transXq * k; + if(xq == 0.0) { + xq = data.syncXq * k; + if(xq == 0.0) { + xq = data.syncXd * k; + } + } + } break; + case Machines::SM_MODEL_3: { + DQ0toABC(data.tranEd, data.tranEq, data.delta, e); + xd = data.transXd * k; + xq = data.transXq * k; + if(xq == 0.0) xq = xd; + } break; + case Machines::SM_MODEL_4: + case Machines::SM_MODEL_5: { + DQ0toABC(data.subEd, data.subEq, data.delta, e); + xd = data.subXd * k; + xq = data.subXq * k; + if(xd == 0.0) xd = xq; + if(xq == 0.0) xq = xd; + } break; + } + xdq = 0.5 * (xd + xq); + + std::complex<double> y0 = std::complex<double>(ra, -xdq) / std::complex<double>(ra * ra + xd * xq, 0.0); + std::complex<double> iUnadj = y0 * e; + + std::complex<double> iAdj = + std::complex<double>(0.0, -((0.5 * (xq - xd)) / (ra * ra + xd * xq))) * (std::conj(e) - std::conj(v)); + iAdj = iAdj * std::cos(2.0 * data.delta) + iAdj * std::complex<double>(0.0, std::sin(2.0 * data.delta)); + + iInj = iUnadj + iAdj; + + m_iBus[n] += iInj; + + std::complex<double> iMachine = iInj - y0 * v; + + data.electricalPower = v * std::conj(iMachine); + } else { + data.electricalPower = std::complex<double>(0.0, 0.0); + } + + syncGenerator->SetElectricalData(data); + } +} + +void Electromechanical::CalculateIntegrationConstants(SyncGenerator* syncGenerator, double id, double iq, double k) +{ + CalculateReferenceSpeed(); + auto data = syncGenerator->GetElectricalData(); + + double syncXd, syncXq, transXd, transXq, subXd, subXq; + syncXd = data.syncXd * k; + syncXq = data.syncXq * k; + transXd = data.transXd * k; + transXq = data.transXq * k; + subXd = data.subXd * k; + subXq = data.subXq * k; + + if(syncXq == 0.0) syncXq = syncXd; + if(transXq == 0.0) transXq = transXd; + if(subXd == 0.0) subXd = subXq; + if(subXq == 0.0) subXq = subXd; + + double transTd0, transTq0, subTd0, subTq0; + transTd0 = data.transTd0; + transTq0 = data.transTq0; + subTd0 = data.subTd0; + subTq0 = data.subTq0; + + if(subTd0 == 0.0) subTd0 = subTq0; + if(subTq0 == 0.0) subTq0 = subTd0; + + // Speed + data.icSpeed.m = m_timeStep / ((4.0f * data.inertia / m_refSpeed) / k + m_timeStep * data.damping * k); + data.icSpeed.c = (1.0f - 2.0f * data.icSpeed.m * data.damping * k) * data.speed + + data.icSpeed.m * (data.pm - data.pe + 2.0f * m_refSpeed * data.damping * k); + + // Delta + data.icDelta.m = 0.5f * m_timeStep; + data.icDelta.c = data.delta + data.icDelta.m * (data.speed - 2.0f * m_refSpeed); + + // Eq' + if(data.model == Machines::SM_MODEL_2 || data.model == Machines::SM_MODEL_3 || data.model == Machines::SM_MODEL_4 || + data.model == Machines::SM_MODEL_5) { + data.icTranEq.m = m_timeStep / (2.0f * transTd0 + m_timeStep); + data.icTranEq.c = (1.0f - 2.0 * data.icTranEq.m) * data.tranEq + + data.icTranEq.m * (data.fieldVoltage + (syncXd - transXd) * id); + } + + // Ed' + if(data.model == Machines::SM_MODEL_3 || data.model == Machines::SM_MODEL_4 || data.model == Machines::SM_MODEL_5) { + data.icTranEd.m = m_timeStep / (2.0f * transTq0 + m_timeStep); + data.icTranEd.c = (1.0f - 2.0f * data.icTranEd.m) * data.tranEd - data.icTranEd.m * (syncXq - transXq) * iq; + } + + // Eq'' + if(data.model == Machines::SM_MODEL_4 || data.model == Machines::SM_MODEL_5) { + data.icSubEq.m = m_timeStep / (2.0f * subTd0 + m_timeStep); + data.icSubEq.c = + (1.0f - 2.0f * data.icSubEq.m) * data.subEq + data.icSubEq.m * (data.tranEq + (transXd - subXd) * id); + } + // Ed'' + if(data.model == Machines::SM_MODEL_4) { + data.icSubEd.m = m_timeStep / (2.0f * subTq0 + m_timeStep); + data.icSubEd.c = (1.0f - 2.0f * data.icSubEd.m) * data.subEd - data.icSubEd.m * (syncXq - subXq) * iq; + } + if(data.model == Machines::SM_MODEL_5) { + data.icSubEd.m = m_timeStep / (2.0f * subTq0 + m_timeStep); + data.icSubEd.c = + (1.0f - 2.0f * data.icSubEd.m) * data.subEd + data.icSubEd.m * (data.tranEd - (transXq - subXq) * iq); + } + + syncGenerator->SetElectricalData(data); +} + +bool Electromechanical::SolveSynchronousMachines() +{ + // CalculateMachinesCurrents(); + for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) { + SyncGenerator* syncGenerator = *it; + auto data = syncGenerator->GetElectricalData(); + + if(syncGenerator->IsOnline()) { + int n = static_cast<Bus*>(syncGenerator->GetParentList()[0])->GetElectricalData().number; + double id, iq, pe; + + pe = data.pe; + + double k = 1.0; // Power base change factor. + if(data.useMachineBase) { + double oldBase = GetPowerValue(data.nominalPower, data.nominalPowerUnit); + k = m_powerSystemBase / oldBase; + } + + std::complex<double> iMachine = std::conj(data.electricalPower) / std::conj(m_vBus[n]); + + ABCtoDQ0(iMachine, data.delta, id, iq); + + // Calculate integration constants. + CalculateIntegrationConstants(syncGenerator, id, iq, k); + + CalculateSyncMachineNonIntVariables(syncGenerator, id, iq, pe, k); + // Extrapolate nonintegrable variables. + id = 2.0 * id - data.oldId; + iq = 2.0 * iq - data.oldIq; + pe = 2.0 * pe - data.oldPe; + + CalculateSyncMachineIntVariables(syncGenerator, id, iq, pe, k); + } else { + CalculateIntegrationConstants(syncGenerator, 0.0f, 0.0f); + } + } + + m_wError = 0; + + double error = 1.0; + int iterations = 0; + while(error > m_tolerance) { + error = 0.0; + + // Calculate the injected currents. + CalculateMachinesCurrents(); + + // Calculate the buses voltages. + m_vBus = LUEvaluate(m_yBusU, m_yBusL, m_iBus); + + // Solve machine equations. + for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) { + SyncGenerator* syncGenerator = *it; + + auto data = syncGenerator->GetElectricalData(); + + double id, iq, pe; + double k = 1.0; // Power base change factor. + if(data.useMachineBase) { + double oldBase = GetPowerValue(data.nominalPower, data.nominalPowerUnit); + k = m_powerSystemBase / oldBase; + } + + CalculateSyncMachineNonIntVariables(syncGenerator, id, iq, pe, k); + + double genError = CalculateSyncMachineIntVariables(syncGenerator, id, iq, pe, k); + + if(genError > error) error = genError; + } + + ++iterations; + + if(iterations > m_maxIterations) { + m_errorMsg = _("Impossible to solve the synchronous generators.\nCheck the system parameters and/or " + "decrease the time step."); + return false; + } + } + m_numIt = iterations; + + // Solve controllers. + int ctrlRatio = static_cast<int>(1 / m_ctrlTimeStepMultiplier); + for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) { + SyncGenerator* syncGenerator = *it; + auto data = syncGenerator->GetElectricalData(); + if(data.useAVR && data.avrSolver) { + for(int i = 0; i < ctrlRatio; ++i) data.avrSolver->SolveNextStep(std::abs(data.terminalVoltage)); + data.fieldVoltage = data.initialFieldVoltage + data.avrSolver->GetLastSolution(); + } + + if(data.useSpeedGovernor && data.speedGovSolver) { + for(int i = 0; i < ctrlRatio; ++i) data.speedGovSolver->SolveNextStep(data.speed); + data.pm = data.speedGovSolver->GetLastSolution(); + } + syncGenerator->SetElectricalData(data); + } + + return true; +} + +double Electromechanical::GetPowerValue(double value, ElectricalUnit unit) +{ + switch(unit) { + case UNIT_PU: { + return value; + } break; + case UNIT_VA: { + return value; + } break; + case UNIT_kVA: { + return value * 1e3; + } break; + case UNIT_MVA: { + return value * 1e6; + } break; + case UNIT_W: { + return value; + } break; + case UNIT_kW: { + return value * 1e3; + } break; + case UNIT_MW: { + return value * 1e6; + } break; + case UNIT_VAr: { + return value; + } break; + case UNIT_kVAr: { + return value * 1e3; + } break; + case UNIT_MVAr: { + return value * 1e6; + } break; + default: { + return 0.0; + } break; + } + return 0.0; +} + +void Electromechanical::SaveData() +{ + for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) { + SyncGenerator* syncGenerator = *it; + auto data = syncGenerator->GetElectricalData(); + if(data.plotSyncMachine) { + data.terminalVoltageVector.push_back(data.terminalVoltage); + data.electricalPowerVector.push_back(data.electricalPower); + data.mechanicalPowerVector.push_back(data.pm); + data.freqVector.push_back(data.speed / (2.0f * M_PI)); + data.fieldVoltageVector.push_back(data.fieldVoltage); + data.deltaVector.push_back(wxRadToDeg(data.delta)); + syncGenerator->SetElectricalData(data); + } + } + for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) { + Bus* bus = *it; + auto data = bus->GetElectricalData(); + if(data.plotBus) { + data.stabVoltageVector.push_back(m_vBus[data.number]); + bus->SetElectricalData(data); + } + } + + m_wErrorVector.push_back(m_wError); + m_numItVector.push_back(m_numIt); +} + +void Electromechanical::SetSyncMachinesModel() +{ + for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) { + SyncGenerator* syncGenerator = *it; + auto data = syncGenerator->GetElectricalData(); + data.model = GetMachineModel(syncGenerator); + syncGenerator->SetElectricalData(data); + } +} + +void Electromechanical::CalculateSyncMachineNonIntVariables(SyncGenerator* syncGenerator, + double& id, + double& iq, + double& pe, + double k) +{ + auto data = syncGenerator->GetElectricalData(); + int n = static_cast<Bus*>(syncGenerator->GetParentList()[0])->GetElectricalData().number; + + if(syncGenerator->IsOnline()) { + data.terminalVoltage = m_vBus[n]; + } + + double vd, vq; + ABCtoDQ0(data.terminalVoltage, data.delta, vd, vq); + + if(syncGenerator->IsOnline()) { + std::complex<double> iMachine = std::conj(data.electricalPower) / std::conj(m_vBus[n]); + ABCtoDQ0(iMachine, data.delta, id, iq); + + pe = id * vd + iq * vq + (id * id + iq * iq) * data.armResistance * k; + } else { + pe = id = iq = 0.0f; + } + data.pe = pe; + data.oldId = id; + data.oldIq = iq; + syncGenerator->SetElectricalData(data); +} + +double Electromechanical::CalculateSyncMachineIntVariables(SyncGenerator* syncGenerator, + double id, + double iq, + double pe, + double k) +{ + double error = 0.0; + auto data = syncGenerator->GetElectricalData(); + + // Mechanical differential equations. + double w = data.icSpeed.c + data.icSpeed.m * (data.pm - pe); + error = std::max(error, std::abs(data.speed - w) / m_refSpeed); + + m_wError += std::abs(data.speed - w) / m_refSpeed; + + double delta = data.icDelta.c + data.icDelta.m * w; + error = std::max(error, std::abs(data.delta - delta)); + + data.speed = w; + data.delta = delta; + + // Electrical differential equations + switch(data.model) { + case Machines::SM_MODEL_1: { + // There is no differential equations. + } break; + case Machines::SM_MODEL_2: { + double tranEq = + data.icTranEq.c + data.icTranEq.m * (data.fieldVoltage + (data.syncXd * k - data.transXd * k) * id); + error = std::max(error, std::abs(data.tranEq - tranEq)); + + data.tranEq = tranEq; + } break; + case Machines::SM_MODEL_3: { + double syncXd, syncXq, transXd, transXq; + syncXd = data.syncXd * k; + syncXq = data.syncXq * k; + transXd = data.transXd * k; + transXq = data.transXq * k; + if(syncXq == 0.0) syncXq = syncXd; + if(transXq == 0.0) transXq = transXd; + + double tranEq = data.icTranEq.c + data.icTranEq.m * (data.fieldVoltage + (syncXd - transXd) * id); + error = std::max(error, std::abs(data.tranEq - tranEq)); + + double tranEd = data.icTranEd.c - data.icTranEd.m * (syncXq - transXq) * iq; + error = std::max(error, std::abs(data.tranEd - tranEd)); + + data.tranEq = tranEq; + data.tranEd = tranEd; + + if(!syncGenerator->IsOnline()) { + std::complex<double> e; + DQ0toABC(data.tranEd, data.tranEq, data.delta, e); + data.terminalVoltage = e; + } + } break; + case Machines::SM_MODEL_4: { + double syncXd, syncXq, transXd, subXd, subXq; + syncXd = data.syncXd * k; + syncXq = data.syncXq * k; + transXd = data.transXd * k; + subXd = data.subXd * k; + subXq = data.subXq * k; + if(syncXq == 0.0) syncXq = syncXd; + if(subXd == 0.0) subXd = subXq; + if(subXq == 0.0) subXq = subXd; + + double tranEq = data.icTranEq.c + data.icTranEq.m * (data.fieldVoltage + (syncXd - transXd) * id); + error = std::max(error, std::abs(data.tranEq - tranEq)); + + double subEq = data.icSubEq.c + data.icSubEq.m * (tranEq + (transXd - subXd) * id); + error = std::max(error, std::abs(data.subEq - subEq)); + + double subEd = data.icSubEd.c - data.icSubEd.m * (syncXq - subXq) * iq; + error = std::max(error, std::abs(data.subEd - subEd)); + + data.tranEq = tranEq; + data.subEq = subEq; + data.subEd = subEd; + } break; + case Machines::SM_MODEL_5: { + double syncXd, syncXq, transXd, transXq, subXd, subXq; + syncXd = data.syncXd * k; + syncXq = data.syncXq * k; + transXd = data.transXd * k; + transXq = data.transXq * k; + subXd = data.subXd * k; + subXq = data.subXq * k; + if(syncXq == 0.0) syncXq = syncXd; + if(transXq == 0.0) transXq = transXd; + if(subXd == 0.0) subXd = subXq; + if(subXq == 0.0) subXq = subXd; + + double tranEq = data.icTranEq.c + data.icTranEq.m * (data.fieldVoltage + (syncXd - transXd) * id); + error = std::max(error, std::abs(data.tranEq - tranEq)); + + double tranEd = data.icTranEd.c - data.icTranEd.m * (syncXq - transXq) * iq; + error = std::max(error, std::abs(data.tranEd - tranEd)); + + double subEq = data.icSubEq.c + data.icSubEq.m * (tranEq + (transXd - subXd) * id); + error = std::max(error, std::abs(data.subEq - subEq)); + + double subEd = data.icSubEd.c + data.icSubEd.m * (tranEd - (transXq - subXq) * iq); + error = std::max(error, std::abs(data.subEd - subEd)); + + data.tranEq = tranEq; + data.tranEd = tranEd; + data.subEq = subEq; + data.subEd = subEd; + } break; + } + + syncGenerator->SetElectricalData(data); + return error; +} + +void Electromechanical::CalculateReferenceSpeed() +{ + if(m_useCOI) { + double sumHW = 0.0; + double sumH = 0.0; + for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) { + SyncGenerator* syncGenerator = *it; + if(syncGenerator->IsOnline()) { + auto data = syncGenerator->GetElectricalData(); + double k = 1.0; // Power base change factor. + if(data.useMachineBase) { + double oldBase = GetPowerValue(data.nominalPower, data.nominalPowerUnit); + k = m_powerSystemBase / oldBase; + } + sumH += data.inertia / k; + sumHW += data.inertia * data.speed / k; + } + } + m_refSpeed = sumHW / sumH; + } else { + m_refSpeed = 2.0 * M_PI * m_systemFreq; + } +} diff --git a/Project/Electromechanical.h b/Project/Electromechanical.h new file mode 100644 index 0000000..b25a53b --- /dev/null +++ b/Project/Electromechanical.h @@ -0,0 +1,78 @@ +#ifndef ELECTROMECHANICAL_H +#define ELECTROMECHANICAL_H + +#include "ElectricCalculation.h" + +#include <wx/progdlg.h> + +class ControlElementSolver; + +class Electromechanical : public ElectricCalculation +{ + public: + Electromechanical(wxWindow* parent, std::vector<Element*> elementList, SimulationData data); + ~Electromechanical(); + + bool RunStabilityCalculation(); + wxString GetErrorMessage() const { return m_errorMsg; } + std::vector<double> GetTimeVector() const { return m_timeVector; } + std::vector<double> m_wErrorVector; + std::vector<double> m_deltaErrorVector; + std::vector<double> m_transEdErrorVector; + std::vector<double> m_transEqErrorVector; + std::vector<double> m_numItVector; + + protected: + void SetEventTimeList(); + bool HasEvent(double currentTime); + void SetEvent(double currentTime); + inline bool EventTrigger(double eventTime, double currentTime); + + double GetPowerValue(double value, ElectricalUnit unit); + + void InsertSyncMachinesOnYBus(); + std::complex<double> GetSyncMachineAdmittance(SyncGenerator* generator); + bool InitializeDynamicElements(); + void CalculateMachinesCurrents(); + void CalculateIntegrationConstants(SyncGenerator* syncGenerator, double id, double iq, double k = 1.0); + bool SolveSynchronousMachines(); + void SetSyncMachinesModel(); + double CalculateSyncMachineIntVariables(SyncGenerator* syncGenerator, double id, double iq, double pe, double k = 1.0); + void CalculateSyncMachineNonIntVariables(SyncGenerator* syncGenerator, double& id, double& iq, double& pe, double k = 1.0); + void CalculateReferenceSpeed(); + + void SaveData(); + + wxWindow* m_parent = NULL; + wxString m_errorMsg = _("Unknown error"); + + double m_systemFreq = 60.0; + double m_refSpeed = 2.0 * M_PI * 60.0; + bool m_useCOI = false; + + std::vector<std::vector<std::complex<double> > > m_yBus; + std::vector<std::vector<std::complex<double> > > m_yBusU; + std::vector<std::vector<std::complex<double> > > m_yBusL; + + std::vector<std::complex<double> > m_vBus; + std::vector<std::complex<double> > m_iBus; + + double m_powerSystemBase = 100e6; + double m_simTime = 10.0; + double m_plotTime = 1e-2; + double m_timeStep = 1e-2; + double m_ctrlTimeStepMultiplier = 0.1; + double m_tolerance = 1e-8; + int m_maxIterations = 100; + + std::vector<double> m_eventTimeList; + std::vector<bool> m_eventOccurrenceList; + + std::vector<double> m_timeVector; + + // tests + double m_wError = 0.0; + double m_numIt = 0; +}; + +#endif // ELECTROMECHANICAL_H diff --git a/Project/Element.cpp b/Project/Element.cpp index 5b2b7d5..381be00 100644 --- a/Project/Element.cpp +++ b/Project/Element.cpp @@ -215,13 +215,14 @@ bool Element::RotatedRectanglesIntersects(wxRect2DDouble rect1, return true; } -void Element::SetOnline(bool online) +bool Element::SetOnline(bool online) { // Check if any parent is null. for(auto it = m_parentList.begin(); it != m_parentList.end(); it++) { - if(!(*it)) return; + if(!(*it)) return false; } m_online = online; + return true; } void Element::GeneralMenuItens(wxMenu& menu) diff --git a/Project/Element.h b/Project/Element.h index 4935f11..08fdfe9 100644 --- a/Project/Element.h +++ b/Project/Element.h @@ -150,7 +150,7 @@ public: * @brief Set if the element is online or offline. * @param online True if online, false if offline. */ - void SetOnline(bool online = true); + bool SetOnline(bool online = true); /** * @brief Set the list of points that connect the element to the bus. @@ -553,7 +553,7 @@ public: * @param value Double value converted. * @param errorMsg Error message. */ - bool DoubleFromString(wxWindow* parent, wxString strValue, double& value, wxString errorMsg); + static bool DoubleFromString(wxWindow* parent, wxString strValue, double& value, wxString errorMsg); /** * @brief Convert a string to int. Show a error message if the conversion fail. @@ -562,7 +562,7 @@ public: * @param value Int value converted. * @param errorMsg Error message. */ - bool IntFromString(wxWindow* parent, wxString strValue, int& value, wxString errorMsg); + static bool IntFromString(wxWindow* parent, wxString strValue, int& value, wxString errorMsg); /** * @brief Convert a double value to string. diff --git a/Project/ElementPlotData.cpp b/Project/ElementPlotData.cpp index 0f406a8..ca1fd84 100644 --- a/Project/ElementPlotData.cpp +++ b/Project/ElementPlotData.cpp @@ -16,7 +16,7 @@ void ElementPlotData::AddData(std::vector<double> values, wxString name) data->SetAxis(0); data->SetColour(*wxBLACK); data->SetPenType(wxPENSTYLE_SOLID); - data->SetThick(1); + data->SetThick(2); m_elementData.push_back(data); } diff --git a/Project/ElementPlotData.h b/Project/ElementPlotData.h index 1434664..5c67575 100644 --- a/Project/ElementPlotData.h +++ b/Project/ElementPlotData.h @@ -49,6 +49,7 @@ class ElementPlotData CT_SHUNT_INDUCTOR, CT_SHUNT_CAPACITOR, CT_LOAD, + CT_TEST, NUM_ELEMENTS, CT_TIME }; @@ -59,12 +60,14 @@ class ElementPlotData wxString GetName() const { return m_name; } void SetName(wxString name) { m_name = name; } CurveType GetCurveType() const { return m_curveType; } + void SetCurveType(CurveType type) { m_curveType = type; } PlotData* GetPlotData(int index) const { return m_elementData[index]; } void AddData(std::vector<double> values, wxString name); int GetElementDataNumber() const { return static_cast<int>(m_elementData.size()); } std::vector<double> GetValues(int index) const { return m_elementData[index]->GetValues(); } void SetValues(int index, std::vector<double> values) { m_elementData[index]->SetValues(values); } + void SetPlot(int index, bool plot = true) { m_elementData[index]->SetPlot(plot); } wxString GetDataName(int index) const { return m_elementData[index]->GetName(); } void SetDataName(int index, wxString name) { m_elementData[index]->SetName(name); } wxColour GetColour(int index) const { return m_elementData[index]->GetColour(); } diff --git a/Project/Exponential.cpp b/Project/Exponential.cpp index e0daeef..3ff1842 100644 --- a/Project/Exponential.cpp +++ b/Project/Exponential.cpp @@ -117,3 +117,10 @@ bool Exponential::Solve(double input, double timeStep) m_output = m_aValue * std::exp(m_bValue * input); return true; } + +Element* Exponential::GetCopy() +{ + Exponential* copy = new Exponential(m_elementID); + *copy = *this; + return copy; +} diff --git a/Project/Exponential.h b/Project/Exponential.h index e9e9511..7510266 100644 --- a/Project/Exponential.h +++ b/Project/Exponential.h @@ -24,6 +24,8 @@ public: virtual bool Solve(double input, double timeStep); + virtual Element* GetCopy(); + protected: double m_aValue = 0.001; double m_bValue = 5.0; diff --git a/Project/ExponentialForm.cpp b/Project/ExponentialForm.cpp index a2b487a..4ab040b 100644 --- a/Project/ExponentialForm.cpp +++ b/Project/ExponentialForm.cpp @@ -3,6 +3,8 @@ ExponentialForm::ExponentialForm(wxWindow* parent, Exponential* exponential) : ExponentialFormBase(parent) { + SetSize(GetBestSize()); + wxString expSymbol = wxString::FromUTF8("\xF0\x9D\x91\x92"); wxString superscriptCapitalB = wxString::FromUTF8("\xE1\xB4\xAE"); wxString superscriptSmallX = wxString::FromUTF8("\xCB\xA3"); diff --git a/Project/Fault.cpp b/Project/Fault.cpp index 505634e..fc4769b 100644 --- a/Project/Fault.cpp +++ b/Project/Fault.cpp @@ -52,7 +52,7 @@ bool Fault::RunFaultCalculation(double systemPowerBase) std::complex<double> fImpedance = std::complex<double>(0.0, 0.0); for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) { Bus* bus = *it; - BusElectricalData data = bus->GetEletricalData(); + BusElectricalData data = bus->GetElectricalData(); preFaultVoltages.push_back(data.voltage); if(data.hasFault) { fNumber = data.number; @@ -184,7 +184,7 @@ void Fault::UpdateElementsFault(double systemPowerBase) for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) { Bus* bus = *it; - auto data = bus->GetEletricalData(); + auto data = bus->GetElectricalData(); if(data.hasFault) { data.faultCurrent[0] = m_fCurrentA; data.faultCurrent[1] = m_fCurrentB; @@ -201,8 +201,8 @@ void Fault::UpdateElementsFault(double systemPowerBase) for(auto it = m_lineList.begin(), itEnd = m_lineList.end(); it != itEnd; ++it) { Line* line = *it; if(line->IsOnline()) { - int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetEletricalData().number; - int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetEletricalData().number; + int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().number; + int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().number; auto data = line->GetElectricalData(); std::complex<double> vPos[2] = { m_posFaultVoltagePos[n1], m_posFaultVoltagePos[n2] }; std::complex<double> vNeg[2] = { m_posFaultVoltageNeg[n1], m_posFaultVoltageNeg[n2] }; @@ -237,8 +237,8 @@ void Fault::UpdateElementsFault(double systemPowerBase) for(auto it = m_transformerList.begin(), itEnd = m_transformerList.end(); it != itEnd; ++it) { Transformer* transformer = *it; if(transformer->IsOnline()) { - int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetEletricalData().number; - int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetEletricalData().number; + int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().number; + int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().number; auto data = transformer->GetElectricalData(); std::complex<double> vPos[2] = { m_posFaultVoltagePos[n1], m_posFaultVoltagePos[n2] }; @@ -314,8 +314,8 @@ void Fault::UpdateElementsFault(double systemPowerBase) SyncGenerator* syncGenerator = *it; if(syncGenerator->IsOnline()) { Bus* bus = static_cast<Bus*>(syncGenerator->GetParentList()[0]); - int n = bus->GetEletricalData().number; - std::complex<double> v = bus->GetEletricalData().voltage; // Pre-fault voltage. + int n = bus->GetElectricalData().number; + std::complex<double> v = bus->GetElectricalData().voltage; // Pre-fault voltage. auto data = syncGenerator->GetElectricalData(); std::complex<double> vPos = m_posFaultVoltagePos[n]; @@ -346,8 +346,8 @@ void Fault::UpdateElementsFault(double systemPowerBase) SyncMotor* syncMotor = *it; if(syncMotor->IsOnline()) { Bus* bus = static_cast<Bus*>(syncMotor->GetParentList()[0]); - int n = bus->GetEletricalData().number; - std::complex<double> v = bus->GetEletricalData().voltage; // Pre-fault voltage. + int n = bus->GetElectricalData().number; + std::complex<double> v = bus->GetElectricalData().voltage; // Pre-fault voltage. auto data = syncMotor->GetElectricalData(); std::complex<double> vPos = m_posFaultVoltagePos[n]; @@ -390,7 +390,7 @@ bool Fault::RunSCPowerCalcutation(double systemPowerBase) // Set the SC power. for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) { Bus* bus = *it; - auto data = bus->GetEletricalData(); + auto data = bus->GetElectricalData(); int n = data.number; data.scPower = 1.0 / std::abs(m_zBusPos[n][n]); bus->SetElectricalData(data); diff --git a/Project/FileHanding.cpp b/Project/FileHanding.cpp index beb9b81..f5b881d 100644 --- a/Project/FileHanding.cpp +++ b/Project/FileHanding.cpp @@ -54,7 +54,7 @@ void FileHanding::SaveProject(wxFileName path) auto angle = AppendNode(doc, cadProp, "Angle"); SetNodeValue(doc, angle, bus->GetAngle()); - BusElectricalData data = bus->GetEletricalData(); + BusElectricalData data = bus->GetElectricalData(); auto electricalProp = AppendNode(doc, busNode, "ElectricalProperties"); auto name = AppendNode(doc, electricalProp, "Name"); SetNodeValue(doc, name, data.name); @@ -126,7 +126,7 @@ void FileHanding::SaveProject(wxFileName path) SetNodeValue(doc, nodePosY, capacitor->GetPointList()[0].m_y); auto parentID = AppendNode(doc, cadProp, "ParentID"); Bus* parent = static_cast<Bus*>(capacitor->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetEletricalData().number); + if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); CapacitorElectricalData data = capacitor->GetElectricalData(); auto electricalProp = AppendNode(doc, capacitorNode, "ElectricalProperties"); @@ -177,7 +177,7 @@ void FileHanding::SaveProject(wxFileName path) SetNodeValue(doc, nodePosY, indMotor->GetPointList()[0].m_y); auto parentID = AppendNode(doc, cadProp, "ParentID"); Bus* parent = static_cast<Bus*>(indMotor->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetEletricalData().number); + if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); IndMotorElectricalData data = indMotor->GetElectricalData(); auto electricalProp = AppendNode(doc, indMotorNode, "ElectricalProperties"); @@ -220,7 +220,7 @@ void FileHanding::SaveProject(wxFileName path) SetNodeValue(doc, nodePosY, inductor->GetPointList()[0].m_y); auto parentID = AppendNode(doc, cadProp, "ParentID"); Bus* parent = static_cast<Bus*>(inductor->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetEletricalData().number); + if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); InductorElectricalData data = inductor->GetElectricalData(); auto electricalProp = AppendNode(doc, inductorNode, "ElectricalProperties"); @@ -273,7 +273,7 @@ void FileHanding::SaveProject(wxFileName path) if(parent) { auto parentID = AppendNode(doc, parentIDList, "ParentID"); SetNodeAttribute(doc, parentID, "ID", j); - SetNodeValue(doc, parentID, parent->GetEletricalData().number); + SetNodeValue(doc, parentID, parent->GetElectricalData().number); } } @@ -350,7 +350,7 @@ void FileHanding::SaveProject(wxFileName path) SetNodeValue(doc, nodePosY, load->GetPointList()[0].m_y); auto parentID = AppendNode(doc, cadProp, "ParentID"); Bus* parent = static_cast<Bus*>(load->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetEletricalData().number); + if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); LoadElectricalData data = load->GetElectricalData(); auto electricalProp = AppendNode(doc, loadNode, "ElectricalProperties"); @@ -406,7 +406,7 @@ void FileHanding::SaveProject(wxFileName path) SetNodeValue(doc, nodePosY, syncGenerator->GetPointList()[0].m_y); auto parentID = AppendNode(doc, cadProp, "ParentID"); Bus* parent = static_cast<Bus*>(syncGenerator->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetEletricalData().number); + if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); SyncGeneratorElectricalData data = syncGenerator->GetElectricalData(); auto electricalProp = AppendNode(doc, syncGeneratorNode, "ElectricalProperties"); @@ -497,6 +497,12 @@ void FileHanding::SaveProject(wxFileName path) auto subTq0 = AppendNode(doc, stability, "SubTq0"); SetNodeValue(doc, subTq0, data.subTq0); + auto avr = AppendNode(doc, stability, "AVR"); + if(data.avr) SaveControlElements(doc, avr, data.avr); + + auto speedGov = AppendNode(doc, stability, "SpeedGovernor"); + if(data.speedGov) SaveControlElements(doc, speedGov, data.speedGov); + auto switchingList = AppendNode(doc, electricalProp, "SwitchingList"); SwitchingData swData = syncGenerator->GetSwitchingData(); for(int j = 0; j < (int)swData.swType.size(); j++) { @@ -536,7 +542,7 @@ void FileHanding::SaveProject(wxFileName path) SetNodeValue(doc, nodePosY, syncMotor->GetPointList()[0].m_y); auto parentID = AppendNode(doc, cadProp, "ParentID"); Bus* parent = static_cast<Bus*>(syncMotor->GetParentList()[0]); - if(parent) SetNodeValue(doc, parentID, parent->GetEletricalData().number); + if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number); SyncMotorElectricalData data = syncMotor->GetElectricalData(); auto electricalProp = AppendNode(doc, syncMotorNode, "ElectricalProperties"); @@ -678,7 +684,7 @@ void FileHanding::SaveProject(wxFileName path) if(parent) { auto parentID = AppendNode(doc, parentIDList, "ParentID"); SetNodeAttribute(doc, parentID, "ID", j); - SetNodeValue(doc, parentID, parent->GetEletricalData().number); + SetNodeValue(doc, parentID, parent->GetElectricalData().number); } } @@ -836,7 +842,7 @@ bool FileHanding::OpenProject(wxFileName path) } for(int i = 0; i < numRot; i++) bus->Rotate(clockwise); - BusElectricalData data = bus->GetEletricalData(); + BusElectricalData data = bus->GetElectricalData(); auto electricalProp = busNode->first_node("ElectricalProperties"); if(!electricalProp) return false; @@ -862,6 +868,9 @@ bool FileHanding::OpenProject(wxFileName path) data.stabFaultReactance = GetNodeValueDouble(stability, "FaultReactance"); bus->SetElectricalData(data); + + if(data.stabHasFault) bus->SetDynamicEvent(true); + elementList.push_back(bus); busList.push_back(bus); busNode = busNode->next_sibling("Bus"); @@ -934,6 +943,9 @@ bool FileHanding::OpenProject(wxFileName path) capacitor->SetSwitchingData(swData); capacitor->SetElectricalData(data); + + if(swData.swTime.size() != 0) capacitor->SetDynamicEvent(true); + elementList.push_back(capacitor); capacitorList.push_back(capacitor); capacitorNode = capacitorNode->next_sibling("Capacitor"); @@ -1069,6 +1081,9 @@ bool FileHanding::OpenProject(wxFileName path) inductor->SetSwitchingData(swData); inductor->SetElectricalData(data); + + if(swData.swTime.size() != 0) inductor->SetDynamicEvent(true); + elementList.push_back(inductor); inductorList.push_back(inductor); inductorNode = inductorNode->next_sibling("Inductor"); @@ -1177,6 +1192,9 @@ bool FileHanding::OpenProject(wxFileName path) line->SetSwitchingData(swData); line->SetElectricalData(data); + + if(swData.swTime.size() != 0) line->SetDynamicEvent(true); + elementList.push_back(line); lineList.push_back(line); lineNode = lineNode->next_sibling("Line"); @@ -1252,6 +1270,9 @@ bool FileHanding::OpenProject(wxFileName path) load->SetSwitchingData(swData); load->SetElectricalData(data); + + if(swData.swTime.size() != 0) load->SetDynamicEvent(true); + elementList.push_back(load); loadList.push_back(load); loadNode = loadNode->next_sibling("Load"); @@ -1358,6 +1379,14 @@ bool FileHanding::OpenProject(wxFileName path) data.subTd0 = GetNodeValueDouble(stability, "SubTd0"); data.subTq0 = GetNodeValueDouble(stability, "SubTq0"); + auto avr = stability->first_node("AVR"); + if(!avr) return false; + if(!OpenControlElements(doc, avr, data.avr)) return false; + + auto speedGov = stability->first_node("SpeedGovernor"); + if(!speedGov) return false; + if(!OpenControlElements(doc, speedGov, data.speedGov)) return false; + SwitchingData swData; auto switchingList = electricalProp->first_node("SwitchingList"); if(!switchingList) return false; @@ -1370,6 +1399,9 @@ bool FileHanding::OpenProject(wxFileName path) syncGenerator->SetSwitchingData(swData); syncGenerator->SetElectricalData(data); + + if(swData.swTime.size() != 0) syncGenerator->SetDynamicEvent(true); + elementList.push_back(syncGenerator); syncGeneratorList.push_back(syncGenerator); syncGeneratorNode = syncGeneratorNode->next_sibling("SyncGenerator"); @@ -1597,6 +1629,9 @@ bool FileHanding::OpenProject(wxFileName path) transformer->SetSwitchingData(swData); transformer->SetElectricaData(data); + + if(swData.swTime.size() != 0) transformer->SetDynamicEvent(true); + elementList.push_back(transformer); transformerList.push_back(transformer); transfomerNode = transfomerNode->next_sibling("Transfomer"); @@ -1852,7 +1887,7 @@ void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc, auto value = AppendNode(doc, gainNode, "Value"); SetNodeValue(doc, value, gain->GetValue()); } //} - + //{ IO auto iosNode = AppendNode(doc, elementsNode, "IOList"); auto ioList = ctrlContainer->GetIOControlList(); @@ -1883,8 +1918,8 @@ void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc, SetNodeValue(doc, value, io->GetValue()); auto ioFlags = AppendNode(doc, ioNode, "IOFlags"); SetNodeValue(doc, ioFlags, io->GetIOFlags()); - }//} - + } //} + //{ Limiter auto limitersNode = AppendNode(doc, elementsNode, "LimiterList"); auto limiterList = ctrlContainer->GetLimiterList(); @@ -1915,8 +1950,8 @@ void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc, SetNodeValue(doc, upLimit, limiter->GetUpLimit()); auto lowLimit = AppendNode(doc, limiterNode, "LowerLimit"); SetNodeValue(doc, lowLimit, limiter->GetLowLimit()); - }//} - + } //} + //{ Multiplier auto multipliersNode = AppendNode(doc, elementsNode, "MultiplierList"); auto multiplierList = ctrlContainer->GetMultiplierList(); @@ -1941,8 +1976,8 @@ void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc, // Nodes auto nodeList = AppendNode(doc, multiplierNode, "NodeList"); SaveControlNodes(doc, nodeList, multiplier->GetNodeList()); - } //} - + } //} + //{ Rate limiter auto rateLimitersNode = AppendNode(doc, elementsNode, "RateLimiterList"); auto rateLimiterList = ctrlContainer->GetRateLimiterList(); @@ -1973,8 +2008,8 @@ void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc, SetNodeValue(doc, upLimit, rateLimiter->GetUpLimit()); auto lowLimit = AppendNode(doc, rateLimiterNode, "LowerLimit"); SetNodeValue(doc, lowLimit, rateLimiter->GetLowLimit()); - } //} - + } //} + //{ Sum auto sumsNode = AppendNode(doc, elementsNode, "SumList"); auto sumList = ctrlContainer->GetSumList(); @@ -1999,17 +2034,17 @@ void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc, // Nodes auto nodeList = AppendNode(doc, sumNode, "NodeList"); SaveControlNodes(doc, nodeList, sum->GetNodeList()); - - //Control properties + + // Control properties auto signsNode = AppendNode(doc, sumNode, "Signs"); auto signs = sum->GetSignalList(); for(int i = 0; i < (int)signs.size(); ++i) { auto value = AppendNode(doc, signsNode, "Value"); SetNodeValue(doc, value, static_cast<int>(signs[i])); } - - } //} - + + } //} + //{ Transfer function auto tfsNode = AppendNode(doc, elementsNode, "TransferFunctionList"); auto tfList = ctrlContainer->GetTFList(); @@ -2034,8 +2069,8 @@ void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc, // Nodes auto nodeList = AppendNode(doc, tfNode, "NodeList"); SaveControlNodes(doc, nodeList, tf->GetNodeList()); - - //Control properties + + // Control properties auto numeratorNode = AppendNode(doc, tfNode, "Numerator"); auto numerator = tf->GetNumerator(); for(int i = 0; i < (int)numerator.size(); ++i) { @@ -2048,7 +2083,7 @@ void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc, auto value = AppendNode(doc, denominatorNode, "Value"); SetNodeValue(doc, value, denominator[i]); } - } //} + } //} //{ Connection line auto cLinesNode = AppendNode(doc, elementsNode, "ConnectionList"); @@ -2093,7 +2128,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, { std::vector<ControlElement*> elementList; std::vector<ConnectionLine*> connectionList; - + //{ Constant auto constListNode = elementsNode->first_node("ConstantList"); if(!constListNode) return false; @@ -2112,27 +2147,27 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, double width = GetNodeValueDouble(size, "Width"); double height = GetNodeValueDouble(size, "Height"); double angle = GetNodeValueDouble(cadPropNode, "Angle"); - + double value = GetNodeValueDouble(constNode, "Value"); - + constant->SetWidth(width); constant->SetHeight(height); constant->SetAngle(angle); constant->SetPosition(wxPoint2DDouble(posX, posY)); constant->StartMove(constant->GetPosition()); - + constant->SetValue(value); std::vector<Node*> nodeVector; if(!OpenControlNodeList(constNode, nodeVector)) return false; - + constant->SetNodeList(nodeVector); constant->UpdatePoints(); elementList.push_back(constant); constNode = constNode->next_sibling("Constant"); - } //} - + } //} + //{ Exponential auto expListNode = elementsNode->first_node("ExponentialList"); if(!expListNode) return false; @@ -2151,7 +2186,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, double width = GetNodeValueDouble(size, "Width"); double height = GetNodeValueDouble(size, "Height"); double angle = GetNodeValueDouble(cadPropNode, "Angle"); - + auto value = expNode->first_node("Value"); double a = GetNodeValueDouble(value, "A"); double b = GetNodeValueDouble(value, "B"); @@ -2161,19 +2196,19 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, exponential->SetAngle(angle); exponential->SetPosition(wxPoint2DDouble(posX, posY)); exponential->StartMove(exponential->GetPosition()); - + exponential->SetValues(a, b); std::vector<Node*> nodeVector; if(!OpenControlNodeList(expNode, nodeVector)) return false; - + exponential->SetNodeList(nodeVector); exponential->UpdatePoints(); elementList.push_back(exponential); expNode = expNode->next_sibling("Exponential"); - } //} - + } //} + //{ Gain auto gainListNode = elementsNode->first_node("GainList"); if(!gainListNode) return false; @@ -2192,7 +2227,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, double width = GetNodeValueDouble(size, "Width"); double height = GetNodeValueDouble(size, "Height"); double angle = GetNodeValueDouble(cadPropNode, "Angle"); - + double value = GetNodeValueDouble(gainNode, "Value"); gain->SetWidth(width); @@ -2204,7 +2239,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, std::vector<Node*> nodeVector; if(!OpenControlNodeList(gainNode, nodeVector)) return false; - + gain->SetNodeList(nodeVector); gain->UpdatePoints(); elementList.push_back(gain); @@ -2212,7 +2247,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, gainNode = gainNode->next_sibling("Gain"); } //} - + //{ IO auto ioListNode = elementsNode->first_node("IOList"); if(!ioListNode) return false; @@ -2233,12 +2268,12 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, std::vector<Node*> nodeVector; if(!OpenControlNodeList(ioNode, nodeVector)) return false; - + IOControl::IOFlags value = static_cast<IOControl::IOFlags>(GetNodeValueInt(ioNode, "Value")); int ioFlags = GetNodeValueInt(ioNode, "IOFlags"); - + IOControl* io = new IOControl(ioFlags, id); - + io->SetWidth(width); io->SetHeight(height); io->SetAngle(angle); @@ -2252,7 +2287,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, ioNode = ioNode->next_sibling("IO"); } //} - + //{ Limiter auto limiterListNode = elementsNode->first_node("LimiterList"); if(!limiterListNode) return false; @@ -2271,20 +2306,20 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, double width = GetNodeValueDouble(size, "Width"); double height = GetNodeValueDouble(size, "Height"); double angle = GetNodeValueDouble(cadPropNode, "Angle"); - + double upLimit = GetNodeValueDouble(limiterNode, "UpperLimit"); double lowLimit = GetNodeValueDouble(limiterNode, "LowerLimit"); std::vector<Node*> nodeVector; if(!OpenControlNodeList(limiterNode, nodeVector)) return false; - + limiter->SetWidth(width); limiter->SetHeight(height); limiter->SetAngle(angle); limiter->SetPosition(wxPoint2DDouble(posX, posY)); limiter->SetUpLimit(upLimit); limiter->SetLowLimit(lowLimit); - + limiter->StartMove(limiter->GetPosition()); limiter->SetNodeList(nodeVector); limiter->UpdatePoints(); @@ -2293,7 +2328,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, limiterNode = limiterNode->next_sibling("Limiter"); } //} - + //{ Multiplier auto multiplierListNode = elementsNode->first_node("MultiplierList"); if(!multiplierListNode) return false; @@ -2315,12 +2350,12 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, std::vector<Node*> nodeVector; if(!OpenControlNodeList(multiplierNode, nodeVector)) return false; - + multiplier->SetWidth(width); multiplier->SetHeight(height); multiplier->SetAngle(angle); multiplier->SetPosition(wxPoint2DDouble(posX, posY)); - + multiplier->StartMove(multiplier->GetPosition()); multiplier->SetNodeList(nodeVector); multiplier->UpdatePoints(); @@ -2329,7 +2364,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, multiplierNode = multiplierNode->next_sibling("Multiplier"); } //} - + //{ Rate limiter auto rateLimiterListNode = elementsNode->first_node("RateLimiterList"); if(!rateLimiterListNode) return false; @@ -2348,20 +2383,20 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, double width = GetNodeValueDouble(size, "Width"); double height = GetNodeValueDouble(size, "Height"); double angle = GetNodeValueDouble(cadPropNode, "Angle"); - + double upLimit = GetNodeValueDouble(rateLimiterNode, "UpperLimit"); double lowLimit = GetNodeValueDouble(rateLimiterNode, "LowerLimit"); std::vector<Node*> nodeVector; if(!OpenControlNodeList(rateLimiterNode, nodeVector)) return false; - + limiter->SetWidth(width); limiter->SetHeight(height); limiter->SetAngle(angle); limiter->SetPosition(wxPoint2DDouble(posX, posY)); limiter->SetUpLimit(upLimit); limiter->SetLowLimit(lowLimit); - + limiter->StartMove(limiter->GetPosition()); limiter->SetNodeList(nodeVector); limiter->UpdatePoints(); @@ -2370,7 +2405,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, rateLimiterNode = rateLimiterNode->next_sibling("RateLimiter"); } //} - + //{ Sum auto sumListNode = elementsNode->first_node("SumList"); if(!sumListNode) return false; @@ -2389,7 +2424,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, double width = GetNodeValueDouble(size, "Width"); double height = GetNodeValueDouble(size, "Height"); double angle = GetNodeValueDouble(cadPropNode, "Angle"); - + std::vector<Sum::Signal> signs; auto signsNode = sumNode->first_node("Signs"); auto sign = signsNode->first_node("Value"); @@ -2403,12 +2438,12 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, std::vector<Node*> nodeVector; if(!OpenControlNodeList(sumNode, nodeVector)) return false; - + sum->SetWidth(width); sum->SetHeight(height); sum->SetAngle(angle); sum->SetPosition(wxPoint2DDouble(posX, posY)); - + sum->StartMove(sum->GetPosition()); sum->SetNodeList(nodeVector); sum->UpdatePoints(); @@ -2417,7 +2452,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, sumNode = sumNode->next_sibling("Sum"); } //} - + //{ Transfer function auto tfListNode = elementsNode->first_node("TransferFunctionList"); if(!tfListNode) return false; @@ -2436,7 +2471,7 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, double width = GetNodeValueDouble(size, "Width"); double height = GetNodeValueDouble(size, "Height"); double angle = GetNodeValueDouble(cadPropNode, "Angle"); - + std::vector<double> numerator, denominator; auto numeratorNode = tfNode->first_node("Numerator"); auto nValue = numeratorNode->first_node("Value"); @@ -2453,24 +2488,24 @@ bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc, wxString(dValue->value()).ToCDouble(&value); denominator.push_back(value); dValue = dValue->next_sibling("Value"); - } + } std::vector<Node*> nodeVector; if(!OpenControlNodeList(tfNode, nodeVector)) return false; - + tf->SetWidth(width); tf->SetHeight(height); tf->SetAngle(angle); tf->SetPosition(wxPoint2DDouble(posX, posY)); - + tf->SetNumerator(numerator); tf->SetDenominator(denominator); - + tf->StartMove(tf->GetPosition()); tf->SetNodeList(nodeVector); - + tf->UpdateTFText(); - + elementList.push_back(tf); tfNode = tfNode->next_sibling("TransferFunction"); @@ -2621,7 +2656,8 @@ void FileHanding::SetNodeAttribute(rapidxml::xml_document<>& doc, const char* atrName, int value) { - node->append_attribute(doc.allocate_attribute(atrName, doc.allocate_string(wxString::Format("%d", value).mb_str()))); + node->append_attribute( + doc.allocate_attribute(atrName, doc.allocate_string(wxString::Format("%d", value).mb_str()))); } void FileHanding::SetNodeAttribute(rapidxml::xml_document<>& doc, diff --git a/Project/Gain.cpp b/Project/Gain.cpp index d2106d7..d6dc7a2 100644 --- a/Project/Gain.cpp +++ b/Project/Gain.cpp @@ -173,3 +173,12 @@ bool Gain::Solve(double input, double timeStep) m_output = input * m_value; return true; } + +Element* Gain::GetCopy() +{ + Gain* copy = new Gain(m_elementID); + *copy = *this; + m_glStringValue = NULL; + SetValue(m_value); + return copy; +} diff --git a/Project/Gain.h b/Project/Gain.h index bb9c3ce..82b2793 100644 --- a/Project/Gain.h +++ b/Project/Gain.h @@ -20,12 +20,14 @@ class Gain : public ControlElement virtual bool ShowForm(wxWindow* parent, Element* element); virtual void Rotate(bool clockwise = true); virtual void Move(wxPoint2DDouble position); - + virtual void UpdateText() { SetValue(m_value); } virtual void SetValue(double value); virtual double GetValue() const { return m_value; } virtual void UpdatePoints(); virtual bool Solve(double input, double timeStep); + + virtual Element* GetCopy(); protected: double m_value = 1.0; diff --git a/Project/GainForm.cpp b/Project/GainForm.cpp index 22f9079..03a70ef 100644 --- a/Project/GainForm.cpp +++ b/Project/GainForm.cpp @@ -3,6 +3,8 @@ GainForm::GainForm(wxWindow* parent, Gain* gain) : GainFormBase(parent) { + SetSize(GetBestSize()); + m_parent = parent; m_gain = gain; diff --git a/Project/GeneralPropertiesForm.cpp b/Project/GeneralPropertiesForm.cpp new file mode 100644 index 0000000..90ecf29 --- /dev/null +++ b/Project/GeneralPropertiesForm.cpp @@ -0,0 +1,101 @@ +#include "GeneralPropertiesForm.h" +#include "PropertiesData.h" + +GeneralPropertiesForm::GeneralPropertiesForm(wxWindow* parent, PropertiesData* properties) + : GeneralPropertiesFormBase(parent) +{ + m_properties = properties; + auto data = m_properties->GetGeneralPropertiesData(); + + // Clear the choices and rebuild to set the correct translations. + m_choiceLanguage->Clear(); + m_choiceLanguage->Insert(_("English"), 0); + m_choiceLanguage->Insert(_("Portuguese"), 1); + m_choiceTheme->Clear(); + m_choiceTheme->Insert(_("Light"), 0); + m_choiceTheme->Insert(_("Dark"), 1); + + switch(data.language) { + case wxLANGUAGE_ENGLISH: { + m_choiceLanguage->SetSelection(0); + } break; + case wxLANGUAGE_PORTUGUESE_BRAZILIAN: { + m_choiceLanguage->SetSelection(1); + } break; + default: { + m_choiceLanguage->SetSelection(wxNOT_FOUND); + } break; + } + switch(data.theme) { + case THEME_LIGHT: { + m_choiceTheme->SetSelection(0); + } break; + case THEME_DARK: { + m_choiceTheme->SetSelection(1); + } break; + } +} + +GeneralPropertiesForm::~GeneralPropertiesForm() {} +void GeneralPropertiesForm::OnButtonOKClick(wxCommandEvent& event) +{ + if(ValidateData()) EndModal(wxID_OK); +} + +bool GeneralPropertiesForm::ValidateData() +{ + auto data = m_properties->GetGeneralPropertiesData(); + auto checkData = m_properties->GetGeneralPropertiesData(); + bool hasChanges = false; + + wxTextFile file("config.ini"); + if(!file.Create()) { + if(!file.Open()) { + // Fail to access the file. + wxMessageDialog msgDialog(this, + _("It was not possible to access the init file.\nThe settings won't be applied."), + _("Error"), wxOK | wxCENTRE | wxICON_ERROR); + msgDialog.ShowModal(); + } + file.Clear(); + } + + wxString line = "lang="; + switch(m_choiceLanguage->GetSelection()) { + case 0: { + line += "en"; + data.language = wxLANGUAGE_ENGLISH; + } break; + case 1: { + line += "pt-br"; + data.language = wxLANGUAGE_PORTUGUESE_BRAZILIAN; + } break; + } + file.AddLine(line); + if(data.language != checkData.language) hasChanges = true; + + line = "theme="; + switch(m_choiceTheme->GetSelection()) { + case 0: { + line += "light"; + data.theme = THEME_LIGHT; + } break; + case 1: { + line += "dark"; + data.theme = THEME_DARK; + } break; + } + file.AddLine(line); + if(data.theme != checkData.theme) hasChanges = true; + + file.Write(); + file.Close(); + + if(hasChanges) { + wxMessageDialog msgDialog(this, _("The application must be restarted to settings changes be applied."), + _("Info"), wxOK | wxCENTRE | wxICON_INFORMATION); + msgDialog.ShowModal(); + } + m_properties->SetGeneralPropertiesData(data); + return true; +} diff --git a/Project/GeneralPropertiesForm.h b/Project/GeneralPropertiesForm.h new file mode 100644 index 0000000..77bf4d2 --- /dev/null +++ b/Project/GeneralPropertiesForm.h @@ -0,0 +1,24 @@ +#ifndef GENERALPROPERTIESFORM_H +#define GENERALPROPERTIESFORM_H + +#include "PropertiesForm.h" + +#include <wx/textfile.h> +#include <wx/msgdlg.h> + +class PropertiesData; + +class GeneralPropertiesForm : public GeneralPropertiesFormBase +{ +public: + GeneralPropertiesForm(wxWindow* parent, PropertiesData* properties); + virtual ~GeneralPropertiesForm(); + +protected: + virtual void OnButtonCancelClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); } + virtual void OnButtonOKClick(wxCommandEvent& event); + virtual bool ValidateData(); + + PropertiesData* m_properties = NULL; +}; +#endif // GENERALPROPERTIESFORM_H diff --git a/Project/GeneratorStabForm.cpp b/Project/GeneratorStabForm.cpp index a5f2098..2280906 100644 --- a/Project/GeneratorStabForm.cpp +++ b/Project/GeneratorStabForm.cpp @@ -1,9 +1,12 @@ #include "GeneratorStabForm.h" #include "SwitchingForm.h" #include "SyncGenerator.h" +#include "ControlEditor.h" +#include "ControlElementContainer.h" GeneratorStabForm::GeneratorStabForm(wxWindow* parent, SyncGenerator* syncGenerator) : GeneratorStabFormBase(parent) { + SetSize(GetBestSize()); m_syncGenerator = syncGenerator; m_parent = parent; @@ -40,13 +43,39 @@ GeneratorStabForm::GeneratorStabForm(wxWindow* parent, SyncGenerator* syncGenera GeneratorStabForm::~GeneratorStabForm() {} void GeneratorStabForm::OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); } -void GeneratorStabForm::OnEditAVRButtonClick(wxCommandEvent& event) {} +void GeneratorStabForm::OnEditAVRButtonClick(wxCommandEvent& event) +{ + SyncGeneratorElectricalData data = m_syncGenerator->GetElectricalData(); + if(!data.avr) { + data.avr = new ControlElementContainer(); + m_syncGenerator->SetElectricalData(data); + } + ControlEditor* cEditor = new ControlEditor(m_parent, IOControl::IN_TERMINAL_VOLTAGE | IOControl::OUT_FIELD_VOLTAGE); + cEditor->SetElementsList(data.avr->GetControlElementsList()); + cEditor->SetConnectionsList(data.avr->GetConnectionLineList()); + cEditor->SetControlContainer(data.avr); + cEditor->Show(); +} + void GeneratorStabForm::OnOKButtonClick(wxCommandEvent& event) { if(ValidateData()) EndModal(wxID_OK); } -void GeneratorStabForm::OnSpeedGovernorButtonClick(wxCommandEvent& event) {} +void GeneratorStabForm::OnSpeedGovernorButtonClick(wxCommandEvent& event) +{ + SyncGeneratorElectricalData data = m_syncGenerator->GetElectricalData(); + if(!data.speedGov) { + data.speedGov = new ControlElementContainer(); + m_syncGenerator->SetElectricalData(data); + } + ControlEditor* cEditor = new ControlEditor(m_parent, IOControl::IN_VELOCITY | IOControl::OUT_MEC_POWER); + cEditor->SetElementsList(data.speedGov->GetControlElementsList()); + cEditor->SetConnectionsList(data.speedGov->GetConnectionLineList()); + cEditor->SetControlContainer(data.speedGov); + cEditor->Show(); +} + void GeneratorStabForm::OnSwitchingButtonClick(wxCommandEvent& event) { if(ValidateData()) { @@ -65,76 +94,76 @@ bool GeneratorStabForm::ValidateData() if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlInertia->GetValue(), data.inertia, _("Value entered incorrectly in the field \"Inertia\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlDamping->GetValue(), data.damping, _("Value entered incorrectly in the field \"Damping factor\"."))) - return false; + return false; data.useAVR = m_checkBoxUseAVR->GetValue(); data.useSpeedGovernor = m_checkBoxUseSG->GetValue(); if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlRa->GetValue(), data.armResistance, _("Value entered incorrectly in the field \"Armature resistance\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlXp->GetValue(), data.potierReactance, _("Value entered incorrectly in the field \"Potier reactance\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlSat->GetValue(), data.satFactor, _("Value entered incorrectly in the field \"Saturation factor\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString( m_parent, m_textCtrlSyncXd->GetValue(), data.syncXd, _("Value entered incorrectly in the field \"Synchronous direct-axis reactance\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString( m_parent, m_textCtrlSyncXq->GetValue(), data.syncXq, _("Value entered incorrectly in the field \"Synchronous quadrature-axis reactance\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString( m_parent, m_textCtrlTranXd->GetValue(), data.transXd, _("Value entered incorrectly in the field \"Transitory direct-axis reactance\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString( m_parent, m_textCtrlTranXq->GetValue(), data.transXq, _("Value entered incorrectly in the field \"Transitory quadrature-axis reactance\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString( m_parent, m_textCtrlTranTd0->GetValue(), data.transTd0, _("Value entered incorrectly in the field \"Transitory direct-axis time constant\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString( m_parent, m_textCtrlTranTq0->GetValue(), data.transTq0, _("Value entered incorrectly in the field \"Transitory quadrature-axis time constant\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString( m_parent, m_textCtrlSubXd->GetValue(), data.subXd, _("Value entered incorrectly in the field \"Subtransitory direct-axis reactance\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString( m_parent, m_textCtrlSubXq->GetValue(), data.subXq, _("Value entered incorrectly in the field \"Subtransitory quadrature-axis reactance\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString( m_parent, m_textCtrlSubTd0->GetValue(), data.subTd0, _("Value entered incorrectly in the field \"Subtransitory direct-axis time constant\"."))) - return false; + return false; if(!m_syncGenerator->DoubleFromString( m_parent, m_textCtrlSubTq0->GetValue(), data.subTq0, _("Value entered incorrectly in the field \"Subtransitory quadrature-axis time constant\"."))) - return false; + return false; m_syncGenerator->SetElectricalData(data); diff --git a/Project/GeneratorStabForm.h b/Project/GeneratorStabForm.h index 6d9e6dc..4ff2127 100644 --- a/Project/GeneratorStabForm.h +++ b/Project/GeneratorStabForm.h @@ -5,14 +5,16 @@ class SwitchingForm; class SyncGenerator; +class ControlEditor; +class ControlElementContainer; class GeneratorStabForm : public GeneratorStabFormBase { -public: + public: GeneratorStabForm(wxWindow* parent, SyncGenerator* syncGenerator); virtual ~GeneratorStabForm(); - -protected: + + protected: virtual void UseAVRClick(wxCommandEvent& event); virtual void UseSGClick(wxCommandEvent& event); virtual void OnCancelButtonClick(wxCommandEvent& event); @@ -20,10 +22,10 @@ protected: virtual void OnOKButtonClick(wxCommandEvent& event); virtual void OnSpeedGovernorButtonClick(wxCommandEvent& event); virtual void OnSwitchingButtonClick(wxCommandEvent& event); - - virtual bool ValidateData(); - - SyncGenerator* m_syncGenerator = NULL; - wxWindow* m_parent = NULL; + + virtual bool ValidateData(); + + SyncGenerator* m_syncGenerator = NULL; + wxWindow* m_parent = NULL; }; -#endif // GENERATORSTABFORM_H +#endif // GENERATORSTABFORM_H diff --git a/Project/IOControl.cpp b/Project/IOControl.cpp index d9ea52e..2eab8de 100644 --- a/Project/IOControl.cpp +++ b/Project/IOControl.cpp @@ -222,3 +222,12 @@ void IOControl::UpdatePoints() } } } + +Element* IOControl::GetCopy() +{ + IOControl* copy = new IOControl(m_ioFlags, m_elementID); + *copy = *this; + m_glStringValue = NULL; + SetValue(m_value); + return copy; +} diff --git a/Project/IOControl.h b/Project/IOControl.h index 8a7666f..513b008 100644 --- a/Project/IOControl.h +++ b/Project/IOControl.h @@ -28,7 +28,7 @@ class IOControl : public ControlElement virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); } virtual bool ShowForm(wxWindow* parent, Element* element); virtual void Rotate(bool clockwise = true); - + virtual void UpdateText() { SetValue(m_value); } virtual wxString GenerateText(); virtual void UpdatePoints(); @@ -36,11 +36,12 @@ class IOControl : public ControlElement virtual void SetValue(IOFlags value); virtual int GetIOFlags() const { return m_ioFlags; } virtual Node::NodeType GetType() { return m_ioNodeType; } - + + virtual Element* GetCopy(); protected: IOFlags m_value; int m_ioFlags; - + Node::NodeType m_ioNodeType = Node::NODE_IN; wxGLString* m_glStringValue = NULL; diff --git a/Project/IOControlForm.cpp b/Project/IOControlForm.cpp index 8a848d9..c4527d6 100644 --- a/Project/IOControlForm.cpp +++ b/Project/IOControlForm.cpp @@ -2,6 +2,8 @@ IOControlForm::IOControlForm(wxWindow* parent, IOControl* ioControl) : IOControlFormBase(parent) { + SetSize(GetBestSize()); + m_parent = parent; m_ioControl = ioControl; diff --git a/Project/IndMotorForm.cpp b/Project/IndMotorForm.cpp index 177b42b..6af2433 100644 --- a/Project/IndMotorForm.cpp +++ b/Project/IndMotorForm.cpp @@ -3,6 +3,7 @@ IndMotorForm::IndMotorForm(wxWindow* parent, IndMotor* indMotor) : IndMotorFormBase(parent) { + SetSize(GetBestSize()); m_buttonStabButton->Enable(false); IndMotorElectricalData data = indMotor->GetElectricalData(); diff --git a/Project/Inductor.cpp b/Project/Inductor.cpp index b9a3da6..ca0dcd8 100644 --- a/Project/Inductor.cpp +++ b/Project/Inductor.cpp @@ -1,15 +1,8 @@ #include "ReactiveShuntElementForm.h" #include "Inductor.h" -Inductor::Inductor() - : Shunt() -{ -} -Inductor::Inductor(wxString name) - : Shunt() -{ - m_electricalData.name = name; -} +Inductor::Inductor() : Shunt() {} +Inductor::Inductor(wxString name) : Shunt() { m_electricalData.name = name; } Inductor::~Inductor() {} bool Inductor::AddParent(Element* parent, wxPoint2DDouble position) { @@ -17,11 +10,11 @@ bool Inductor::AddParent(Element* parent, wxPoint2DDouble position) m_parentList.push_back(parent); parent->AddChild(this); wxPoint2DDouble parentPt = - parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. - parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. - parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. + parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. + parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. + parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. - m_position = parentPt + wxPoint2DDouble(0.0, 100.0); // Shifts the position to the down of the bus. + m_position = parentPt + wxPoint2DDouble(0.0, 100.0); // Shifts the position to the down of the bus. m_width = 20.0; m_height = 70.0; m_rect = wxRect2DDouble(m_position.m_x - m_width / 2.0, m_position.m_y - m_height / 2.0, m_width, m_height); @@ -34,7 +27,7 @@ bool Inductor::AddParent(Element* parent, wxPoint2DDouble position) m_inserted = true; wxRect2DDouble genRect(0, 0, 0, 0); - m_switchRect.push_back(genRect); // Push a general rectangle. + m_switchRect.push_back(genRect); // Push a general rectangle. UpdateSwitches(); return true; @@ -45,9 +38,12 @@ bool Inductor::AddParent(Element* parent, wxPoint2DDouble position) void Inductor::Draw(wxPoint2DDouble translation, double scale) const { OpenGLColour elementColour; - if(m_online) - elementColour = m_onlineElementColour; - else + if(m_online) { + if(m_dynEvent) + elementColour = m_dynamicEventColour; + else + elementColour = m_onlineElementColour; + } else elementColour = m_offlineElementColour; if(m_inserted) { @@ -174,7 +170,7 @@ wxString Inductor::GetTipText() const if(!m_online) reactivePower = 0.0; else { - std::complex<double> v = static_cast<Bus*>(m_parentList[0])->GetEletricalData().voltage; + std::complex<double> v = static_cast<Bus*>(m_parentList[0])->GetElectricalData().voltage; reactivePower *= std::pow(std::abs(v), 2); } tipText += "\n"; diff --git a/Project/Limiter.cpp b/Project/Limiter.cpp index cd76fba..8519482 100644 --- a/Project/Limiter.cpp +++ b/Project/Limiter.cpp @@ -96,3 +96,10 @@ bool Limiter::Solve(double input, double timeStep) return true; } + +Element* Limiter::GetCopy() +{ + Limiter* copy = new Limiter(m_elementID); + *copy = *this; + return copy; +} diff --git a/Project/Limiter.h b/Project/Limiter.h index 1585a3c..82617a7 100644 --- a/Project/Limiter.h +++ b/Project/Limiter.h @@ -26,6 +26,8 @@ public: void SetUpLimit(double upLimit) { m_upLimit = upLimit; } void SetLowLimit(double lowLimit) { m_lowLimit = lowLimit; } + virtual Element* GetCopy(); + protected: double m_upLimit = 5.0; double m_lowLimit = -5.0; diff --git a/Project/LimiterForm.cpp b/Project/LimiterForm.cpp index dfbffb8..a43d6d2 100644 --- a/Project/LimiterForm.cpp +++ b/Project/LimiterForm.cpp @@ -3,6 +3,8 @@ LimiterForm::LimiterForm(wxWindow* parent, Limiter* limiter) : LimiterFormBase(parent) { + SetSize(GetBestSize()); + m_limiter = limiter; m_parent = parent; diff --git a/Project/Line.cpp b/Project/Line.cpp index 86d947c..350d3f5 100644 --- a/Project/Line.cpp +++ b/Project/Line.cpp @@ -1,7 +1,6 @@ #include "Line.h" -Line::Line() - : Branch() +Line::Line() : Branch() { for(int i = 0; i < 2; i++) { for(int j = 0; j < 3; j++) { @@ -10,8 +9,7 @@ Line::Line() } } -Line::Line(wxString name) - : Branch() +Line::Line(wxString name) : Branch() { for(int i = 0; i < 2; i++) { for(int j = 0; j < 3; j++) { @@ -32,9 +30,13 @@ bool Line::Contains(wxPoint2DDouble position) const void Line::Draw(wxPoint2DDouble translation, double scale) const { OpenGLColour elementColour; - if(m_online) - elementColour = m_onlineElementColour; - else + if(m_online) { + if(m_dynEvent) + elementColour = m_dynamicEventColour; + else + elementColour = m_onlineElementColour; + + } else elementColour = m_offlineElementColour; std::vector<wxPoint2DDouble> pointList = m_pointList; @@ -123,10 +125,10 @@ bool Line::AddParent(Element* parent, wxPoint2DDouble position) m_parentList.push_back(parent); parent->AddChild(this); wxPoint2DDouble parentPt = - parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. - parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. - parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. - m_pointList.push_back(parentPt); // First point + parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. + parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. + parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. + m_pointList.push_back(parentPt); // First point m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_position)); wxRect2DDouble genRect(0, 0, 0, 0); @@ -134,19 +136,19 @@ bool Line::AddParent(Element* parent, wxPoint2DDouble position) UpdateSwitches(); Bus* parentBus = static_cast<Bus*>(parent); - m_electricaData.nominalVoltage = parentBus->GetEletricalData().nominalVoltage; - m_electricaData.nominalVoltageUnit = parentBus->GetEletricalData().nominalVoltageUnit; + m_electricaData.nominalVoltage = parentBus->GetElectricalData().nominalVoltage; + m_electricaData.nominalVoltageUnit = parentBus->GetElectricalData().nominalVoltageUnit; return false; } // Second bus. else if(parent != m_parentList[0]) { Bus* parentBus = static_cast<Bus*>(parent); - if(m_electricaData.nominalVoltage != parentBus->GetEletricalData().nominalVoltage || - m_electricaData.nominalVoltageUnit != parentBus->GetEletricalData().nominalVoltageUnit) { + if(m_electricaData.nominalVoltage != parentBus->GetElectricalData().nominalVoltage || + m_electricaData.nominalVoltageUnit != parentBus->GetElectricalData().nominalVoltageUnit) { wxMessageDialog msgDialog(NULL, _("Unable to connect two buses with different nominal voltages.\n" "Use a transformer or edit the bus properties."), - _("Error"), wxOK | wxCENTRE | wxICON_ERROR); + _("Error"), wxOK | wxCENTRE | wxICON_ERROR); msgDialog.ShowModal(); return false; } @@ -154,9 +156,9 @@ bool Line::AddParent(Element* parent, wxPoint2DDouble position) m_parentList.push_back(parent); parent->AddChild(this); wxPoint2DDouble parentPt = - parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. - parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. - parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. + parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. + parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. + parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. // Set first switch point. wxPoint2DDouble secondPoint = parentPt; @@ -168,7 +170,7 @@ bool Line::AddParent(Element* parent, wxPoint2DDouble position) // Set the second switch point. m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_pointList[m_pointList.size() - 1])); - m_pointList.push_back(parentPt); // Last point. + m_pointList.push_back(parentPt); // Last point. wxRect2DDouble genRect(0, 0, 0, 0); m_switchRect.push_back(genRect); @@ -353,12 +355,12 @@ bool Line::SetNodeParent(Element* parent) wxRect2DDouble nodeRect(0, 0, 0, 0); if(m_activeNodeID == 1) { nodeRect = wxRect2DDouble(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize, - 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); + 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); } if(m_activeNodeID == 2) { nodeRect = wxRect2DDouble(m_pointList[m_pointList.size() - 1].m_x - 5.0 - m_borderSize, - m_pointList[m_pointList.size() - 1].m_y - 5.0 - m_borderSize, 10 + 2.0 * m_borderSize, - 10 + 2.0 * m_borderSize); + m_pointList[m_pointList.size() - 1].m_y - 5.0 - m_borderSize, + 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); } if(parent->Intersects(nodeRect)) { @@ -366,13 +368,13 @@ bool Line::SetNodeParent(Element* parent) // two different voltages buses Bus* parentBus = static_cast<Bus*>(parent); if(!m_parentList[0] && !m_parentList[1]) { - m_electricaData.nominalVoltage = parentBus->GetEletricalData().nominalVoltage; - m_electricaData.nominalVoltageUnit = parentBus->GetEletricalData().nominalVoltageUnit; - } else if(m_electricaData.nominalVoltage != parentBus->GetEletricalData().nominalVoltage || - m_electricaData.nominalVoltageUnit != parentBus->GetEletricalData().nominalVoltageUnit) { + m_electricaData.nominalVoltage = parentBus->GetElectricalData().nominalVoltage; + m_electricaData.nominalVoltageUnit = parentBus->GetElectricalData().nominalVoltageUnit; + } else if(m_electricaData.nominalVoltage != parentBus->GetElectricalData().nominalVoltage || + m_electricaData.nominalVoltageUnit != parentBus->GetElectricalData().nominalVoltageUnit) { wxMessageDialog msgDialog(NULL, _("Unable to connect two buses with different nominal voltages.\n" "Use a transformer or edit the bus properties."), - _("Error"), wxOK | wxCENTRE | wxICON_ERROR); + _("Error"), wxOK | wxCENTRE | wxICON_ERROR); msgDialog.ShowModal(); m_activeNodeID = 0; return false; @@ -389,8 +391,8 @@ bool Line::SetNodeParent(Element* parent) // Centralize the node on bus. wxPoint2DDouble parentPt = parent->RotateAtPosition( - m_pointList[0], -parent->GetAngle()); // Rotate click to horizontal position. - parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. + m_pointList[0], -parent->GetAngle()); // Rotate click to horizontal position. + parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); m_pointList[0] = parentPt; @@ -488,17 +490,17 @@ wxString Line::GetTipText() const if(m_online) { tipText += "\n"; int busNumber[2]; - busNumber[0] = static_cast<Bus*>(m_parentList[0])->GetEletricalData().number + 1; - busNumber[1] = static_cast<Bus*>(m_parentList[1])->GetEletricalData().number + 1; + busNumber[0] = static_cast<Bus*>(m_parentList[0])->GetElectricalData().number + 1; + busNumber[1] = static_cast<Bus*>(m_parentList[1])->GetElectricalData().number + 1; tipText += _("\nP") + wxString::Format("(%d-%d) = ", busNumber[0], busNumber[1]) + - wxString::FromDouble(m_electricaData.powerFlow[0].real(), 5) + _(" p.u."); + wxString::FromDouble(m_electricaData.powerFlow[0].real(), 5) + _(" p.u."); tipText += _("\nQ") + wxString::Format("(%d-%d) = ", busNumber[0], busNumber[1]) + - wxString::FromDouble(m_electricaData.powerFlow[0].imag(), 5) + _(" p.u."); + wxString::FromDouble(m_electricaData.powerFlow[0].imag(), 5) + _(" p.u."); tipText += _("\nP") + wxString::Format("(%d-%d) = ", busNumber[1], busNumber[0]) + - wxString::FromDouble(m_electricaData.powerFlow[1].real(), 5) + _(" p.u."); + wxString::FromDouble(m_electricaData.powerFlow[1].real(), 5) + _(" p.u."); tipText += _("\nQ") + wxString::Format("(%d-%d) = ", busNumber[1], busNumber[0]) + - wxString::FromDouble(m_electricaData.powerFlow[1].imag(), 5) + _(" p.u."); + wxString::FromDouble(m_electricaData.powerFlow[1].imag(), 5) + _(" p.u."); } return tipText; diff --git a/Project/LineForm.cpp b/Project/LineForm.cpp index 3c288b1..beab909 100644 --- a/Project/LineForm.cpp +++ b/Project/LineForm.cpp @@ -4,6 +4,7 @@ LineForm::LineForm(wxWindow* parent, Line* line) : LineFormBase(parent) { + SetSize(GetBestSize()); m_choiceResistance->SetString(1, L'\u03A9'); m_choiceResistance->SetString(2, (wxString)L'\u03A9' + "/km"); m_choiceResistance->SetInitialSize(); diff --git a/Project/Load.cpp b/Project/Load.cpp index 3cce7a1..c490d24 100644 --- a/Project/Load.cpp +++ b/Project/Load.cpp @@ -1,14 +1,7 @@ #include "Load.h" -Load::Load() - : Shunt() -{ -} -Load::Load(wxString name) - : Shunt() -{ - m_electricalData.name = name; -} +Load::Load() : Shunt() {} +Load::Load(wxString name) : Shunt() { m_electricalData.name = name; } Load::~Load() {} bool Load::AddParent(Element* parent, wxPoint2DDouble position) { @@ -16,11 +9,11 @@ bool Load::AddParent(Element* parent, wxPoint2DDouble position) m_parentList.push_back(parent); parent->AddChild(this); wxPoint2DDouble parentPt = - parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. - parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. - parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. + parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. + parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. + parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. - m_position = parentPt + wxPoint2DDouble(0.0, 100.0); // Shifts the position to the down of the bus. + m_position = parentPt + wxPoint2DDouble(0.0, 100.0); // Shifts the position to the down of the bus. m_width = m_height = 20.0; m_rect = wxRect2DDouble(m_position.m_x - 10.0, m_position.m_y - 10.0, m_width, m_height); @@ -36,7 +29,7 @@ bool Load::AddParent(Element* parent, wxPoint2DDouble position) m_inserted = true; wxRect2DDouble genRect(0, 0, 0, 0); - m_switchRect.push_back(genRect); // Push a general rectangle. + m_switchRect.push_back(genRect); // Push a general rectangle. UpdateSwitches(); m_pfDirection = PF_TO_ELEMENT; UpdatePowerFlowArrowsPosition(); @@ -49,9 +42,12 @@ bool Load::AddParent(Element* parent, wxPoint2DDouble position) void Load::Draw(wxPoint2DDouble translation, double scale) const { OpenGLColour elementColour; - if(m_online) - elementColour = m_onlineElementColour; - else + if(m_online) { + if(m_dynEvent) + elementColour = m_dynamicEventColour; + else + elementColour = m_onlineElementColour; + } else elementColour = m_offlineElementColour; if(m_inserted) { @@ -60,10 +56,10 @@ void Load::Draw(wxPoint2DDouble translation, double scale) const glLineWidth(1.5 + m_borderSize * 2.0); glColor4dv(m_selectionColour.GetRGBA()); std::vector<wxPoint2DDouble> selTriangPts; - selTriangPts.push_back( - m_triangPts[0] + m_position + wxPoint2DDouble(-m_borderSize / scale, -m_borderSize / scale)); - selTriangPts.push_back( - m_triangPts[1] + m_position + wxPoint2DDouble(m_borderSize / scale, -m_borderSize / scale)); + selTriangPts.push_back(m_triangPts[0] + m_position + + wxPoint2DDouble(-m_borderSize / scale, -m_borderSize / scale)); + selTriangPts.push_back(m_triangPts[1] + m_position + + wxPoint2DDouble(m_borderSize / scale, -m_borderSize / scale)); selTriangPts.push_back(m_triangPts[2] + m_position + wxPoint2DDouble(0.0, m_borderSize / scale)); glPushMatrix(); @@ -194,7 +190,7 @@ wxString Load::GetTipText() const reactivePower = 0.0; } if(m_online && m_electricalData.loadType == CONST_IMPEDANCE) { - std::complex<double> v = static_cast<Bus*>(m_parentList[0])->GetEletricalData().voltage; + std::complex<double> v = static_cast<Bus*>(m_parentList[0])->GetElectricalData().voltage; reactivePower *= std::pow(std::abs(v), 2); activePower *= std::pow(std::abs(v), 2); } diff --git a/Project/LoadForm.cpp b/Project/LoadForm.cpp index 549762a..270723a 100644 --- a/Project/LoadForm.cpp +++ b/Project/LoadForm.cpp @@ -4,6 +4,7 @@ LoadForm::LoadForm(wxWindow* parent, Load* load) : LoadFormBase(parent) { + SetSize(GetBestSize()); LoadElectricalData data = load->GetElectricalData(); m_textCtrlName->SetValue(data.name); diff --git a/Project/Machines.cpp b/Project/Machines.cpp index dd93bf1..883ad3a 100644 --- a/Project/Machines.cpp +++ b/Project/Machines.cpp @@ -1,9 +1,6 @@ #include "Machines.h" -Machines::Machines() - : PowerElement() -{ -} +Machines::Machines() : PowerElement() {} Machines::~Machines() {} bool Machines::AddParent(Element* parent, wxPoint2DDouble position) { @@ -11,11 +8,11 @@ bool Machines::AddParent(Element* parent, wxPoint2DDouble position) m_parentList.push_back(parent); parent->AddChild(this); wxPoint2DDouble parentPt = - parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. - parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. - parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. + parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. + parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. + parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. - m_position = parentPt + wxPoint2DDouble(-100.0, 0.0); // Shifts the position to the left of the bus. + m_position = parentPt + wxPoint2DDouble(-100.0, 0.0); // Shifts the position to the left of the bus. m_width = m_height = 50.0; m_rect = wxRect2DDouble(m_position.m_x - 25.0, m_position.m_y - 25.0, m_width, m_height); @@ -26,7 +23,7 @@ bool Machines::AddParent(Element* parent, wxPoint2DDouble position) m_inserted = true; wxRect2DDouble genRect(0, 0, 0, 0); - m_switchRect.push_back(genRect); // Push a general rectangle. + m_switchRect.push_back(genRect); // Push a general rectangle. UpdateSwitches(); UpdatePowerFlowArrowsPosition(); return true; @@ -37,9 +34,14 @@ bool Machines::AddParent(Element* parent, wxPoint2DDouble position) void Machines::Draw(wxPoint2DDouble translation, double scale) const { OpenGLColour elementColour; - if(m_online) elementColour = m_onlineElementColour; - else elementColour = m_offlineElementColour; - + if(m_online) { + if(m_dynEvent) + elementColour = m_dynamicEventColour; + else + elementColour = m_onlineElementColour; + } else + elementColour = m_offlineElementColour; + if(m_inserted) { // Draw Selection (layer 1). if(m_selected) { @@ -153,7 +155,7 @@ void Machines::RemoveParent(Element* parent) bool Machines::NodeContains(wxPoint2DDouble position) { wxRect2DDouble nodeRect(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize, - 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); + 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); if(nodeRect.Contains(position)) { m_activeNodeID = 1; @@ -168,15 +170,15 @@ bool Machines::SetNodeParent(Element* parent) { if(parent && m_activeNodeID != 0) { wxRect2DDouble nodeRect(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize, - 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); + 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); if(parent->Intersects(nodeRect)) { m_parentList[0] = parent; // Centralize the node on bus. wxPoint2DDouble parentPt = - parent->RotateAtPosition(m_pointList[0], -parent->GetAngle()); // Rotate click to horizontal position. - parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. + parent->RotateAtPosition(m_pointList[0], -parent->GetAngle()); // Rotate click to horizontal position. + parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); m_pointList[0] = parentPt; @@ -195,7 +197,7 @@ void Machines::UpdateNodes() { if(m_parentList[0]) { wxRect2DDouble nodeRect(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize, - 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); + 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); if(!m_parentList[0]->Intersects(nodeRect)) { m_parentList[0]->RemoveChild(this); diff --git a/Project/Machines.h b/Project/Machines.h index 8efcab6..9c2e6cd 100644 --- a/Project/Machines.h +++ b/Project/Machines.h @@ -5,10 +5,12 @@ class Machines : public PowerElement { -public: - Machines(); - ~Machines(); - + public: + enum SyncMachineModel { SM_MODEL_1 = 0, SM_MODEL_2, SM_MODEL_3, SM_MODEL_4, SM_MODEL_5 }; + + Machines(); + ~Machines(); + virtual bool AddParent(Element* parent, wxPoint2DDouble position); virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); } virtual void Draw(wxPoint2DDouble translation, double scale) const; @@ -22,14 +24,13 @@ public: virtual bool SetNodeParent(Element* parent); virtual void UpdateNodes(); virtual void Rotate(bool clockwise = true); - virtual void DrawSymbol() const {} + virtual void DrawSymbol() const {} virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection); protected: void UpdateSwitchesPosition(); void UpdatePowerFlowArrowsPosition(); bool m_inserted = false; - }; -#endif // MACHINES_H +#endif // MACHINES_H diff --git a/Project/MainFrame.cpp b/Project/MainFrame.cpp index 87c547e..6604722 100644 --- a/Project/MainFrame.cpp +++ b/Project/MainFrame.cpp @@ -11,27 +11,32 @@ #include "Inductor.h" #include "Capacitor.h" #include "FileHanding.h" +#include "GeneralPropertiesForm.h" +#include "SimulationsSettingsForm.h" +#include "PropertiesData.h" +#include "ChartView.h" -MainFrame::MainFrame() - : MainFrameBase(NULL) -{ -} -MainFrame::MainFrame(wxWindow* parent, wxLocale* locale) - : MainFrameBase(parent) +MainFrame::MainFrame() : MainFrameBase(NULL) {} +MainFrame::MainFrame(wxWindow* parent, wxLocale* locale, PropertiesData* initProperties) : MainFrameBase(parent) { m_locale = locale; + m_generalProperties = initProperties; Init(); } + MainFrame::~MainFrame() { // if(m_artMetro) delete m_artMetro; if(m_addElementsMenu) { - m_addElementsMenu->Disconnect( - wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnAddElementsClick), NULL, this); + m_addElementsMenu->Disconnect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnAddElementsClick), + NULL, this); delete m_addElementsMenu; } + if(m_locale) delete m_locale; + if(m_generalProperties) delete m_generalProperties; } + void MainFrame::Init() { this->SetSize(800, 600); @@ -86,20 +91,21 @@ void MainFrame::CreateAddElementsMenu() // busElement->SetBitmap(wxArtProvider::GetBitmap(wxART_WARNING)); wxMenuItem* lineElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_LINE, _("&Line\tL"), _("Adds a power line at the circuit")); - wxMenuItem* transformerElement = new wxMenuItem( - m_addElementsMenu, ID_ADDMENU_TRANSFORMER, _("&Transformer\tT"), _("Adds a transformer at the circuit")); - wxMenuItem* generatorElement = new wxMenuItem( - m_addElementsMenu, ID_ADDMENU_GENERATOR, _("&Generator\tG"), _("Adds a generator at the circuit")); - wxMenuItem* indMotorElement = new wxMenuItem( - m_addElementsMenu, ID_ADDMENU_INDMOTOR, _("&Induction motor\tI"), _("Adds an induction motor at the circuit")); - wxMenuItem* syncCompElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_SYNCCOMP, - _("&Synchronous compensator \tK"), _("Adds an induction motor at the circuit")); + wxMenuItem* transformerElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_TRANSFORMER, _("&Transformer\tT"), + _("Adds a transformer at the circuit")); + wxMenuItem* generatorElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_GENERATOR, _("&Generator\tG"), + _("Adds a generator at the circuit")); + wxMenuItem* indMotorElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_INDMOTOR, _("&Induction motor\tI"), + _("Adds an induction motor at the circuit")); + wxMenuItem* syncCompElement = + new wxMenuItem(m_addElementsMenu, ID_ADDMENU_SYNCCOMP, _("&Synchronous compensator \tK"), + _("Adds an induction motor at the circuit")); wxMenuItem* loadElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_LOAD, _("&Load\tShift-L"), _("Adds a load at the circuit")); - wxMenuItem* capacitorElement = new wxMenuItem( - m_addElementsMenu, ID_ADDMENU_CAPACITOR, _("&Capacitor\tShift-C"), _("Adds a shunt capacitor at the circuit")); - wxMenuItem* inductorElement = new wxMenuItem( - m_addElementsMenu, ID_ADDMENU_INDUCTOR, _("&Inductor\tShift-I"), _("Adds a shunt inductor at the circuit")); + wxMenuItem* capacitorElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_CAPACITOR, _("&Capacitor\tShift-C"), + _("Adds a shunt capacitor at the circuit")); + wxMenuItem* inductorElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_INDUCTOR, _("&Inductor\tShift-I"), + _("Adds a shunt inductor at the circuit")); m_addElementsMenu->Append(busElement); m_addElementsMenu->Append(lineElement); @@ -132,7 +138,22 @@ void MainFrame::OnNewClick(wxRibbonButtonBarEvent& event) void MainFrame::OnAboutClick(wxRibbonButtonBarEvent& event) {} void MainFrame::OnAddElementDropdown(wxRibbonButtonBarEvent& event) { event.PopupMenu(m_addElementsMenu); } -void MainFrame::OnChartsClick(wxRibbonButtonBarEvent& event) {} +void MainFrame::OnChartsClick(wxRibbonButtonBarEvent& event) +{ + if(Workspace* workspace = dynamic_cast<Workspace*>(m_auiNotebook->GetCurrentPage())) { + std::vector<ElementPlotData> plotDataList; + auto elementList = workspace->GetElementList(); + for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) { + if(PowerElement* powerElement = dynamic_cast<PowerElement*>(*it)) { + ElementPlotData plotData; + if(powerElement->GetPlotData(plotData)) plotDataList.push_back(plotData); + } + } + ChartView* cView = new ChartView(workspace, plotDataList, workspace->GetStabilityTimeVector()); + cView->Show(); + } +} + void MainFrame::OnCloseClick(wxRibbonButtonBarEvent& event) {} void MainFrame::OnCopyClick(wxRibbonButtonBarEvent& event) {} void MainFrame::OnDataReportClick(wxRibbonButtonBarEvent& event) {} @@ -150,7 +171,6 @@ void MainFrame::OnDisableSolutionClick(wxRibbonButtonBarEvent& event) } void MainFrame::OnDragClick(wxRibbonButtonBarEvent& event) {} - void MainFrame::OnEnableSolutionClick(wxRibbonButtonBarEvent& event) { m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, true); @@ -158,7 +178,6 @@ void MainFrame::OnEnableSolutionClick(wxRibbonButtonBarEvent& event) } void MainFrame::OnExpImpClick(wxRibbonButtonBarEvent& event) {} - void MainFrame::OnFaultClick(wxRibbonButtonBarEvent& event) { if(Workspace* workspace = dynamic_cast<Workspace*>(m_auiNotebook->GetCurrentPage())) { @@ -203,8 +222,8 @@ void MainFrame::OnMoveClick(wxRibbonButtonBarEvent& event) void MainFrame::OnOpenClick(wxRibbonButtonBarEvent& event) { - wxFileDialog openFileDialog( - this, _("Open PSP file"), "", "", "PSP files (*.psp)|*.psp", wxFD_OPEN | wxFD_FILE_MUST_EXIST); + wxFileDialog openFileDialog(this, _("Open PSP file"), "", "", "PSP files (*.psp)|*.psp", + wxFD_OPEN | wxFD_FILE_MUST_EXIST); if(openFileDialog.ShowModal() == wxID_CANCEL) return; wxFileName fileName(openFileDialog.GetPath()); @@ -227,8 +246,8 @@ void MainFrame::OnOpenClick(wxRibbonButtonBarEvent& event) newWorkspace->SetJustOpened(true); m_projectNumber++; } else { - wxMessageDialog msgDialog( - this, _("It was not possible to open the selected file."), _("Error"), wxOK | wxCENTRE | wxICON_ERROR); + wxMessageDialog msgDialog(this, _("It was not possible to open the selected file."), _("Error"), + wxOK | wxCENTRE | wxICON_ERROR); msgDialog.ShowModal(); delete newWorkspace; } @@ -244,10 +263,16 @@ void MainFrame::OnPowerFlowClick(wxRibbonButtonBarEvent& event) } } -void MainFrame::OnProjectSettingsClick(wxRibbonButtonBarEvent& event) {} void MainFrame::OnRedoClick(wxRibbonButtonBarEvent& event) {} void MainFrame::OnResetVoltagesClick(wxRibbonButtonBarEvent& event) {} -void MainFrame::OnRunStabilityClick(wxRibbonButtonBarEvent& event) {} +void MainFrame::OnRunStabilityClick(wxRibbonButtonBarEvent& event) +{ + Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage()); + if(workspace) { + workspace->RunStability(); + } +} + void MainFrame::OnSCPowerClick(wxRibbonButtonBarEvent& event) { Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage()); @@ -261,8 +286,8 @@ void MainFrame::OnSaveAsClick(wxRibbonButtonBarEvent& event) if(workspace) { FileHanding fileHandling(workspace); - wxFileDialog saveFileDialog( - this, _("Save PSP file"), "", "", "PSP files (*.psp)|*.psp", wxFD_SAVE | wxFD_OVERWRITE_PROMPT); + wxFileDialog saveFileDialog(this, _("Save PSP file"), "", "", "PSP files (*.psp)|*.psp", + wxFD_SAVE | wxFD_OVERWRITE_PROMPT); if(saveFileDialog.ShowModal() == wxID_CANCEL) return; fileHandling.SaveProject(saveFileDialog.GetPath()); @@ -282,8 +307,8 @@ void MainFrame::OnSaveClick(wxRibbonButtonBarEvent& event) if(workspace->GetSavedPath().IsOk()) { fileHandling.SaveProject(workspace->GetSavedPath()); } else { - wxFileDialog saveFileDialog( - this, _("Save PSP file"), "", "", "PSP files (*.psp)|*.psp", wxFD_SAVE | wxFD_OVERWRITE_PROMPT); + wxFileDialog saveFileDialog(this, _("Save PSP file"), "", "", "PSP files (*.psp)|*.psp", + wxFD_SAVE | wxFD_OVERWRITE_PROMPT); if(saveFileDialog.ShowModal() == wxID_CANCEL) return; fileHandling.SaveProject(saveFileDialog.GetPath()); @@ -296,7 +321,6 @@ void MainFrame::OnSaveClick(wxRibbonButtonBarEvent& event) } void MainFrame::OnSnapshotClick(wxRibbonButtonBarEvent& event) {} -void MainFrame::OnStabilitySettingsClick(wxRibbonButtonBarEvent& event) {} void MainFrame::OnUndoClick(wxRibbonButtonBarEvent& event) {} void MainFrame::OnAddElementsClick(wxCommandEvent& event) { @@ -310,8 +334,8 @@ void MainFrame::OnAddElementsClick(wxCommandEvent& event) switch(event.GetId()) { case ID_ADDMENU_BUS: { - Bus* newBus = new Bus( - wxPoint2DDouble(0, 0), wxString::Format(_("Bus %d"), workspace->GetElementNumber(ID_BUS))); + Bus* newBus = new Bus(wxPoint2DDouble(0, 0), + wxString::Format(_("Bus %d"), workspace->GetElementNumber(ID_BUS))); workspace->IncrementElementNumber(ID_BUS); elementList.push_back(newBus); statusBarText = _("Insert Bus: Click to insert, ESC to cancel."); @@ -419,3 +443,19 @@ void MainFrame::OnRotCounterClockClick(wxRibbonButtonBarEvent& event) workspace->RotateSelectedElements(false); } } +void MainFrame::OnGeneralSettingsClick(wxRibbonButtonBarEvent& event) +{ + GeneralPropertiesForm genPropForm(this, m_generalProperties); + genPropForm.SetInitialSize(); + genPropForm.ShowModal(); +} + +void MainFrame::OnSimulationSettingsClick(wxRibbonButtonBarEvent& event) +{ + Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage()); + if(workspace) { + SimulationsSettingsForm simulSettingsForm(this, workspace->GetProperties()); + simulSettingsForm.SetInitialSize(); + simulSettingsForm.ShowModal(); + } +} diff --git a/Project/MainFrame.h b/Project/MainFrame.h index c20e691..f9d9523 100644 --- a/Project/MainFrame.h +++ b/Project/MainFrame.h @@ -11,9 +11,12 @@ class MainFrameBase; class wxRibbonMetroArtProvider; class Workspace; class FileHanding; +class GeneralPropertiesForm; +class SimulationsSettingsForm; +class PropertiesData; +class ChartView; -enum -{ +enum { ID_ADDMENU_BUS = 20000, ID_ADDMENU_LINE, ID_ADDMENU_TRANSFORMER, @@ -29,10 +32,12 @@ class MainFrame : public MainFrameBase { public: MainFrame(); - MainFrame(wxWindow* parent, wxLocale* locale); + MainFrame(wxWindow* parent, wxLocale* locale, PropertiesData* initProperties); ~MainFrame(); protected: + virtual void OnGeneralSettingsClick(wxRibbonButtonBarEvent& event); + virtual void OnSimulationSettingsClick(wxRibbonButtonBarEvent& event); virtual void OnRotClockClick(wxRibbonButtonBarEvent& event); virtual void OnRotCounterClockClick(wxRibbonButtonBarEvent& event); virtual void NotebookPageClosed(wxAuiNotebookEvent& event); @@ -56,7 +61,6 @@ class MainFrame : public MainFrameBase virtual void OnPSPGuideClick(wxRibbonButtonBarEvent& event); virtual void OnPasteClick(wxRibbonButtonBarEvent& event); virtual void OnPowerFlowClick(wxRibbonButtonBarEvent& event); - virtual void OnProjectSettingsClick(wxRibbonButtonBarEvent& event); virtual void OnRedoClick(wxRibbonButtonBarEvent& event); virtual void OnResetVoltagesClick(wxRibbonButtonBarEvent& event); virtual void OnRunStabilityClick(wxRibbonButtonBarEvent& event); @@ -64,17 +68,17 @@ class MainFrame : public MainFrameBase virtual void OnSaveAsClick(wxRibbonButtonBarEvent& event); virtual void OnSaveClick(wxRibbonButtonBarEvent& event); virtual void OnSnapshotClick(wxRibbonButtonBarEvent& event); - virtual void OnStabilitySettingsClick(wxRibbonButtonBarEvent& event); virtual void OnUndoClick(wxRibbonButtonBarEvent& event); virtual void OnNewClick(wxRibbonButtonBarEvent& event); - private: + protected: std::vector<Workspace*> m_workspaceList; int m_projectNumber = 1; wxRibbonMetroArtProvider* m_artMetro = NULL; wxMenu* m_addElementsMenu = NULL; wxLocale* m_locale = NULL; + PropertiesData* m_generalProperties = NULL; void Init(); void EnableCurrentProjectRibbon(bool enable = true); diff --git a/Project/MainFrame.wxcp b/Project/MainFrame.wxcp index 96797e9..38f0642 100644 --- a/Project/MainFrame.wxcp +++ b/Project/MainFrame.wxcp @@ -740,7 +740,7 @@ "m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED", "m_eventClass": "wxRibbonButtonBarEvent", "m_eventHandler": "wxRibbonButtonBarEventHandler", - "m_functionNameAndSignature": "OnStabilitySettingsClick(wxRibbonButtonBarEvent& event)", + "m_functionNameAndSignature": "OnGeneralSettingsClick(wxRibbonButtonBarEvent& event)", "m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.", "m_noBody": false }], @@ -4524,7 +4524,7 @@ "m_eventName": "wxEVT_COMMAND_RIBBONBUTTON_CLICKED", "m_eventClass": "wxRibbonButtonBarEvent", "m_eventHandler": "wxRibbonButtonBarEventHandler", - "m_functionNameAndSignature": "OnProjectSettingsClick(wxRibbonButtonBarEvent& event)", + "m_functionNameAndSignature": "OnSimulationSettingsClick(wxRibbonButtonBarEvent& event)", "m_description": "Triggered when the normal (non-dropdown) region of a button on the button bar is clicked.", "m_noBody": false }], diff --git a/Project/MainFrameBase.cpp b/Project/MainFrameBase.cpp index 80877e8..bcac269 100644 --- a/Project/MainFrameBase.cpp +++ b/Project/MainFrameBase.cpp @@ -238,7 +238,7 @@ MainFrameBase::MainFrameBase(wxWindow* parent, wxWindowID id, const wxString& ti // Connect events m_ribbonButtonBarProjects->Connect(ID_RIBBON_NEW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnNewClick), NULL, this); m_ribbonButtonBarProjects->Connect(ID_RIBBON_OPEN, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnOpenClick), NULL, this); - m_ribbonButtonBarProjects->Connect(ID_RIBBON_GENSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnStabilitySettingsClick), NULL, this); + m_ribbonButtonBarProjects->Connect(ID_RIBBON_GENSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnGeneralSettingsClick), NULL, this); m_ribbonButtonBarProjects->Connect(ID_RIBBON_EXIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnExitClick), NULL, this); m_ribbonButtonBarCProject->Connect(ID_RIBBON_SAVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveClick), NULL, this); m_ribbonButtonBarCProject->Connect(ID_RIBBON_SAVEAS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveAsClick), NULL, this); @@ -266,7 +266,7 @@ MainFrameBase::MainFrameBase(wxWindow* parent, wxWindowID id, const wxString& ti m_ribbonButtonBarSimulations->Connect(ID_RIBBON_RUNSTAB, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRunStabilityClick), NULL, this); m_ribbonButtonBarSimulations->Connect(ID_RIBBON_FAULT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFaultClick), NULL, this); m_ribbonButtonBarSimulations->Connect(ID_RIBBON_SCPOWER, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSCPowerClick), NULL, this); - m_ribbonButtonBarSimulations->Connect(ID_RIBBON_SIMULSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnProjectSettingsClick), NULL, this); + m_ribbonButtonBarSimulations->Connect(ID_RIBBON_SIMULSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSimulationSettingsClick), NULL, this); m_auiNotebook->Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosing), NULL, this); m_auiNotebook->Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosed), NULL, this); @@ -276,7 +276,7 @@ MainFrameBase::~MainFrameBase() { m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_NEW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnNewClick), NULL, this); m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_OPEN, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnOpenClick), NULL, this); - m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_GENSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnStabilitySettingsClick), NULL, this); + m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_GENSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnGeneralSettingsClick), NULL, this); m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_EXIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnExitClick), NULL, this); m_ribbonButtonBarCProject->Disconnect(ID_RIBBON_SAVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveClick), NULL, this); m_ribbonButtonBarCProject->Disconnect(ID_RIBBON_SAVEAS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveAsClick), NULL, this); @@ -304,7 +304,7 @@ MainFrameBase::~MainFrameBase() m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_RUNSTAB, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRunStabilityClick), NULL, this); m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_FAULT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFaultClick), NULL, this); m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_SCPOWER, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSCPowerClick), NULL, this); - m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_SIMULSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnProjectSettingsClick), NULL, this); + m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_SIMULSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSimulationSettingsClick), NULL, this); m_auiNotebook->Disconnect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosing), NULL, this); m_auiNotebook->Disconnect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosed), NULL, this); diff --git a/Project/MainFrameBase.h b/Project/MainFrameBase.h index 3e24c3c..10859e8 100644 --- a/Project/MainFrameBase.h +++ b/Project/MainFrameBase.h @@ -102,7 +102,7 @@ protected: protected: virtual void OnNewClick(wxRibbonButtonBarEvent& event) { event.Skip(); } virtual void OnOpenClick(wxRibbonButtonBarEvent& event) { event.Skip(); } - virtual void OnStabilitySettingsClick(wxRibbonButtonBarEvent& event) { event.Skip(); } + virtual void OnGeneralSettingsClick(wxRibbonButtonBarEvent& event) { event.Skip(); } virtual void OnExitClick(wxRibbonButtonBarEvent& event) { event.Skip(); } virtual void OnSaveClick(wxRibbonButtonBarEvent& event) { event.Skip(); } virtual void OnSaveAsClick(wxRibbonButtonBarEvent& event) { event.Skip(); } @@ -130,7 +130,7 @@ protected: virtual void OnRunStabilityClick(wxRibbonButtonBarEvent& event) { event.Skip(); } virtual void OnFaultClick(wxRibbonButtonBarEvent& event) { event.Skip(); } virtual void OnSCPowerClick(wxRibbonButtonBarEvent& event) { event.Skip(); } - virtual void OnProjectSettingsClick(wxRibbonButtonBarEvent& event) { event.Skip(); } + virtual void OnSimulationSettingsClick(wxRibbonButtonBarEvent& event) { event.Skip(); } virtual void NotebookPageClosing(wxAuiNotebookEvent& event) { event.Skip(); } virtual void NotebookPageClosed(wxAuiNotebookEvent& event) { event.Skip(); } diff --git a/Project/MainFrameBitmaps.cpp b/Project/MainFrameBitmaps.cpp index fb54eec..42f52fd 100644 --- a/Project/MainFrameBitmaps.cpp +++ b/Project/MainFrameBitmaps.cpp @@ -2564,6 +2564,6 @@ void wxC9ED9InitBitmapResources() XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_settings32.png"), xml_res_file_31, xml_res_size_31, wxT("image/png")); XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_snap32.png"), xml_res_file_32, xml_res_size_32, wxT("image/png")); XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_undo32.png"), xml_res_file_33, xml_res_size_33, wxT("image/png")); - XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$C__Users_Thales_Documents_GitHub_PSP_Project_MainFrameBitmaps.xrc"), xml_res_file_34, xml_res_size_34, wxT("text/xml")); - wxXmlResource::Get()->Load(wxT("memory:XRC_resource/MainFrameBitmaps.cpp$C__Users_Thales_Documents_GitHub_PSP_Project_MainFrameBitmaps.xrc")); + XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_MainFrameBitmaps.xrc"), xml_res_file_34, xml_res_size_34, wxT("text/xml")); + wxXmlResource::Get()->Load(wxT("memory:XRC_resource/MainFrameBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_MainFrameBitmaps.xrc")); } diff --git a/Project/Multiplier.cpp b/Project/Multiplier.cpp index e8708c9..a44f254 100644 --- a/Project/Multiplier.cpp +++ b/Project/Multiplier.cpp @@ -115,3 +115,10 @@ bool Multiplier::Solve(double input, double timeStep) return true; } + +Element* Multiplier::GetCopy() +{ + Multiplier* copy = new Multiplier(m_elementID); + *copy = *this; + return copy; +} diff --git a/Project/Multiplier.h b/Project/Multiplier.h index 19fca71..76a8679 100644 --- a/Project/Multiplier.h +++ b/Project/Multiplier.h @@ -20,6 +20,8 @@ class Multiplier : public ControlElement virtual void UpdatePoints(); virtual bool Solve(double input, double timeStep); + + virtual Element* GetCopy(); }; #endif // MULTIPLIER_H diff --git a/Project/PowerElement.cpp b/Project/PowerElement.cpp index e6a04ed..2a00abf 100644 --- a/Project/PowerElement.cpp +++ b/Project/PowerElement.cpp @@ -3,8 +3,7 @@ #include "DegreesAndRadians.h" #endif -PowerElement::PowerElement() - : Element() +PowerElement::PowerElement() : Element() { m_busColour.SetRGBA(0.0, 0.3, 1.0, 1.0); m_onlineElementColour.SetRGBA(0.2, 0.2, 0.2, 1.0); @@ -12,15 +11,17 @@ PowerElement::PowerElement() m_closedSwitchColour.SetRGBA(0.0, 0.4, 0.0, 1.0); m_openedSwitchColour.SetRGBA(1.0, 0.1, 0.1, 1.0); m_powerFlowArrowColour.SetRGBA(1.0, 0.51, 0.0, 1.0); + m_dynamicEventColour.SetRGBA(1.0, 0.51, 0.0, 1.0); } PowerElement::~PowerElement() {} - void PowerElement::SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit) { } -wxPoint2DDouble PowerElement::GetSwitchPoint(Element* parent, wxPoint2DDouble parentPoint, wxPoint2DDouble secondPoint) const +wxPoint2DDouble PowerElement::GetSwitchPoint(Element* parent, + wxPoint2DDouble parentPoint, + wxPoint2DDouble secondPoint) const { double swLineSize = 25.0; wxPoint2DDouble swPoint = wxPoint2DDouble(parentPoint.m_x, parentPoint.m_y - swLineSize); @@ -28,17 +29,18 @@ wxPoint2DDouble PowerElement::GetSwitchPoint(Element* parent, wxPoint2DDouble pa // Rotate the second point (to compare). double angle = parent->GetAngle(); - secondPoint = wxPoint2DDouble(std::cos(wxDegToRad(-angle)) * (secondPoint.m_x - parentPoint.m_x) - - std::sin(wxDegToRad(-angle)) * (secondPoint.m_y - parentPoint.m_y) + parentPoint.m_x, - std::sin(wxDegToRad(-angle)) * (secondPoint.m_x - parentPoint.m_x) + - std::cos(wxDegToRad(-angle)) * (secondPoint.m_y - parentPoint.m_y) + parentPoint.m_y); + secondPoint = + wxPoint2DDouble(std::cos(wxDegToRad(-angle)) * (secondPoint.m_x - parentPoint.m_x) - + std::sin(wxDegToRad(-angle)) * (secondPoint.m_y - parentPoint.m_y) + parentPoint.m_x, + std::sin(wxDegToRad(-angle)) * (secondPoint.m_x - parentPoint.m_x) + + std::cos(wxDegToRad(-angle)) * (secondPoint.m_y - parentPoint.m_y) + parentPoint.m_y); // Rotate if(secondPoint.m_y > parentPoint.m_y) angle -= 180.0; return wxPoint2DDouble(std::cos(wxDegToRad(angle)) * (swPoint.m_x - parentPoint.m_x) - - std::sin(wxDegToRad(angle)) * (swPoint.m_y - parentPoint.m_y) + parentPoint.m_x, - std::sin(wxDegToRad(angle)) * (swPoint.m_x - parentPoint.m_x) + - std::cos(wxDegToRad(angle)) * (swPoint.m_y - parentPoint.m_y) + parentPoint.m_y); + std::sin(wxDegToRad(angle)) * (swPoint.m_y - parentPoint.m_y) + parentPoint.m_x, + std::sin(wxDegToRad(angle)) * (swPoint.m_x - parentPoint.m_x) + + std::cos(wxDegToRad(angle)) * (swPoint.m_y - parentPoint.m_y) + parentPoint.m_y); } bool PowerElement::SwitchesContains(wxPoint2DDouble position) const @@ -54,10 +56,10 @@ bool PowerElement::SwitchesContains(wxPoint2DDouble position) const void PowerElement::UpdateSwitches() { // General method, to one switch only. - wxPoint2DDouble swCenter = wxPoint2DDouble( - (m_pointList[0].m_x + m_pointList[1].m_x) / 2.0, (m_pointList[0].m_y + m_pointList[1].m_y) / 2.0); - m_switchRect[0] = wxRect2DDouble( - swCenter.m_x - m_switchSize / 2.0, swCenter.m_y - m_switchSize / 2.0, m_switchSize, m_switchSize); + wxPoint2DDouble swCenter = wxPoint2DDouble((m_pointList[0].m_x + m_pointList[1].m_x) / 2.0, + (m_pointList[0].m_y + m_pointList[1].m_y) / 2.0); + m_switchRect[0] = wxRect2DDouble(swCenter.m_x - m_switchSize / 2.0, swCenter.m_y - m_switchSize / 2.0, m_switchSize, + m_switchSize); } void PowerElement::DrawSwitches() const @@ -74,13 +76,13 @@ void PowerElement::DrawSwitches() const glPushMatrix(); glTranslated(m_switchRect[i].GetPosition().m_x + m_switchSize / 2.0, - m_switchRect[i].GetPosition().m_y + m_switchSize / 2.0, 0.0); + m_switchRect[i].GetPosition().m_y + m_switchSize / 2.0, 0.0); glRotated(parent->GetAngle(), 0.0, 0.0, 1.0); glTranslated(-m_switchRect[i].GetPosition().m_x - m_switchSize / 2.0, - -m_switchRect[i].GetPosition().m_y - m_switchSize / 2.0, 0.0); + -m_switchRect[i].GetPosition().m_y - m_switchSize / 2.0, 0.0); DrawRectangle(m_switchRect[i].GetPosition() + wxPoint2DDouble(m_switchSize / 2.0, m_switchSize / 2.0), - m_switchSize, m_switchSize); + m_switchSize, m_switchSize); glPopMatrix(); } @@ -90,7 +92,7 @@ void PowerElement::DrawSwitches() const void PowerElement::CalculatePowerFlowPts(std::vector<wxPoint2DDouble> edges) { - double arrowRate = 100.0; // One arrow to each "arrowRate" distance in pixels. + double arrowRate = 100.0; // One arrow to each "arrowRate" distance in pixels. if(edges.size() < 2) return; @@ -113,7 +115,7 @@ void PowerElement::CalculatePowerFlowPts(std::vector<wxPoint2DDouble> edges) for(int i = 0; i < numArrows; i++) { wxPoint2DDouble arrowCenter(pt1.m_x + ((rotPt2.m_x - pt1.m_x) / double(numArrows + 1)) * double(i + 1), - pt1.m_y + ((rotPt2.m_y - pt1.m_y) / double(numArrows + 1)) * double(i + 1)); + pt1.m_y + ((rotPt2.m_y - pt1.m_y) / double(numArrows + 1)) * double(i + 1)); std::vector<wxPoint2DDouble> triPts; triPts.push_back(arrowCenter + wxPoint2DDouble(5.0, 0.0)); diff --git a/Project/PowerElement.h b/Project/PowerElement.h index 7399fe8..e1afc7a 100644 --- a/Project/PowerElement.h +++ b/Project/PowerElement.h @@ -2,6 +2,7 @@ #define POWERELEMENT_H #include "Element.h" +#include "ElementPlotData.h" /** * @enum ElectricalUnit @@ -78,6 +79,18 @@ struct SwitchingData { }; /** + * @class IntegrationConstant + * @author Thales Lima Oliveira + * @date 24/05/2017 + * @file PowerElement.h + * @brief Integration constants to calculate dynamic elements through trapezoidal integration method + */ +struct IntegrationConstant { + double c; /**< C value */ + double m; /**< M value */ +}; + +/** * @class PowerElement * @author Thales Lima Oliveira * @date 18/01/2017 @@ -86,7 +99,7 @@ struct SwitchingData { */ class PowerElement : public Element { -public: + public: /** * @brief Constructor */ @@ -102,8 +115,9 @@ public: * @param parentPoint Position of node on parent. * @param secondPoint Next point in element. */ - virtual wxPoint2DDouble - GetSwitchPoint(Element* parent, wxPoint2DDouble parentPoint, wxPoint2DDouble secondPoint) const; + virtual wxPoint2DDouble GetSwitchPoint(Element* parent, + wxPoint2DDouble parentPoint, + wxPoint2DDouble secondPoint) const; /** * @brief Check if switch contains position. @@ -144,36 +158,51 @@ public: * @param data Switching data. */ virtual void SetSwitchingData(SwitchingData data) { m_swData = data; } - /** * @brief Returns the switching data of the element. * @return Element switching data. */ virtual SwitchingData GetSwitchingData() { return m_swData; } - /** * @brief Set the direction of the power flow. * @param pfDirection Power flow direction. */ virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection) { m_pfDirection = pfDirection; } - /** * @brief Return the direction of the power flow. * @return Power flow direction. */ virtual PowerFlowDirection GetPowerFlowDirection() const { return m_pfDirection; } - -protected: + /** + * @brief Fill the plot data. + * @param plotData Plot data to be filled. + * @return true if the plot data was successfully filled, false otherwise. + */ + virtual bool GetPlotData(ElementPlotData& plotData) { return false; } + /** + * @brief Check if the power element have dynamic event. + * @return true if the element have dynamic an event, false otherwise. + */ + virtual bool HaveDynamicEvent() const { return m_dynEvent; } + /** + * @brief Set if the power element have dynamic event. + * @param dynEvent Event occurrence. + */ + virtual void SetDynamicEvent(bool dynEvent = true) { m_dynEvent = dynEvent; } + protected: SwitchingData m_swData; std::vector<std::vector<wxPoint2DDouble> > m_powerFlowArrow; PowerFlowDirection m_pfDirection = PF_NONE; - + OpenGLColour m_busColour; OpenGLColour m_onlineElementColour; OpenGLColour m_offlineElementColour; OpenGLColour m_closedSwitchColour; OpenGLColour m_openedSwitchColour; OpenGLColour m_powerFlowArrowColour; + OpenGLColour m_dynamicEventColour; + + bool m_dynEvent = false; }; -#endif // POWERELEMENT_H +#endif // POWERELEMENT_H diff --git a/Project/PowerFlow.cpp b/Project/PowerFlow.cpp index bfee2af..fe59067 100644 --- a/Project/PowerFlow.cpp +++ b/Project/PowerFlow.cpp @@ -39,7 +39,7 @@ bool PowerFlow::RunGaussSeidel(double systemPowerBase, int busNumber = 0; for(auto itb = m_busList.begin(); itb != m_busList.end(); itb++) { Bus* bus = *itb; - BusElectricalData data = bus->GetEletricalData(); + BusElectricalData data = bus->GetElectricalData(); // Fill the bus type if(data.slackBus) busType.push_back(BUS_SLACK); diff --git a/Project/Project.mk b/Project/Project.mk index b9d2fb9..d8000b1 100644 --- a/Project/Project.mk +++ b/Project/Project.mk @@ -13,7 +13,7 @@ CurrentFileName := CurrentFilePath := CurrentFileFullPath := User :=NDSE-69 -Date :=13/05/2017 +Date :=04/09/2017 CodeLitePath :="C:/Program Files/CodeLite" LinkerName :=C:/TDM-GCC-64/bin/g++.exe SharedObjectLinkerName :=C:/TDM-GCC-64/bin/g++.exe -shared -fPIC @@ -64,18 +64,21 @@ AS := C:/TDM-GCC-64/bin/as.exe CodeLiteDir:=C:\Program Files\CodeLite WXWIN:=C:\wxWidgets-3.1.0 WXCFG:=gcc_dll\mswu -Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) $(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix) $(IntermediateDirectory)/wxGLString.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/WorkspaceBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditorBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/ChartViewBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/WorkspaceBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditorBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/ChartViewBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) $(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) \ - $(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix) +Objects0=$(IntermediateDirectory)/main.cpp$(ObjectSuffix) $(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix) $(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix) $(IntermediateDirectory)/wxGLString.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/WorkspaceBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditorBitmaps.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/ChartViewBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/PropertiesFormBitmaps.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/WorkspaceBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlEditorBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/ChartViewBase.cpp$(ObjectSuffix) $(IntermediateDirectory)/PropertiesForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerFlow.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/Fault.cpp$(ObjectSuffix) $(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix) $(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) $(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) $(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) $(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) $(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControl.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) $(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix) $(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IOControlForm.cpp$(ObjectSuffix) +Objects1=$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) \ + $(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) -Objects=$(Objects0) + +Objects=$(Objects0) $(Objects1) ## ## Main Build Targets @@ -87,6 +90,7 @@ $(OutputFile): $(IntermediateDirectory)/.d $(Objects) @$(MakeDirCommand) $(@D) @echo "" > $(IntermediateDirectory)/.d @echo $(Objects0) > $(ObjectsFileList) + @echo $(Objects1) >> $(ObjectsFileList) $(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions) MakeIntermediateDirs: @@ -112,29 +116,13 @@ $(IntermediateDirectory)/main.cpp$(PreprocessSuffix): main.cpp $(IntermediateDirectory)/win_resources.rc$(ObjectSuffix): win_resources.rc $(RcCompilerName) -i "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/win_resources.rc" $(RcCmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/win_resources.rc$(ObjectSuffix) $(RcIncludePath) -$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix): ElementDataObject.cpp $(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElementDataObject.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix): ElementDataObject.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix) -MM ElementDataObject.cpp - -$(IntermediateDirectory)/ElementDataObject.cpp$(PreprocessSuffix): ElementDataObject.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElementDataObject.cpp$(PreprocessSuffix) ElementDataObject.cpp - -$(IntermediateDirectory)/Element.cpp$(ObjectSuffix): Element.cpp $(IntermediateDirectory)/Element.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Element.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Element.cpp$(DependSuffix): Element.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Element.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Element.cpp$(DependSuffix) -MM Element.cpp +$(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix): PropertiesData.cpp $(IntermediateDirectory)/PropertiesData.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/PropertiesData.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/PropertiesData.cpp$(DependSuffix): PropertiesData.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PropertiesData.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PropertiesData.cpp$(DependSuffix) -MM PropertiesData.cpp -$(IntermediateDirectory)/Element.cpp$(PreprocessSuffix): Element.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Element.cpp$(PreprocessSuffix) Element.cpp - -$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix): ElementPlotData.cpp $(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElementPlotData.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix): ElementPlotData.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix) -MM ElementPlotData.cpp - -$(IntermediateDirectory)/ElementPlotData.cpp$(PreprocessSuffix): ElementPlotData.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElementPlotData.cpp$(PreprocessSuffix) ElementPlotData.cpp +$(IntermediateDirectory)/PropertiesData.cpp$(PreprocessSuffix): PropertiesData.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PropertiesData.cpp$(PreprocessSuffix) PropertiesData.cpp $(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix): ArtMetro.cpp $(IntermediateDirectory)/ArtMetro.cpp$(DependSuffix) $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ArtMetro.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ArtMetro.cpp$(ObjectSuffix) $(IncludePath) @@ -152,54 +140,6 @@ $(IntermediateDirectory)/wxGLString.cpp$(DependSuffix): wxGLString.cpp $(IntermediateDirectory)/wxGLString.cpp$(PreprocessSuffix): wxGLString.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/wxGLString.cpp$(PreprocessSuffix) wxGLString.cpp -$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix): MainFrame.cpp $(IntermediateDirectory)/MainFrame.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MainFrame.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/MainFrame.cpp$(DependSuffix): MainFrame.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MainFrame.cpp$(DependSuffix) -MM MainFrame.cpp - -$(IntermediateDirectory)/MainFrame.cpp$(PreprocessSuffix): MainFrame.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MainFrame.cpp$(PreprocessSuffix) MainFrame.cpp - -$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix): Workspace.cpp $(IntermediateDirectory)/Workspace.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Workspace.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Workspace.cpp$(DependSuffix): Workspace.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Workspace.cpp$(DependSuffix) -MM Workspace.cpp - -$(IntermediateDirectory)/Workspace.cpp$(PreprocessSuffix): Workspace.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Workspace.cpp$(PreprocessSuffix) Workspace.cpp - -$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix): FileHanding.cpp $(IntermediateDirectory)/FileHanding.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/FileHanding.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/FileHanding.cpp$(DependSuffix): FileHanding.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/FileHanding.cpp$(DependSuffix) -MM FileHanding.cpp - -$(IntermediateDirectory)/FileHanding.cpp$(PreprocessSuffix): FileHanding.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/FileHanding.cpp$(PreprocessSuffix) FileHanding.cpp - -$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix): ControlEditor.cpp $(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlEditor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix): ControlEditor.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix) -MM ControlEditor.cpp - -$(IntermediateDirectory)/ControlEditor.cpp$(PreprocessSuffix): ControlEditor.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlEditor.cpp$(PreprocessSuffix) ControlEditor.cpp - -$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix): Camera.cpp $(IntermediateDirectory)/Camera.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Camera.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Camera.cpp$(DependSuffix): Camera.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Camera.cpp$(DependSuffix) -MM Camera.cpp - -$(IntermediateDirectory)/Camera.cpp$(PreprocessSuffix): Camera.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Camera.cpp$(PreprocessSuffix) Camera.cpp - -$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix): ChartView.cpp $(IntermediateDirectory)/ChartView.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ChartView.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ChartView.cpp$(DependSuffix): ChartView.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ChartView.cpp$(DependSuffix) -MM ChartView.cpp - -$(IntermediateDirectory)/ChartView.cpp$(PreprocessSuffix): ChartView.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ChartView.cpp$(PreprocessSuffix) ChartView.cpp - $(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix): MainFrameBitmaps.cpp $(IntermediateDirectory)/MainFrameBitmaps.cpp$(DependSuffix) $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MainFrameBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrameBitmaps.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/MainFrameBitmaps.cpp$(DependSuffix): MainFrameBitmaps.cpp @@ -248,6 +188,14 @@ $(IntermediateDirectory)/ChartViewBitmaps.cpp$(DependSuffix): ChartViewBitmaps.c $(IntermediateDirectory)/ChartViewBitmaps.cpp$(PreprocessSuffix): ChartViewBitmaps.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ChartViewBitmaps.cpp$(PreprocessSuffix) ChartViewBitmaps.cpp +$(IntermediateDirectory)/PropertiesFormBitmaps.cpp$(ObjectSuffix): PropertiesFormBitmaps.cpp $(IntermediateDirectory)/PropertiesFormBitmaps.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/PropertiesFormBitmaps.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PropertiesFormBitmaps.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/PropertiesFormBitmaps.cpp$(DependSuffix): PropertiesFormBitmaps.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PropertiesFormBitmaps.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PropertiesFormBitmaps.cpp$(DependSuffix) -MM PropertiesFormBitmaps.cpp + +$(IntermediateDirectory)/PropertiesFormBitmaps.cpp$(PreprocessSuffix): PropertiesFormBitmaps.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PropertiesFormBitmaps.cpp$(PreprocessSuffix) PropertiesFormBitmaps.cpp + $(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix): MainFrameBase.cpp $(IntermediateDirectory)/MainFrameBase.cpp$(DependSuffix) $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MainFrameBase.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrameBase.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/MainFrameBase.cpp$(DependSuffix): MainFrameBase.cpp @@ -288,109 +236,13 @@ $(IntermediateDirectory)/ChartViewBase.cpp$(DependSuffix): ChartViewBase.cpp $(IntermediateDirectory)/ChartViewBase.cpp$(PreprocessSuffix): ChartViewBase.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ChartViewBase.cpp$(PreprocessSuffix) ChartViewBase.cpp -$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix): Bus.cpp $(IntermediateDirectory)/Bus.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Bus.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Bus.cpp$(DependSuffix): Bus.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Bus.cpp$(DependSuffix) -MM Bus.cpp - -$(IntermediateDirectory)/Bus.cpp$(PreprocessSuffix): Bus.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Bus.cpp$(PreprocessSuffix) Bus.cpp - -$(IntermediateDirectory)/Line.cpp$(ObjectSuffix): Line.cpp $(IntermediateDirectory)/Line.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Line.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Line.cpp$(DependSuffix): Line.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Line.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Line.cpp$(DependSuffix) -MM Line.cpp - -$(IntermediateDirectory)/Line.cpp$(PreprocessSuffix): Line.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Line.cpp$(PreprocessSuffix) Line.cpp - -$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix): Transformer.cpp $(IntermediateDirectory)/Transformer.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Transformer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Transformer.cpp$(DependSuffix): Transformer.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Transformer.cpp$(DependSuffix) -MM Transformer.cpp - -$(IntermediateDirectory)/Transformer.cpp$(PreprocessSuffix): Transformer.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Transformer.cpp$(PreprocessSuffix) Transformer.cpp - -$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix): Machines.cpp $(IntermediateDirectory)/Machines.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Machines.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Machines.cpp$(DependSuffix): Machines.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Machines.cpp$(DependSuffix) -MM Machines.cpp - -$(IntermediateDirectory)/Machines.cpp$(PreprocessSuffix): Machines.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Machines.cpp$(PreprocessSuffix) Machines.cpp - -$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix): SyncGenerator.cpp $(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncGenerator.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix): SyncGenerator.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix) -MM SyncGenerator.cpp - -$(IntermediateDirectory)/SyncGenerator.cpp$(PreprocessSuffix): SyncGenerator.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncGenerator.cpp$(PreprocessSuffix) SyncGenerator.cpp - -$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix): IndMotor.cpp $(IntermediateDirectory)/IndMotor.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IndMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IndMotor.cpp$(DependSuffix): IndMotor.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IndMotor.cpp$(DependSuffix) -MM IndMotor.cpp - -$(IntermediateDirectory)/IndMotor.cpp$(PreprocessSuffix): IndMotor.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IndMotor.cpp$(PreprocessSuffix) IndMotor.cpp - -$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix): Branch.cpp $(IntermediateDirectory)/Branch.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Branch.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Branch.cpp$(DependSuffix): Branch.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Branch.cpp$(DependSuffix) -MM Branch.cpp - -$(IntermediateDirectory)/Branch.cpp$(PreprocessSuffix): Branch.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Branch.cpp$(PreprocessSuffix) Branch.cpp - -$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix): SyncMotor.cpp $(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix): SyncMotor.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix) -MM SyncMotor.cpp - -$(IntermediateDirectory)/SyncMotor.cpp$(PreprocessSuffix): SyncMotor.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncMotor.cpp$(PreprocessSuffix) SyncMotor.cpp - -$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix): Shunt.cpp $(IntermediateDirectory)/Shunt.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Shunt.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Shunt.cpp$(DependSuffix): Shunt.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Shunt.cpp$(DependSuffix) -MM Shunt.cpp - -$(IntermediateDirectory)/Shunt.cpp$(PreprocessSuffix): Shunt.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Shunt.cpp$(PreprocessSuffix) Shunt.cpp - -$(IntermediateDirectory)/Load.cpp$(ObjectSuffix): Load.cpp $(IntermediateDirectory)/Load.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Load.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Load.cpp$(DependSuffix): Load.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Load.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Load.cpp$(DependSuffix) -MM Load.cpp - -$(IntermediateDirectory)/Load.cpp$(PreprocessSuffix): Load.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Load.cpp$(PreprocessSuffix) Load.cpp - -$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix): Inductor.cpp $(IntermediateDirectory)/Inductor.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Inductor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Inductor.cpp$(DependSuffix): Inductor.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Inductor.cpp$(DependSuffix) -MM Inductor.cpp - -$(IntermediateDirectory)/Inductor.cpp$(PreprocessSuffix): Inductor.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Inductor.cpp$(PreprocessSuffix) Inductor.cpp - -$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix): Capacitor.cpp $(IntermediateDirectory)/Capacitor.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Capacitor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Capacitor.cpp$(DependSuffix): Capacitor.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Capacitor.cpp$(DependSuffix) -MM Capacitor.cpp - -$(IntermediateDirectory)/Capacitor.cpp$(PreprocessSuffix): Capacitor.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Capacitor.cpp$(PreprocessSuffix) Capacitor.cpp - -$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix): PowerElement.cpp $(IntermediateDirectory)/PowerElement.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/PowerElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/PowerElement.cpp$(DependSuffix): PowerElement.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PowerElement.cpp$(DependSuffix) -MM PowerElement.cpp +$(IntermediateDirectory)/PropertiesForm.cpp$(ObjectSuffix): PropertiesForm.cpp $(IntermediateDirectory)/PropertiesForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/PropertiesForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PropertiesForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/PropertiesForm.cpp$(DependSuffix): PropertiesForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PropertiesForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PropertiesForm.cpp$(DependSuffix) -MM PropertiesForm.cpp -$(IntermediateDirectory)/PowerElement.cpp$(PreprocessSuffix): PowerElement.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PowerElement.cpp$(PreprocessSuffix) PowerElement.cpp +$(IntermediateDirectory)/PropertiesForm.cpp$(PreprocessSuffix): PropertiesForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PropertiesForm.cpp$(PreprocessSuffix) PropertiesForm.cpp $(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix): ElectricCalculation.cpp $(IntermediateDirectory)/ElectricCalculation.cpp$(DependSuffix) $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElectricCalculation.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElectricCalculation.cpp$(ObjectSuffix) $(IncludePath) @@ -416,37 +268,93 @@ $(IntermediateDirectory)/Fault.cpp$(DependSuffix): Fault.cpp $(IntermediateDirectory)/Fault.cpp$(PreprocessSuffix): Fault.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Fault.cpp$(PreprocessSuffix) Fault.cpp -$(IntermediateDirectory)/Text.cpp$(ObjectSuffix): Text.cpp $(IntermediateDirectory)/Text.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Text.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Text.cpp$(DependSuffix): Text.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Text.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Text.cpp$(DependSuffix) -MM Text.cpp +$(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix): Electromechanical.cpp $(IntermediateDirectory)/Electromechanical.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Electromechanical.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Electromechanical.cpp$(DependSuffix): Electromechanical.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Electromechanical.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Electromechanical.cpp$(DependSuffix) -MM Electromechanical.cpp -$(IntermediateDirectory)/Text.cpp$(PreprocessSuffix): Text.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Text.cpp$(PreprocessSuffix) Text.cpp +$(IntermediateDirectory)/Electromechanical.cpp$(PreprocessSuffix): Electromechanical.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Electromechanical.cpp$(PreprocessSuffix) Electromechanical.cpp -$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix): GraphicalElement.cpp $(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GraphicalElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix): GraphicalElement.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix) -MM GraphicalElement.cpp +$(IntermediateDirectory)/Element.cpp$(ObjectSuffix): Element.cpp $(IntermediateDirectory)/Element.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Element.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Element.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Element.cpp$(DependSuffix): Element.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Element.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Element.cpp$(DependSuffix) -MM Element.cpp -$(IntermediateDirectory)/GraphicalElement.cpp$(PreprocessSuffix): GraphicalElement.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GraphicalElement.cpp$(PreprocessSuffix) GraphicalElement.cpp +$(IntermediateDirectory)/Element.cpp$(PreprocessSuffix): Element.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Element.cpp$(PreprocessSuffix) Element.cpp -$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix): ControlElement.cpp $(IntermediateDirectory)/ControlElement.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ControlElement.cpp$(DependSuffix): ControlElement.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElement.cpp$(DependSuffix) -MM ControlElement.cpp +$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix): ElementDataObject.cpp $(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElementDataObject.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix): ElementDataObject.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElementDataObject.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElementDataObject.cpp$(DependSuffix) -MM ElementDataObject.cpp -$(IntermediateDirectory)/ControlElement.cpp$(PreprocessSuffix): ControlElement.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElement.cpp$(PreprocessSuffix) ControlElement.cpp +$(IntermediateDirectory)/ElementDataObject.cpp$(PreprocessSuffix): ElementDataObject.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElementDataObject.cpp$(PreprocessSuffix) ElementDataObject.cpp -$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix): TransferFunction.cpp $(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransferFunction.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix): TransferFunction.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix) -MM TransferFunction.cpp +$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix): ElementPlotData.cpp $(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ElementPlotData.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix): ElementPlotData.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ElementPlotData.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ElementPlotData.cpp$(DependSuffix) -MM ElementPlotData.cpp -$(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix): TransferFunction.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix) TransferFunction.cpp +$(IntermediateDirectory)/ElementPlotData.cpp$(PreprocessSuffix): ElementPlotData.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ElementPlotData.cpp$(PreprocessSuffix) ElementPlotData.cpp + +$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix): wxMathPlot/mathplot.cpp $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/wxMathPlot/mathplot.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix): wxMathPlot/mathplot.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix) -MM wxMathPlot/mathplot.cpp + +$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(PreprocessSuffix): wxMathPlot/mathplot.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(PreprocessSuffix) wxMathPlot/mathplot.cpp + +$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix): Camera.cpp $(IntermediateDirectory)/Camera.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Camera.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Camera.cpp$(DependSuffix): Camera.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Camera.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Camera.cpp$(DependSuffix) -MM Camera.cpp + +$(IntermediateDirectory)/Camera.cpp$(PreprocessSuffix): Camera.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Camera.cpp$(PreprocessSuffix) Camera.cpp + +$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix): MainFrame.cpp $(IntermediateDirectory)/MainFrame.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/MainFrame.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/MainFrame.cpp$(DependSuffix): MainFrame.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/MainFrame.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/MainFrame.cpp$(DependSuffix) -MM MainFrame.cpp + +$(IntermediateDirectory)/MainFrame.cpp$(PreprocessSuffix): MainFrame.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/MainFrame.cpp$(PreprocessSuffix) MainFrame.cpp + +$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix): Workspace.cpp $(IntermediateDirectory)/Workspace.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Workspace.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Workspace.cpp$(DependSuffix): Workspace.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Workspace.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Workspace.cpp$(DependSuffix) -MM Workspace.cpp + +$(IntermediateDirectory)/Workspace.cpp$(PreprocessSuffix): Workspace.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Workspace.cpp$(PreprocessSuffix) Workspace.cpp + +$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix): ChartView.cpp $(IntermediateDirectory)/ChartView.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ChartView.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ChartView.cpp$(DependSuffix): ChartView.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ChartView.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ChartView.cpp$(DependSuffix) -MM ChartView.cpp + +$(IntermediateDirectory)/ChartView.cpp$(PreprocessSuffix): ChartView.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ChartView.cpp$(PreprocessSuffix) ChartView.cpp + +$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix): ControlEditor.cpp $(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlEditor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix): ControlEditor.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlEditor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlEditor.cpp$(DependSuffix) -MM ControlEditor.cpp + +$(IntermediateDirectory)/ControlEditor.cpp$(PreprocessSuffix): ControlEditor.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlEditor.cpp$(PreprocessSuffix) ControlEditor.cpp + +$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix): FileHanding.cpp $(IntermediateDirectory)/FileHanding.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/FileHanding.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/FileHanding.cpp$(DependSuffix): FileHanding.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/FileHanding.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/FileHanding.cpp$(DependSuffix) -MM FileHanding.cpp + +$(IntermediateDirectory)/FileHanding.cpp$(PreprocessSuffix): FileHanding.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/FileHanding.cpp$(PreprocessSuffix) FileHanding.cpp $(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix): ConnectionLine.cpp $(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix) $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ConnectionLine.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ConnectionLine.cpp$(ObjectSuffix) $(IncludePath) @@ -456,37 +364,37 @@ $(IntermediateDirectory)/ConnectionLine.cpp$(DependSuffix): ConnectionLine.cpp $(IntermediateDirectory)/ConnectionLine.cpp$(PreprocessSuffix): ConnectionLine.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ConnectionLine.cpp$(PreprocessSuffix) ConnectionLine.cpp -$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix): Sum.cpp $(IntermediateDirectory)/Sum.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Sum.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Sum.cpp$(DependSuffix): Sum.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Sum.cpp$(DependSuffix) -MM Sum.cpp +$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix): Constant.cpp $(IntermediateDirectory)/Constant.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Constant.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Constant.cpp$(DependSuffix): Constant.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Constant.cpp$(DependSuffix) -MM Constant.cpp -$(IntermediateDirectory)/Sum.cpp$(PreprocessSuffix): Sum.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Sum.cpp$(PreprocessSuffix) Sum.cpp +$(IntermediateDirectory)/Constant.cpp$(PreprocessSuffix): Constant.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Constant.cpp$(PreprocessSuffix) Constant.cpp -$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix): Multiplier.cpp $(IntermediateDirectory)/Multiplier.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Multiplier.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Multiplier.cpp$(DependSuffix): Multiplier.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Multiplier.cpp$(DependSuffix) -MM Multiplier.cpp +$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix): ControlElement.cpp $(IntermediateDirectory)/ControlElement.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ControlElement.cpp$(DependSuffix): ControlElement.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElement.cpp$(DependSuffix) -MM ControlElement.cpp -$(IntermediateDirectory)/Multiplier.cpp$(PreprocessSuffix): Multiplier.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Multiplier.cpp$(PreprocessSuffix) Multiplier.cpp +$(IntermediateDirectory)/ControlElement.cpp$(PreprocessSuffix): ControlElement.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElement.cpp$(PreprocessSuffix) ControlElement.cpp -$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix): Limiter.cpp $(IntermediateDirectory)/Limiter.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Limiter.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Limiter.cpp$(DependSuffix): Limiter.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Limiter.cpp$(DependSuffix) -MM Limiter.cpp +$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix): ControlElementContainer.cpp $(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlElementContainer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix): ControlElementContainer.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix) -MM ControlElementContainer.cpp -$(IntermediateDirectory)/Limiter.cpp$(PreprocessSuffix): Limiter.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Limiter.cpp$(PreprocessSuffix) Limiter.cpp +$(IntermediateDirectory)/ControlElementContainer.cpp$(PreprocessSuffix): ControlElementContainer.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElementContainer.cpp$(PreprocessSuffix) ControlElementContainer.cpp -$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix): RateLimiter.cpp $(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/RateLimiter.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix): RateLimiter.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix) -MM RateLimiter.cpp +$(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix): ControlElementSolver.cpp $(IntermediateDirectory)/ControlElementSolver.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlElementSolver.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ControlElementSolver.cpp$(DependSuffix): ControlElementSolver.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElementSolver.cpp$(DependSuffix) -MM ControlElementSolver.cpp -$(IntermediateDirectory)/RateLimiter.cpp$(PreprocessSuffix): RateLimiter.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/RateLimiter.cpp$(PreprocessSuffix) RateLimiter.cpp +$(IntermediateDirectory)/ControlElementSolver.cpp$(PreprocessSuffix): ControlElementSolver.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElementSolver.cpp$(PreprocessSuffix) ControlElementSolver.cpp $(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix): Exponential.cpp $(IntermediateDirectory)/Exponential.cpp$(DependSuffix) $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Exponential.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Exponential.cpp$(ObjectSuffix) $(IncludePath) @@ -496,14 +404,6 @@ $(IntermediateDirectory)/Exponential.cpp$(DependSuffix): Exponential.cpp $(IntermediateDirectory)/Exponential.cpp$(PreprocessSuffix): Exponential.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Exponential.cpp$(PreprocessSuffix) Exponential.cpp -$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix): Constant.cpp $(IntermediateDirectory)/Constant.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Constant.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/Constant.cpp$(DependSuffix): Constant.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Constant.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Constant.cpp$(DependSuffix) -MM Constant.cpp - -$(IntermediateDirectory)/Constant.cpp$(PreprocessSuffix): Constant.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Constant.cpp$(PreprocessSuffix) Constant.cpp - $(IntermediateDirectory)/Gain.cpp$(ObjectSuffix): Gain.cpp $(IntermediateDirectory)/Gain.cpp$(DependSuffix) $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Gain.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Gain.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/Gain.cpp$(DependSuffix): Gain.cpp @@ -520,149 +420,181 @@ $(IntermediateDirectory)/IOControl.cpp$(DependSuffix): IOControl.cpp $(IntermediateDirectory)/IOControl.cpp$(PreprocessSuffix): IOControl.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IOControl.cpp$(PreprocessSuffix) IOControl.cpp -$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix): ControlElementContainer.cpp $(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlElementContainer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix): ControlElementContainer.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElementContainer.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElementContainer.cpp$(DependSuffix) -MM ControlElementContainer.cpp +$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix): Limiter.cpp $(IntermediateDirectory)/Limiter.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Limiter.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Limiter.cpp$(DependSuffix): Limiter.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Limiter.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Limiter.cpp$(DependSuffix) -MM Limiter.cpp -$(IntermediateDirectory)/ControlElementContainer.cpp$(PreprocessSuffix): ControlElementContainer.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElementContainer.cpp$(PreprocessSuffix) ControlElementContainer.cpp +$(IntermediateDirectory)/Limiter.cpp$(PreprocessSuffix): Limiter.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Limiter.cpp$(PreprocessSuffix) Limiter.cpp -$(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix): ControlElementSolver.cpp $(IntermediateDirectory)/ControlElementSolver.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlElementSolver.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ControlElementSolver.cpp$(DependSuffix): ControlElementSolver.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlElementSolver.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlElementSolver.cpp$(DependSuffix) -MM ControlElementSolver.cpp +$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix): Multiplier.cpp $(IntermediateDirectory)/Multiplier.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Multiplier.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Multiplier.cpp$(DependSuffix): Multiplier.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Multiplier.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Multiplier.cpp$(DependSuffix) -MM Multiplier.cpp -$(IntermediateDirectory)/ControlElementSolver.cpp$(PreprocessSuffix): ControlElementSolver.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlElementSolver.cpp$(PreprocessSuffix) ControlElementSolver.cpp +$(IntermediateDirectory)/Multiplier.cpp$(PreprocessSuffix): Multiplier.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Multiplier.cpp$(PreprocessSuffix) Multiplier.cpp -$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix): wxMathPlot/mathplot.cpp $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/wxMathPlot/mathplot.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix): wxMathPlot/mathplot.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(DependSuffix) -MM wxMathPlot/mathplot.cpp +$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix): RateLimiter.cpp $(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/RateLimiter.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix): RateLimiter.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/RateLimiter.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/RateLimiter.cpp$(DependSuffix) -MM RateLimiter.cpp -$(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(PreprocessSuffix): wxMathPlot/mathplot.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/wxMathPlot_mathplot.cpp$(PreprocessSuffix) wxMathPlot/mathplot.cpp +$(IntermediateDirectory)/RateLimiter.cpp$(PreprocessSuffix): RateLimiter.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/RateLimiter.cpp$(PreprocessSuffix) RateLimiter.cpp -$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix): BusForm.cpp $(IntermediateDirectory)/BusForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/BusForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/BusForm.cpp$(DependSuffix): BusForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/BusForm.cpp$(DependSuffix) -MM BusForm.cpp +$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix): Sum.cpp $(IntermediateDirectory)/Sum.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Sum.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Sum.cpp$(DependSuffix): Sum.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Sum.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Sum.cpp$(DependSuffix) -MM Sum.cpp -$(IntermediateDirectory)/BusForm.cpp$(PreprocessSuffix): BusForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/BusForm.cpp$(PreprocessSuffix) BusForm.cpp +$(IntermediateDirectory)/Sum.cpp$(PreprocessSuffix): Sum.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Sum.cpp$(PreprocessSuffix) Sum.cpp -$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix): GeneratorStabForm.cpp $(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GeneratorStabForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix): GeneratorStabForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix) -MM GeneratorStabForm.cpp +$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix): TransferFunction.cpp $(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransferFunction.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix): TransferFunction.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransferFunction.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransferFunction.cpp$(DependSuffix) -MM TransferFunction.cpp -$(IntermediateDirectory)/GeneratorStabForm.cpp$(PreprocessSuffix): GeneratorStabForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GeneratorStabForm.cpp$(PreprocessSuffix) GeneratorStabForm.cpp +$(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix): TransferFunction.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunction.cpp$(PreprocessSuffix) TransferFunction.cpp -$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix): LineForm.cpp $(IntermediateDirectory)/LineForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/LineForm.cpp$(DependSuffix): LineForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LineForm.cpp$(DependSuffix) -MM LineForm.cpp +$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix): GraphicalElement.cpp $(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GraphicalElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix): GraphicalElement.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GraphicalElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GraphicalElement.cpp$(DependSuffix) -MM GraphicalElement.cpp -$(IntermediateDirectory)/LineForm.cpp$(PreprocessSuffix): LineForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LineForm.cpp$(PreprocessSuffix) LineForm.cpp +$(IntermediateDirectory)/GraphicalElement.cpp$(PreprocessSuffix): GraphicalElement.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GraphicalElement.cpp$(PreprocessSuffix) GraphicalElement.cpp -$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix): SwitchingForm.cpp $(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SwitchingForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix): SwitchingForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix) -MM SwitchingForm.cpp +$(IntermediateDirectory)/Text.cpp$(ObjectSuffix): Text.cpp $(IntermediateDirectory)/Text.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Text.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Text.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Text.cpp$(DependSuffix): Text.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Text.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Text.cpp$(DependSuffix) -MM Text.cpp -$(IntermediateDirectory)/SwitchingForm.cpp$(PreprocessSuffix): SwitchingForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SwitchingForm.cpp$(PreprocessSuffix) SwitchingForm.cpp +$(IntermediateDirectory)/Text.cpp$(PreprocessSuffix): Text.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Text.cpp$(PreprocessSuffix) Text.cpp -$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix): TransformerForm.cpp $(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransformerForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix): TransformerForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix) -MM TransformerForm.cpp +$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix): Branch.cpp $(IntermediateDirectory)/Branch.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Branch.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Branch.cpp$(DependSuffix): Branch.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Branch.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Branch.cpp$(DependSuffix) -MM Branch.cpp -$(IntermediateDirectory)/TransformerForm.cpp$(PreprocessSuffix): TransformerForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransformerForm.cpp$(PreprocessSuffix) TransformerForm.cpp +$(IntermediateDirectory)/Branch.cpp$(PreprocessSuffix): Branch.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Branch.cpp$(PreprocessSuffix) Branch.cpp -$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix): LoadForm.cpp $(IntermediateDirectory)/LoadForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LoadForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/LoadForm.cpp$(DependSuffix): LoadForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LoadForm.cpp$(DependSuffix) -MM LoadForm.cpp +$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix): Bus.cpp $(IntermediateDirectory)/Bus.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Bus.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Bus.cpp$(DependSuffix): Bus.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Bus.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Bus.cpp$(DependSuffix) -MM Bus.cpp -$(IntermediateDirectory)/LoadForm.cpp$(PreprocessSuffix): LoadForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LoadForm.cpp$(PreprocessSuffix) LoadForm.cpp +$(IntermediateDirectory)/Bus.cpp$(PreprocessSuffix): Bus.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Bus.cpp$(PreprocessSuffix) Bus.cpp -$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix): ReactiveShuntElementForm.cpp $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ReactiveShuntElementForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix): ReactiveShuntElementForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix) -MM ReactiveShuntElementForm.cpp +$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix): Capacitor.cpp $(IntermediateDirectory)/Capacitor.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Capacitor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Capacitor.cpp$(DependSuffix): Capacitor.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Capacitor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Capacitor.cpp$(DependSuffix) -MM Capacitor.cpp -$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(PreprocessSuffix): ReactiveShuntElementForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(PreprocessSuffix) ReactiveShuntElementForm.cpp +$(IntermediateDirectory)/Capacitor.cpp$(PreprocessSuffix): Capacitor.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Capacitor.cpp$(PreprocessSuffix) Capacitor.cpp -$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix): IndMotorForm.cpp $(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IndMotorForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix): IndMotorForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix) -MM IndMotorForm.cpp +$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix): IndMotor.cpp $(IntermediateDirectory)/IndMotor.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IndMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/IndMotor.cpp$(DependSuffix): IndMotor.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IndMotor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IndMotor.cpp$(DependSuffix) -MM IndMotor.cpp -$(IntermediateDirectory)/IndMotorForm.cpp$(PreprocessSuffix): IndMotorForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IndMotorForm.cpp$(PreprocessSuffix) IndMotorForm.cpp +$(IntermediateDirectory)/IndMotor.cpp$(PreprocessSuffix): IndMotor.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IndMotor.cpp$(PreprocessSuffix) IndMotor.cpp -$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix): SyncMachineForm.cpp $(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncMachineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix): SyncMachineForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix) -MM SyncMachineForm.cpp +$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix): Inductor.cpp $(IntermediateDirectory)/Inductor.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Inductor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Inductor.cpp$(DependSuffix): Inductor.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Inductor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Inductor.cpp$(DependSuffix) -MM Inductor.cpp -$(IntermediateDirectory)/SyncMachineForm.cpp$(PreprocessSuffix): SyncMachineForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncMachineForm.cpp$(PreprocessSuffix) SyncMachineForm.cpp +$(IntermediateDirectory)/Inductor.cpp$(PreprocessSuffix): Inductor.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Inductor.cpp$(PreprocessSuffix) Inductor.cpp -$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix): TextForm.cpp $(IntermediateDirectory)/TextForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TextForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/TextForm.cpp$(DependSuffix): TextForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TextForm.cpp$(DependSuffix) -MM TextForm.cpp +$(IntermediateDirectory)/Line.cpp$(ObjectSuffix): Line.cpp $(IntermediateDirectory)/Line.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Line.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Line.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Line.cpp$(DependSuffix): Line.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Line.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Line.cpp$(DependSuffix) -MM Line.cpp -$(IntermediateDirectory)/TextForm.cpp$(PreprocessSuffix): TextForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TextForm.cpp$(PreprocessSuffix) TextForm.cpp +$(IntermediateDirectory)/Line.cpp$(PreprocessSuffix): Line.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Line.cpp$(PreprocessSuffix) Line.cpp -$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix): TransferFunctionForm.cpp $(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransferFunctionForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix): TransferFunctionForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix) -MM TransferFunctionForm.cpp +$(IntermediateDirectory)/Load.cpp$(ObjectSuffix): Load.cpp $(IntermediateDirectory)/Load.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Load.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Load.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Load.cpp$(DependSuffix): Load.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Load.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Load.cpp$(DependSuffix) -MM Load.cpp -$(IntermediateDirectory)/TransferFunctionForm.cpp$(PreprocessSuffix): TransferFunctionForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunctionForm.cpp$(PreprocessSuffix) TransferFunctionForm.cpp +$(IntermediateDirectory)/Load.cpp$(PreprocessSuffix): Load.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Load.cpp$(PreprocessSuffix) Load.cpp -$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix): SumForm.cpp $(IntermediateDirectory)/SumForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SumForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/SumForm.cpp$(DependSuffix): SumForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SumForm.cpp$(DependSuffix) -MM SumForm.cpp +$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix): Machines.cpp $(IntermediateDirectory)/Machines.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Machines.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Machines.cpp$(DependSuffix): Machines.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Machines.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Machines.cpp$(DependSuffix) -MM Machines.cpp -$(IntermediateDirectory)/SumForm.cpp$(PreprocessSuffix): SumForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SumForm.cpp$(PreprocessSuffix) SumForm.cpp +$(IntermediateDirectory)/Machines.cpp$(PreprocessSuffix): Machines.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Machines.cpp$(PreprocessSuffix) Machines.cpp -$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix): LimiterForm.cpp $(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LimiterForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix): LimiterForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix) -MM LimiterForm.cpp +$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix): PowerElement.cpp $(IntermediateDirectory)/PowerElement.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/PowerElement.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/PowerElement.cpp$(DependSuffix): PowerElement.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/PowerElement.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/PowerElement.cpp$(DependSuffix) -MM PowerElement.cpp -$(IntermediateDirectory)/LimiterForm.cpp$(PreprocessSuffix): LimiterForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LimiterForm.cpp$(PreprocessSuffix) LimiterForm.cpp +$(IntermediateDirectory)/PowerElement.cpp$(PreprocessSuffix): PowerElement.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/PowerElement.cpp$(PreprocessSuffix) PowerElement.cpp -$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix): RateLimiterForm.cpp $(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/RateLimiterForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix): RateLimiterForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix) -MM RateLimiterForm.cpp +$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix): Shunt.cpp $(IntermediateDirectory)/Shunt.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Shunt.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Shunt.cpp$(DependSuffix): Shunt.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Shunt.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Shunt.cpp$(DependSuffix) -MM Shunt.cpp -$(IntermediateDirectory)/RateLimiterForm.cpp$(PreprocessSuffix): RateLimiterForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/RateLimiterForm.cpp$(PreprocessSuffix) RateLimiterForm.cpp +$(IntermediateDirectory)/Shunt.cpp$(PreprocessSuffix): Shunt.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Shunt.cpp$(PreprocessSuffix) Shunt.cpp -$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix): ExponentialForm.cpp $(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ExponentialForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix): ExponentialForm.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix) -MM ExponentialForm.cpp +$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix): SyncGenerator.cpp $(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncGenerator.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix): SyncGenerator.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncGenerator.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncGenerator.cpp$(DependSuffix) -MM SyncGenerator.cpp -$(IntermediateDirectory)/ExponentialForm.cpp$(PreprocessSuffix): ExponentialForm.cpp - $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ExponentialForm.cpp$(PreprocessSuffix) ExponentialForm.cpp +$(IntermediateDirectory)/SyncGenerator.cpp$(PreprocessSuffix): SyncGenerator.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncGenerator.cpp$(PreprocessSuffix) SyncGenerator.cpp + +$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix): SyncMotor.cpp $(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncMotor.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix): SyncMotor.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncMotor.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncMotor.cpp$(DependSuffix) -MM SyncMotor.cpp + +$(IntermediateDirectory)/SyncMotor.cpp$(PreprocessSuffix): SyncMotor.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncMotor.cpp$(PreprocessSuffix) SyncMotor.cpp + +$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix): Transformer.cpp $(IntermediateDirectory)/Transformer.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/Transformer.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/Transformer.cpp$(DependSuffix): Transformer.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/Transformer.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/Transformer.cpp$(DependSuffix) -MM Transformer.cpp + +$(IntermediateDirectory)/Transformer.cpp$(PreprocessSuffix): Transformer.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/Transformer.cpp$(PreprocessSuffix) Transformer.cpp + +$(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix): GeneralPropertiesForm.cpp $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GeneralPropertiesForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/GeneralPropertiesForm.cpp$(DependSuffix): GeneralPropertiesForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GeneralPropertiesForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GeneralPropertiesForm.cpp$(DependSuffix) -MM GeneralPropertiesForm.cpp + +$(IntermediateDirectory)/GeneralPropertiesForm.cpp$(PreprocessSuffix): GeneralPropertiesForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GeneralPropertiesForm.cpp$(PreprocessSuffix) GeneralPropertiesForm.cpp + +$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix): SimulationsSettingsForm.cpp $(IntermediateDirectory)/SimulationsSettingsForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SimulationsSettingsForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(DependSuffix): SimulationsSettingsForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(DependSuffix) -MM SimulationsSettingsForm.cpp + +$(IntermediateDirectory)/SimulationsSettingsForm.cpp$(PreprocessSuffix): SimulationsSettingsForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SimulationsSettingsForm.cpp$(PreprocessSuffix) SimulationsSettingsForm.cpp $(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix): ConstantForm.cpp $(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix) $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ConstantForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ConstantForm.cpp$(ObjectSuffix) $(IncludePath) @@ -672,6 +604,22 @@ $(IntermediateDirectory)/ConstantForm.cpp$(DependSuffix): ConstantForm.cpp $(IntermediateDirectory)/ConstantForm.cpp$(PreprocessSuffix): ConstantForm.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ConstantForm.cpp$(PreprocessSuffix) ConstantForm.cpp +$(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix): ControlSystemTest.cpp $(IntermediateDirectory)/ControlSystemTest.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ControlSystemTest.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ControlSystemTest.cpp$(DependSuffix): ControlSystemTest.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ControlSystemTest.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ControlSystemTest.cpp$(DependSuffix) -MM ControlSystemTest.cpp + +$(IntermediateDirectory)/ControlSystemTest.cpp$(PreprocessSuffix): ControlSystemTest.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ControlSystemTest.cpp$(PreprocessSuffix) ControlSystemTest.cpp + +$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix): ExponentialForm.cpp $(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ExponentialForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix): ExponentialForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ExponentialForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ExponentialForm.cpp$(DependSuffix) -MM ExponentialForm.cpp + +$(IntermediateDirectory)/ExponentialForm.cpp$(PreprocessSuffix): ExponentialForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ExponentialForm.cpp$(PreprocessSuffix) ExponentialForm.cpp + $(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix): GainForm.cpp $(IntermediateDirectory)/GainForm.cpp$(DependSuffix) $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GainForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GainForm.cpp$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/GainForm.cpp$(DependSuffix): GainForm.cpp @@ -688,6 +636,118 @@ $(IntermediateDirectory)/IOControlForm.cpp$(DependSuffix): IOControlForm.cpp $(IntermediateDirectory)/IOControlForm.cpp$(PreprocessSuffix): IOControlForm.cpp $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IOControlForm.cpp$(PreprocessSuffix) IOControlForm.cpp +$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix): LimiterForm.cpp $(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LimiterForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix): LimiterForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LimiterForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LimiterForm.cpp$(DependSuffix) -MM LimiterForm.cpp + +$(IntermediateDirectory)/LimiterForm.cpp$(PreprocessSuffix): LimiterForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LimiterForm.cpp$(PreprocessSuffix) LimiterForm.cpp + +$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix): RateLimiterForm.cpp $(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/RateLimiterForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix): RateLimiterForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/RateLimiterForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/RateLimiterForm.cpp$(DependSuffix) -MM RateLimiterForm.cpp + +$(IntermediateDirectory)/RateLimiterForm.cpp$(PreprocessSuffix): RateLimiterForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/RateLimiterForm.cpp$(PreprocessSuffix) RateLimiterForm.cpp + +$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix): SumForm.cpp $(IntermediateDirectory)/SumForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SumForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/SumForm.cpp$(DependSuffix): SumForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SumForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SumForm.cpp$(DependSuffix) -MM SumForm.cpp + +$(IntermediateDirectory)/SumForm.cpp$(PreprocessSuffix): SumForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SumForm.cpp$(PreprocessSuffix) SumForm.cpp + +$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix): TransferFunctionForm.cpp $(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransferFunctionForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix): TransferFunctionForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransferFunctionForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransferFunctionForm.cpp$(DependSuffix) -MM TransferFunctionForm.cpp + +$(IntermediateDirectory)/TransferFunctionForm.cpp$(PreprocessSuffix): TransferFunctionForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransferFunctionForm.cpp$(PreprocessSuffix) TransferFunctionForm.cpp + +$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix): TextForm.cpp $(IntermediateDirectory)/TextForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TextForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/TextForm.cpp$(DependSuffix): TextForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TextForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TextForm.cpp$(DependSuffix) -MM TextForm.cpp + +$(IntermediateDirectory)/TextForm.cpp$(PreprocessSuffix): TextForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TextForm.cpp$(PreprocessSuffix) TextForm.cpp + +$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix): BusForm.cpp $(IntermediateDirectory)/BusForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/BusForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/BusForm.cpp$(DependSuffix): BusForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/BusForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/BusForm.cpp$(DependSuffix) -MM BusForm.cpp + +$(IntermediateDirectory)/BusForm.cpp$(PreprocessSuffix): BusForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/BusForm.cpp$(PreprocessSuffix) BusForm.cpp + +$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix): GeneratorStabForm.cpp $(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/GeneratorStabForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix): GeneratorStabForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/GeneratorStabForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/GeneratorStabForm.cpp$(DependSuffix) -MM GeneratorStabForm.cpp + +$(IntermediateDirectory)/GeneratorStabForm.cpp$(PreprocessSuffix): GeneratorStabForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/GeneratorStabForm.cpp$(PreprocessSuffix) GeneratorStabForm.cpp + +$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix): IndMotorForm.cpp $(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/IndMotorForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix): IndMotorForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/IndMotorForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/IndMotorForm.cpp$(DependSuffix) -MM IndMotorForm.cpp + +$(IntermediateDirectory)/IndMotorForm.cpp$(PreprocessSuffix): IndMotorForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/IndMotorForm.cpp$(PreprocessSuffix) IndMotorForm.cpp + +$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix): LineForm.cpp $(IntermediateDirectory)/LineForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/LineForm.cpp$(DependSuffix): LineForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LineForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LineForm.cpp$(DependSuffix) -MM LineForm.cpp + +$(IntermediateDirectory)/LineForm.cpp$(PreprocessSuffix): LineForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LineForm.cpp$(PreprocessSuffix) LineForm.cpp + +$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix): LoadForm.cpp $(IntermediateDirectory)/LoadForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/LoadForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/LoadForm.cpp$(DependSuffix): LoadForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/LoadForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/LoadForm.cpp$(DependSuffix) -MM LoadForm.cpp + +$(IntermediateDirectory)/LoadForm.cpp$(PreprocessSuffix): LoadForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/LoadForm.cpp$(PreprocessSuffix) LoadForm.cpp + +$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix): ReactiveShuntElementForm.cpp $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/ReactiveShuntElementForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix): ReactiveShuntElementForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(DependSuffix) -MM ReactiveShuntElementForm.cpp + +$(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(PreprocessSuffix): ReactiveShuntElementForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/ReactiveShuntElementForm.cpp$(PreprocessSuffix) ReactiveShuntElementForm.cpp + +$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix): SwitchingForm.cpp $(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SwitchingForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix): SwitchingForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SwitchingForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SwitchingForm.cpp$(DependSuffix) -MM SwitchingForm.cpp + +$(IntermediateDirectory)/SwitchingForm.cpp$(PreprocessSuffix): SwitchingForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SwitchingForm.cpp$(PreprocessSuffix) SwitchingForm.cpp + +$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix): SyncMachineForm.cpp $(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/SyncMachineForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix): SyncMachineForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/SyncMachineForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/SyncMachineForm.cpp$(DependSuffix) -MM SyncMachineForm.cpp + +$(IntermediateDirectory)/SyncMachineForm.cpp$(PreprocessSuffix): SyncMachineForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/SyncMachineForm.cpp$(PreprocessSuffix) SyncMachineForm.cpp + +$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix): TransformerForm.cpp $(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/Users/NDSE-69/Documents/GitHub/PSP/Project/TransformerForm.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix): TransformerForm.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/TransformerForm.cpp$(ObjectSuffix) -MF$(IntermediateDirectory)/TransformerForm.cpp$(DependSuffix) -MM TransformerForm.cpp + +$(IntermediateDirectory)/TransformerForm.cpp$(PreprocessSuffix): TransformerForm.cpp + $(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/TransformerForm.cpp$(PreprocessSuffix) TransformerForm.cpp + -include $(IntermediateDirectory)/*$(DependSuffix) ## diff --git a/Project/Project.project b/Project/Project.project index 752ee00..a65be5b 100644 --- a/Project/Project.project +++ b/Project/Project.project @@ -10,48 +10,52 @@ <Dependencies/> <VirtualDirectory Name="src"> <VirtualDirectory Name="model"> - <VirtualDirectory Name="power element"> - <File Name="Bus.cpp"/> - <File Name="Line.cpp"/> - <File Name="Transformer.cpp"/> - <File Name="Machines.cpp"/> - <File Name="SyncGenerator.cpp"/> - <File Name="IndMotor.cpp"/> - <File Name="Branch.cpp"/> - <File Name="SyncMotor.cpp"/> - <File Name="Shunt.cpp"/> - <File Name="Load.cpp"/> - <File Name="Inductor.cpp"/> - <File Name="Capacitor.cpp"/> - <File Name="PowerElement.cpp"/> - </VirtualDirectory> - <VirtualDirectory Name="calculations"> + <VirtualDirectory Name="simulation"> <File Name="ElectricCalculation.cpp"/> <File Name="PowerFlow.cpp"/> <File Name="Fault.cpp"/> + <File Name="Electromechanical.cpp"/> </VirtualDirectory> - <File Name="ElementDataObject.cpp"/> - <VirtualDirectory Name="graphical element"> - <File Name="Text.cpp"/> - <File Name="GraphicalElement.cpp"/> - </VirtualDirectory> - <File Name="Element.cpp"/> - <VirtualDirectory Name="control element"> - <File Name="ControlElement.cpp"/> - <File Name="TransferFunction.cpp"/> - <File Name="ConnectionLine.cpp"/> - <File Name="Sum.cpp"/> - <File Name="Multiplier.cpp"/> - <File Name="Limiter.cpp"/> - <File Name="RateLimiter.cpp"/> - <File Name="Exponential.cpp"/> - <File Name="Constant.cpp"/> - <File Name="Gain.cpp"/> - <File Name="IOControl.cpp"/> - <File Name="ControlElementContainer.cpp"/> - <File Name="ControlElementSolver.cpp"/> + <VirtualDirectory Name="element"> + <File Name="Element.cpp"/> + <File Name="ElementDataObject.cpp"/> + <File Name="ElementPlotData.cpp"/> + <VirtualDirectory Name="control"> + <File Name="ConnectionLine.cpp"/> + <File Name="Constant.cpp"/> + <File Name="ControlElement.cpp"/> + <File Name="ControlElementContainer.cpp"/> + <File Name="ControlElementSolver.cpp"/> + <File Name="Exponential.cpp"/> + <File Name="Gain.cpp"/> + <File Name="IOControl.cpp"/> + <File Name="Limiter.cpp"/> + <File Name="Multiplier.cpp"/> + <File Name="RateLimiter.cpp"/> + <File Name="Sum.cpp"/> + <File Name="TransferFunction.cpp"/> + </VirtualDirectory> + <VirtualDirectory Name="graphical"> + <File Name="GraphicalElement.cpp"/> + <File Name="Text.cpp"/> + </VirtualDirectory> + <VirtualDirectory Name="power"> + <File Name="Branch.cpp"/> + <File Name="Bus.cpp"/> + <File Name="Capacitor.cpp"/> + <File Name="IndMotor.cpp"/> + <File Name="Inductor.cpp"/> + <File Name="Line.cpp"/> + <File Name="Load.cpp"/> + <File Name="Machines.cpp"/> + <File Name="PowerElement.cpp"/> + <File Name="Shunt.cpp"/> + <File Name="SyncGenerator.cpp"/> + <File Name="SyncMotor.cpp"/> + <File Name="Transformer.cpp"/> + </VirtualDirectory> </VirtualDirectory> - <File Name="ElementPlotData.cpp"/> + <File Name="PropertiesData.cpp"/> </VirtualDirectory> <VirtualDirectory Name="view"> <File Name="ArtMetro.cpp"/> @@ -61,60 +65,59 @@ </VirtualDirectory> </VirtualDirectory> <VirtualDirectory Name="controller"> - <File Name="MainFrame.cpp"/> - <File Name="Workspace.cpp"/> - <VirtualDirectory Name="power element form"> - <File Name="BusForm.cpp"/> - <File Name="GeneratorStabForm.cpp"/> - <File Name="LineForm.cpp"/> - <File Name="SwitchingForm.cpp"/> - <File Name="TransformerForm.cpp"/> - <File Name="LoadForm.cpp"/> - <File Name="ReactiveShuntElementForm.cpp"/> - <File Name="IndMotorForm.cpp"/> - <File Name="SyncMachineForm.cpp"/> + <VirtualDirectory Name="forms"> + <VirtualDirectory Name="properties"> + <File Name="GeneralPropertiesForm.cpp"/> + <File Name="SimulationsSettingsForm.cpp"/> + </VirtualDirectory> + <VirtualDirectory Name="control element"> + <File Name="ConstantForm.cpp"/> + <File Name="ControlSystemTest.cpp"/> + <File Name="ExponentialForm.cpp"/> + <File Name="GainForm.cpp"/> + <File Name="IOControlForm.cpp"/> + <File Name="LimiterForm.cpp"/> + <File Name="RateLimiterForm.cpp"/> + <File Name="SumForm.cpp"/> + <File Name="TransferFunctionForm.cpp"/> + </VirtualDirectory> + <VirtualDirectory Name="graphical element"> + <File Name="TextForm.cpp"/> + </VirtualDirectory> + <VirtualDirectory Name="power element"> + <File Name="BusForm.cpp"/> + <File Name="GeneratorStabForm.cpp"/> + <File Name="IndMotorForm.cpp"/> + <File Name="LineForm.cpp"/> + <File Name="LoadForm.cpp"/> + <File Name="ReactiveShuntElementForm.cpp"/> + <File Name="SwitchingForm.cpp"/> + <File Name="SyncMachineForm.cpp"/> + <File Name="TransformerForm.cpp"/> + </VirtualDirectory> + </VirtualDirectory> + <VirtualDirectory Name="main GUI"> + <File Name="Camera.cpp"/> + <File Name="MainFrame.cpp"/> + <File Name="Workspace.cpp"/> </VirtualDirectory> - <File Name="FileHanding.cpp"/> - <VirtualDirectory Name="graphical element form"> - <File Name="TextForm.cpp"/> + <VirtualDirectory Name="simulation GUI"> + <File Name="ChartView.cpp"/> + <File Name="ControlEditor.cpp"/> </VirtualDirectory> - <File Name="ControlEditor.cpp"/> - <File Name="Camera.cpp"/> - <VirtualDirectory Name="control element form"> - <File Name="TransferFunctionForm.cpp"/> - <File Name="SumForm.cpp"/> - <File Name="LimiterForm.cpp"/> - <File Name="RateLimiterForm.cpp"/> - <File Name="ExponentialForm.cpp"/> - <File Name="ConstantForm.cpp"/> - <File Name="GainForm.cpp"/> - <File Name="IOControlForm.cpp"/> + <VirtualDirectory Name="files"> + <File Name="FileHanding.cpp"/> </VirtualDirectory> - <File Name="ChartView.cpp"/> </VirtualDirectory> <File Name="main.cpp"/> </VirtualDirectory> <VirtualDirectory Name="include"> <VirtualDirectory Name="model"> - <VirtualDirectory Name="power element"> - <File Name="Bus.h"/> - <File Name="Line.h"/> - <File Name="Transformer.h"/> - <File Name="Machines.h"/> - <File Name="SyncGenerator.h"/> - <File Name="IndMotor.h"/> - <File Name="Branch.h"/> - <File Name="SyncMotor.h"/> - <File Name="Shunt.h"/> - <File Name="Load.h"/> - <File Name="Inductor.h"/> - <File Name="Capacitor.h"/> - <File Name="PowerElement.h"/> - </VirtualDirectory> - <VirtualDirectory Name="calculations"> + <VirtualDirectory Name="simulation"> <File Name="ElectricCalculation.h"/> <File Name="PowerFlow.h"/> <File Name="Fault.h"/> + <File Name="Electromechanical.h"/> </VirtualDirectory> <VirtualDirectory Name="rapidXML"> <File Name="rapidXML/rapidxml.hpp"/> @@ -122,28 +125,46 @@ <File Name="rapidXML/rapidxml_print.hpp"/> <File Name="rapidXML/rapidxml_utils.hpp"/> </VirtualDirectory> - <File Name="ElementDataObject.h"/> - <File Name="Element.h"/> - <VirtualDirectory Name="graphical element"> - <File Name="Text.h"/> - <File Name="GraphicalElement.h"/> - </VirtualDirectory> - <VirtualDirectory Name="control element"> - <File Name="ControlElement.h"/> - <File Name="TransferFunction.h"/> - <File Name="ConnectionLine.h"/> - <File Name="Sum.h"/> - <File Name="Multiplier.h"/> - <File Name="Limiter.h"/> - <File Name="RateLimiter.h"/> - <File Name="Exponential.h"/> - <File Name="Constant.h"/> - <File Name="Gain.h"/> - <File Name="IOControl.h"/> - <File Name="ControlElementContainer.h"/> - <File Name="ControlElementSolver.h"/> + <VirtualDirectory Name="element"> + <File Name="Element.h"/> + <File Name="ElementDataObject.h"/> + <File Name="ElementPlotData.h"/> + <VirtualDirectory Name="graphical"> + <File Name="GraphicalElement.h"/> + <File Name="Text.h"/> + </VirtualDirectory> + <VirtualDirectory Name="control"> + <File Name="ConnectionLine.h"/> + <File Name="Constant.h"/> + <File Name="ControlElement.h"/> + <File Name="ControlElementContainer.h"/> + <File Name="ControlElementSolver.h"/> + <File Name="Exponential.h"/> + <File Name="Gain.h"/> + <File Name="IOControl.h"/> + <File Name="Limiter.h"/> + <File Name="Multiplier.h"/> + <File Name="RateLimiter.h"/> + <File Name="Sum.h"/> + <File Name="TransferFunction.h"/> + </VirtualDirectory> + <VirtualDirectory Name="power"> + <File Name="Branch.h"/> + <File Name="Bus.h"/> + <File Name="Capacitor.h"/> + <File Name="IndMotor.h"/> + <File Name="Inductor.h"/> + <File Name="Line.h"/> + <File Name="Load.h"/> + <File Name="Machines.h"/> + <File Name="PowerElement.h"/> + <File Name="Shunt.h"/> + <File Name="SyncGenerator.h"/> + <File Name="SyncMotor.h"/> + <File Name="Transformer.h"/> + </VirtualDirectory> </VirtualDirectory> - <File Name="ElementPlotData.h"/> + <File Name="PropertiesData.h"/> </VirtualDirectory> <VirtualDirectory Name="view"> <File Name="ArtMetro.h"/> @@ -153,36 +174,49 @@ </VirtualDirectory> </VirtualDirectory> <VirtualDirectory Name="controller"> - <File Name="MainFrame.h"/> - <File Name="Workspace.h"/> - <VirtualDirectory Name="power element form"> - <File Name="BusForm.h"/> - <File Name="GeneratorStabForm.h"/> - <File Name="LineForm.h"/> - <File Name="SwitchingForm.h"/> - <File Name="TransformerForm.h"/> - <File Name="LoadForm.h"/> - <File Name="ReactiveShuntElementForm.h"/> - <File Name="IndMotorForm.h"/> - <File Name="SyncMachineForm.h"/> + <VirtualDirectory Name="files"> + <File Name="FileHanding.h"/> + </VirtualDirectory> + <VirtualDirectory Name="forms"> + <VirtualDirectory Name="control"> + <File Name="ConstantForm.h"/> + <File Name="ControlSystemTest.h"/> + <File Name="ExponentialForm.h"/> + <File Name="GainForm.h"/> + <File Name="IOControlForm.h"/> + <File Name="LimiterForm.h"/> + <File Name="RateLimiterForm.h"/> + <File Name="SumForm.h"/> + <File Name="TransferFunctionForm.h"/> + </VirtualDirectory> + <VirtualDirectory Name="graphical"> + <File Name="TextForm.h"/> + </VirtualDirectory> + <VirtualDirectory Name="power"> + <File Name="BusForm.h"/> + <File Name="GeneratorStabForm.h"/> + <File Name="IndMotorForm.h"/> + <File Name="LineForm.h"/> + <File Name="LoadForm.h"/> + <File Name="ReactiveShuntElementForm.h"/> + <File Name="SwitchingForm.h"/> + <File Name="SyncMachineForm.h"/> + <File Name="TransformerForm.h"/> + </VirtualDirectory> + <VirtualDirectory Name="properties"> + <File Name="GeneralPropertiesForm.h"/> + <File Name="SimulationsSettingsForm.h"/> + </VirtualDirectory> </VirtualDirectory> - <File Name="FileHanding.h"/> - <VirtualDirectory Name="graphical element form"> - <File Name="TextForm.h"/> + <VirtualDirectory Name="main GUI"> + <File Name="Camera.h"/> + <File Name="MainFrame.h"/> + <File Name="Workspace.h"/> </VirtualDirectory> - <File Name="ControlEditor.h"/> - <File Name="Camera.h"/> - <VirtualDirectory Name="control element form"> - <File Name="TransferFunctionForm.h"/> - <File Name="SumForm.h"/> - <File Name="LimiterForm.h"/> - <File Name="RateLimiterForm.h"/> - <File Name="ExponentialForm.h"/> - <File Name="ConstantForm.h"/> - <File Name="GainForm.h"/> - <File Name="IOControlForm.h"/> + <VirtualDirectory Name="simulation GUI"> + <File Name="ChartView.h"/> + <File Name="ControlEditor.h"/> </VirtualDirectory> - <File Name="ChartView.h"/> </VirtualDirectory> </VirtualDirectory> <VirtualDirectory Name="resources"> @@ -196,6 +230,7 @@ <File Name="ElementFormBitmaps.cpp"/> <File Name="ControlEditorBitmaps.cpp"/> <File Name="ChartViewBitmaps.cpp"/> + <File Name="PropertiesFormBitmaps.cpp"/> </VirtualDirectory> <VirtualDirectory Name="base"> <File Name="MainFrameBase.h"/> @@ -208,12 +243,15 @@ <File Name="ControlEditorBase.cpp"/> <File Name="ChartViewBase.h"/> <File Name="ChartViewBase.cpp"/> + <File Name="PropertiesForm.h"/> + <File Name="PropertiesForm.cpp"/> </VirtualDirectory> <File Name="MainFrame.wxcp"/> <File Name="Workspace.wxcp"/> <File Name="ElementForm.wxcp"/> <File Name="ControlEditor.wxcp"/> <File Name="ChartView.wxcp"/> + <File Name="PropertiesForm.wxcp"/> </VirtualDirectory> <Settings Type="Executable"> <GlobalSettings> @@ -265,7 +303,7 @@ <SearchPaths/> </Completion> </Configuration> - <Configuration Name="Release" CompilerType="MinGW ( TDM-GCC-32 )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append"> + <Configuration Name="Release" CompilerType="MinGW ( TDM-GCC-64 )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append"> <Compiler Options="-O2;-Wall;$(shell wx-config --cflags)" C_Options="-O2;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0"> <IncludePath Value="."/> <Preprocessor Value="NDEBUG"/> diff --git a/Project/Project.txt b/Project/Project.txt index 65a2851..6a3e440 100644 --- a/Project/Project.txt +++ b/Project/Project.txt @@ -1 +1,2 @@ -./Release/main.cpp.o ./Release/win_resources.rc.o ./Release/ElementDataObject.cpp.o ./Release/Element.cpp.o ./Release/ElementPlotData.cpp.o ./Release/ArtMetro.cpp.o ./Release/wxGLString.cpp.o ./Release/MainFrame.cpp.o ./Release/Workspace.cpp.o ./Release/FileHanding.cpp.o ./Release/ControlEditor.cpp.o ./Release/Camera.cpp.o ./Release/ChartView.cpp.o ./Release/MainFrameBitmaps.cpp.o ./Release/WorkspaceBitmaps.cpp.o ./Release/BusFormBitmaps.cpp.o ./Release/ElementFormBitmaps.cpp.o ./Release/ControlEditorBitmaps.cpp.o ./Release/ChartViewBitmaps.cpp.o ./Release/MainFrameBase.cpp.o ./Release/WorkspaceBase.cpp.o ./Release/ElementForm.cpp.o ./Release/ControlEditorBase.cpp.o ./Release/ChartViewBase.cpp.o ./Release/Bus.cpp.o ./Release/Line.cpp.o ./Release/Transformer.cpp.o ./Release/Machines.cpp.o ./Release/SyncGenerator.cpp.o ./Release/IndMotor.cpp.o ./Release/Branch.cpp.o ./Release/SyncMotor.cpp.o ./Release/Shunt.cpp.o ./Release/Load.cpp.o ./Release/Inductor.cpp.o ./Release/Capacitor.cpp.o ./Release/PowerElement.cpp.o ./Release/ElectricCalculation.cpp.o ./Release/PowerFlow.cpp.o ./Release/Fault.cpp.o ./Release/Text.cpp.o ./Release/GraphicalElement.cpp.o ./Release/ControlElement.cpp.o ./Release/TransferFunction.cpp.o ./Release/ConnectionLine.cpp.o ./Release/Sum.cpp.o ./Release/Multiplier.cpp.o ./Release/Limiter.cpp.o ./Release/RateLimiter.cpp.o ./Release/Exponential.cpp.o ./Release/Constant.cpp.o ./Release/Gain.cpp.o ./Release/IOControl.cpp.o ./Release/ControlElementContainer.cpp.o ./Release/ControlElementSolver.cpp.o ./Release/wxMathPlot_mathplot.cpp.o ./Release/BusForm.cpp.o ./Release/GeneratorStabForm.cpp.o ./Release/LineForm.cpp.o ./Release/SwitchingForm.cpp.o ./Release/TransformerForm.cpp.o ./Release/LoadForm.cpp.o ./Release/ReactiveShuntElementForm.cpp.o ./Release/IndMotorForm.cpp.o ./Release/SyncMachineForm.cpp.o ./Release/TextForm.cpp.o ./Release/TransferFunctionForm.cpp.o ./Release/SumForm.cpp.o ./Release/LimiterForm.cpp.o ./Release/RateLimiterForm.cpp.o ./Release/ExponentialForm.cpp.o ./Release/ConstantForm.cpp.o ./Release/GainForm.cpp.o ./Release/IOControlForm.cpp.o +./Release/main.cpp.o ./Release/win_resources.rc.o ./Release/PropertiesData.cpp.o ./Release/ArtMetro.cpp.o ./Release/wxGLString.cpp.o ./Release/MainFrameBitmaps.cpp.o ./Release/WorkspaceBitmaps.cpp.o ./Release/BusFormBitmaps.cpp.o ./Release/ElementFormBitmaps.cpp.o ./Release/ControlEditorBitmaps.cpp.o ./Release/ChartViewBitmaps.cpp.o ./Release/PropertiesFormBitmaps.cpp.o ./Release/MainFrameBase.cpp.o ./Release/WorkspaceBase.cpp.o ./Release/ElementForm.cpp.o ./Release/ControlEditorBase.cpp.o ./Release/ChartViewBase.cpp.o ./Release/PropertiesForm.cpp.o ./Release/ElectricCalculation.cpp.o ./Release/PowerFlow.cpp.o ./Release/Fault.cpp.o ./Release/Electromechanical.cpp.o ./Release/Element.cpp.o ./Release/ElementDataObject.cpp.o ./Release/ElementPlotData.cpp.o ./Release/wxMathPlot_mathplot.cpp.o ./Release/Camera.cpp.o ./Release/MainFrame.cpp.o ./Release/Workspace.cpp.o ./Release/ChartView.cpp.o ./Release/ControlEditor.cpp.o ./Release/FileHanding.cpp.o ./Release/ConnectionLine.cpp.o ./Release/Constant.cpp.o ./Release/ControlElement.cpp.o ./Release/ControlElementContainer.cpp.o ./Release/ControlElementSolver.cpp.o ./Release/Exponential.cpp.o ./Release/Gain.cpp.o ./Release/IOControl.cpp.o ./Release/Limiter.cpp.o ./Release/Multiplier.cpp.o ./Release/RateLimiter.cpp.o ./Release/Sum.cpp.o ./Release/TransferFunction.cpp.o ./Release/GraphicalElement.cpp.o ./Release/Text.cpp.o ./Release/Branch.cpp.o ./Release/Bus.cpp.o ./Release/Capacitor.cpp.o ./Release/IndMotor.cpp.o ./Release/Inductor.cpp.o ./Release/Line.cpp.o ./Release/Load.cpp.o ./Release/Machines.cpp.o ./Release/PowerElement.cpp.o ./Release/Shunt.cpp.o ./Release/SyncGenerator.cpp.o ./Release/SyncMotor.cpp.o ./Release/Transformer.cpp.o ./Release/GeneralPropertiesForm.cpp.o ./Release/SimulationsSettingsForm.cpp.o ./Release/ConstantForm.cpp.o ./Release/ControlSystemTest.cpp.o ./Release/ExponentialForm.cpp.o ./Release/GainForm.cpp.o ./Release/IOControlForm.cpp.o +./Release/LimiterForm.cpp.o ./Release/RateLimiterForm.cpp.o ./Release/SumForm.cpp.o ./Release/TransferFunctionForm.cpp.o ./Release/TextForm.cpp.o ./Release/BusForm.cpp.o ./Release/GeneratorStabForm.cpp.o ./Release/IndMotorForm.cpp.o ./Release/LineForm.cpp.o ./Release/LoadForm.cpp.o ./Release/ReactiveShuntElementForm.cpp.o ./Release/SwitchingForm.cpp.o ./Release/SyncMachineForm.cpp.o ./Release/TransformerForm.cpp.o diff --git a/Project/PropertiesData.cpp b/Project/PropertiesData.cpp new file mode 100644 index 0000000..a9a57c4 --- /dev/null +++ b/Project/PropertiesData.cpp @@ -0,0 +1,10 @@ +#include "PropertiesData.h" + +PropertiesData::PropertiesData() +{ +} + +PropertiesData::~PropertiesData() +{ +} + diff --git a/Project/PropertiesData.h b/Project/PropertiesData.h new file mode 100644 index 0000000..634e60e --- /dev/null +++ b/Project/PropertiesData.h @@ -0,0 +1,55 @@ +#ifndef PROPERTIESDATA_H +#define PROPERTIESDATA_H + +#include "wx/language.h" +#include "Element.h" +#include "PowerElement.h" + +enum PowerFlowMethod { GAUSS_SEIDEL = 0, NEWTON_RAPHSON }; +enum GUITheme { THEME_LIGHT = 0, THEME_DARK }; + +struct SimulationData { + // General simulation data + double basePower = 100.0; + ElectricalUnit basePowerUnit = UNIT_MVA; + bool faultAfterPowerFlow = true; + bool scPowerAfterPowerFlow = true; + + // Power flow + PowerFlowMethod powerFlowMethod = GAUSS_SEIDEL; + double accFator = 1.0; + double powerFlowTolerance = 1e-7; + int powerFlowMaxIterations = 5000; + + // Stability + double stabilityFrequency = 60.0; + double timeStep = 1e-2; + double stabilitySimulationTime = 10.0; + double stabilityTolerance = 1e-8; + int stabilityMaxIterations = 100; + int controlTimeStepRatio = 10; + double plotTime = 1e-2; + bool useCOI = true; +}; + +struct GeneralData { + wxLanguage language = wxLANGUAGE_ENGLISH; + GUITheme theme = THEME_LIGHT; +}; + +class PropertiesData +{ + public: + PropertiesData(); + ~PropertiesData(); + + SimulationData GetSimulationPropertiesData() const { return m_simulData; } + void SetSimulationPropertiesData(SimulationData simulationData) { m_simulData = simulationData; } + GeneralData GetGeneralPropertiesData() const { return m_genData; } + void SetGeneralPropertiesData(GeneralData generalData) { m_genData = generalData; } + protected: + SimulationData m_simulData; + GeneralData m_genData; +}; + +#endif // PROPERTIESDATA_H diff --git a/Project/PropertiesForm.cpp b/Project/PropertiesForm.cpp new file mode 100644 index 0000000..dd98180 --- /dev/null +++ b/Project/PropertiesForm.cpp @@ -0,0 +1,467 @@ +////////////////////////////////////////////////////////////////////// +// This file was auto-generated by codelite's wxCrafter Plugin +// wxCrafter project file: PropertiesForm.wxcp +// Do not modify this file by hand! +////////////////////////////////////////////////////////////////////// + +#include "PropertiesForm.h" + + +// Declare the bitmap loading function +extern void wxCDAD0InitBitmapResources(); + +static bool bBitmapLoaded = false; + + +GeneralPropertiesFormBase::GeneralPropertiesFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) + : wxDialog(parent, id, title, pos, size, style) +{ + if ( !bBitmapLoaded ) { + // We need to initialise the default bitmap handler + wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); + wxCDAD0InitBitmapResources(); + bBitmapLoaded = true; + } + + wxBoxSizer* boxSizer_lvl1_1 = new wxBoxSizer(wxVERTICAL); + this->SetSizer(boxSizer_lvl1_1); + + m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT); + m_notebook->SetName(wxT("m_notebook")); + + boxSizer_lvl1_1->Add(m_notebook, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5)); + + m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL); + m_notebook->AddPage(m_panelGeneral, _("General"), false); + + wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL); + m_panelGeneral->SetSizer(boxSizerLvl2_1); + + wxBoxSizer* boxSizerLvl3_1 = new wxBoxSizer(wxVERTICAL); + + boxSizerLvl2_1->Add(boxSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextLanguage = new wxStaticText(m_panelGeneral, wxID_ANY, _("Language"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl3_1->Add(m_staticTextLanguage, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxArrayString m_choiceLanguageArr; + m_choiceLanguageArr.Add(wxT("English")); + m_choiceLanguageArr.Add(wxT("Portuguese")); + m_choiceLanguage = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceLanguageArr, 0); + m_choiceLanguage->SetSelection(0); + + boxSizerLvl3_1->Add(m_choiceLanguage, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl3_2 = new wxBoxSizer(wxVERTICAL); + + boxSizerLvl2_1->Add(boxSizerLvl3_2, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextTheme = new wxStaticText(m_panelGeneral, wxID_ANY, _("Theme"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl3_2->Add(m_staticTextTheme, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxArrayString m_choiceThemeArr; + m_choiceThemeArr.Add(wxT("Light")); + m_choiceThemeArr.Add(wxT("Dark")); + m_choiceTheme = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceThemeArr, 0); + m_choiceTheme->SetSelection(0); + + boxSizerLvl3_2->Add(m_choiceTheme, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizer_bottonButtons = new wxBoxSizer(wxHORIZONTAL); + + boxSizer_lvl1_1->Add(boxSizer_bottonButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5)); + + boxSizer_bottonButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5)); + + m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0); + + boxSizer_bottonButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5)); + + m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0); + + boxSizer_bottonButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5)); + + + #if wxVERSION_NUMBER >= 2900 + if(!wxPersistenceManager::Get().Find(m_notebook)){ + wxPersistenceManager::Get().RegisterAndRestore(m_notebook); + } else { + wxPersistenceManager::Get().Restore(m_notebook); + } + #endif + + SetName(wxT("GeneralPropertiesFormBase")); + SetSize(-1,-1); + if (GetSizer()) { + GetSizer()->Fit(this); + } + if(GetParent()) { + CentreOnParent(wxBOTH); + } else { + CentreOnScreen(wxBOTH); + } +#if wxVERSION_NUMBER >= 2900 + if(!wxPersistenceManager::Get().Find(this)) { + wxPersistenceManager::Get().RegisterAndRestore(this); + } else { + wxPersistenceManager::Get().Restore(this); + } +#endif + // Connect events + m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneralPropertiesFormBase::OnButtonOKClick), NULL, this); + m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneralPropertiesFormBase::OnButtonCancelClick), NULL, this); + +} + +GeneralPropertiesFormBase::~GeneralPropertiesFormBase() +{ + m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneralPropertiesFormBase::OnButtonOKClick), NULL, this); + m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneralPropertiesFormBase::OnButtonCancelClick), NULL, this); + +} + +SimulationsSettingsFormBase::SimulationsSettingsFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) + : wxDialog(parent, id, title, pos, size, style) +{ + if ( !bBitmapLoaded ) { + // We need to initialise the default bitmap handler + wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); + wxCDAD0InitBitmapResources(); + bBitmapLoaded = true; + } + + wxBoxSizer* boxSizer_lvl1_1 = new wxBoxSizer(wxVERTICAL); + this->SetSizer(boxSizer_lvl1_1); + + m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT); + m_notebook->SetName(wxT("m_notebook")); + + boxSizer_lvl1_1->Add(m_notebook, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5)); + + m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL); + m_notebook->AddPage(m_panelGeneral, _("General"), false); + + wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL); + m_panelGeneral->SetSizer(boxSizerLvl2_1); + + wxBoxSizer* boxSizerLvl3_1 = new wxBoxSizer(wxVERTICAL); + + boxSizerLvl2_1->Add(boxSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextBasePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Base power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + + boxSizerLvl3_1->Add(m_staticTextBasePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlbasePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT("100,0"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlbasePower->SetHint(wxT("")); + #endif + + boxSizerLvl4_1->Add(m_textCtrlbasePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxArrayString m_choiceBasePowerArr; + m_choiceBasePowerArr.Add(wxT("VA")); + m_choiceBasePowerArr.Add(wxT("kVA")); + m_choiceBasePowerArr.Add(wxT("MVA")); + m_choiceBasePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceBasePowerArr, 0); + m_choiceBasePower->SetSelection(2); + + boxSizerLvl4_1->Add(m_choiceBasePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5)); + + wxStaticBoxSizer* staticBoxSizerLvl3_2 = new wxStaticBoxSizer( new wxStaticBox(m_panelGeneral, wxID_ANY, _("Continuous calculation")), wxVERTICAL); + + boxSizerLvl2_1->Add(staticBoxSizerLvl3_2, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5)); + + m_checkBoxFaultAfterPF = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Calculate fault after power flow"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + m_checkBoxFaultAfterPF->SetValue(true); + + staticBoxSizerLvl3_2->Add(m_checkBoxFaultAfterPF, 0, wxALL, WXC_FROM_DIP(5)); + + m_checkBoxSCPowerAfterPF = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Calculate short-circuit power after power flow"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0); + m_checkBoxSCPowerAfterPF->SetValue(true); + + staticBoxSizerLvl3_2->Add(m_checkBoxSCPowerAfterPF, 0, wxALL, WXC_FROM_DIP(5)); + + m_panelPF = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL); + m_notebook->AddPage(m_panelPF, _("Power flow"), false); + + wxBoxSizer* boxSizerLvl2_2 = new wxBoxSizer(wxVERTICAL); + m_panelPF->SetSizer(boxSizerLvl2_2); + + wxBoxSizer* boxSizerLvl3_3 = new wxBoxSizer(wxVERTICAL); + + boxSizerLvl2_2->Add(boxSizerLvl3_3, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextPFMethod = new wxStaticText(m_panelPF, wxID_ANY, _("Solution method"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0); + + boxSizerLvl3_3->Add(m_staticTextPFMethod, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxArrayString m_choicePFMethodArr; + m_choicePFMethodArr.Add(wxT("Gauss-Seidel")); + m_choicePFMethodArr.Add(wxT("Newton-Raphson")); + m_choicePFMethod = new wxChoice(m_panelPF, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), m_choicePFMethodArr, 0); + m_choicePFMethod->SetSelection(0); + + boxSizerLvl3_3->Add(m_choicePFMethod, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5)); + + wxGridSizer* gridSizerLvl_3_4 = new wxGridSizer(0, 2, 0, 0); + + boxSizerLvl2_2->Add(gridSizerLvl_3_4, 0, wxEXPAND, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl_3_4->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextAccFactor = new wxStaticText(m_panelPF, wxID_ANY, _("Acceleration factor"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0); + + boxSizerLvl4_2->Add(m_staticTextAccFactor, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_textCtrlAccFactor = new wxTextCtrl(m_panelPF, wxID_ANY, wxT("1,0"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlAccFactor->SetHint(wxT("")); + #endif + + boxSizerLvl4_2->Add(m_textCtrlAccFactor, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl_3_4->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextPFTolerance = new wxStaticText(m_panelPF, wxID_ANY, _("Tolerance"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0); + + boxSizerLvl4_3->Add(m_staticTextPFTolerance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_textCtrlPFTolerance = new wxTextCtrl(m_panelPF, wxID_ANY, wxT("1e-7"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlPFTolerance->SetHint(wxT("")); + #endif + + boxSizerLvl4_3->Add(m_textCtrlPFTolerance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl_3_4->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextPFMaxIterations = new wxStaticText(m_panelPF, wxID_ANY, _("Max. iterations"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0); + + boxSizerLvl4_4->Add(m_staticTextPFMaxIterations, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_textCtrlPFMaxIterations = new wxTextCtrl(m_panelPF, wxID_ANY, wxT("5000"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlPFMaxIterations->SetHint(wxT("")); + #endif + + boxSizerLvl4_4->Add(m_textCtrlPFMaxIterations, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_panelStability = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL); + m_notebook->AddPage(m_panelStability, _("Stability"), false); + + wxBoxSizer* boxSizerLvl2_232 = new wxBoxSizer(wxVERTICAL); + m_panelStability->SetSizer(boxSizerLvl2_232); + + wxGridSizer* gridSizerLvl_2_3 = new wxGridSizer(0, 2, 0, 0); + + boxSizerLvl2_232->Add(gridSizerLvl_2_3, 0, wxEXPAND, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl3_6 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl_2_3->Add(boxSizerLvl3_6, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextTimeStep = new wxStaticText(m_panelStability, wxID_ANY, _("Time step"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl3_6->Add(m_staticTextTimeStep, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_6 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl3_6->Add(boxSizerLvl4_6, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlTimeStep = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("0,01"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlTimeStep->SetHint(wxT("")); + #endif + + boxSizerLvl4_6->Add(m_textCtrlTimeStep, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_staticTextSec_1 = new wxStaticText(m_panelStability, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl4_6->Add(m_staticTextSec_1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl3_7 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl_2_3->Add(boxSizerLvl3_7, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextTSimTime = new wxStaticText(m_panelStability, wxID_ANY, _("Simulation time"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl3_7->Add(m_staticTextTSimTime, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_7 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl3_7->Add(boxSizerLvl4_7, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlSimTime = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("10"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlSimTime->SetHint(wxT("")); + #endif + + boxSizerLvl4_7->Add(m_textCtrlSimTime, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_staticTextSec_2 = new wxStaticText(m_panelStability, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl4_7->Add(m_staticTextSec_2, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl3_5 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl_2_3->Add(boxSizerLvl3_5, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextFreq = new wxStaticText(m_panelStability, wxID_ANY, _("System frequency"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl3_5->Add(m_staticTextFreq, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_5 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl3_5->Add(boxSizerLvl4_5, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlFreq = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("60,0"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlFreq->SetHint(wxT("")); + #endif + + boxSizerLvl4_5->Add(m_textCtrlFreq, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_staticTextFreqUnit = new wxStaticText(m_panelStability, wxID_ANY, _("Hz"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl4_5->Add(m_staticTextFreqUnit, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl3_8 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl_2_3->Add(boxSizerLvl3_8, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextTStabTolerance = new wxStaticText(m_panelStability, wxID_ANY, _("Tolerance"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl3_8->Add(m_staticTextTStabTolerance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_textCtrlStabTolerance = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("1e-8"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlStabTolerance->SetHint(wxT("")); + #endif + + boxSizerLvl3_8->Add(m_textCtrlStabTolerance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl3_9 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl_2_3->Add(boxSizerLvl3_9, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextTStabMaxIterations = new wxStaticText(m_panelStability, wxID_ANY, _("Max. Iterations"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl3_9->Add(m_staticTextTStabMaxIterations, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_textCtrlStabMaxIterations = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("100"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlStabMaxIterations->SetHint(wxT("")); + #endif + + boxSizerLvl3_9->Add(m_textCtrlStabMaxIterations, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl3_10 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl_2_3->Add(boxSizerLvl3_10, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextCtrlStepRation = new wxStaticText(m_panelStability, wxID_ANY, _("Controls step ratio"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl3_10->Add(m_staticTextCtrlStepRation, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_textCtrlCtrlStepRatio = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("10"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlCtrlStepRatio->SetHint(wxT("")); + #endif + + boxSizerLvl3_10->Add(m_textCtrlCtrlStepRatio, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl3_11 = new wxBoxSizer(wxVERTICAL); + + gridSizerLvl_2_3->Add(boxSizerLvl3_11, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_staticTextPrintTime = new wxStaticText(m_panelStability, wxID_ANY, _("Plot time"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl3_11->Add(m_staticTextPrintTime, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizerLvl4_8 = new wxBoxSizer(wxHORIZONTAL); + + boxSizerLvl3_11->Add(boxSizerLvl4_8, 0, wxEXPAND, WXC_FROM_DIP(5)); + + m_textCtrlPrintTime = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("0,01"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + #if wxVERSION_NUMBER >= 3000 + m_textCtrlPrintTime->SetHint(wxT("")); + #endif + + boxSizerLvl4_8->Add(m_textCtrlPrintTime, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_staticTextSec_4 = new wxStaticText(m_panelStability, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + + boxSizerLvl4_8->Add(m_staticTextSec_4, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5)); + + m_checkBoxUseCOI = new wxCheckBox(m_panelStability, wxID_ANY, _("Use center of inertia as reference"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0); + m_checkBoxUseCOI->SetValue(true); + + boxSizerLvl2_232->Add(m_checkBoxUseCOI, 0, wxALL, WXC_FROM_DIP(5)); + + wxBoxSizer* boxSizer_bottonButtons = new wxBoxSizer(wxHORIZONTAL); + + boxSizer_lvl1_1->Add(boxSizer_bottonButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5)); + + boxSizer_bottonButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5)); + + m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0); + + boxSizer_bottonButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5)); + + m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0); + + boxSizer_bottonButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5)); + + + #if wxVERSION_NUMBER >= 2900 + if(!wxPersistenceManager::Get().Find(m_notebook)){ + wxPersistenceManager::Get().RegisterAndRestore(m_notebook); + } else { + wxPersistenceManager::Get().Restore(m_notebook); + } + #endif + + SetName(wxT("SimulationsSettingsFormBase")); + SetSize(-1,-1); + if (GetSizer()) { + GetSizer()->Fit(this); + } + if(GetParent()) { + CentreOnParent(wxBOTH); + } else { + CentreOnScreen(wxBOTH); + } +#if wxVERSION_NUMBER >= 2900 + if(!wxPersistenceManager::Get().Find(this)) { + wxPersistenceManager::Get().RegisterAndRestore(this); + } else { + wxPersistenceManager::Get().Restore(this); + } +#endif + // Connect events + m_choicePFMethod->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SimulationsSettingsFormBase::OnPFMethodChoiceSelected), NULL, this); + m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SimulationsSettingsFormBase::OnButtonOKClick), NULL, this); + m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SimulationsSettingsFormBase::OnButtonCancelClick), NULL, this); + +} + +SimulationsSettingsFormBase::~SimulationsSettingsFormBase() +{ + m_choicePFMethod->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SimulationsSettingsFormBase::OnPFMethodChoiceSelected), NULL, this); + m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SimulationsSettingsFormBase::OnButtonOKClick), NULL, this); + m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SimulationsSettingsFormBase::OnButtonCancelClick), NULL, this); + +} diff --git a/Project/PropertiesForm.h b/Project/PropertiesForm.h new file mode 100644 index 0000000..c3704fb --- /dev/null +++ b/Project/PropertiesForm.h @@ -0,0 +1,164 @@ +////////////////////////////////////////////////////////////////////// +// This file was auto-generated by codelite's wxCrafter Plugin +// wxCrafter project file: PropertiesForm.wxcp +// Do not modify this file by hand! +////////////////////////////////////////////////////////////////////// + +#ifndef _PSP_PROJECT_PROPERTIESFORM_BASE_CLASSES_H +#define _PSP_PROJECT_PROPERTIESFORM_BASE_CLASSES_H + +#include <wx/settings.h> +#include <wx/xrc/xmlres.h> +#include <wx/xrc/xh_bmp.h> +#include <wx/dialog.h> +#include <wx/iconbndl.h> +#include <wx/artprov.h> +#include <wx/sizer.h> +#include <wx/notebook.h> +#include <wx/panel.h> +#include <wx/imaglist.h> +#include <wx/stattext.h> +#include <wx/choice.h> +#include <wx/arrstr.h> +#include <wx/button.h> +#include <wx/textctrl.h> +#include <wx/statbox.h> +#include <wx/checkbox.h> +#if wxVERSION_NUMBER >= 2900 +#include <wx/persist.h> +#include <wx/persist/toplevel.h> +#include <wx/persist/bookctrl.h> +#include <wx/persist/treebook.h> +#endif + +#ifdef WXC_FROM_DIP +#undef WXC_FROM_DIP +#endif +#if wxVERSION_NUMBER >= 3100 +#define WXC_FROM_DIP(x) wxWindow::FromDIP(x, NULL) +#else +#define WXC_FROM_DIP(x) x +#endif + + +class GeneralPropertiesFormBase : public wxDialog +{ +protected: + wxNotebook* m_notebook; + wxPanel* m_panelGeneral; + wxStaticText* m_staticTextLanguage; + wxChoice* m_choiceLanguage; + wxStaticText* m_staticTextTheme; + wxChoice* m_choiceTheme; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + +protected: + virtual void OnButtonOKClick(wxCommandEvent& event) { event.Skip(); } + virtual void OnButtonCancelClick(wxCommandEvent& event) { event.Skip(); } + +public: + wxStaticText* GetStaticTextLanguage() { return m_staticTextLanguage; } + wxChoice* GetChoiceLanguage() { return m_choiceLanguage; } + wxStaticText* GetStaticTextTheme() { return m_staticTextTheme; } + wxChoice* GetChoiceTheme() { return m_choiceTheme; } + wxPanel* GetPanelGeneral() { return m_panelGeneral; } + wxNotebook* GetNotebook() { return m_notebook; } + wxButton* GetButtonOK() { return m_buttonOK; } + wxButton* GetButtonCancel() { return m_buttonCancel; } + GeneralPropertiesFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("General settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE); + virtual ~GeneralPropertiesFormBase(); +}; + + +class SimulationsSettingsFormBase : public wxDialog +{ +protected: + wxNotebook* m_notebook; + wxPanel* m_panelGeneral; + wxStaticText* m_staticTextBasePower; + wxTextCtrl* m_textCtrlbasePower; + wxChoice* m_choiceBasePower; + wxCheckBox* m_checkBoxFaultAfterPF; + wxCheckBox* m_checkBoxSCPowerAfterPF; + wxPanel* m_panelPF; + wxStaticText* m_staticTextPFMethod; + wxChoice* m_choicePFMethod; + wxStaticText* m_staticTextAccFactor; + wxTextCtrl* m_textCtrlAccFactor; + wxStaticText* m_staticTextPFTolerance; + wxTextCtrl* m_textCtrlPFTolerance; + wxStaticText* m_staticTextPFMaxIterations; + wxTextCtrl* m_textCtrlPFMaxIterations; + wxPanel* m_panelStability; + wxStaticText* m_staticTextTimeStep; + wxTextCtrl* m_textCtrlTimeStep; + wxStaticText* m_staticTextSec_1; + wxStaticText* m_staticTextTSimTime; + wxTextCtrl* m_textCtrlSimTime; + wxStaticText* m_staticTextSec_2; + wxStaticText* m_staticTextFreq; + wxTextCtrl* m_textCtrlFreq; + wxStaticText* m_staticTextFreqUnit; + wxStaticText* m_staticTextTStabTolerance; + wxTextCtrl* m_textCtrlStabTolerance; + wxStaticText* m_staticTextTStabMaxIterations; + wxTextCtrl* m_textCtrlStabMaxIterations; + wxStaticText* m_staticTextCtrlStepRation; + wxTextCtrl* m_textCtrlCtrlStepRatio; + wxStaticText* m_staticTextPrintTime; + wxTextCtrl* m_textCtrlPrintTime; + wxStaticText* m_staticTextSec_4; + wxCheckBox* m_checkBoxUseCOI; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + +protected: + virtual void OnPFMethodChoiceSelected(wxCommandEvent& event) { event.Skip(); } + virtual void OnButtonOKClick(wxCommandEvent& event) { event.Skip(); } + virtual void OnButtonCancelClick(wxCommandEvent& event) { event.Skip(); } + +public: + wxStaticText* GetStaticTextBasePower() { return m_staticTextBasePower; } + wxTextCtrl* GetTextCtrlbasePower() { return m_textCtrlbasePower; } + wxChoice* GetChoiceBasePower() { return m_choiceBasePower; } + wxCheckBox* GetCheckBoxFaultAfterPF() { return m_checkBoxFaultAfterPF; } + wxCheckBox* GetCheckBoxSCPowerAfterPF() { return m_checkBoxSCPowerAfterPF; } + wxPanel* GetPanelGeneral() { return m_panelGeneral; } + wxStaticText* GetStaticTextPFMethod() { return m_staticTextPFMethod; } + wxChoice* GetChoicePFMethod() { return m_choicePFMethod; } + wxStaticText* GetStaticTextAccFactor() { return m_staticTextAccFactor; } + wxTextCtrl* GetTextCtrlAccFactor() { return m_textCtrlAccFactor; } + wxStaticText* GetStaticTextPFTolerance() { return m_staticTextPFTolerance; } + wxTextCtrl* GetTextCtrlPFTolerance() { return m_textCtrlPFTolerance; } + wxStaticText* GetStaticTextPFMaxIterations() { return m_staticTextPFMaxIterations; } + wxTextCtrl* GetTextCtrlPFMaxIterations() { return m_textCtrlPFMaxIterations; } + wxPanel* GetPanelPF() { return m_panelPF; } + wxStaticText* GetStaticTextTimeStep() { return m_staticTextTimeStep; } + wxTextCtrl* GetTextCtrlTimeStep() { return m_textCtrlTimeStep; } + wxStaticText* GetStaticTextSec_1() { return m_staticTextSec_1; } + wxStaticText* GetStaticTextTSimTime() { return m_staticTextTSimTime; } + wxTextCtrl* GetTextCtrlSimTime() { return m_textCtrlSimTime; } + wxStaticText* GetStaticTextSec_2() { return m_staticTextSec_2; } + wxStaticText* GetStaticTextFreq() { return m_staticTextFreq; } + wxTextCtrl* GetTextCtrlFreq() { return m_textCtrlFreq; } + wxStaticText* GetStaticTextFreqUnit() { return m_staticTextFreqUnit; } + wxStaticText* GetStaticTextTStabTolerance() { return m_staticTextTStabTolerance; } + wxTextCtrl* GetTextCtrlStabTolerance() { return m_textCtrlStabTolerance; } + wxStaticText* GetStaticTextTStabMaxIterations() { return m_staticTextTStabMaxIterations; } + wxTextCtrl* GetTextCtrlStabMaxIterations() { return m_textCtrlStabMaxIterations; } + wxStaticText* GetStaticTextCtrlStepRation() { return m_staticTextCtrlStepRation; } + wxTextCtrl* GetTextCtrlCtrlStepRatio() { return m_textCtrlCtrlStepRatio; } + wxStaticText* GetStaticTextPrintTime() { return m_staticTextPrintTime; } + wxTextCtrl* GetTextCtrlPrintTime() { return m_textCtrlPrintTime; } + wxStaticText* GetStaticTextSec_4() { return m_staticTextSec_4; } + wxCheckBox* GetCheckBoxUseCOI() { return m_checkBoxUseCOI; } + wxPanel* GetPanelStability() { return m_panelStability; } + wxNotebook* GetNotebook() { return m_notebook; } + wxButton* GetButtonOK() { return m_buttonOK; } + wxButton* GetButtonCancel() { return m_buttonCancel; } + SimulationsSettingsFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Simulation settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE); + virtual ~SimulationsSettingsFormBase(); +}; + +#endif diff --git a/Project/PropertiesForm.wxcp b/Project/PropertiesForm.wxcp new file mode 100644 index 0000000..685285a --- /dev/null +++ b/Project/PropertiesForm.wxcp @@ -0,0 +1,4830 @@ +{ + "metadata": { + "m_generatedFilesDir": ".", + "m_objCounter": 202, + "m_includeFiles": [], + "m_bitmapFunction": "wxCDAD0InitBitmapResources", + "m_bitmapsFile": "PropertiesFormBitmaps.cpp", + "m_GenerateCodeTypes": 1, + "m_outputFileName": "PropertiesForm", + "m_firstWindowId": 10000, + "m_useEnum": true, + "m_useUnderscoreMacro": true, + "m_addHandlers": true, + "m_templateClasses": [] + }, + "windows": [{ + "m_type": 4421, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxDEFAULT_DIALOG_STYLE"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "GeneralPropertiesFormBase" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Enable Window Persistency:", + "m_value": true + }, { + "type": "string", + "m_label": "Title:", + "m_value": "General settings" + }, { + "type": "virtualFolderPicker", + "m_label": "Virtual Folder:", + "m_path": "Project:wxcrafter" + }, { + "type": "choice", + "m_label": "Centre:", + "m_selection": 1, + "m_options": ["", "wxBOTH", "wxVERTICAL", "wxHORIZONTAL"] + }, { + "type": "string", + "m_label": "Inherited Class", + "m_value": "GeneralPropertiesForm" + }, { + "type": "string", + "m_label": "File:", + "m_value": "GeneralPropertiesForm" + }, { + "type": "string", + "m_label": "Class Decorator", + "m_value": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (16x16) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (32x32) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (64x64) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (128x128):", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (256x256):", + "m_path": "" + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizer_lvl1_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4442, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxBK_DEFAULT"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_notebook" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }], + "m_events": [], + "m_children": [{ + "m_type": 4441, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxTAB_TRAVERSAL"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_panelGeneral" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "General" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "bool", + "m_label": "Selected", + "m_value": false + }, { + "type": "bool", + "m_label": "Null Page", + "m_value": false + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl2_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl3_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextLanguage" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Language" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4411, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_choiceLanguage" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Choices:", + "m_value": "English;Portuguese" + }, { + "type": "string", + "m_label": "Selection:", + "m_value": "0" + }], + "m_events": [], + "m_children": [] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl3_2" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextTheme" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Theme" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4411, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_choiceTheme" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Choices:", + "m_value": "Light;Dark" + }, { + "type": "string", + "m_label": "Selection:", + "m_value": "0" + }], + "m_events": [], + "m_children": [] + }] + }] + }] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizer_bottonButtons" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 1, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4454, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "string", + "m_label": "Name:", + "m_value": "Spacer_1" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "0,0" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4400, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_buttonOK" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "OK" + }, { + "type": "bool", + "m_label": "Default Button", + "m_value": false + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Direction", + "m_selection": 0, + "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] + }, { + "type": "string", + "m_label": "Margins:", + "m_value": "2,2" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnButtonOKClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.", + "m_noBody": false + }], + "m_children": [] + }, { + "m_type": 4400, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_buttonCancel" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Cancel" + }, { + "type": "bool", + "m_label": "Default Button", + "m_value": false + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Direction", + "m_selection": 0, + "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] + }, { + "type": "string", + "m_label": "Margins:", + "m_value": "2,2" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnButtonCancelClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.", + "m_noBody": false + }], + "m_children": [] + }] + }] + }] + }, { + "m_type": 4421, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxDEFAULT_DIALOG_STYLE"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "SimulationsSettingsFormBase" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Enable Window Persistency:", + "m_value": true + }, { + "type": "string", + "m_label": "Title:", + "m_value": "Simulation settings" + }, { + "type": "virtualFolderPicker", + "m_label": "Virtual Folder:", + "m_path": "Project:src:controller:properties form" + }, { + "type": "choice", + "m_label": "Centre:", + "m_selection": 1, + "m_options": ["", "wxBOTH", "wxVERTICAL", "wxHORIZONTAL"] + }, { + "type": "string", + "m_label": "Inherited Class", + "m_value": "SimulationsSettingsForm" + }, { + "type": "string", + "m_label": "File:", + "m_value": "SimulationsSettingsForm" + }, { + "type": "string", + "m_label": "Class Decorator", + "m_value": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (16x16) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (32x32) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (64x64) :", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (128x128):", + "m_path": "" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File (256x256):", + "m_path": "" + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizer_lvl1_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4442, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxBK_DEFAULT"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_notebook" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }], + "m_events": [], + "m_children": [{ + "m_type": 4441, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxTAB_TRAVERSAL"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_panelGeneral" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "General" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "bool", + "m_label": "Selected", + "m_value": false + }, { + "type": "bool", + "m_label": "Null Page", + "m_value": false + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl2_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl3_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextBasePower" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Base power" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_1" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 1, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4406, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlbasePower" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "100,0" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4411, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_choiceBasePower" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Choices:", + "m_value": "VA;kVA;MVA" + }, { + "type": "string", + "m_label": "Selection:", + "m_value": "2" + }], + "m_events": [], + "m_children": [] + }] + }] + }, { + "m_type": 4449, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "staticBoxSizerLvl3_2" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["Vertical", "Horizontal"] + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Continuous calculation" + }], + "m_events": [], + "m_children": [{ + "m_type": 4415, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_checkBoxFaultAfterPF" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Calculate fault after power flow" + }, { + "type": "bool", + "m_label": "Value:", + "m_value": true + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4415, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_checkBoxSCPowerAfterPF" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Calculate short-circuit power after power flow" + }, { + "type": "bool", + "m_label": "Value:", + "m_value": true + }], + "m_events": [], + "m_children": [] + }] + }] + }] + }, { + "m_type": 4441, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxTAB_TRAVERSAL"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_panelPF" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Power flow" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "bool", + "m_label": "Selected", + "m_value": false + }, { + "type": "bool", + "m_label": "Null Page", + "m_value": false + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl2_2" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl3_3" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextPFMethod" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Solution method" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4411, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_choicePFMethod" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Choices:", + "m_value": "Gauss-Seidel;Newton-Raphson" + }, { + "type": "string", + "m_label": "Selection:", + "m_value": "0" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_CHOICE_SELECTED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnPFMethodChoiceSelected(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_CHOICE_SELECTED event, when an item on the list is selected.", + "m_noBody": false + }], + "m_children": [] + }] + }, { + "m_type": 4452, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "gridSizerLvl_3_4" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "# Columns:", + "m_value": "2" + }, { + "type": "string", + "m_label": "# Rows:", + "m_value": "0" + }, { + "type": "string", + "m_label": "Horizontal gap:", + "m_value": "0" + }, { + "type": "string", + "m_label": "Vertical gap:", + "m_value": "0" + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_2" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextAccFactor" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Acceleration factor" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4406, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlAccFactor" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "1,0" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_3" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextPFTolerance" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Tolerance" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4406, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlPFTolerance" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "1e-7" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_4" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextPFMaxIterations" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Max. iterations" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4406, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlPFMaxIterations" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "5000" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }] + }] + }] + }] + }, { + "m_type": 4441, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": ["wxTAB_TRAVERSAL"], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_panelStability" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Stability" + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "bool", + "m_label": "Selected", + "m_value": false + }, { + "type": "bool", + "m_label": "Null Page", + "m_value": false + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl2_232" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4452, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "gridSizerLvl_2_3" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "# Columns:", + "m_value": "2" + }, { + "type": "string", + "m_label": "# Rows:", + "m_value": "0" + }, { + "type": "string", + "m_label": "Horizontal gap:", + "m_value": "0" + }, { + "type": "string", + "m_label": "Vertical gap:", + "m_value": "0" + }], + "m_events": [], + "m_children": [{ + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl3_6" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextTimeStep" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Time step" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_6" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 1, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4406, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlTimeStep" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "0,01" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextSec_1" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "s" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl3_7" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextTSimTime" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Simulation time" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_7" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 1, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4406, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlSimTime" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "10" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextSec_2" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "s" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl3_5" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextFreq" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "System frequency" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_5" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 1, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4406, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlFreq" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "60,0" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextFreqUnit" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Hz" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl3_8" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextTStabTolerance" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Tolerance" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4406, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlStabTolerance" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "1e-8" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl3_9" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextTStabMaxIterations" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Max. Iterations" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4406, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlStabMaxIterations" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "100" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl3_10" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextCtrlStepRation" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Controls step ratio" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4406, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxEXPAND", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlCtrlStepRatio" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "10" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl3_11" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 0, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxTOP", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextPrintTime" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "Plot time" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizerLvl4_8" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 1, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4406, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_textCtrlPrintTime" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Value:", + "m_value": "0,01" + }, { + "type": "string", + "m_label": "Text Hint", + "m_value": "" + }, { + "type": "string", + "m_label": "Max Length:", + "m_value": "0" + }, { + "type": "bool", + "m_label": "Auto Complete Directories:", + "m_value": false + }, { + "type": "bool", + "m_label": "Auto Complete Files:", + "m_value": false + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4405, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxLEFT", "wxRIGHT", "wxBOTTOM", "wxALIGN_CENTER_VERTICAL"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_staticTextSec_4" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "multi-string", + "m_label": "Label:", + "m_value": "s" + }, { + "type": "string", + "m_label": "Wrap:", + "m_value": "-1" + }], + "m_events": [], + "m_children": [] + }] + }] + }] + }, { + "m_type": 4415, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_checkBoxUseCOI" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Use center of inertia as reference" + }, { + "type": "bool", + "m_label": "Value:", + "m_value": true + }], + "m_events": [], + "m_children": [] + }] + }] + }] + }, { + "m_type": 4401, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"], + "m_properties": [{ + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "boxSizer_bottonButtons" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "choice", + "m_label": "Orientation:", + "m_selection": 1, + "m_options": ["wxVERTICAL", "wxHORIZONTAL"] + }], + "m_events": [], + "m_children": [{ + "m_type": 4454, + "proportion": 1, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"], + "m_properties": [{ + "type": "string", + "m_label": "Name:", + "m_value": "Spacer_1" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "0,0" + }], + "m_events": [], + "m_children": [] + }, { + "m_type": 4400, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_buttonOK" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "OK" + }, { + "type": "bool", + "m_label": "Default Button", + "m_value": false + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Direction", + "m_selection": 0, + "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] + }, { + "type": "string", + "m_label": "Margins:", + "m_value": "2,2" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnButtonOKClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.", + "m_noBody": false + }], + "m_children": [] + }, { + "m_type": 4400, + "proportion": 0, + "border": 5, + "gbSpan": "1,1", + "gbPosition": "0,0", + "m_styles": [], + "m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxALIGN_RIGHT"], + "m_properties": [{ + "type": "winid", + "m_label": "ID:", + "m_winid": "wxID_ANY" + }, { + "type": "string", + "m_label": "Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Minimum Size:", + "m_value": "-1,-1" + }, { + "type": "string", + "m_label": "Name:", + "m_value": "m_buttonCancel" + }, { + "type": "multi-string", + "m_label": "Tooltip:", + "m_value": "" + }, { + "type": "colour", + "m_label": "Bg Colour:", + "colour": "<Default>" + }, { + "type": "colour", + "m_label": "Fg Colour:", + "colour": "<Default>" + }, { + "type": "font", + "m_label": "Font:", + "m_value": "" + }, { + "type": "bool", + "m_label": "Hidden", + "m_value": false + }, { + "type": "bool", + "m_label": "Disabled", + "m_value": false + }, { + "type": "bool", + "m_label": "Focused", + "m_value": false + }, { + "type": "string", + "m_label": "Class Name:", + "m_value": "" + }, { + "type": "string", + "m_label": "Include File:", + "m_value": "" + }, { + "type": "string", + "m_label": "Style:", + "m_value": "" + }, { + "type": "string", + "m_label": "Label:", + "m_value": "Cancel" + }, { + "type": "bool", + "m_label": "Default Button", + "m_value": false + }, { + "type": "bitmapPicker", + "m_label": "Bitmap File:", + "m_path": "" + }, { + "type": "choice", + "m_label": "Direction", + "m_selection": 0, + "m_options": ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] + }, { + "type": "string", + "m_label": "Margins:", + "m_value": "2,2" + }], + "m_events": [{ + "m_eventName": "wxEVT_COMMAND_BUTTON_CLICKED", + "m_eventClass": "wxCommandEvent", + "m_eventHandler": "wxCommandEventHandler", + "m_functionNameAndSignature": "OnButtonCancelClick(wxCommandEvent& event)", + "m_description": "Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.", + "m_noBody": false + }], + "m_children": [] + }] + }] + }] + }] +}
\ No newline at end of file diff --git a/Project/PropertiesFormBitmaps.cpp b/Project/PropertiesFormBitmaps.cpp new file mode 100644 index 0000000..8ea8e1d --- /dev/null +++ b/Project/PropertiesFormBitmaps.cpp @@ -0,0 +1,49 @@ +// +// This file was automatically generated by wxrc, do not edit by hand. +// + +#include <wx/wxprec.h> + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include <wx/filesys.h> +#include <wx/fs_mem.h> +#include <wx/xrc/xmlres.h> +#include <wx/xrc/xh_all.h> + +#if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805 + #define XRC_ADD_FILE(name, data, size, mime) \ + wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime) +#else + #define XRC_ADD_FILE(name, data, size, mime) \ + wxMemoryFSHandler::AddFile(name, data, size) +#endif + +static size_t xml_res_size_0 = 137; +static unsigned char xml_res_file_0[] = { +60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101, +110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101, +115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58, +47,47,119,119,119,46,119,120,119,105,100,103,101,116,115,46,111,114,103, +47,119,120,120,114,99,34,62,10,32,32,60,33,45,45,32,72,97,110,100,108,101, +114,32,71,101,110,101,114,97,116,105,111,110,32,105,115,32,79,78,32,45, +45,62,10,60,47,114,101,115,111,117,114,99,101,62,10}; + +void wxCDAD0InitBitmapResources() +{ + + // Check for memory FS. If not present, load the handler: + { + wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one")); + wxFileSystem fsys; + wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file")); + wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file")); + if (f) delete f; + else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase); + } + + XRC_ADD_FILE(wxT("XRC_resource/PropertiesFormBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_PropertiesFormBitmaps.xrc"), xml_res_file_0, xml_res_size_0, wxT("text/xml")); + wxXmlResource::Get()->Load(wxT("memory:XRC_resource/PropertiesFormBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_PropertiesFormBitmaps.xrc")); +} diff --git a/Project/RateLimiter.cpp b/Project/RateLimiter.cpp index 42bede1..ea0db25 100644 --- a/Project/RateLimiter.cpp +++ b/Project/RateLimiter.cpp @@ -112,3 +112,10 @@ bool RateLimiter::Solve(double input, double timeStep) m_output = input; return true; } + +Element* RateLimiter::GetCopy() +{ + RateLimiter* copy = new RateLimiter(m_elementID); + *copy = *this; + return copy; +} diff --git a/Project/RateLimiter.h b/Project/RateLimiter.h index b1e669c..49596db 100644 --- a/Project/RateLimiter.h +++ b/Project/RateLimiter.h @@ -26,6 +26,8 @@ class RateLimiter : public ControlElement virtual bool Solve(double input, double timeStep); + virtual Element* GetCopy(); + protected: double m_upLimit = 5.0; double m_lowLimit = -5.0; diff --git a/Project/RateLimiterForm.cpp b/Project/RateLimiterForm.cpp index e0d11f2..c9b8a24 100644 --- a/Project/RateLimiterForm.cpp +++ b/Project/RateLimiterForm.cpp @@ -3,6 +3,8 @@ RateLimiterForm::RateLimiterForm(wxWindow* parent, RateLimiter* rateLimiter) : RateLimiterFormBase(parent) { + SetSize(GetBestSize()); + m_rateLimiter = rateLimiter; m_parent = parent; diff --git a/Project/ReactiveShuntElementForm.cpp b/Project/ReactiveShuntElementForm.cpp index 90d4049..ededa6b 100644 --- a/Project/ReactiveShuntElementForm.cpp +++ b/Project/ReactiveShuntElementForm.cpp @@ -6,6 +6,7 @@ ReactiveShuntElementForm::ReactiveShuntElementForm(wxWindow* parent, Capacitor* capacitor) : ReactiveShuntElementFormBase(parent) { + SetSize(GetBestSize()); CapacitorElectricalData data = capacitor->GetElectricalData(); m_textCtrlName->SetValue(data.name); diff --git a/Project/SimulationsSettingsForm.cpp b/Project/SimulationsSettingsForm.cpp new file mode 100644 index 0000000..714e49b --- /dev/null +++ b/Project/SimulationsSettingsForm.cpp @@ -0,0 +1,127 @@ +#include "SimulationsSettingsForm.h" +#include "PropertiesData.h" + +SimulationsSettingsForm::SimulationsSettingsForm(wxWindow* parent, PropertiesData* properties) + : SimulationsSettingsFormBase(parent) +{ + m_properties = properties; + auto data = m_properties->GetSimulationPropertiesData(); + + m_textCtrlbasePower->SetValue(Element::StringFromDouble(data.basePower)); + switch(data.basePowerUnit) { + case UNIT_VA: { + m_choiceBasePower->SetSelection(0); + } break; + case UNIT_kVA: { + m_choiceBasePower->SetSelection(1); + } break; + case UNIT_MVA: { + m_choiceBasePower->SetSelection(2); + } break; + default: { + m_choiceBasePower->SetSelection(wxNOT_FOUND); + } break; + } + m_checkBoxFaultAfterPF->SetValue(data.faultAfterPowerFlow); + m_checkBoxSCPowerAfterPF->SetValue(data.scPowerAfterPowerFlow); + switch(data.powerFlowMethod) { + case GAUSS_SEIDEL: { + m_choicePFMethod->SetSelection(0); + } break; + case NEWTON_RAPHSON: { + m_choicePFMethod->SetSelection(1); + m_textCtrlAccFactor->Enable(false); + } break; + default: { + m_choicePFMethod->SetSelection(wxNOT_FOUND); + } break; + } + m_textCtrlAccFactor->SetValue(Element::StringFromDouble(data.accFator)); + m_textCtrlPFTolerance->SetValue(wxString::Format("%g", data.powerFlowTolerance)); + m_textCtrlPFMaxIterations->SetValue(wxString::Format("%d", data.powerFlowMaxIterations)); + m_textCtrlTimeStep->SetValue(wxString::Format("%g", data.timeStep)); + m_textCtrlSimTime->SetValue(Element::StringFromDouble(data.stabilitySimulationTime)); + m_textCtrlFreq->SetValue(Element::StringFromDouble(data.stabilityFrequency)); + m_textCtrlStabTolerance->SetValue(wxString::Format("%g", data.stabilityTolerance)); + m_textCtrlStabMaxIterations->SetValue(wxString::Format("%d", data.stabilityMaxIterations)); + m_textCtrlCtrlStepRatio->SetValue(wxString::Format("%d", data.controlTimeStepRatio)); + m_textCtrlPrintTime->SetValue(wxString::Format("%g", data.plotTime)); + + m_checkBoxUseCOI->SetValue(data.useCOI); +} + +SimulationsSettingsForm::~SimulationsSettingsForm() {} +void SimulationsSettingsForm::OnButtonOKClick(wxCommandEvent& event) +{ + if(ValidateData()) EndModal(wxID_OK); +} + +bool SimulationsSettingsForm::ValidateData() +{ + auto data = m_properties->GetSimulationPropertiesData(); + if(!Element::DoubleFromString(this, m_textCtrlbasePower->GetValue(), data.basePower, + _("Value entered incorrectly in the field \"Base power\"."))) + return false; + switch(m_choiceBasePower->GetSelection()) { + case 0: { + data.basePowerUnit = UNIT_VA; + } break; + case 1: { + data.basePowerUnit = UNIT_kVA; + } break; + default: { + data.basePowerUnit = UNIT_MVA; + } break; + } + data.faultAfterPowerFlow = m_checkBoxFaultAfterPF->GetValue(); + data.scPowerAfterPowerFlow = m_checkBoxSCPowerAfterPF->GetValue(); + switch(m_choicePFMethod->GetSelection()) { + case 0: { + data.powerFlowMethod = GAUSS_SEIDEL; + } break; + case 1: { + data.powerFlowMethod = NEWTON_RAPHSON; + } break; + } + if(!Element::DoubleFromString(this, m_textCtrlAccFactor->GetValue(), data.accFator, + _("Value entered incorrectly in the field \"Acceleration factor\"."))) + return false; + if(!Element::DoubleFromString(this, m_textCtrlPFTolerance->GetValue(), data.powerFlowTolerance, + _("Value entered incorrectly in the field \"Tolerance (Power flow)\"."))) + return false; + if(!Element::IntFromString(this, m_textCtrlPFMaxIterations->GetValue(), data.powerFlowMaxIterations, + _("Value entered incorrectly in the field \"Max. iterations (Power flow)\"."))) + return false; + if(!Element::DoubleFromString(this, m_textCtrlTimeStep->GetValue(), data.timeStep, + _("Value entered incorrectly in the field \"Time step\"."))) + return false; + if(!Element::DoubleFromString(this, m_textCtrlSimTime->GetValue(), data.stabilitySimulationTime, + _("Value entered incorrectly in the field \"Simulation time\"."))) + return false; + if(!Element::DoubleFromString(this, m_textCtrlFreq->GetValue(), data.stabilityFrequency, + _("Value entered incorrectly in the field \"System frequency\"."))) + return false; + if(!Element::DoubleFromString(this, m_textCtrlStabTolerance->GetValue(), data.stabilityTolerance, + _("Value entered incorrectly in the field \"Tolerance (Stability)\"."))) + return false; + if(!Element::IntFromString(this, m_textCtrlStabMaxIterations->GetValue(), data.stabilityMaxIterations, + _("Value entered incorrectly in the field \"Max. iterations (Stability)\"."))) + return false; + if(!Element::IntFromString(this, m_textCtrlCtrlStepRatio->GetValue(), data.controlTimeStepRatio, + _("Value entered incorrectly in the field \"Controls step ratio\"."))) + return false; + if(!Element::DoubleFromString(this, m_textCtrlPrintTime->GetValue(), data.plotTime, + _("Value entered incorrectly in the field \"Plot time\"."))) + return false; + data.useCOI = m_checkBoxUseCOI->GetValue(); + + m_properties->SetSimulationPropertiesData(data); + return true; +} +void SimulationsSettingsForm::OnPFMethodChoiceSelected(wxCommandEvent& event) +{ + if(m_choicePFMethod->GetSelection() == 0) + m_textCtrlAccFactor->Enable(); + else + m_textCtrlAccFactor->Enable(false); +} diff --git a/Project/SimulationsSettingsForm.h b/Project/SimulationsSettingsForm.h new file mode 100644 index 0000000..d6b0a08 --- /dev/null +++ b/Project/SimulationsSettingsForm.h @@ -0,0 +1,21 @@ +#ifndef SIMULATIONSSETTINGSFORM_H +#define SIMULATIONSSETTINGSFORM_H + +#include "PropertiesForm.h" + +class PropertiesData; + +class SimulationsSettingsForm : public SimulationsSettingsFormBase +{ +public: + SimulationsSettingsForm(wxWindow* parent, PropertiesData* properties); + virtual ~SimulationsSettingsForm(); +protected: + virtual void OnPFMethodChoiceSelected(wxCommandEvent& event); + virtual void OnButtonCancelClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); } + virtual void OnButtonOKClick(wxCommandEvent& event); + virtual bool ValidateData(); + + PropertiesData* m_properties; +}; +#endif // SIMULATIONSSETTINGSFORM_H diff --git a/Project/Sum.cpp b/Project/Sum.cpp index b7a4f8a..45dc80d 100644 --- a/Project/Sum.cpp +++ b/Project/Sum.cpp @@ -217,3 +217,10 @@ bool Sum::Solve(double input, double timeStep) } return true; } + +Element* Sum::GetCopy() +{ + Sum* copy = new Sum(m_elementID); + *copy = *this; + return copy; +} diff --git a/Project/Sum.h b/Project/Sum.h index f3ab4c6..72a71a5 100644 --- a/Project/Sum.h +++ b/Project/Sum.h @@ -27,6 +27,8 @@ public: virtual void UpdatePoints(); void AddInNode(); void RemoveInNode(); + + virtual Element* GetCopy(); protected: std::vector<Signal> m_signalList; diff --git a/Project/SumForm.cpp b/Project/SumForm.cpp index 2bb7c67..fb0fa58 100644 --- a/Project/SumForm.cpp +++ b/Project/SumForm.cpp @@ -4,6 +4,8 @@ SumForm::SumForm(wxWindow* parent, Sum* sum) : SumFormBase(parent) { + SetSize(GetBestSize()); + m_parent = parent; m_sum = sum; diff --git a/Project/SwitchingForm.cpp b/Project/SwitchingForm.cpp index 061b0a5..29da9c2 100644 --- a/Project/SwitchingForm.cpp +++ b/Project/SwitchingForm.cpp @@ -60,6 +60,11 @@ void SwitchingForm::OnOKButtonClick(wxCommandEvent& event) } m_element->SetSwitchingData(data); + if(data.swTime.size() != 0) + m_element->SetDynamicEvent(true); + else + m_element->SetDynamicEvent(false); + EndModal(wxID_OK); } diff --git a/Project/SyncGenerator.cpp b/Project/SyncGenerator.cpp index 17a7e91..2579cef 100644 --- a/Project/SyncGenerator.cpp +++ b/Project/SyncGenerator.cpp @@ -1,21 +1,15 @@ #include "SyncMachineForm.h" #include "SyncGenerator.h" +#include "ControlElementContainer.h" -SyncGenerator::SyncGenerator() - : Machines() -{ - Init(); -} - -SyncGenerator::SyncGenerator(wxString name) - : Machines() +SyncGenerator::SyncGenerator() : Machines() { Init(); } +SyncGenerator::SyncGenerator(wxString name) : Machines() { Init(); m_electricalData.name = name; } SyncGenerator::~SyncGenerator() {} - void SyncGenerator::Init() { int numPtsSine = 10; @@ -28,6 +22,9 @@ void SyncGenerator::Init() double y = std::sin(x); m_sinePts.push_back(wxPoint2DDouble((x / pi) * mx, y * my)); } + + m_electricalData.avr = new ControlElementContainer(); + m_electricalData.speedGov = new ControlElementContainer(); } void SyncGenerator::DrawSymbol() const @@ -131,7 +128,7 @@ SyncGeneratorElectricalData SyncGenerator::GetPUElectricalData(double systemPowe } void SyncGenerator::SetNominalVoltage(std::vector<double> nominalVoltage, - std::vector<ElectricalUnit> nominalVoltageUnit) + std::vector<ElectricalUnit> nominalVoltageUnit) { if(nominalVoltage.size() > 0) { m_electricalData.nominalVoltage = nominalVoltage[0]; @@ -143,6 +140,27 @@ Element* SyncGenerator::GetCopy() { SyncGenerator* copy = new SyncGenerator(); *copy = *this; + auto data = copy->GetElectricalData(); + + // Copy AVR + std::vector<ConnectionLine*> cLineList; + std::vector<ControlElement*> elementList; + m_electricalData.avr->GetContainerCopy(elementList, cLineList); + + ControlElementContainer* avrCopy = new ControlElementContainer(); + avrCopy->FillContainer(elementList, cLineList); + data.avr = avrCopy; + + // Copy Speed Governor + cLineList.clear(); + elementList.clear(); + m_electricalData.speedGov->GetContainerCopy(elementList, cLineList); + + ControlElementContainer* speedGovCopy = new ControlElementContainer(); + speedGovCopy->FillContainer(elementList, cLineList); + data.speedGov = speedGovCopy; + + copy->SetElectricalData(data); return copy; } @@ -191,3 +209,25 @@ wxString SyncGenerator::GetTipText() const return tipText; } + +bool SyncGenerator::GetPlotData(ElementPlotData& plotData) +{ + if(!m_electricalData.plotSyncMachine) return false; + plotData.SetName(m_electricalData.name); + plotData.SetCurveType(ElementPlotData::CT_SYNC_GENERATOR); + + std::vector<double> absTerminalVoltage, activePower, reactivePower; + for(unsigned int i = 0; i < m_electricalData.terminalVoltageVector.size(); ++i) { + absTerminalVoltage.push_back(std::abs(m_electricalData.terminalVoltageVector[i])); + activePower.push_back(std::real(m_electricalData.electricalPowerVector[i])); + reactivePower.push_back(std::imag(m_electricalData.electricalPowerVector[i])); + } + plotData.AddData(absTerminalVoltage, _("Terminal voltage")); + plotData.AddData(activePower, _("Active power")); + plotData.AddData(reactivePower, _("Reactive power")); + plotData.AddData(m_electricalData.mechanicalPowerVector, _("Mechanical power")); + plotData.AddData(m_electricalData.freqVector, _("Frequency")); + plotData.AddData(m_electricalData.fieldVoltageVector, _("Field voltage")); + plotData.AddData(m_electricalData.deltaVector, _("Delta")); + return true; +} diff --git a/Project/SyncGenerator.h b/Project/SyncGenerator.h index a672a4f..fb5ffdc 100644 --- a/Project/SyncGenerator.h +++ b/Project/SyncGenerator.h @@ -4,6 +4,8 @@ #include "Machines.h" class SyncMachineForm; +class ControlElementContainer; +class ControlElementSolver; struct SyncGeneratorElectricalData { // General @@ -22,7 +24,7 @@ struct SyncGeneratorElectricalData { bool haveMinReactive = false; double minReactive = -9999.0; ElectricalUnit minReactiveUnit = UNIT_MVAr; - bool useMachineBase = false; + bool useMachineBase = true; // Fault double positiveResistance = 0.0; @@ -35,12 +37,12 @@ struct SyncGeneratorElectricalData { double groundReactance = 0.0; bool groundNeutral = true; // p.u. fault data - std::complex<double> faultCurrent[3] = { std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0), - std::complex<double>(0.0, 0.0) }; + std::complex<double> faultCurrent[3] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0), + std::complex<double>(0.0, 0.0)}; // Stability bool plotSyncMachine = false; - double inertia = 0.0; + double inertia = 1.0; double damping = 0.0; bool useAVR = false; bool useSpeedGovernor = false; @@ -59,16 +61,62 @@ struct SyncGeneratorElectricalData { double subXq = 0.0; double subTd0 = 0.0; double subTq0 = 0.0; + + // Machine state variables + std::complex<double> terminalVoltage; + std::vector<std::complex<double> > terminalVoltageVector; + std::complex<double> electricalPower; + std::vector<std::complex<double> > electricalPowerVector; + double pm; + std::vector<double> mechanicalPowerVector; + double speed; + std::vector<double> freqVector; + double fieldVoltage; + std::vector<double> fieldVoltageVector; + double delta; + std::vector<double> deltaVector; + + double initialFieldVoltage; + + // Internal machine variables + double tranEq; + double tranEd; + double subEq; + double subEd; + double pe; + + // Variables to extrapolate + double oldId; + double oldIq; + double oldPe; + + // Integration constants + IntegrationConstant icSpeed; + IntegrationConstant icDelta; + IntegrationConstant icTranEq; + IntegrationConstant icTranEd; + IntegrationConstant icSubEq; + IntegrationConstant icSubEd; + + // Control + ControlElementContainer* avr = NULL; + ControlElementContainer* speedGov = NULL; + + // Control solvers + ControlElementSolver* avrSolver = NULL; + ControlElementSolver* speedGovSolver = NULL; + + Machines::SyncMachineModel model = Machines::SM_MODEL_1; }; class SyncGenerator : public Machines { -public: + public: SyncGenerator(); SyncGenerator(wxString name); ~SyncGenerator(); - - virtual Element* GetCopy(); + + virtual Element* GetCopy(); virtual void Init(); virtual void DrawSymbol() const; virtual bool GetContextMenu(wxMenu& menu); @@ -78,10 +126,12 @@ public: virtual SyncGeneratorElectricalData GetPUElectricalData(double systemPowerBase); virtual void SetElectricalData(SyncGeneratorElectricalData electricalData) { m_electricalData = electricalData; } virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit); -protected: + virtual bool GetPlotData(ElementPlotData& plotData); + + protected: std::vector<wxPoint2DDouble> m_sinePts; SyncGeneratorElectricalData m_electricalData; }; -#endif // SYNCGENERATOR_H +#endif // SYNCGENERATOR_H diff --git a/Project/Text.cpp b/Project/Text.cpp index 9fe4fe8..51cdce9 100644 --- a/Project/Text.cpp +++ b/Project/Text.cpp @@ -164,14 +164,14 @@ void Text::UpdateText(double systemPowerBase) case TYPE_BUS: { Bus* bus = static_cast<Bus*>(m_element); if(bus) { - BusElectricalData data = bus->GetEletricalData(); + BusElectricalData data = bus->GetElectricalData(); double baseVoltage = data.nominalVoltage; if(data.nominalVoltageUnit == UNIT_kV) baseVoltage *= 1e3; double baseCurrent = systemPowerBase / (std::sqrt(3.0) * baseVoltage); switch(m_dataType) { case DATA_NAME: { - SetText(bus->GetEletricalData().name); + SetText(bus->GetElectricalData().name); } break; case DATA_VOLTAGE: { double voltage = std::abs(data.voltage); @@ -672,7 +672,7 @@ void Text::UpdateText(double systemPowerBase) LoadElectricalData data = load->GetPUElectricalData(systemPowerBase); std::complex<double> sPower(data.activePower, data.reactivePower); if(data.loadType == CONST_IMPEDANCE && load->IsOnline()) { - std::complex<double> v = static_cast<Bus*>(load->GetParentList()[0])->GetEletricalData().voltage; + std::complex<double> v = static_cast<Bus*>(load->GetParentList()[0])->GetElectricalData().voltage; sPower = std::pow(std::abs(v), 2) * sPower; } if(!load->IsOnline()) sPower = std::complex<double>(0.0, 0.0); @@ -847,7 +847,7 @@ void Text::UpdateText(double systemPowerBase) reativePower = 0.0; else { std::complex<double> v = - static_cast<Bus*>(capacitor->GetParentList()[0])->GetEletricalData().voltage; + static_cast<Bus*>(capacitor->GetParentList()[0])->GetElectricalData().voltage; reativePower *= std::pow(std::abs(v), 2); } switch(m_dataType) { @@ -888,7 +888,7 @@ void Text::UpdateText(double systemPowerBase) reativePower = 0.0; else { std::complex<double> v = - static_cast<Bus*>(inductor->GetParentList()[0])->GetEletricalData().voltage; + static_cast<Bus*>(inductor->GetParentList()[0])->GetElectricalData().voltage; reativePower *= std::pow(std::abs(v), 2); } switch(m_dataType) { diff --git a/Project/TextForm.cpp b/Project/TextForm.cpp index b33c64b..b2624ba 100644 --- a/Project/TextForm.cpp +++ b/Project/TextForm.cpp @@ -3,6 +3,7 @@ TextForm::TextForm(wxWindow* parent, Text* text, std::vector<Element*> elementList, double systemPowerBase) : TextFormBase(parent) { + SetSize(GetBestSize()); m_parent = parent; m_textToEdit = text; m_allElements.GetElementsFromList(elementList); @@ -773,7 +774,7 @@ void TextForm::ElementTypeChoice() case TYPE_BUS: { for(int i = 0; i < (int)m_allElements.GetBusList().size(); i++) { Bus* bus = m_allElements.GetBusList()[i]; - arrayString.Add(bus->GetEletricalData().name); + arrayString.Add(bus->GetElectricalData().name); } } break; case TYPE_SYNC_GENERATOR: { @@ -1004,8 +1005,8 @@ void TextForm::DataTypeChoice() Bus* bus1 = static_cast<Bus*>(line->GetParentList()[0]); Bus* bus2 = static_cast<Bus*>(line->GetParentList()[1]); - wxString bus1Name = bus1->GetEletricalData().name; - wxString bus2Name = bus2->GetEletricalData().name; + wxString bus1Name = bus1->GetElectricalData().name; + wxString bus2Name = bus2->GetElectricalData().name; m_choiceTextFromBus->Append(bus1Name); m_choiceTextFromBus->Append(bus2Name); @@ -1026,8 +1027,8 @@ void TextForm::DataTypeChoice() Bus* bus1 = static_cast<Bus*>(transformer->GetParentList()[0]); Bus* bus2 = static_cast<Bus*>(transformer->GetParentList()[1]); - wxString bus1Name = bus1->GetEletricalData().name; - wxString bus2Name = bus2->GetEletricalData().name; + wxString bus1Name = bus1->GetElectricalData().name; + wxString bus2Name = bus2->GetElectricalData().name; m_choiceTextFromBus->Append(bus1Name); m_choiceTextFromBus->Append(bus2Name); diff --git a/Project/TransferFunction.cpp b/Project/TransferFunction.cpp index ebb59fb..b91627a 100644 --- a/Project/TransferFunction.cpp +++ b/Project/TransferFunction.cpp @@ -355,3 +355,13 @@ bool TransferFunction::Solve(double input, double timeStep) return true; } + +Element* TransferFunction::GetCopy() +{ + TransferFunction* copy = new TransferFunction(m_elementID); + *copy = *this; + m_glStringNum = NULL; + m_glStringDen = NULL; + UpdateTFText(); + return copy; +} diff --git a/Project/TransferFunction.h b/Project/TransferFunction.h index 19bd04e..aab4bd2 100644 --- a/Project/TransferFunction.h +++ b/Project/TransferFunction.h @@ -32,9 +32,12 @@ class TransferFunction : public ControlElement virtual void SetNumerator(std::vector<double> numerator) { m_numerator = numerator; } virtual void SetDenominator(std::vector<double> denominator) { m_denominator = denominator; } virtual void UpdateTFText(); + virtual void UpdateText() { UpdateTFText(); } virtual SpaceState GetSpaceState() { return m_ss; } virtual void CalculateSpaceState(int maxIteration = 100, double error = 1e-3); virtual bool Solve(double input, double timeStep); + + virtual Element* GetCopy(); protected: virtual void SetText(wxString numerator, wxString denominator); diff --git a/Project/TransferFunctionForm.cpp b/Project/TransferFunctionForm.cpp index d71b28b..0317da6 100644 --- a/Project/TransferFunctionForm.cpp +++ b/Project/TransferFunctionForm.cpp @@ -4,6 +4,8 @@ TransferFunctionForm::TransferFunctionForm(wxWindow* parent, TransferFunction* transferFunction) : TransferFunctionFormBase(parent) { + SetSize(GetBestSize()); + m_parent = parent; m_tf = transferFunction; LoadTFData(); diff --git a/Project/Transformer.cpp b/Project/Transformer.cpp index 3d3156a..584a139 100644 --- a/Project/Transformer.cpp +++ b/Project/Transformer.cpp @@ -1,8 +1,7 @@ #include "TransformerForm.h" #include "Transformer.h" -Transformer::Transformer() - : Branch() +Transformer::Transformer() : Branch() { for(int i = 0; i < 2; i++) { for(int j = 0; j < 3; j++) { @@ -10,8 +9,7 @@ Transformer::Transformer() } } } -Transformer::Transformer(wxString name) - : Branch() +Transformer::Transformer(wxString name) : Branch() { for(int i = 0; i < 2; i++) { for(int j = 0; j < 3; j++) { @@ -30,10 +28,10 @@ bool Transformer::AddParent(Element* parent, wxPoint2DDouble position) m_parentList.push_back(parent); parent->AddChild(this); wxPoint2DDouble parentPt = - parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. - parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. - parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. - m_pointList.push_back(parentPt); // First point + parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. + parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. + parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. + m_pointList.push_back(parentPt); // First point m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_position)); wxRect2DDouble genRect(0, 0, 0, 0); @@ -46,9 +44,9 @@ bool Transformer::AddParent(Element* parent, wxPoint2DDouble position) m_parentList.push_back(parent); parent->AddChild(this); wxPoint2DDouble parentPt = - parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. - parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. - parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. + parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position. + parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. + parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back. // Get the average between the two bus points. m_position = @@ -56,9 +54,10 @@ bool Transformer::AddParent(Element* parent, wxPoint2DDouble position) // Set the transformer rectangle. m_width = 70.0; m_height = 40.0; - SetPosition(m_position); // This method calculates the rectangle propely. + SetPosition(m_position); // This method calculates the rectangle propely. // Set the "side" points. - m_pointList.push_back(wxPoint2DDouble(m_rect.GetPosition() + wxPoint2DDouble(-10 - m_borderSize, m_height / 2.0))); + m_pointList.push_back( + wxPoint2DDouble(m_rect.GetPosition() + wxPoint2DDouble(-10 - m_borderSize, m_height / 2.0))); m_pointList.push_back( wxPoint2DDouble(m_rect.GetPosition() + wxPoint2DDouble(m_width + 10 + m_borderSize, m_height / 2.0))); @@ -72,7 +71,7 @@ bool Transformer::AddParent(Element* parent, wxPoint2DDouble position) // Set the second switch point. m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_pointList[m_pointList.size() - 1])); - m_pointList.push_back(parentPt); // Last point. + m_pointList.push_back(parentPt); // Last point. m_inserted = true; wxRect2DDouble genRect(0, 0, 0, 0); @@ -95,9 +94,12 @@ bool Transformer::Contains(wxPoint2DDouble position) const void Transformer::Draw(wxPoint2DDouble translation, double scale) const { OpenGLColour elementColour; - if(m_online) - elementColour = m_onlineElementColour; - else + if(m_online) { + if(m_dynEvent) + elementColour = m_dynamicEventColour; + else + elementColour = m_onlineElementColour; + } else elementColour = m_offlineElementColour; if(m_inserted) { @@ -113,10 +115,10 @@ void Transformer::Draw(wxPoint2DDouble translation, double scale) const glRotated(m_angle, 0.0, 0.0, 1.0); glTranslated(-m_position.m_x, -m_position.m_y, 0.0); - DrawCircle( - m_rect.GetPosition() + wxPoint2DDouble(20.0, 20.0), 20 + (m_borderSize + 1.5) / scale, 20, GL_POLYGON); - DrawCircle( - m_rect.GetPosition() + wxPoint2DDouble(50.0, 20.0), 20 + (m_borderSize + 1.5) / scale, 20, GL_POLYGON); + DrawCircle(m_rect.GetPosition() + wxPoint2DDouble(20.0, 20.0), 20 + (m_borderSize + 1.5) / scale, 20, + GL_POLYGON); + DrawCircle(m_rect.GetPosition() + wxPoint2DDouble(50.0, 20.0), 20 + (m_borderSize + 1.5) / scale, 20, + GL_POLYGON); glPopMatrix(); @@ -328,12 +330,12 @@ bool Transformer::SetNodeParent(Element* parent) wxRect2DDouble nodeRect(0, 0, 0, 0); if(m_activeNodeID == 1) { nodeRect = wxRect2DDouble(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize, - 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); + 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); } if(m_activeNodeID == 2) { nodeRect = wxRect2DDouble(m_pointList[m_pointList.size() - 1].m_x - 5.0 - m_borderSize, - m_pointList[m_pointList.size() - 1].m_y - 5.0 - m_borderSize, 10 + 2.0 * m_borderSize, - 10 + 2.0 * m_borderSize); + m_pointList[m_pointList.size() - 1].m_y - 5.0 - m_borderSize, + 10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize); } if(parent->Intersects(nodeRect)) { @@ -348,8 +350,8 @@ bool Transformer::SetNodeParent(Element* parent) // Centralize the node on bus. wxPoint2DDouble parentPt = parent->RotateAtPosition( - m_pointList[0], -parent->GetAngle()); // Rotate click to horizontal position. - parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. + m_pointList[0], -parent->GetAngle()); // Rotate click to horizontal position. + parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus. parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); m_pointList[0] = parentPt; @@ -427,17 +429,17 @@ wxString Transformer::GetTipText() const if(m_online) { tipText += "\n"; int busNumber[2]; - busNumber[0] = static_cast<Bus*>(m_parentList[0])->GetEletricalData().number + 1; - busNumber[1] = static_cast<Bus*>(m_parentList[1])->GetEletricalData().number + 1; + busNumber[0] = static_cast<Bus*>(m_parentList[0])->GetElectricalData().number + 1; + busNumber[1] = static_cast<Bus*>(m_parentList[1])->GetElectricalData().number + 1; tipText += _("\nP") + wxString::Format("(%d-%d) = ", busNumber[0], busNumber[1]) + - wxString::FromDouble(m_electricalData.powerFlow[0].real(), 5) + _(" p.u."); + wxString::FromDouble(m_electricalData.powerFlow[0].real(), 5) + _(" p.u."); tipText += _("\nQ") + wxString::Format("(%d-%d) = ", busNumber[0], busNumber[1]) + - wxString::FromDouble(m_electricalData.powerFlow[0].imag(), 5) + _(" p.u."); + wxString::FromDouble(m_electricalData.powerFlow[0].imag(), 5) + _(" p.u."); tipText += _("\nP") + wxString::Format("(%d-%d) = ", busNumber[1], busNumber[0]) + - wxString::FromDouble(m_electricalData.powerFlow[1].real(), 5) + _(" p.u."); + wxString::FromDouble(m_electricalData.powerFlow[1].real(), 5) + _(" p.u."); tipText += _("\nQ") + wxString::Format("(%d-%d) = ", busNumber[1], busNumber[0]) + - wxString::FromDouble(m_electricalData.powerFlow[1].imag(), 5) + _(" p.u."); + wxString::FromDouble(m_electricalData.powerFlow[1].imag(), 5) + _(" p.u."); } return tipText; diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp index 5575764..4ef610d 100644 --- a/Project/Workspace.cpp +++ b/Project/Workspace.cpp @@ -16,14 +16,16 @@ #include "PowerFlow.h" #include "Fault.h" +#include "Electromechanical.h" + +#include "ElementPlotData.h" +#include "ChartView.h" + +#include "PropertiesData.h" // Workspace -Workspace::Workspace() - : WorkspaceBase(NULL) -{ -} -Workspace::Workspace(wxWindow* parent, wxString name, wxStatusBar* statusBar) - : WorkspaceBase(parent) +Workspace::Workspace() : WorkspaceBase(NULL) {} +Workspace::Workspace(wxWindow* parent, wxString name, wxStatusBar* statusBar) : WorkspaceBase(parent) { m_timer->Start(); m_name = name; @@ -36,8 +38,10 @@ Workspace::Workspace(wxWindow* parent, wxString name, wxStatusBar* statusBar) m_elementNumber[i] = 1; } - const int widths[4] = { -3, -1, 100, 100 }; + const int widths[4] = {-3, -1, 100, 100}; m_statusBar->SetStatusWidths(4, widths); + + m_properties = new PropertiesData(); } Workspace::~Workspace() @@ -51,6 +55,7 @@ Workspace::~Workspace() if(m_camera) delete m_camera; if(m_glContext) delete m_glContext; if(m_tipWindow) delete m_tipWindow; + if(m_properties) delete m_properties; } void Workspace::OnPaint(wxPaintEvent& event) @@ -60,8 +65,8 @@ void Workspace::OnPaint(wxPaintEvent& event) SetViewport(); // Set GLCanvas scale and translation. - glScaled(m_camera->GetScale(), m_camera->GetScale(), 0.0); // Scale - glTranslated(m_camera->GetTranslation().m_x, m_camera->GetTranslation().m_y, 0.0); // Translation + glScaled(m_camera->GetScale(), m_camera->GetScale(), 0.0); // Scale + glTranslated(m_camera->GetTranslation().m_x, m_camera->GetTranslation().m_y, 0.0); // Translation // Draw @@ -94,14 +99,14 @@ void Workspace::OnPaint(wxPaintEvent& event) glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y); glEnd(); - glFlush(); // Sends all pending information directly to the GPU. + glFlush(); // Sends all pending information directly to the GPU. m_glCanvas->SwapBuffers(); event.Skip(); } void Workspace::SetViewport() { - glClearColor(1.0, 1.0, 1.0, 1.0); // White background. + glClearColor(1.0, 1.0, 1.0, 1.0); // White background. glClear(GL_COLOR_BUFFER_BIT); glDisable(GL_DEPTH_TEST); glDisable(GL_TEXTURE_2D); @@ -143,7 +148,7 @@ void Workspace::OnLeftClickDown(wxMouseEvent& event) if(typeid(*element) == typeid(Bus)) { // Select the bus. element->SetSelected(); - foundElement = true; // Element found. + foundElement = true; // Element found. // Add the new element's parent. If the element being inserted returns true, back to // edit mode. if(newElement->AddParent(element, m_camera->ScreenToWorld(clickPoint))) { @@ -166,7 +171,7 @@ void Workspace::OnLeftClickDown(wxMouseEvent& event) bool clickPickbox = false; for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) { PowerElement* element = *it; - element->ResetPickboxes(); // Reset pickbox state. + element->ResetPickboxes(); // Reset pickbox state. // Set movement initial position (not necessarily will be moved). element->StartMove(m_camera->ScreenToWorld(clickPoint)); @@ -259,21 +264,22 @@ void Workspace::OnLeftDoubleClick(wxMouseEvent& event) // propagated through the lines if(elementIsBus) { // The voltage was changed - if(oldBus.GetEletricalData().nominalVoltage != currentBus->GetEletricalData().nominalVoltage || - oldBus.GetEletricalData().nominalVoltageUnit != currentBus->GetEletricalData().nominalVoltageUnit) { + if(oldBus.GetElectricalData().nominalVoltage != currentBus->GetElectricalData().nominalVoltage || + oldBus.GetElectricalData().nominalVoltageUnit != + currentBus->GetElectricalData().nominalVoltageUnit) { // Check if the bus has line as child. std::vector<Element*> childList = element->GetChildList(); for(auto itc = childList.begin(), itcEnd = childList.end(); itc != itcEnd; ++itc) { Element* child = *itc; if(typeid(*child) == typeid(Line)) { wxMessageDialog msgDialog(this, _("Do you want to change the rated voltage of the path?"), - _("Warning"), wxYES_NO | wxCENTRE | wxICON_WARNING); + _("Warning"), wxYES_NO | wxCENTRE | wxICON_WARNING); if(msgDialog.ShowModal() == wxID_YES) ValidateBusesVoltages(element); else { - auto data = currentBus->GetEletricalData(); - data.nominalVoltage = oldBus.GetEletricalData().nominalVoltage; - data.nominalVoltageUnit = oldBus.GetEletricalData().nominalVoltageUnit; + auto data = currentBus->GetElectricalData(); + data.nominalVoltage = oldBus.GetElectricalData().nominalVoltage; + data.nominalVoltageUnit = oldBus.GetElectricalData().nominalVoltageUnit; currentBus->SetElectricalData(data); } break; @@ -445,7 +451,7 @@ void Workspace::OnMouseMotion(wxMouseEvent& event) bool redraw = false; switch(m_mode) { case MODE_INSERT: { - Element* newElement = *(m_elementList.end() - 1); // Get the last element in the list. + Element* newElement = *(m_elementList.end() - 1); // Get the last element in the list. newElement->SetPosition(m_camera->ScreenToWorld(event.GetPosition())); redraw = true; } break; @@ -563,7 +569,7 @@ void Workspace::OnMouseMotion(wxMouseEvent& event) if(redraw) Redraw(); m_camera->UpdateMousePosition(event.GetPosition()); UpdateStatusBar(); - m_timer->Start(); // Restart the timer. + m_timer->Start(); // Restart the timer. event.Skip(); } @@ -586,6 +592,7 @@ void Workspace::OnMiddleDown(wxMouseEvent& event) } m_camera->StartTranslation(m_camera->ScreenToWorld(event.GetPosition())); UpdateStatusBar(); + event.Skip(); } void Workspace::OnMiddleUp(wxMouseEvent& event) @@ -610,6 +617,7 @@ void Workspace::OnMiddleUp(wxMouseEvent& event) } break; } UpdateStatusBar(); + event.Skip(); } void Workspace::OnScroll(wxMouseEvent& event) @@ -631,10 +639,10 @@ void Workspace::OnKeyDown(wxKeyEvent& event) char key = event.GetUnicodeKey(); if(key != WXK_NONE) { switch(key) { - case WXK_ESCAPE: // Cancel operations. + case WXK_ESCAPE: // Cancel operations. { if(m_mode == MODE_INSERT) { - m_elementList.pop_back(); // Removes the last element being inserted. + m_elementList.pop_back(); // Removes the last element being inserted. m_mode = MODE_EDIT; Redraw(); } else if(m_mode == MODE_INSERT_TEXT) { @@ -643,7 +651,7 @@ void Workspace::OnKeyDown(wxKeyEvent& event) Redraw(); } } break; - case WXK_DELETE: // Delete selected elements + case WXK_DELETE: // Delete selected elements { DeleteSelectedElements(); } break; @@ -661,15 +669,15 @@ void Workspace::OnKeyDown(wxKeyEvent& event) Fit(); } } break; - case 'R': // Rotate the selected elements. + case 'R': // Rotate the selected elements. { RotateSelectedElements(event.GetModifiers() != wxMOD_SHIFT); } break; - case 'B': // Insert a bus. + case 'B': // Insert a bus. { if(!insertingElement) { Bus* newBus = new Bus(m_camera->ScreenToWorld(event.GetPosition()), - wxString::Format(_("Bus %d"), GetElementNumber(ID_BUS))); + wxString::Format(_("Bus %d"), GetElementNumber(ID_BUS))); IncrementElementNumber(ID_BUS); m_elementList.push_back(newBus); m_mode = MODE_INSERT; @@ -679,13 +687,13 @@ void Workspace::OnKeyDown(wxKeyEvent& event) } break; case 'L': { if(!insertingElement) { - if(!event.ControlDown() && event.ShiftDown()) { // Insert a load. + if(!event.ControlDown() && event.ShiftDown()) { // Insert a load. Load* newLoad = new Load(wxString::Format(_("Load %d"), GetElementNumber(ID_LOAD))); IncrementElementNumber(ID_LOAD); m_elementList.push_back(newLoad); m_mode = MODE_INSERT; m_statusBar->SetStatusText(_("Insert Load: Click on a buses, ESC to cancel.")); - } else if(!event.ControlDown() && !event.ShiftDown()) { // Insert a power line. + } else if(!event.ControlDown() && !event.ShiftDown()) { // Insert a power line. Line* newLine = new Line(wxString::Format(_("Line %d"), GetElementNumber(ID_LINE))); IncrementElementNumber(ID_LINE); m_elementList.push_back(newLine); @@ -696,11 +704,12 @@ void Workspace::OnKeyDown(wxKeyEvent& event) } // Tests - Ctrl + Shift + L if(event.ControlDown() && event.ShiftDown()) { - ControlEditor* ce = new ControlEditor(this, IOControl::IN_TERMINAL_VOLTAGE | IOControl::OUT_FIELD_VOLTAGE); + ControlEditor* ce = + new ControlEditor(this, IOControl::IN_TERMINAL_VOLTAGE | IOControl::OUT_FIELD_VOLTAGE); ce->Show(); } } break; - case 'T': // Insert a transformer. + case 'T': // Insert a transformer. { if(!insertingElement) { Transformer* newTransformer = @@ -712,7 +721,7 @@ void Workspace::OnKeyDown(wxKeyEvent& event) Redraw(); } } break; - case 'G': // Insert a generator. + case 'G': // Insert a generator. { if(!insertingElement) { SyncGenerator* newGenerator = @@ -726,14 +735,14 @@ void Workspace::OnKeyDown(wxKeyEvent& event) } break; case 'I': { if(!insertingElement) { - if(event.GetModifiers() == wxMOD_SHIFT) { // Insert an inductor. + if(event.GetModifiers() == wxMOD_SHIFT) { // Insert an inductor. Inductor* newInductor = new Inductor(wxString::Format(_("Inductor %d"), GetElementNumber(ID_INDUCTOR))); IncrementElementNumber(ID_INDUCTOR); m_elementList.push_back(newInductor); m_mode = MODE_INSERT; m_statusBar->SetStatusText(_("Insert Inductor: Click on a buses, ESC to cancel.")); - } else // Insert an induction motor. + } else // Insert an induction motor. { IndMotor* newIndMotor = new IndMotor(wxString::Format(_("Induction motor %d"), GetElementNumber(ID_INDMOTOR))); @@ -745,7 +754,7 @@ void Workspace::OnKeyDown(wxKeyEvent& event) Redraw(); } } break; - case 'K': // Insert a synchronous condenser. + case 'K': // Insert a synchronous condenser. { if(!insertingElement) { SyncMotor* newSyncCondenser = @@ -759,7 +768,7 @@ void Workspace::OnKeyDown(wxKeyEvent& event) } break; case 'C': { if(!insertingElement) { - if(event.GetModifiers() == wxMOD_SHIFT) { // Insert a capacitor. + if(event.GetModifiers() == wxMOD_SHIFT) { // Insert a capacitor. Capacitor* newCapacitor = new Capacitor(wxString::Format(_("Capacitor %d"), GetElementNumber(ID_CAPACITOR))); IncrementElementNumber(ID_CAPACITOR); @@ -767,7 +776,7 @@ void Workspace::OnKeyDown(wxKeyEvent& event) m_mode = MODE_INSERT; m_statusBar->SetStatusText(_("Insert Capacitor: Click on a buses, ESC to cancel.")); Redraw(); - } else if(event.GetModifiers() == wxMOD_CONTROL) { // Copy. + } else if(event.GetModifiers() == wxMOD_CONTROL) { // Copy. CopySelection(); } } @@ -916,7 +925,7 @@ void Workspace::RotateSelectedElements(bool clockwise) // Parent's element rotating... for(int i = 0; i < (int)element->GetParentList().size(); i++) { Element* parent = element->GetParentList()[i]; - if(parent) { // Check if parent is not null + if(parent) { // Check if parent is not null if(parent->IsSelected()) { element->RotateNode(parent, clockwise); // Update the positions used on motion action, the element will not be necessarily @@ -949,7 +958,6 @@ void Workspace::DeleteSelectedElements() Element* element = *it; if(element->IsSelected()) { - // Remove child/parent. std::vector<Element*> childList = element->GetChildList(); for(auto itc = childList.begin(), itEnd = childList.end(); itc != itEnd; ++itc) { @@ -992,8 +1000,8 @@ void Workspace::DeleteSelectedElements() } bool Workspace::GetElementsCorners(wxPoint2DDouble& leftUpCorner, - wxPoint2DDouble& rightDownCorner, - std::vector<Element*> elementList) + wxPoint2DDouble& rightDownCorner, + std::vector<Element*> elementList) { if(elementList.size() == 0) return false; @@ -1042,19 +1050,19 @@ void Workspace::Fit() void Workspace::ValidateBusesVoltages(Element* initialBus) { - double nominalVoltage = static_cast<Bus*>(initialBus)->GetEletricalData().nominalVoltage; - ElectricalUnit nominalVoltageUnit = static_cast<Bus*>(initialBus)->GetEletricalData().nominalVoltageUnit; + double nominalVoltage = static_cast<Bus*>(initialBus)->GetElectricalData().nominalVoltage; + ElectricalUnit nominalVoltageUnit = static_cast<Bus*>(initialBus)->GetElectricalData().nominalVoltageUnit; for(auto it = m_elementList.begin(); it != m_elementList.end(); it++) { Element* child = *it; if(typeid(*child) == typeid(Line)) { if(child->GetParentList()[0] && child->GetParentList()[1]) { - BusElectricalData data1 = static_cast<Bus*>(child->GetParentList()[0])->GetEletricalData(); - BusElectricalData data2 = static_cast<Bus*>(child->GetParentList()[1])->GetEletricalData(); + BusElectricalData data1 = static_cast<Bus*>(child->GetParentList()[0])->GetElectricalData(); + BusElectricalData data2 = static_cast<Bus*>(child->GetParentList()[1])->GetElectricalData(); if(data1.nominalVoltage != data2.nominalVoltage || - data1.nominalVoltageUnit != data2.nominalVoltageUnit) { + data1.nominalVoltageUnit != data2.nominalVoltageUnit) { data1.nominalVoltage = nominalVoltage; data2.nominalVoltage = nominalVoltage; data1.nominalVoltageUnit = nominalVoltageUnit; @@ -1063,7 +1071,7 @@ void Workspace::ValidateBusesVoltages(Element* initialBus) static_cast<Bus*>(child->GetParentList()[0])->SetElectricalData(data1); static_cast<Bus*>(child->GetParentList()[1])->SetElectricalData(data2); - it = m_elementList.begin(); // Restart search. + it = m_elementList.begin(); // Restart search. } } } @@ -1082,8 +1090,8 @@ void Workspace::ValidateElementsVoltages() for(int i = 0; i < (int)child->GetParentList().size(); i++) { Bus* parent = static_cast<Bus*>(child->GetParentList()[i]); if(parent) { - nominalVoltage.push_back(parent->GetEletricalData().nominalVoltage); - nominalVoltageUnit.push_back(parent->GetEletricalData().nominalVoltageUnit); + nominalVoltage.push_back(parent->GetElectricalData().nominalVoltage); + nominalVoltageUnit.push_back(parent->GetElectricalData().nominalVoltageUnit); } } child->SetNominalVoltage(nominalVoltage, nominalVoltageUnit); @@ -1123,7 +1131,7 @@ void Workspace::CopySelection() Element* element = *it; if(typeid(*element) == typeid(Bus)) { Bus* bus = static_cast<Bus*>(element); - auto data = bus->GetEletricalData(); + auto data = bus->GetElectricalData(); data.number = busNumber; bus->SetElectricalData(data); busNumber++; @@ -1151,7 +1159,7 @@ bool Workspace::Paste() if(wxTheClipboard->IsSupported(wxDataFormat("PSPCopy"))) { if(!wxTheClipboard->GetData(dataObject)) { wxMessageDialog dialog(this, _("It was not possible to paste from clipboard."), _("Error"), - wxOK | wxCENTER | wxICON_ERROR, wxDefaultPosition); + wxOK | wxCENTER | wxICON_ERROR, wxDefaultPosition); dialog.ShowModal(); wxTheClipboard->Close(); return false; @@ -1169,7 +1177,7 @@ bool Workspace::Paste() // Paste buses (parents). auto parentList = elementsLists->parentList; - std::vector<Bus*> pastedBusList; // To set new parents; + std::vector<Bus*> pastedBusList; // To set new parents; for(auto it = parentList.begin(), itEnd = parentList.end(); it != itEnd; ++it) { Element* copy = (*it)->GetCopy(); if(copy) { @@ -1259,7 +1267,7 @@ bool Workspace::Paste() } } else { wxMessageDialog dialog(this, _("It was not possible to paste from clipboard."), _("Error"), - wxOK | wxCENTER | wxICON_ERROR, wxDefaultPosition); + wxOK | wxCENTER | wxICON_ERROR, wxDefaultPosition); dialog.ShowModal(); return false; } @@ -1393,3 +1401,46 @@ bool Workspace::RunSCPower() return result; } + +bool Workspace::RunStability() +{ + // Run power flow before stability. + RunPowerFlow(); + + Electromechanical stability(this, GetElementList(), m_properties->GetSimulationPropertiesData()); + bool result = stability.RunStabilityCalculation(); + if(!result) { + wxMessageDialog msgDialog(this, stability.GetErrorMessage(), _("Error"), wxOK | wxCENTRE | wxICON_ERROR); + msgDialog.ShowModal(); + } + m_stabilityTimeVector.clear(); + m_stabilityTimeVector = stability.GetTimeVector(); + + // Run power flow after stability. + RunPowerFlow(); + + wxMessageDialog msgDialog(this, _("Do you wish to open the stability graphics?"), _("Question"), + wxYES_NO | wxCENTRE | wxICON_QUESTION); + if(msgDialog.ShowModal() == wxID_YES) { + std::vector<ElementPlotData> plotDataList; + for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) { + PowerElement* element = *it; + ElementPlotData plotData; + if(element->GetPlotData(plotData)) plotDataList.push_back(plotData); + } + ElementPlotData tests(_("Error"), ElementPlotData::CT_TEST); + tests.AddData(stability.m_wErrorVector, _("Speed error")); + tests.AddData(stability.m_numItVector, _("Number iterations")); + plotDataList.push_back(tests); + + ChartView* cView = new ChartView(this, plotDataList, m_stabilityTimeVector); + cView->Show(); + } + + return result; +} +void Workspace::OnMiddleDoubleClick(wxMouseEvent& event) +{ + Fit(); + event.Skip(); +} diff --git a/Project/Workspace.h b/Project/Workspace.h index bf03a9e..2a8b9b6 100644 --- a/Project/Workspace.h +++ b/Project/Workspace.h @@ -31,6 +31,12 @@ class Text; class PowerFlow; class Fault; +class Electromechanical; + +class ElementPlotData; +class ChartView; + +class PropertiesData; enum ElementID { ID_BUS = 0, @@ -106,12 +112,18 @@ public: int GetElementNumber(ElementID elementID) { return m_elementNumber[elementID]; } void IncrementElementNumber(ElementID elementID) { m_elementNumber[elementID]++; } + + PropertiesData* GetProperties() const { return m_properties; } + + std::vector<double> GetStabilityTimeVector() const { return m_stabilityTimeVector; } bool RunPowerFlow(); bool RunFault(); bool RunSCPower(); + bool RunStability(); protected: + virtual void OnMiddleDoubleClick(wxMouseEvent& event); virtual void OnIdle(wxIdleEvent& event); virtual void OnTimer(wxTimerEvent& event); virtual void OnLeftDoubleClick(wxMouseEvent& event); @@ -146,6 +158,10 @@ protected: wxRect2DDouble m_selectionRect; wxPoint2DDouble m_startSelRect; + + PropertiesData* m_properties = NULL; + + std::vector<double> m_stabilityTimeVector; bool m_justOpened = false; }; diff --git a/Project/Workspace.wxcp b/Project/Workspace.wxcp index a65cb3c..bebedf1 100644 --- a/Project/Workspace.wxcp +++ b/Project/Workspace.wxcp @@ -341,6 +341,13 @@ "m_functionNameAndSignature": "OnIdle(wxIdleEvent& event)", "m_description": "Process a wxEVT_IDLE event", "m_noBody": false + }, { + "m_eventName": "wxEVT_MIDDLE_DCLICK", + "m_eventClass": "wxMouseEvent", + "m_eventHandler": "wxMouseEventHandler", + "m_functionNameAndSignature": "OnMiddleDoubleClick(wxMouseEvent& event)", + "m_description": "Process a wxEVT_MIDDLE_DCLICK event.", + "m_noBody": false }], "m_children": [] }] diff --git a/Project/WorkspaceBase.cpp b/Project/WorkspaceBase.cpp index a4a6d64..6fc2b79 100644 --- a/Project/WorkspaceBase.cpp +++ b/Project/WorkspaceBase.cpp @@ -57,6 +57,7 @@ WorkspaceBase::WorkspaceBase(wxWindow* parent, wxWindowID id, const wxPoint& pos m_glCanvas->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(WorkspaceBase::OnRightClickDown), NULL, this); m_glCanvas->Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(WorkspaceBase::OnLeftDoubleClick), NULL, this); m_glCanvas->Connect(wxEVT_IDLE, wxIdleEventHandler(WorkspaceBase::OnIdle), NULL, this); + m_glCanvas->Connect(wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(WorkspaceBase::OnMiddleDoubleClick), NULL, this); m_timer->Connect(wxEVT_TIMER, wxTimerEventHandler(WorkspaceBase::OnTimer), NULL, this); } @@ -74,6 +75,7 @@ WorkspaceBase::~WorkspaceBase() m_glCanvas->Disconnect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(WorkspaceBase::OnRightClickDown), NULL, this); m_glCanvas->Disconnect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(WorkspaceBase::OnLeftDoubleClick), NULL, this); m_glCanvas->Disconnect(wxEVT_IDLE, wxIdleEventHandler(WorkspaceBase::OnIdle), NULL, this); + m_glCanvas->Disconnect(wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(WorkspaceBase::OnMiddleDoubleClick), NULL, this); m_timer->Disconnect(wxEVT_TIMER, wxTimerEventHandler(WorkspaceBase::OnTimer), NULL, this); m_timer->Stop(); diff --git a/Project/WorkspaceBase.h b/Project/WorkspaceBase.h index 4696652..2ceed20 100644 --- a/Project/WorkspaceBase.h +++ b/Project/WorkspaceBase.h @@ -50,6 +50,7 @@ protected: virtual void OnRightClickDown(wxMouseEvent& event) { event.Skip(); } virtual void OnLeftDoubleClick(wxMouseEvent& event) { event.Skip(); } virtual void OnIdle(wxIdleEvent& event) { event.Skip(); } + virtual void OnMiddleDoubleClick(wxMouseEvent& event) { event.Skip(); } virtual void OnTimer(wxTimerEvent& event) { event.Skip(); } public: diff --git a/Project/WorkspaceBitmaps.cpp b/Project/WorkspaceBitmaps.cpp index 7925da4..b370872 100644 --- a/Project/WorkspaceBitmaps.cpp +++ b/Project/WorkspaceBitmaps.cpp @@ -44,6 +44,6 @@ void wxC52C4InitBitmapResources() else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase); } - XRC_ADD_FILE(wxT("XRC_resource/WorkspaceBitmaps.cpp$C__Users_Thales_Documents_GitHub_PSP_Project_WorkspaceBitmaps.xrc"), xml_res_file_0, xml_res_size_0, wxT("text/xml")); - wxXmlResource::Get()->Load(wxT("memory:XRC_resource/WorkspaceBitmaps.cpp$C__Users_Thales_Documents_GitHub_PSP_Project_WorkspaceBitmaps.xrc")); + XRC_ADD_FILE(wxT("XRC_resource/WorkspaceBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_WorkspaceBitmaps.xrc"), xml_res_file_0, xml_res_size_0, wxT("text/xml")); + wxXmlResource::Get()->Load(wxT("memory:XRC_resource/WorkspaceBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_WorkspaceBitmaps.xrc")); } diff --git a/Project/data/images/chart128.png b/Project/data/images/chart128.png Binary files differnew file mode 100644 index 0000000..c783595 --- /dev/null +++ b/Project/data/images/chart128.png diff --git a/Project/data/images/chart16.png b/Project/data/images/chart16.png Binary files differnew file mode 100644 index 0000000..273af79 --- /dev/null +++ b/Project/data/images/chart16.png diff --git a/Project/data/images/chart256.png b/Project/data/images/chart256.png Binary files differnew file mode 100644 index 0000000..d4c4381 --- /dev/null +++ b/Project/data/images/chart256.png diff --git a/Project/data/images/chart32.png b/Project/data/images/chart32.png Binary files differnew file mode 100644 index 0000000..4d90a37 --- /dev/null +++ b/Project/data/images/chart32.png diff --git a/Project/data/images/chart64.png b/Project/data/images/chart64.png Binary files differnew file mode 100644 index 0000000..39434a5 --- /dev/null +++ b/Project/data/images/chart64.png diff --git a/Project/data/lang/pt_BR/pt_BR.mo b/Project/data/lang/pt_BR/pt_BR.mo Binary files differindex 63cc044..40181b7 100644 --- a/Project/data/lang/pt_BR/pt_BR.mo +++ b/Project/data/lang/pt_BR/pt_BR.mo diff --git a/Project/data/lang/pt_BR/pt_BR.po b/Project/data/lang/pt_BR/pt_BR.po index 37d8d12..5dc750a 100644 --- a/Project/data/lang/pt_BR/pt_BR.po +++ b/Project/data/lang/pt_BR/pt_BR.po @@ -1,15 +1,15 @@ msgid "" msgstr "" "Project-Id-Version: PSP-UFU pt_BR 0.0.1\n" -"POT-Creation-Date: 2017-04-25 16:38-0300\n" -"PO-Revision-Date: 2017-04-25 16:41-0300\n" +"POT-Creation-Date: 2017-08-11 14:47-0300\n" +"PO-Revision-Date: 2017-08-11 14:56-0300\n" "Last-Translator: \n" "Language-Team: Thales Lima Oliveira <thaleslima.ufu@gmail.com>\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.1\n" +"X-Generator: Poedit 2.0.3\n" "X-Poedit-Basepath: ../../..\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Poedit-KeywordsList: _\n" @@ -17,181 +17,337 @@ msgstr "" "X-Poedit-SearchPathExcluded-0: wxMathPlot\n" "X-Poedit-SearchPathExcluded-1: rapidXML\n" -#: Bus.cpp:175 +#: Bus.cpp:174 msgid "Edit bus" -msgstr "" +msgstr "Editar barra" -#: Bus.cpp:204 Transformer.cpp:405 Transformer.cpp:416 +#: Bus.cpp:203 Transformer.cpp:405 Transformer.cpp:416 msgid " V" -msgstr "" +msgstr " V" -#: Bus.cpp:204 Transformer.cpp:408 Transformer.cpp:419 +#: Bus.cpp:203 Transformer.cpp:408 Transformer.cpp:419 msgid " kV" -msgstr "" +msgstr " kV" -#: Bus.cpp:206 +#: Bus.cpp:205 msgid "" "\n" "V = " msgstr "" +"\n" +"V = " -#: Bus.cpp:206 Bus.cpp:212 Bus.cpp:213 Bus.cpp:214 Bus.cpp:216 Bus.cpp:217 -#: Bus.cpp:218 Bus.cpp:221 Capacitor.cpp:190 IndMotor.cpp:99 IndMotor.cpp:118 +#: Bus.cpp:205 Bus.cpp:211 Bus.cpp:212 Bus.cpp:213 Bus.cpp:215 Bus.cpp:216 +#: Bus.cpp:217 Bus.cpp:220 Capacitor.cpp:190 IndMotor.cpp:99 IndMotor.cpp:118 #: Inductor.cpp:184 Line.cpp:495 Line.cpp:497 Line.cpp:499 Line.cpp:501 -#: Load.cpp:205 Load.cpp:222 SyncGenerator.cpp:158 SyncGenerator.cpp:177 +#: Load.cpp:205 Load.cpp:222 SyncGenerator.cpp:176 SyncGenerator.cpp:195 #: SyncMotor.cpp:124 SyncMotor.cpp:143 Transformer.cpp:434 Transformer.cpp:436 #: Transformer.cpp:438 Transformer.cpp:440 msgid " p.u." -msgstr "" +msgstr " p.u." -#: Bus.cpp:211 +#: Bus.cpp:210 msgid "" "\n" "\n" "Fault info:" msgstr "" +"\n" +"\n" +"Informações da falta:" -#: Bus.cpp:212 +#: Bus.cpp:211 msgid "" "\n" "Va = " msgstr "" +"\n" +"Va = " -#: Bus.cpp:213 +#: Bus.cpp:212 msgid "" "\n" "Vb = " msgstr "" +"\n" +"Vb = " -#: Bus.cpp:214 +#: Bus.cpp:213 msgid "" "\n" "Vc = " msgstr "" +"\n" +"Vc = " -#: Bus.cpp:216 +#: Bus.cpp:215 msgid "" "\n" "Ia = " msgstr "" +"\n" +"Ia = " -#: Bus.cpp:217 +#: Bus.cpp:216 msgid "" "\n" "Ib = " msgstr "" +"\n" +"Ib = " -#: Bus.cpp:218 +#: Bus.cpp:217 msgid "" "\n" "Ic = " msgstr "" +"\n" +"Ic = " -#: Bus.cpp:221 +#: Bus.cpp:220 msgid "" "\n" "\n" "Ssc = " msgstr "" +"\n" +"\n" +"Pcc = " + +#: Bus.cpp:236 TextForm.cpp:855 +msgid "Voltage" +msgstr "Tensão" + +#: Bus.cpp:237 TextForm.cpp:856 +msgid "Angle" +msgstr "Ângulo" #: BusForm.cpp:77 msgid "Value entered incorrectly in the field \"Rated voltage\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Tensão nominal\"." #: BusForm.cpp:83 msgid "Value entered incorrectly in the field \"Controlled voltage\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Tensão controlada\"." #: BusForm.cpp:118 msgid "Value entered incorrectly in the field \"Fault resistance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Resistência da falta\"." #: BusForm.cpp:122 msgid "Value entered incorrectly in the field \"Fault reactance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Reatância da falta\"." #: BusForm.cpp:129 msgid "Value entered incorrectly in the field \"Time\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Instante\"." #: BusForm.cpp:133 msgid "Value entered incorrectly in the field \"Fault lenght\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Duração da falta\"." #: BusForm.cpp:137 msgid "" "Value entered incorrectly in the field \"Fault resistence (stability)\"." msgstr "" +"Valor inserido incorretamente no campo \"Resistência da falta " +"(estabilidade)\"." #: BusForm.cpp:141 msgid "Value entered incorrectly in the field \"Fault reactance (stability)\"." msgstr "" +"Valor inserido incorretamente no campo \"Reatância da falta (estabilidade)\"." #: BusForm.cpp:200 msgid "Lines AB" -msgstr "" +msgstr "Fases AB" #: BusForm.cpp:201 msgid "Lines BC" -msgstr "" +msgstr "Fases BC" #: BusForm.cpp:202 msgid "Lines CA" -msgstr "" +msgstr "Fase CA" #: BusForm.cpp:207 msgid "Line A" -msgstr "" +msgstr "Fase A" #: BusForm.cpp:208 msgid "Line B" -msgstr "" +msgstr "Fase B" #: BusForm.cpp:209 msgid "Line C" -msgstr "" +msgstr "Fase C" #: BusForm.cpp:216 TextForm.cpp:958 msgid "V" -msgstr "" +msgstr "V" #: BusForm.cpp:219 TextForm.cpp:959 msgid "kV" -msgstr "" +msgstr "kV" #: Capacitor.cpp:116 msgid "Edit Capacitor" -msgstr "" +msgstr "Editar Capacitor" -#: Capacitor.cpp:135 +#: Capacitor.cpp:135 ChartView.cpp:94 msgid "Capacitor" -msgstr "" +msgstr "Capacitor" #: Capacitor.cpp:187 IndMotor.cpp:115 Inductor.cpp:181 Load.cpp:219 -#: SyncGenerator.cpp:174 SyncMotor.cpp:140 +#: SyncGenerator.cpp:192 SyncMotor.cpp:140 msgid "" "\n" "Q = " msgstr "" +"\n" +"Q = " #: Capacitor.cpp:193 IndMotor.cpp:121 Inductor.cpp:187 Load.cpp:225 -#: SyncGenerator.cpp:180 SyncMotor.cpp:146 +#: SyncGenerator.cpp:198 SyncMotor.cpp:146 msgid " VAr" -msgstr "" +msgstr " VAr" #: Capacitor.cpp:196 IndMotor.cpp:124 Inductor.cpp:190 Load.cpp:228 -#: SyncGenerator.cpp:183 SyncMotor.cpp:149 +#: SyncGenerator.cpp:201 SyncMotor.cpp:149 msgid " kVAr" -msgstr "" +msgstr " kVAr" #: Capacitor.cpp:199 IndMotor.cpp:127 Inductor.cpp:193 Load.cpp:231 -#: SyncGenerator.cpp:186 SyncMotor.cpp:152 +#: SyncGenerator.cpp:204 SyncMotor.cpp:152 msgid " MVAr" -msgstr "" +msgstr " MVAr" -#: ChartView.cpp:14 +#: ChartView.cpp:17 ChartView.cpp:133 msgid "Color" -msgstr "" +msgstr "Cor" + +#: ChartView.cpp:28 +msgid "Solid" +msgstr "Sólido" + +#: ChartView.cpp:29 +msgid "Dot" +msgstr "Ponto" + +#: ChartView.cpp:30 +msgid "Dash" +msgstr "Traço" + +#: ChartView.cpp:31 +msgid "Dot and dash" +msgstr "Ponto e traço" + +#: ChartView.cpp:32 +msgid "Cross" +msgstr "Cruz" + +#: ChartView.cpp:33 +msgid "Driagonal cross" +msgstr "Cruz diagonal" + +#: ChartView.cpp:83 ChartView.cpp:497 ElementForm.cpp:236 +msgid "Time" +msgstr "Tempo" + +#: ChartView.cpp:90 ElementForm.h:143 +msgid "Bus" +msgstr "Barra" + +#: ChartView.cpp:91 +msgid "Induction motor" +msgstr "Motor de indução" + +#: ChartView.cpp:92 ElementForm.h:448 +msgid "Line" +msgstr "Linha" + +#: ChartView.cpp:93 ElementForm.h:592 +msgid "Load" +msgstr "Carga" + +#: ChartView.cpp:95 Inductor.cpp:129 +msgid "Inductor" +msgstr "Indutor" + +#: ChartView.cpp:96 +msgid "Synchronous compensator" +msgstr "Compensador síncrono" + +#: ChartView.cpp:97 +msgid "Synchronous generator" +msgstr "Gerador síncrono" + +#: ChartView.cpp:98 ElementForm.h:547 +msgid "Transformer" +msgstr "Transformador" + +#: ChartView.cpp:99 ControlEditor.cpp:750 +msgid "Test" +msgstr "Teste" + +#: ChartView.cpp:124 ChartViewBase.cpp:89 +msgid "Draw" +msgstr "Plotar" + +#: ChartView.cpp:137 ChartViewBase.cpp:93 +msgid "Thickness" +msgstr "Espessura" + +#: ChartView.cpp:139 ChartViewBase.cpp:99 ElementForm.cpp:2329 +#: SwitchingForm.cpp:6 SwitchingForm.cpp:15 +msgid "Type" +msgstr "Tipo" + +#: ChartView.cpp:141 ChartViewBase.cpp:107 +msgid "Axis" +msgstr "Eixo" + +#: ChartView.cpp:156 ChartViewBase.cpp:126 +msgid "Margins" +msgstr "Margens" + +#: ChartView.cpp:161 ChartViewBase.cpp:141 +msgid "Axis limit" +msgstr "Limites dos eixos" + +#: ChartView.cpp:204 +msgid "Save image" +msgstr "Salvar imagem" + +#: ChartView.cpp:240 +msgid "Chart send to clipboard" +msgstr "Gráfico enviado para a área de transferência" + +#: ChartView.cpp:240 +msgid "Info" +msgstr "Informação" + +#: ChartView.cpp:244 +msgid "It was not possible to send to clipboard" +msgstr "Não foi possível enviar para a área de transferência" + +#: ChartView.cpp:244 ChartView.cpp:460 ControlEditor.cpp:733 +#: ControlEditor.cpp:821 ControlElementSolver.cpp:89 ControlSystemTest.cpp:34 +#: ControlSystemTest.cpp:41 ControlSystemTest.cpp:48 ControlSystemTest.cpp:55 +#: Element.cpp:277 Element.cpp:291 Line.cpp:149 Line.cpp:375 MainFrame.cpp:233 +#: SumForm.cpp:41 SumForm.cpp:56 TextForm.cpp:1207 Workspace.cpp:1104 +#: Workspace.cpp:1159 Workspace.cpp:1267 Workspace.cpp:1371 Workspace.cpp:1393 +#: Workspace.cpp:1411 Workspace.cpp:1424 +msgid "Error" +msgstr "Erro" + +#: ChartView.cpp:453 +msgid "Save CSV file" +msgstr "Salvar arquivo CSV" + +#: ChartView.cpp:460 +msgid "It was not possible to open or create the selected file." +msgstr "Não foi possível criar ou abrir o arquivo selecionado." #: ChartViewBase.cpp:30 MainFrameBase.cpp:72 MainFrameBase.cpp:73 msgid "File" @@ -199,215 +355,179 @@ msgstr "Arquivo" #: ChartViewBase.cpp:32 msgid "Save chart as image" -msgstr "" +msgstr "Salvar gráfico como imagem" #: ChartViewBase.cpp:35 -#, fuzzy -#| msgid "Clipboard" msgid "Send to clipboard" -msgstr "Área de transferência" +msgstr "Enviar para a área de transferência" + +#: ChartViewBase.cpp:38 +msgid "Export CSV..." +msgstr "Exportar CSV..." -#: ChartViewBase.cpp:40 MainFrameBase.cpp:88 +#: ChartViewBase.cpp:43 MainFrameBase.cpp:88 msgid "Exit" msgstr "Sair" -#: ChartViewBase.cpp:44 +#: ChartViewBase.cpp:47 msgid "View" -msgstr "" +msgstr "Vizualização" -#: ChartViewBase.cpp:46 MainFrameBase.cpp:146 +#: ChartViewBase.cpp:49 MainFrameBase.cpp:146 msgid "Fit" msgstr "Encaixar" -#: ChartViewBase.cpp:51 +#: ChartViewBase.cpp:54 msgid "Show grid" -msgstr "" +msgstr "Exibir linhas de grade" -#: ChartViewBase.cpp:54 +#: ChartViewBase.cpp:57 msgid "Show label" -msgstr "" +msgstr "Exibir legendas" -#: ChartViewBase.cpp:57 +#: ChartViewBase.cpp:60 msgid "Show coordinates" -msgstr "" +msgstr "Exibir coordenadas" -#: ChartViewBase.cpp:60 +#: ChartViewBase.cpp:63 msgid "Dark theme" -msgstr "" - -#: ChartViewBase.cpp:83 -msgid "Line properties" -msgstr "" +msgstr "Tema escuro" #: ChartViewBase.cpp:86 -msgid "Draw" -msgstr "" - -#: ChartViewBase.cpp:90 -msgid "Thickness" -msgstr "" - -#: ChartViewBase.cpp:96 -msgid "Solid" -msgstr "" - -#: ChartViewBase.cpp:97 -msgid "Dot" -msgstr "" - -#: ChartViewBase.cpp:98 -msgid "Dash" -msgstr "" - -#: ChartViewBase.cpp:99 -msgid "Dot and dash" -msgstr "" - -#: ChartViewBase.cpp:100 -msgid "Cross" -msgstr "" - -#: ChartViewBase.cpp:101 -msgid "Diagonal cross" -msgstr "" - -#: ChartViewBase.cpp:102 ElementForm.cpp:2329 SwitchingForm.cpp:6 -#: SwitchingForm.cpp:15 -msgid "Type" -msgstr "" +msgid "Line properties" +msgstr "Propriedades do traço" -#: ChartViewBase.cpp:108 +#: ChartViewBase.cpp:105 msgid "Y" -msgstr "" +msgstr "Y" -#: ChartViewBase.cpp:109 +#: ChartViewBase.cpp:106 msgid "X" -msgstr "" - -#: ChartViewBase.cpp:110 -msgid "Axis" -msgstr "" +msgstr "X" -#: ChartViewBase.cpp:114 +#: ChartViewBase.cpp:111 msgid "Chart properties" -msgstr "" +msgstr "Propriedades do gráfico" -#: ChartViewBase.cpp:117 +#: ChartViewBase.cpp:114 msgid "Chart title" -msgstr "" +msgstr "Título do gráfico" -#: ChartViewBase.cpp:121 +#: ChartViewBase.cpp:118 msgid "X axis label" -msgstr "" +msgstr "Rótulo do eixo X" -#: ChartViewBase.cpp:125 +#: ChartViewBase.cpp:122 msgid "Y axis label" -msgstr "" +msgstr "Rótulo do eixo Y" -#: ChartViewBase.cpp:129 -msgid "Margins" -msgstr "" - -#: ChartViewBase.cpp:132 ElementForm.cpp:2348 +#: ChartViewBase.cpp:129 ElementForm.cpp:2348 msgid "Up" -msgstr "" +msgstr "Cima" -#: ChartViewBase.cpp:135 +#: ChartViewBase.cpp:132 msgid "Botton" -msgstr "" +msgstr "Baixo" -#: ChartViewBase.cpp:138 +#: ChartViewBase.cpp:135 msgid "Left" -msgstr "" +msgstr "Esquerda" -#: ChartViewBase.cpp:141 +#: ChartViewBase.cpp:138 msgid "Right" -msgstr "" +msgstr "Direita" #: ChartViewBase.cpp:144 -msgid "Axis limit" -msgstr "" - -#: ChartViewBase.cpp:147 msgid "X min" -msgstr "" +msgstr "X min" -#: ChartViewBase.cpp:150 +#: ChartViewBase.cpp:147 msgid "X max" -msgstr "" +msgstr "X máx" -#: ChartViewBase.cpp:153 +#: ChartViewBase.cpp:150 msgid "Y min" -msgstr "" +msgstr "Y min" -#: ChartViewBase.cpp:156 +#: ChartViewBase.cpp:153 msgid "Y max" -msgstr "" +msgstr "Y máx" -#: ChartViewBase.h:87 -#, fuzzy -#| msgid "Charts" -msgid "Chart view" -msgstr "Gráficos" +#: ChartViewBase.h:96 +msgid "Chart viewer" +msgstr "Visualizador de gráficos" #: ConstantForm.cpp:22 msgid "Value entered incorrectly in the field \"Constant value\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Valor da constante\"." -#: ControlEditor.cpp:128 +#: ControlEditor.cpp:135 msgid "In/Out" -msgstr "" +msgstr "Entrada/Saída" -#: ControlEditor.cpp:134 +#: ControlEditor.cpp:141 msgid "Transfer fcn" msgstr "Func Transferência" -#: ControlEditor.cpp:138 ElementForm.h:826 +#: ControlEditor.cpp:145 ElementForm.h:826 msgid "Sum" -msgstr "" +msgstr "Somador" -#: ControlEditor.cpp:144 ElementForm.h:944 +#: ControlEditor.cpp:151 ElementForm.h:944 msgid "Constant" -msgstr "" +msgstr "Constante" -#: ControlEditor.cpp:149 ElementForm.h:856 +#: ControlEditor.cpp:156 ElementForm.h:856 msgid "Limiter" -msgstr "" +msgstr "Limitador" -#: ControlEditor.cpp:154 ElementForm.h:970 +#: ControlEditor.cpp:161 ElementForm.h:970 msgid "Gain" -msgstr "" +msgstr "Ganho" -#: ControlEditor.cpp:159 +#: ControlEditor.cpp:166 msgid "Multiplier" -msgstr "" +msgstr "Multiplicador" -#: ControlEditor.cpp:163 ElementForm.h:918 +#: ControlEditor.cpp:170 ElementForm.h:918 msgid "Exponential" -msgstr "" +msgstr "Exponencial" -#: ControlEditor.cpp:169 ElementForm.h:886 +#: ControlEditor.cpp:176 ElementForm.h:886 msgid "Rate limiter" -msgstr "" +msgstr "Limitador de taxa" -#: ControlEditor.cpp:724 +#: ControlEditor.cpp:714 msgid "Save CTL file" -msgstr "" +msgstr "Salvar arquivo CTL" -#: ControlEditor.cpp:735 +#: ControlEditor.cpp:725 msgid "Open CTL file" -msgstr "" +msgstr "Abrir arquivo CTL" -#: ControlEditor.cpp:743 MainFrame.cpp:231 +#: ControlEditor.cpp:733 MainFrame.cpp:233 msgid "It was not possible to open the selected file." -msgstr "" +msgstr "Não foi possível abrir o arquivo selecionado." -#: ControlEditor.cpp:743 Element.cpp:273 Element.cpp:287 Line.cpp:149 -#: Line.cpp:375 MainFrame.cpp:231 SumForm.cpp:41 SumForm.cpp:56 -#: TextForm.cpp:1207 Workspace.cpp:1098 Workspace.cpp:1153 Workspace.cpp:1261 -#: Workspace.cpp:1365 Workspace.cpp:1387 -msgid "Error" -msgstr "" +#: ControlEditor.cpp:750 Electromechanical.cpp:25 +msgid "Initializing..." +msgstr "Inicializando..." + +#: ControlEditor.cpp:805 +msgid "I/O" +msgstr "I/O" + +#: ControlEditor.cpp:806 ElementForm.cpp:3488 +msgid "Input" +msgstr "Entrada" + +#: ControlEditor.cpp:807 ElementForm.cpp:3498 +msgid "Output" +msgstr "Saída" + +#: ControlEditor.cpp:821 +msgid "It was not possible to solve the control system" +msgstr "Não foi possível resolver o sistema de controle" #: ControlEditorBase.cpp:63 MainFrameBase.cpp:82 msgid "New" @@ -415,11 +535,11 @@ msgstr "Novo" #: ControlEditorBase.cpp:65 msgid "Import" -msgstr "" +msgstr "Importar" #: ControlEditorBase.cpp:67 msgid "Export" -msgstr "" +msgstr "Exportar" #: ControlEditorBase.cpp:71 MainFrameBase.cpp:123 msgid "Copy" @@ -445,34 +565,167 @@ msgstr "Arrastar" msgid "Move" msgstr "Mover" -#: ControlEditorBase.cpp:85 Element.cpp:234 Line.cpp:282 MainFrameBase.cpp:144 +#: ControlEditorBase.cpp:85 Element.cpp:238 Line.cpp:282 MainFrameBase.cpp:144 msgid "Delete" msgstr "Excluir" #: ControlEditorBase.cpp:96 msgid "Control elements" -msgstr "" +msgstr "Elementos de controle" + +#: ControlEditorBase.cpp:124 +msgid "Test system..." +msgstr "Testar sistema..." + +#: ControlEditorBase.cpp:130 ElementForm.cpp:328 ElementForm.cpp:731 +#: ElementForm.cpp:1235 ElementForm.cpp:1547 ElementForm.cpp:1947 +#: ElementForm.cpp:2116 ElementForm.cpp:2244 ElementForm.cpp:2372 +#: ElementForm.cpp:2530 ElementForm.cpp:2728 ElementForm.cpp:2843 +#: ElementForm.cpp:2932 ElementForm.cpp:3033 ElementForm.cpp:3134 +#: ElementForm.cpp:3239 ElementForm.cpp:3328 ElementForm.cpp:3417 +#: ElementForm.cpp:3514 PropertiesForm.cpp:78 PropertiesForm.cpp:415 +msgid "OK" +msgstr "OK" + +#: ControlEditorBase.cpp:214 ElementForm.cpp:35 ElementForm.cpp:404 +#: ElementForm.cpp:1302 ElementForm.cpp:1615 ElementForm.cpp:2015 +#: ElementForm.cpp:2184 ElementForm.cpp:2441 ElementForm.cpp:2598 +#: ElementForm.cpp:2808 ElementForm.cpp:2909 ElementForm.cpp:2998 +#: ElementForm.cpp:3099 ElementForm.cpp:3200 ElementForm.cpp:3305 +#: ElementForm.cpp:3394 ElementForm.cpp:3483 PropertiesForm.cpp:35 +#: PropertiesForm.cpp:144 +msgid "General" +msgstr "Geral" + +#: ControlEditorBase.cpp:219 +msgid "Input type:" +msgstr "Tipo de entrada:" + +#: ControlEditorBase.cpp:240 +msgid "Start time" +msgstr "Tempo de início" -#: ControlEditorBase.h:76 +#: ControlEditorBase.cpp:255 ControlEditorBase.cpp:308 ElementForm.cpp:251 +#: ElementForm.cpp:274 ElementForm.cpp:829 ElementForm.cpp:1086 +#: ElementForm.cpp:1109 ElementForm.cpp:1186 ElementForm.cpp:1209 +#: PropertiesForm.cpp:291 PropertiesForm.cpp:314 PropertiesForm.cpp:405 +msgid "s" +msgstr "s" + +#: ControlEditorBase.cpp:263 +msgid "Slope" +msgstr "Inclinação" + +#: ControlEditorBase.cpp:278 PropertiesForm.cpp:276 +msgid "Time step" +msgstr "Passo de integração" + +#: ControlEditorBase.cpp:293 PropertiesForm.cpp:299 +msgid "Simulation time" +msgstr "Tempo de simulação" + +#: ControlEditorBase.cpp:316 +msgid "Run" +msgstr "Executar" + +#: ControlEditorBase.cpp:320 ElementForm.cpp:332 ElementForm.cpp:735 +#: ElementForm.cpp:1239 ElementForm.cpp:1551 ElementForm.cpp:1951 +#: ElementForm.cpp:2120 ElementForm.cpp:2248 ElementForm.cpp:2376 +#: ElementForm.cpp:2534 ElementForm.cpp:2732 ElementForm.cpp:2847 +#: ElementForm.cpp:2936 ElementForm.cpp:3037 ElementForm.cpp:3138 +#: ElementForm.cpp:3243 ElementForm.cpp:3332 ElementForm.cpp:3421 +#: ElementForm.cpp:3518 PropertiesForm.cpp:82 PropertiesForm.cpp:419 +msgid "Cancel" +msgstr "Cancelar" + +#: ControlEditorBase.h:90 msgid "Control editor" +msgstr "Editor de controle" + +#: ControlEditorBase.h:136 +msgid "Control system test" +msgstr "Teste do sistema de controle" + +#: ControlElementSolver.cpp:50 +msgid "The control system must have one input and one output." +msgstr "O sistema de controle deve ter uma entrada e uma saída." + +#: ControlElementSolver.cpp:66 +msgid "There is no input in the control system." +msgstr "Não há entrada no sistema de controle." + +#: ControlElementSolver.cpp:70 +msgid "There is no output in the control system." +msgstr "Não há saída no sistema de controle." + +#: ControlElementSolver.cpp:75 +msgid "Input not connected." +msgstr "Entrada não conectada." + +#: ControlElementSolver.cpp:84 +msgid "It was not possible to initialize the control system." +msgstr "Não foi possível inicializar o sistema de controle." + +#: ControlSystemTest.cpp:34 +msgid "Value entered incorrectly in the field \"Start time\"." +msgstr "Valor inserido incorretamente no campo \"Tempo de início\"." + +#: ControlSystemTest.cpp:41 +msgid "Value entered incorrectly in the field \"Slope\"." +msgstr "Valor inserido incorretamente no campo \"Inclinação\"." + +#: ControlSystemTest.cpp:48 SimulationsSettingsForm.cpp:94 +msgid "Value entered incorrectly in the field \"Time step\"." +msgstr "Valor inserido incorretamente no campo \"Passo de integração\"." + +#: ControlSystemTest.cpp:55 SimulationsSettingsForm.cpp:97 +msgid "Value entered incorrectly in the field \"Simulation time\"." +msgstr "Valor inserido incorretamente no campo \"Tempo de simulação\"." + +#: Electromechanical.cpp:25 +msgid "Running simulation" +msgstr "Simulação em andamento" + +#: Electromechanical.cpp:32 +msgid "It was not possible to build the admittance matrix." +msgstr "Não foi possível construir a matriz admitância." + +#: Electromechanical.cpp:73 +#, c-format +msgid "Simulation cancelled at %.2fs." +msgstr "Simulação cancelada em %.2fs." + +#: Electromechanical.cpp:563 +msgid "Error on initializate the AVR of \"" +msgstr "Erro ao inicializar o AVR de \"" + +#: Electromechanical.cpp:563 Electromechanical.cpp:573 +msgid "\"." +msgstr "\"." + +#: Electromechanical.cpp:573 +msgid "Error on initializate the speed governor of \"" +msgstr "Erro ao inicializar o regulador de velocidade de \"" + +#: Electromechanical.cpp:821 +msgid "" +"Impossible to solve the synchronous generators.\n" +"Check the system parameters and/or decrease the time step." msgstr "" +"Impossível de solucionar os geradores síncronos.\n" +"Verifique os parâmetros do sistema e/ou diminua o passo de integração." + +#: Electromechanical.h:46 +msgid "Unknown error" +msgstr "Erro desconhecido" -#: Element.cpp:226 MainFrameBase.cpp:148 +#: Element.cpp:230 MainFrameBase.cpp:148 msgid "Rotate clockwise" -msgstr "" +msgstr "Girar no sentido horário" -#: Element.cpp:230 +#: Element.cpp:234 msgid "Rotate counter-clockwise" -msgstr "" - -#: ElementForm.cpp:35 ElementForm.cpp:404 ElementForm.cpp:1302 -#: ElementForm.cpp:1615 ElementForm.cpp:2015 ElementForm.cpp:2184 -#: ElementForm.cpp:2441 ElementForm.cpp:2598 ElementForm.cpp:2808 -#: ElementForm.cpp:2909 ElementForm.cpp:2998 ElementForm.cpp:3099 -#: ElementForm.cpp:3200 ElementForm.cpp:3305 ElementForm.cpp:3394 -#: ElementForm.cpp:3483 -msgid "General" -msgstr "" +msgstr "Girar no sentido anti-horário" #: ElementForm.cpp:40 ElementForm.cpp:409 ElementForm.cpp:1307 #: ElementForm.cpp:1620 ElementForm.cpp:2020 ElementForm.cpp:2189 @@ -484,15 +737,15 @@ msgstr "Nome" #: ElementForm.cpp:60 ElementForm.cpp:1327 ElementForm.cpp:1640 msgid "Rated voltage" -msgstr "" +msgstr "Tensão nominal" #: ElementForm.cpp:87 msgid "Controlled voltage" -msgstr "" +msgstr "Tensão controlada" #: ElementForm.cpp:111 msgid "Slack Bus" -msgstr "" +msgstr "Barra de referência" #: ElementForm.cpp:117 ElementForm.cpp:579 ElementForm.cpp:1479 #: ElementForm.cpp:1826 MainFrameBase.cpp:192 @@ -501,19 +754,19 @@ msgstr "Falta" #: ElementForm.cpp:122 ElementForm.cpp:223 msgid "Insert fault in the bus" -msgstr "" +msgstr "Inserir falta na barra" #: ElementForm.cpp:135 msgid "Fault type" -msgstr "" +msgstr "Tipo de falta" #: ElementForm.cpp:153 msgid "Fault place" -msgstr "" +msgstr "Local da falta" #: ElementForm.cpp:170 ElementForm.cpp:282 msgid "Fault resistance (R)" -msgstr "" +msgstr "Resistência da falta (R)" #: ElementForm.cpp:185 ElementForm.cpp:208 ElementForm.cpp:297 #: ElementForm.cpp:320 ElementForm.cpp:852 ElementForm.cpp:909 @@ -522,81 +775,54 @@ msgstr "" #: ElementForm.cpp:1140 ElementForm.cpp:1163 TextForm.cpp:957 TextForm.cpp:967 #: TextForm.cpp:972 TextForm.cpp:980 TextForm.cpp:988 msgid "p.u." -msgstr "" +msgstr "p.u." #: ElementForm.cpp:193 ElementForm.cpp:305 msgid "Fault reactance (Xl)" -msgstr "" +msgstr "Reatância da falta (Xl)" #: ElementForm.cpp:213 ElementForm.cpp:725 ElementForm.cpp:1541 #: ElementForm.cpp:1941 ElementForm.cpp:2110 ElementForm.cpp:2238 -#: ElementForm.cpp:2524 +#: ElementForm.cpp:2524 PropertiesForm.cpp:263 msgid "Stability" msgstr "Estabilidade" #: ElementForm.cpp:218 msgid "Plot bus data" -msgstr "" - -#: ElementForm.cpp:236 -msgid "Time" -msgstr "" - -#: ElementForm.cpp:251 ElementForm.cpp:274 ElementForm.cpp:829 -#: ElementForm.cpp:1086 ElementForm.cpp:1109 ElementForm.cpp:1186 -#: ElementForm.cpp:1209 -msgid "s" -msgstr "" +msgstr "Imprimir dados da barra" #: ElementForm.cpp:259 msgid "Fault length" -msgstr "" - -#: ElementForm.cpp:328 ElementForm.cpp:731 ElementForm.cpp:1235 -#: ElementForm.cpp:1547 ElementForm.cpp:1947 ElementForm.cpp:2116 -#: ElementForm.cpp:2244 ElementForm.cpp:2372 ElementForm.cpp:2530 -#: ElementForm.cpp:2728 ElementForm.cpp:2843 ElementForm.cpp:2932 -#: ElementForm.cpp:3033 ElementForm.cpp:3134 ElementForm.cpp:3239 -#: ElementForm.cpp:3328 ElementForm.cpp:3417 ElementForm.cpp:3514 -msgid "OK" -msgstr "" - -#: ElementForm.cpp:332 ElementForm.cpp:735 ElementForm.cpp:1239 -#: ElementForm.cpp:1551 ElementForm.cpp:1951 ElementForm.cpp:2120 -#: ElementForm.cpp:2248 ElementForm.cpp:2376 ElementForm.cpp:2534 -#: ElementForm.cpp:2732 ElementForm.cpp:2847 ElementForm.cpp:2936 -#: ElementForm.cpp:3037 ElementForm.cpp:3138 ElementForm.cpp:3243 -#: ElementForm.cpp:3332 ElementForm.cpp:3421 ElementForm.cpp:3518 -msgid "Cancel" -msgstr "" +msgstr "Duração da falta" #: ElementForm.cpp:429 ElementForm.cpp:1342 ElementForm.cpp:1671 msgid "Rated power" -msgstr "" +msgstr "Potência nominal" #: ElementForm.cpp:459 ElementForm.cpp:2040 ElementForm.cpp:2466 -#: IOControlForm.cpp:23 TextForm.cpp:866 TextForm.cpp:897 TextForm.cpp:919 -#: TextForm.cpp:927 +#: IOControlForm.cpp:23 SyncGenerator.cpp:226 TextForm.cpp:866 TextForm.cpp:897 +#: TextForm.cpp:919 TextForm.cpp:927 msgid "Active power" -msgstr "" +msgstr "Potência ativa" #: ElementForm.cpp:488 ElementForm.cpp:2069 ElementForm.cpp:2209 -#: ElementForm.cpp:2495 IOControlForm.cpp:28 TextForm.cpp:867 TextForm.cpp:898 -#: TextForm.cpp:905 TextForm.cpp:912 TextForm.cpp:920 TextForm.cpp:928 +#: ElementForm.cpp:2495 IOControlForm.cpp:28 SyncGenerator.cpp:227 +#: TextForm.cpp:867 TextForm.cpp:898 TextForm.cpp:905 TextForm.cpp:912 +#: TextForm.cpp:920 TextForm.cpp:928 msgid "Reactive power" -msgstr "" +msgstr "Potência reativa" #: ElementForm.cpp:517 msgid "Max reactive power" -msgstr "" +msgstr "Potência reativa máx" #: ElementForm.cpp:547 msgid "Min reactive power" -msgstr "" +msgstr "Potência reativa min" #: ElementForm.cpp:573 msgid "Use machine rated power as base" -msgstr "" +msgstr "Utilizar potência nominal da máquina como base" #: ElementForm.cpp:584 msgid "Sequence impedances (p.u.)" @@ -640,341 +866,317 @@ msgstr "Neutro aterrado" #: ElementForm.cpp:801 msgid "Plot synchronous machine data" -msgstr "" +msgstr "Imprimir dados da máquina síncrona" #: ElementForm.cpp:814 msgid "Inertia (H)" -msgstr "" +msgstr "Inércia (H)" #: ElementForm.cpp:837 msgid "Damping factor" -msgstr "" +msgstr "Fator de amortecimento" #: ElementForm.cpp:860 msgid "Use AVR" -msgstr "" +msgstr "Utilizar AVR" #: ElementForm.cpp:865 msgid "Edit AVR" -msgstr "" +msgstr "Editar AVR" #: ElementForm.cpp:873 msgid "Use speed governor" -msgstr "" +msgstr "Utilizar regulador de velocidade" #: ElementForm.cpp:878 msgid "Edit speed governor" -msgstr "" +msgstr "Editar regulador de velocidade" #: ElementForm.cpp:894 msgid "Armature resistance (Ra)" -msgstr "" +msgstr "Resistência de armadura (Ra)" #: ElementForm.cpp:917 msgid "Potier reactance (Xp)" -msgstr "" +msgstr "Reatância de Potier (Xp)" #: ElementForm.cpp:940 msgid "Saturation factor" -msgstr "" +msgstr "Fator de saturação" #: ElementForm.cpp:959 msgid "Syncronous" -msgstr "" +msgstr "Síncrono" #: ElementForm.cpp:971 msgid "Direct-axis reactance (Xd)" -msgstr "" +msgstr "Reatância de eixo direto (Xd)" #: ElementForm.cpp:994 msgid "Quadrature-axis reactance (Xq)" -msgstr "" +msgstr "Reatância de eixo em quadratura (Xq)" #: ElementForm.cpp:1013 msgid "Transient" -msgstr "" +msgstr "Tansitório" #: ElementForm.cpp:1025 msgid "Direct-axis reactance (X'd)" -msgstr "" +msgstr "Reatância de eixo direto (X'd)" #: ElementForm.cpp:1048 msgid "Quadrature-axis reactance (X'q)" -msgstr "" +msgstr "Reatância de eixo em quadratura (X'q)" #: ElementForm.cpp:1071 msgid "Direct-axis time constant (T'd0)" -msgstr "" +msgstr "Constante de tempo de eixo direto (T'd0)" #: ElementForm.cpp:1094 msgid "Quadrature-axis time constant (T'q0)" -msgstr "" +msgstr "Constante de tempo de eixo em quadratura (T'd0)" #: ElementForm.cpp:1113 msgid "Sub-transient" -msgstr "" +msgstr "Subtransitório" #: ElementForm.cpp:1125 msgid "Direct-axis reactance (X''d)" -msgstr "" +msgstr "Reatância de eixo direto (X''d)" #: ElementForm.cpp:1148 msgid "Quadrature-axis reactance (X''q)" -msgstr "" +msgstr "Reatância de eixo em quadratura (X''q)" #: ElementForm.cpp:1171 msgid "Direct-axis time constant (T''d0)" -msgstr "" +msgstr "Constante de tempo de eixo direto (T''d0)" #: ElementForm.cpp:1194 msgid "Quadrature-axis time constant (T''q0)" -msgstr "" +msgstr "Constante de tempo de eixo em quadratura (T''d0)" #: ElementForm.cpp:1229 ElementForm.h:668 msgid "Switching" -msgstr "" +msgstr "Chaveamento" #: ElementForm.cpp:1331 msgid "138 kV" -msgstr "" +msgstr "138 kV" #: ElementForm.cpp:1370 ElementForm.cpp:1701 msgid "Resistance (R)" -msgstr "" +msgstr "Resistência (R)" #: ElementForm.cpp:1398 ElementForm.cpp:1728 msgid "Indutive reactance (XL)" -msgstr "" +msgstr "Reatância indutiva (Xl)" #: ElementForm.cpp:1426 msgid "Capacitive susceptance (B)" -msgstr "" +msgstr "Susceptância capacitiva (B)" #: ElementForm.cpp:1454 msgid "Line size" -msgstr "" +msgstr "Comprimento da linha" #: ElementForm.cpp:1469 msgid "km" -msgstr "" +msgstr "km" #: ElementForm.cpp:1473 msgid "Use line rated power as base" -msgstr "" +msgstr "Utilizar a potência nominal como base" #: ElementForm.cpp:1484 ElementForm.cpp:1831 msgid "Zero-sequence impedances (p.u.)" -msgstr "" +msgstr "Impedâncias de sequência zero (p.u.)" #: ElementForm.cpp:1496 ElementForm.cpp:1843 msgid "Resistance (R0)" -msgstr "" +msgstr "Resistência (R0)" #: ElementForm.cpp:1511 ElementForm.cpp:1858 msgid "Indutive reactance (X0)" -msgstr "" +msgstr "Reatância indutiva (X0)" #: ElementForm.cpp:1526 msgid "Capacitive susceptance (B0)" -msgstr "" +msgstr "Susceptância capacitiva (B0)" #: ElementForm.cpp:1644 msgid "138 kV / 138 kV" -msgstr "" +msgstr "138 kV / 138 kV" #: ElementForm.cpp:1655 msgid "Base voltage" -msgstr "" +msgstr "Tensão base" #: ElementForm.cpp:1759 msgid "Connection" -msgstr "" +msgstr "Conexão" #: ElementForm.cpp:1786 msgid "Turns ratio" -msgstr "" +msgstr "TAP" #: ElementForm.cpp:1801 msgid "Phase shift" -msgstr "" +msgstr "Defasagem" #: ElementForm.cpp:1816 msgid "degrees" -msgstr "" +msgstr "graus" #: ElementForm.cpp:1820 msgid "Use transformer rated power as base" -msgstr "" +msgstr "Utilizar a potência do transformador como base" #: ElementForm.cpp:1869 msgid "Ground impedances (p.u.)" -msgstr "" +msgstr "Impedância de aterramento (p.u.)" #: ElementForm.cpp:1881 msgid "Primary resistance" -msgstr "" +msgstr "Resistência do primário" #: ElementForm.cpp:1896 msgid "Primary reactance" -msgstr "" +msgstr "Reatância do primário" #: ElementForm.cpp:1911 msgid "Secondary resistance" -msgstr "" +msgstr "Resistência do secundário" #: ElementForm.cpp:1926 msgid "Secondary reactance" -msgstr "" +msgstr "Reatância do secundário" #: ElementForm.cpp:2094 msgid "Load type" -msgstr "" +msgstr "Tipo de carga" #: ElementForm.cpp:2322 msgid "Switching properties" -msgstr "" +msgstr "Propriedades de chaveamento" #: ElementForm.cpp:2327 SwitchingForm.cpp:23 SwitchingForm.cpp:36 #: SwitchingForm.cpp:52 msgid "Insert" -msgstr "" +msgstr "Inserir" #: ElementForm.cpp:2328 ElementForm.cpp:2344 SwitchingForm.cpp:23 #: SwitchingForm.cpp:36 msgid "Remove" -msgstr "" +msgstr "Remover" #: ElementForm.cpp:2332 SwitchingForm.cpp:7 SwitchingForm.cpp:16 msgid "Time (s)" -msgstr "" +msgstr "Tempo (s)" #: ElementForm.cpp:2340 msgid "Add" -msgstr "" +msgstr "Adicionar" #: ElementForm.cpp:2352 msgid "Down" -msgstr "" +msgstr "Baixo" #: ElementForm.cpp:2360 msgid "Switching list" -msgstr "" +msgstr "Lista de chaveamento" #: ElementForm.cpp:2611 msgid "Element" -msgstr "" +msgstr "Elemento" #: ElementForm.cpp:2633 msgid "Element name" -msgstr "" +msgstr "Nome do elemento" #: ElementForm.cpp:2646 msgid "Text type" -msgstr "" +msgstr "Tipo de texto" #: ElementForm.cpp:2659 msgid "From bus" -msgstr "" +msgstr "Da barra" #: ElementForm.cpp:2672 msgid "To bus" -msgstr "" +msgstr "Para barra" #: ElementForm.cpp:2685 msgid "Unit" -msgstr "" +msgstr "Unidade" #: ElementForm.cpp:2698 msgid "Decimal places:" -msgstr "" +msgstr "Casas decimais:" #: ElementForm.cpp:2711 msgid "Preview:" -msgstr "" +msgstr "Pré-visualização:" #: ElementForm.cpp:2813 msgid "Numerator parameters" -msgstr "" +msgstr "Parâmetros do numerador" #: ElementForm.cpp:2825 msgid "Denominator parameters" -msgstr "" +msgstr "Parâmetros do denominador" #: ElementForm.cpp:2914 msgid "Signs" -msgstr "" +msgstr "Sinais" #: ElementForm.cpp:3003 ElementForm.cpp:3104 msgid "Upper limit" -msgstr "" +msgstr "Limite superior" #: ElementForm.cpp:3015 ElementForm.cpp:3116 msgid "Lower limit" -msgstr "" +msgstr "Limite inferior" #: ElementForm.cpp:3205 msgid "y = A.eB.x" -msgstr "" +msgstr "y = A.eB.x" #: ElementForm.cpp:3209 msgid "A value" -msgstr "" +msgstr "Valor A" #: ElementForm.cpp:3221 msgid "B value" -msgstr "" +msgstr "Valor B" #: ElementForm.cpp:3310 msgid "Constant value" -msgstr "" +msgstr "Valor da constante" #: ElementForm.cpp:3399 msgid "Gain value" -msgstr "" - -#: ElementForm.cpp:3488 -msgid "Input" -msgstr "" +msgstr "Valor do ganho" -#: ElementForm.cpp:3498 -msgid "Output" -msgstr "" - -#: ElementForm.h:143 -msgid "Bus" -msgstr "" - -#: ElementForm.h:242 SyncGenerator.cpp:52 +#: ElementForm.h:242 SyncGenerator.cpp:49 msgid "Generator" -msgstr "" +msgstr "Gerador" #: ElementForm.h:369 msgid "Generator: Stability" -msgstr "" - -#: ElementForm.h:448 -msgid "Line" -msgstr "" - -#: ElementForm.h:547 -msgid "Transformer" -msgstr "" - -#: ElementForm.h:592 -msgid "Load" -msgstr "" +msgstr "Gerador: Estabilidade" #: ElementForm.h:627 msgid "Reactive shunt element" -msgstr "" +msgstr "Elemento shunt reativo" #: ElementForm.h:709 msgid "Motor" -msgstr "" +msgstr "Motor" #: ElementForm.h:770 Text.h:87 msgid "Text" -msgstr "" +msgstr "Texto" #: ElementForm.h:800 msgid "Transfer function" @@ -982,454 +1184,494 @@ msgstr "Função transferência" #: ElementForm.h:1002 msgid "Input / Output" -msgstr "" +msgstr "Entrada / Saída" #: ExponentialForm.cpp:37 msgid "Value entered incorrectly in the field \"A value\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Valor A\"." #: ExponentialForm.cpp:40 msgid "Value entered incorrectly in the field \"B value\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Valor B\"." -#: Fault.cpp:16 +#: Fault.cpp:19 msgid "There is no buses in the system." -msgstr "" +msgstr "Não há barramentos no sistema." -#: Fault.cpp:30 Fault.cpp:383 +#: Fault.cpp:33 Fault.cpp:386 msgid "Fail to invert the positive sequence admittance matrix." -msgstr "" +msgstr "Falha ao inverter a matriz admitância de sequência positiva." -#: Fault.cpp:34 +#: Fault.cpp:37 msgid "Fail to invert the negative sequence admittance matrix." -msgstr "" +msgstr "Falha ao inverter a matriz admitância de sequência negativa." -#: Fault.cpp:38 +#: Fault.cpp:41 msgid "Fail to invert the zero sequence admittance matrix." -msgstr "" +msgstr "Falha ao inverter a matriz admitância de sequência zero." -#: Fault.cpp:63 +#: Fault.cpp:66 msgid "There is no fault in the system." -msgstr "" +msgstr "Não há faltas no sistema." #: GainForm.cpp:22 msgid "Value entered incorrectly in the field \"Gain value\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Valor do ganho\"." + +#: GeneralPropertiesForm.cpp:12 +msgid "English" +msgstr "English" + +#: GeneralPropertiesForm.cpp:13 +msgid "Portuguese" +msgstr "Português" -#: GeneratorStabForm.cpp:54 +#: GeneralPropertiesForm.cpp:15 +msgid "Light" +msgstr "Claro" + +#: GeneralPropertiesForm.cpp:16 +msgid "Dark" +msgstr "Escuro" + +#: GeneratorStabForm.cpp:82 msgid "Synchronous generator: Switching" -msgstr "" +msgstr "Gerador síncrono: Chaveameto" -#: GeneratorStabForm.cpp:67 +#: GeneratorStabForm.cpp:95 msgid "Value entered incorrectly in the field \"Inertia\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Inércia\"." -#: GeneratorStabForm.cpp:71 +#: GeneratorStabForm.cpp:99 msgid "Value entered incorrectly in the field \"Damping factor\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Fator de amortecimento\"." -#: GeneratorStabForm.cpp:78 +#: GeneratorStabForm.cpp:106 msgid "Value entered incorrectly in the field \"Armature resistance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Resistência de armadura\"." -#: GeneratorStabForm.cpp:82 +#: GeneratorStabForm.cpp:110 msgid "Value entered incorrectly in the field \"Potier reactance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Reatância de Potier\"." -#: GeneratorStabForm.cpp:86 +#: GeneratorStabForm.cpp:114 msgid "Value entered incorrectly in the field \"Saturation factor\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Fator de aceleração\"." -#: GeneratorStabForm.cpp:91 +#: GeneratorStabForm.cpp:119 msgid "" "Value entered incorrectly in the field \"Synchronous direct-axis reactance\"." msgstr "" +"Valor inserido incorretamente no campo \"Reatância síncrona de eixo direto\"." -#: GeneratorStabForm.cpp:96 +#: GeneratorStabForm.cpp:124 msgid "" "Value entered incorrectly in the field \"Synchronous quadrature-axis " "reactance\"." msgstr "" +"Valor inserido incorretamente no campo \"Reatância síncrona de eixo em " +"quadratura\"." -#: GeneratorStabForm.cpp:101 +#: GeneratorStabForm.cpp:129 msgid "" "Value entered incorrectly in the field \"Transitory direct-axis reactance\"." msgstr "" +"Valor inserido incorretamente no campo \"Reatância transitória de eixo direto" +"\"." -#: GeneratorStabForm.cpp:106 +#: GeneratorStabForm.cpp:134 msgid "" "Value entered incorrectly in the field \"Transitory quadrature-axis reactance" "\"." msgstr "" +"Valor inserido incorretamente no campo \"Reatância transitória de eixo em " +"quadratura\"." -#: GeneratorStabForm.cpp:111 +#: GeneratorStabForm.cpp:139 msgid "" "Value entered incorrectly in the field \"Transitory direct-axis time constant" "\"." msgstr "" +"Valor inserido incorretamente no campo \"Constante de tempo transitória de " +"eixo direto\"." -#: GeneratorStabForm.cpp:116 +#: GeneratorStabForm.cpp:144 msgid "" "Value entered incorrectly in the field \"Transitory quadrature-axis time " "constant\"." msgstr "" +"Valor inserido incorretamente no campo \"Constante de tempo transitória de " +"eixo em quadratura\"." -#: GeneratorStabForm.cpp:121 +#: GeneratorStabForm.cpp:149 msgid "" "Value entered incorrectly in the field \"Subtransitory direct-axis reactance" "\"." msgstr "" +"Valor inserido incorretamente no campo \"Reatância subtransitória de eixo " +"direto\"." -#: GeneratorStabForm.cpp:126 +#: GeneratorStabForm.cpp:154 msgid "" "Value entered incorrectly in the field \"Subtransitory quadrature-axis " "reactance\"." msgstr "" +"Valor inserido incorretamente no campo \"Reatância subtransitória de eixo em " +"quadratura\"." -#: GeneratorStabForm.cpp:131 +#: GeneratorStabForm.cpp:159 msgid "" "Value entered incorrectly in the field \"Subtransitory direct-axis time " "constant\"." msgstr "" +"Valor inserido incorretamente no campo \"Constante de tempo subtransitória " +"de eixo direto\"." -#: GeneratorStabForm.cpp:136 +#: GeneratorStabForm.cpp:164 msgid "" "Value entered incorrectly in the field \"Subtransitory quadrature-axis time " "constant\"." msgstr "" +"Valor inserido incorretamente no campo \"Constante de tempo subtransitória " +"de eixo em quadratura\"." #: IOControl.cpp:142 msgid "Vt" -msgstr "" +msgstr "Vt" #: IOControl.cpp:150 msgid "Pe" -msgstr "" +msgstr "Pe" #: IOControl.cpp:154 msgid "Qe" -msgstr "" +msgstr "Qe" #: IOControl.cpp:158 msgid "Vf" -msgstr "" +msgstr "Vf" #: IOControl.cpp:162 msgid "Pm" -msgstr "" +msgstr "Pm" -#: IOControlForm.cpp:13 -#, fuzzy -#| msgid "Reset voltages" +#: IOControlForm.cpp:13 SyncGenerator.cpp:225 msgid "Terminal voltage" -msgstr "Reiniciar tensões" +msgstr "Tensão terminal" #: IOControlForm.cpp:18 msgid "Velocity" -msgstr "" +msgstr "Velocidade" -#: IOControlForm.cpp:33 -#, fuzzy -#| msgid "Reset voltages" +#: IOControlForm.cpp:33 SyncGenerator.cpp:230 msgid "Field voltage" -msgstr "Reiniciar tensões" +msgstr "Tensão de campo" -#: IOControlForm.cpp:38 +#: IOControlForm.cpp:38 SyncGenerator.cpp:228 msgid "Mechanical power" -msgstr "" +msgstr "Potência mecânica" #: IndMotor.cpp:27 msgid "Edit induction motor" -msgstr "" +msgstr "Editar motor de indução" -#: IndMotor.cpp:96 Load.cpp:202 SyncGenerator.cpp:155 SyncMotor.cpp:121 +#: IndMotor.cpp:96 Load.cpp:202 SyncGenerator.cpp:173 SyncMotor.cpp:121 msgid "" "\n" "P = " msgstr "" +"\n" +"P = " -#: IndMotor.cpp:102 Load.cpp:208 SyncGenerator.cpp:161 SyncMotor.cpp:127 +#: IndMotor.cpp:102 Load.cpp:208 SyncGenerator.cpp:179 SyncMotor.cpp:127 msgid " W" -msgstr "" +msgstr " W" -#: IndMotor.cpp:105 Load.cpp:211 SyncGenerator.cpp:164 SyncMotor.cpp:130 +#: IndMotor.cpp:105 Load.cpp:211 SyncGenerator.cpp:182 SyncMotor.cpp:130 msgid " kW" -msgstr "" +msgstr " kW" -#: IndMotor.cpp:108 Load.cpp:214 SyncGenerator.cpp:167 SyncMotor.cpp:133 +#: IndMotor.cpp:108 Load.cpp:214 SyncGenerator.cpp:185 SyncMotor.cpp:133 msgid " MW" -msgstr "" +msgstr " MW" #: IndMotorForm.cpp:68 LoadForm.cpp:83 SyncMachineForm.cpp:306 #: SyncMachineForm.cpp:440 msgid "Value entered incorrectly in the field \"Active power\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Potência ativa\"." #: IndMotorForm.cpp:86 LoadForm.cpp:101 ReactiveShuntElementForm.cpp:95 #: ReactiveShuntElementForm.cpp:119 SyncMachineForm.cpp:324 #: SyncMachineForm.cpp:458 msgid "Value entered incorrectly in the field \"Reactive power\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Potência reativa\"." #: Inductor.cpp:114 msgid "Edit Inductor" -msgstr "" - -#: Inductor.cpp:129 -msgid "Inductor" -msgstr "" +msgstr "Editar indutor" #: LimiterForm.cpp:25 RateLimiterForm.cpp:20 msgid "Value entered incorrectly in the field \"Upper limit\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Limite superior\"." #: LimiterForm.cpp:28 RateLimiterForm.cpp:23 msgid "Value entered incorrectly in the field \"Lower limit\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Limite inferior\"." #: Line.cpp:147 Line.cpp:373 msgid "" "Unable to connect two buses with different nominal voltages.\n" "Use a transformer or edit the bus properties." msgstr "" +"Não é possível conectar duas barras com tensões nominais diferentes.\n" +"Utilize um transformador ou edite as propriedades do barramento." #: Line.cpp:272 msgid "Edit line" -msgstr "" +msgstr "Editar linha" #: Line.cpp:274 msgid "Insert node" -msgstr "" +msgstr "Inserir nó" #: Line.cpp:278 msgid "Remove node" -msgstr "" +msgstr "Remover nó" #: Line.cpp:494 Line.cpp:498 Transformer.cpp:433 Transformer.cpp:437 msgid "" "\n" "P" msgstr "" +"\n" +"P" #: Line.cpp:496 Line.cpp:500 Transformer.cpp:435 Transformer.cpp:439 msgid "" "\n" "Q" msgstr "" +"\n" +"Q" #: LineForm.cpp:122 msgid "Line: Switching" -msgstr "" +msgstr "Linha: Chaveamento" #: LineForm.cpp:142 SyncMachineForm.cpp:291 SyncMachineForm.cpp:425 #: TransformerForm.cpp:126 msgid "Value entered incorrectly in the field \"Nominal power\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Potência nominal\"." #: LineForm.cpp:157 TransformerForm.cpp:141 msgid "Value entered incorrectly in the field \"Resistance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Resistência\"." #: LineForm.cpp:172 msgid "Value entered incorrectly in the field \"Indutive Reactance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Reatância indutiva\"." #: LineForm.cpp:187 msgid "Value entered incorrectly in the field \"Capacitive Susceptance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Susceptância capacitiva\"." #: LineForm.cpp:202 msgid "Value entered incorrectly in the field \"Line size\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Comprimento da linha\"." #: LineForm.cpp:208 msgid "Value entered incorrectly in the field \"Zero-sequence resistance\"." msgstr "" +"Valor inserido incorretamente no campo \"Resistência de sequência zero\"." #: LineForm.cpp:211 msgid "" "Value entered incorrectly in the field \"Zero-sequence indutive reactance\"." msgstr "" +"Valor inserido incorretamente no campo \"Reatância indutiva de sequência zero" +"\"." #: LineForm.cpp:214 msgid "" "Value entered incorrectly in the field \"Zero-sequence capacitive susceptance" "\"." msgstr "" +"Valor inserido incorretamente no campo \"Susceptância capacitiva de " +"sequência zero\"." #: Load.cpp:123 msgid "Edit Load" -msgstr "" +msgstr "Editar Carga" #: LoadForm.cpp:70 msgid "Load: Switching" -msgstr "" +msgstr "Carga: Chaveamento" -#: MainFrame.cpp:85 +#: MainFrame.cpp:89 msgid "&Bus\tB" msgstr "&Barramento\tB" -#: MainFrame.cpp:85 +#: MainFrame.cpp:89 msgid "Adds a bus at the circuit" msgstr "Adiciona um barramento no circuito" -#: MainFrame.cpp:88 +#: MainFrame.cpp:92 msgid "&Line\tL" msgstr "&Linha\tL" -#: MainFrame.cpp:88 +#: MainFrame.cpp:92 msgid "Adds a power line at the circuit" msgstr "Adiciona uma linha no circuito" -#: MainFrame.cpp:90 +#: MainFrame.cpp:93 msgid "&Transformer\tT" msgstr "&Transformador\tT" -#: MainFrame.cpp:90 +#: MainFrame.cpp:94 msgid "Adds a transformer at the circuit" msgstr "Adiciona um transformador no circuito" -#: MainFrame.cpp:92 +#: MainFrame.cpp:95 msgid "&Generator\tG" msgstr "&Gerador\tG" -#: MainFrame.cpp:92 +#: MainFrame.cpp:96 msgid "Adds a generator at the circuit" msgstr "Adiciona um gerador no circuito" -#: MainFrame.cpp:94 +#: MainFrame.cpp:97 msgid "&Induction motor\tI" msgstr "&Motor de indução\tI" -#: MainFrame.cpp:94 MainFrame.cpp:96 +#: MainFrame.cpp:98 MainFrame.cpp:101 msgid "Adds an induction motor at the circuit" msgstr "Adiciona um motor de indução no circuito" -#: MainFrame.cpp:96 +#: MainFrame.cpp:100 msgid "&Synchronous compensator \tK" msgstr "&Compensador síncrono \tK" -#: MainFrame.cpp:98 +#: MainFrame.cpp:103 msgid "&Load\tShift-L" msgstr "&Carga\tShift-L" -#: MainFrame.cpp:98 +#: MainFrame.cpp:103 msgid "Adds a load at the circuit" msgstr "Adiciona uma carga no circuito" -#: MainFrame.cpp:100 +#: MainFrame.cpp:104 msgid "&Capacitor\tShift-C" msgstr "&Capacitor\tShift-C" -#: MainFrame.cpp:100 +#: MainFrame.cpp:105 msgid "Adds a shunt capacitor at the circuit" msgstr "Adiciona um capacitor shunt no circuito" -#: MainFrame.cpp:102 +#: MainFrame.cpp:106 msgid "&Inductor\tShift-I" msgstr "&Inductor\tShift-I" -#: MainFrame.cpp:102 +#: MainFrame.cpp:107 msgid "Adds a shunt inductor at the circuit" msgstr "Adiciona um indutor shunt no circuito" -#: MainFrame.cpp:122 +#: MainFrame.cpp:127 #, c-format msgid "New project %d" -msgstr "" +msgstr "Novo projeto %d" -#: MainFrame.cpp:207 +#: MainFrame.cpp:209 msgid "Open PSP file" -msgstr "" +msgstr "Abrir arquivo do PSP" -#: MainFrame.cpp:213 +#: MainFrame.cpp:216 msgid "Open project" -msgstr "" +msgstr "Abrir projeto" -#: MainFrame.cpp:265 MainFrame.cpp:286 +#: MainFrame.cpp:273 MainFrame.cpp:294 msgid "Save PSP file" -msgstr "" +msgstr "Salvar arquivo do PSP" -#: MainFrame.cpp:314 Workspace.cpp:672 +#: MainFrame.cpp:322 Workspace.cpp:678 #, c-format msgid "Bus %d" msgstr "Barra %d" -#: MainFrame.cpp:317 Workspace.cpp:676 +#: MainFrame.cpp:325 Workspace.cpp:682 msgid "Insert Bus: Click to insert, ESC to cancel." -msgstr "" +msgstr "Inserir Barramento: Clique para inserir, ESC para cancelar." -#: MainFrame.cpp:321 Workspace.cpp:689 +#: MainFrame.cpp:329 Workspace.cpp:695 #, c-format msgid "Line %d" -msgstr "" +msgstr "Linha %d" -#: MainFrame.cpp:324 Workspace.cpp:693 +#: MainFrame.cpp:332 Workspace.cpp:699 msgid "Insert Line: Click on two buses, ESC to cancel." -msgstr "" +msgstr "Inserir Linha: Clique em duas barras, ESC para cancelar." -#: MainFrame.cpp:329 Workspace.cpp:707 +#: MainFrame.cpp:337 Workspace.cpp:714 #, c-format msgid "Transformer %d" -msgstr "" +msgstr "Transformador %d" -#: MainFrame.cpp:332 Workspace.cpp:711 +#: MainFrame.cpp:340 Workspace.cpp:718 msgid "Insert Transformer: Click on two buses, ESC to cancel." -msgstr "" +msgstr "Inserir Transformador: Clique em duas barras, ESC para cancelar." -#: MainFrame.cpp:337 Workspace.cpp:719 +#: MainFrame.cpp:345 Workspace.cpp:726 #, c-format msgid "Generator %d" msgstr "Gerador %d" -#: MainFrame.cpp:340 Workspace.cpp:723 +#: MainFrame.cpp:348 Workspace.cpp:730 msgid "Insert Generator: Click on a buses, ESC to cancel." -msgstr "" +msgstr "Inserir Gerador: Clique em uma barra, ESC para cancelar." -#: MainFrame.cpp:344 Workspace.cpp:683 +#: MainFrame.cpp:352 Workspace.cpp:689 #, c-format msgid "Load %d" -msgstr "" +msgstr "Carga %d" -#: MainFrame.cpp:347 Workspace.cpp:687 +#: MainFrame.cpp:355 Workspace.cpp:693 msgid "Insert Load: Click on a buses, ESC to cancel." -msgstr "" +msgstr "Inserir Carga: Clique em uma barra, ESC para cancelar." -#: MainFrame.cpp:352 Workspace.cpp:764 +#: MainFrame.cpp:360 Workspace.cpp:771 #, c-format msgid "Capacitor %d" -msgstr "" +msgstr "Capacitor %d" -#: MainFrame.cpp:355 Workspace.cpp:768 +#: MainFrame.cpp:363 Workspace.cpp:775 msgid "Insert Capacitor: Click on a buses, ESC to cancel." -msgstr "" +msgstr "Inserir Capacitor: Clique em uma barra, ESC para cancelar." -#: MainFrame.cpp:360 Workspace.cpp:731 +#: MainFrame.cpp:368 Workspace.cpp:738 #, c-format msgid "Inductor %d" -msgstr "" +msgstr "Indutor %d" -#: MainFrame.cpp:363 Workspace.cpp:735 +#: MainFrame.cpp:371 Workspace.cpp:742 msgid "Insert Inductor: Click on a buses, ESC to cancel." -msgstr "" +msgstr "Inserir Indutor: Clique em uma barra, ESC para cancelar." -#: MainFrame.cpp:368 Workspace.cpp:739 +#: MainFrame.cpp:376 Workspace.cpp:746 #, c-format msgid "Induction motor %d" -msgstr "" +msgstr "Motor de indução %d" -#: MainFrame.cpp:371 Workspace.cpp:743 +#: MainFrame.cpp:379 Workspace.cpp:750 msgid "Insert Induction Motor: Click on a buses, ESC to cancel." -msgstr "" +msgstr "Inserir Motor de indução: Clique em uma barra, ESC para cancelar." -#: MainFrame.cpp:376 Workspace.cpp:752 +#: MainFrame.cpp:384 Workspace.cpp:759 #, c-format msgid "Synchronous condenser %d" -msgstr "" +msgstr "Compensador síncrono %d" -#: MainFrame.cpp:379 Workspace.cpp:756 +#: MainFrame.cpp:387 Workspace.cpp:763 msgid "Insert Synchronous Condenser: Click on a buses, ESC to cancel." -msgstr "" +msgstr "Inserir Compensador síncrono: Clique em uma barra, ESC para cancelar." #: MainFrameBase.cpp:76 MainFrameBase.cpp:77 MainFrameBase.cpp:80 msgid "Projects" @@ -1449,11 +1691,12 @@ msgstr "Abrir projetos salvos" #: MainFrameBase.cpp:86 msgid "General Settings" -msgstr "" +msgstr "Configurações gerais" #: MainFrameBase.cpp:86 msgid "Opens a dialog to set the main settings of the program" msgstr "" +"Abre um formulário para definir as principais configurações do programa" #: MainFrameBase.cpp:88 msgid "Closes the application" @@ -1473,7 +1716,7 @@ msgstr "Salvar o projeto atual" #: MainFrameBase.cpp:98 msgid "Save As..." -msgstr "" +msgstr "Salvar como..." #: MainFrameBase.cpp:98 msgid "Save as the current project" @@ -1537,7 +1780,7 @@ msgstr "Circuito" #: MainFrameBase.cpp:138 msgid "Add Element" -msgstr "" +msgstr "Inserir elemento" #: MainFrameBase.cpp:138 msgid "Add a new element in the project" @@ -1563,19 +1806,19 @@ msgstr "" #: MainFrameBase.cpp:148 msgid "Rotate Clockwise" -msgstr "" +msgstr "Girar Horário" #: MainFrameBase.cpp:150 msgid "Rotate Counter-clockwise" -msgstr "" +msgstr "Girar anti-horário" #: MainFrameBase.cpp:150 msgid "Rotate the selected elements counter-clockwise" -msgstr "" +msgstr "Gira os elementos selecionados no sentido anti-horário" #: MainFrameBase.cpp:152 msgid "Project Settings" -msgstr "" +msgstr "Configurações do projeto" #: MainFrameBase.cpp:152 msgid "Opens a dialog to set the main settings of the current project" @@ -1588,7 +1831,7 @@ msgstr "Relatórios" #: MainFrameBase.cpp:160 msgid "Data Report" -msgstr "" +msgstr "Relatório de dados" #: MainFrameBase.cpp:160 msgid "Opens a data report" @@ -1612,15 +1855,15 @@ msgstr "Captura uma imagem instantânea do circuito" #: MainFrameBase.cpp:167 MainFrameBase.cpp:168 msgid "Simulation" -msgstr "" +msgstr "Simulação" #: MainFrameBase.cpp:170 MainFrameBase.cpp:171 msgid "Continuous" -msgstr "" +msgstr "Contínuo" #: MainFrameBase.cpp:175 msgid "Enable Solution" -msgstr "" +msgstr "Habilitar solução" #: MainFrameBase.cpp:175 msgid "" @@ -1632,7 +1875,7 @@ msgstr "" #: MainFrameBase.cpp:177 msgid "Disable Solution" -msgstr "" +msgstr "Desabilitar solução" #: MainFrameBase.cpp:177 msgid "" @@ -1643,7 +1886,7 @@ msgstr "" #: MainFrameBase.cpp:179 msgid "Reset Voltages" -msgstr "" +msgstr "Reiniciar tensões" #: MainFrameBase.cpp:179 msgid "Reset all voltages to initial state" @@ -1651,11 +1894,11 @@ msgstr "Reinicia todas as tensões para os valores iniciais" #: MainFrameBase.cpp:182 MainFrameBase.cpp:183 MainFrameBase.cpp:186 msgid "Simulations" -msgstr "" +msgstr "Simulações" #: MainFrameBase.cpp:188 msgid "Power Flow" -msgstr "" +msgstr "Fluxo de carga" #: MainFrameBase.cpp:188 msgid "Calculate the circuit power flow" @@ -1663,7 +1906,7 @@ msgstr "Calcula o fluxo de carga do circuito" #: MainFrameBase.cpp:190 msgid "Run Stability" -msgstr "" +msgstr "Executar estabilidade" #: MainFrameBase.cpp:190 msgid "Run the stability calculations" @@ -1675,7 +1918,7 @@ msgstr "Calcula a falta do circuito (se existir)" #: MainFrameBase.cpp:194 msgid "Short-Circuit Power" -msgstr "" +msgstr "Nível de curto-circuito" #: MainFrameBase.cpp:194 msgid "Calculate the short-circuit power in all buses" @@ -1683,11 +1926,11 @@ msgstr "Calcula o nível de curto-circuito em todas as barras" #: MainFrameBase.cpp:196 msgid "Simulation Settings" -msgstr "" +msgstr "Configurações de simulação" #: MainFrameBase.cpp:196 msgid "Opens a dialog to set the settings of the simulations" -msgstr "" +msgstr "Abre um formulário para definir as configurações de simulação" #: MainFrameBase.h:141 msgid "PSP-UFU" @@ -1695,103 +1938,216 @@ msgstr "PSP-UFU" #: PowerFlow.cpp:24 msgid "No buses found on the system." -msgstr "" +msgstr "Não foram encontradas barras no sistema." #: PowerFlow.cpp:173 msgid "There is no slack bus on the system." -msgstr "" +msgstr "Não há barra de referência no sistema." #: PowerFlow.cpp:177 msgid "The slack bus don't have generation." -msgstr "" +msgstr "A barra de referência não tem geração." #: PowerFlow.cpp:192 msgid "The maximum number of iterations was reached." -msgstr "" +msgstr "O número máximo de iterações foi alcançado." + +#: PropertiesForm.cpp:44 +msgid "Language" +msgstr "Idioma" + +#: PropertiesForm.cpp:60 +msgid "Theme" +msgstr "Tema" + +#: PropertiesForm.cpp:153 +msgid "Base power" +msgstr "Potência base" + +#: PropertiesForm.cpp:177 +msgid "Continuous calculation" +msgstr "Cálculo contínuo" + +#: PropertiesForm.cpp:181 +msgid "Calculate fault after power flow" +msgstr "Calcular falta após o fluxo de carga" + +#: PropertiesForm.cpp:186 +msgid "Calculate short-circuit power after power flow" +msgstr "Calcular o nível de curto-circuito após o fluxo de carga" + +#: PropertiesForm.cpp:192 +msgid "Power flow" +msgstr "Fluxo de carga" + +#: PropertiesForm.cpp:201 +msgid "Solution method" +msgstr "Método de solução" + +#: PropertiesForm.cpp:221 +msgid "Acceleration factor" +msgstr "Fator de aceleração" + +#: PropertiesForm.cpp:236 PropertiesForm.cpp:345 +msgid "Tolerance" +msgstr "Tolerância" + +#: PropertiesForm.cpp:251 +msgid "Max. iterations" +msgstr "Iterações máx" + +#: PropertiesForm.cpp:322 +msgid "System frequency" +msgstr "Frequência do sistema" + +#: PropertiesForm.cpp:337 +msgid "Hz" +msgstr "Hz" + +#: PropertiesForm.cpp:360 +msgid "Max. Iterations" +msgstr "Iterações máx" + +#: PropertiesForm.cpp:375 +msgid "Controls step ratio" +msgstr "Razão do passo dos controles" + +#: PropertiesForm.cpp:390 +msgid "Plot time" +msgstr "Tempo de impressão" + +#: PropertiesForm.h:69 +msgid "General settings" +msgstr "Opções gerais" + +#: PropertiesForm.h:158 +msgid "Simulation settings" +msgstr "Opções de simulação" #: ReactiveShuntElementForm.cpp:75 msgid "Capacitor: Switching" -msgstr "" +msgstr "Capacitor: Chaveamento" #: ReactiveShuntElementForm.cpp:79 msgid "Inductor: Switching" +msgstr "Indutor: Chaveamento" + +#: SimulationsSettingsForm.cpp:61 +msgid "Value entered incorrectly in the field \"Base power\"." +msgstr "Valor inserido incorretamente no campo \"Potência base\"." + +#: SimulationsSettingsForm.cpp:85 +msgid "Value entered incorrectly in the field \"Acceleration factor\"." +msgstr "Valor inserido incorretamente no campo \"Fator de aceleração\"." + +#: SimulationsSettingsForm.cpp:88 +msgid "Value entered incorrectly in the field \"Tolerance (Power flow)\"." +msgstr "" +"Valor inserido incorretamente no campo \"Tolerância (Fluxo de carga)\"." + +#: SimulationsSettingsForm.cpp:91 +msgid "" +"Value entered incorrectly in the field \"Max. iterations (Power flow)\"." +msgstr "" +"Valor inserido incorretamente no campo \"Iterações máx (Fluxo de carga)\"." + +#: SimulationsSettingsForm.cpp:100 +msgid "Value entered incorrectly in the field \"System frequency\"." +msgstr "Valor inserido incorretamente no campo \"Frequência do sistema\"." + +#: SimulationsSettingsForm.cpp:103 +msgid "Value entered incorrectly in the field \"Tolerance (Stability)\"." +msgstr "Valor inserido incorretamente no campo \"Tolerância (estabilidade)\"." + +#: SimulationsSettingsForm.cpp:106 +msgid "Value entered incorrectly in the field \"Max. iterations (Stability)\"." msgstr "" +"Valor inserido incorretamente no campo \"Iterações máx (Estabilidade)\"." + +#: SimulationsSettingsForm.cpp:109 +msgid "Value entered incorrectly in the field \"Controls step ratio\"." +msgstr "" +"Valor inserido incorretamente no campo \"Razão do passo dos controles\"." + +#: SimulationsSettingsForm.cpp:112 +msgid "Value entered incorrectly in the field \"Plot time\"." +msgstr "Valor inserido incorretamente no campo \"Tempo de impressão\"." #: SumForm.cpp:41 msgid "You must assign at least two signals." -msgstr "" +msgstr "Você deve atribuir pelo menos dois sinais." #: SumForm.cpp:56 msgid "Value entered incorrectly in the field \"Signs\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Sinais\"." -#: SyncGenerator.cpp:44 +#: SyncGenerator.cpp:41 msgid "Edit Generator" -msgstr "" +msgstr "Editar Gerador" + +#: SyncGenerator.cpp:229 +msgid "Frequency" +msgstr "Frequência" + +#: SyncGenerator.cpp:231 +msgid "Delta" +msgstr "Delta" #: SyncMachineForm.cpp:344 SyncMachineForm.cpp:478 msgid "Value entered incorrectly in the field \"Max reactive power\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Potência reativa máx\"." #: SyncMachineForm.cpp:365 SyncMachineForm.cpp:499 msgid "Value entered incorrectly in the field \"Min reactive power\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Potência reativa min\"." #: SyncMachineForm.cpp:386 SyncMachineForm.cpp:520 msgid "Value entered incorrectly in the field \"Positive resistance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Resistência positiva\"." #: SyncMachineForm.cpp:390 SyncMachineForm.cpp:524 msgid "Value entered incorrectly in the field \"Positive reactance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Reatância positiva\"." #: SyncMachineForm.cpp:394 SyncMachineForm.cpp:528 msgid "Value entered incorrectly in the field \"Negative resistance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Resistência negativa\"." #: SyncMachineForm.cpp:398 SyncMachineForm.cpp:532 msgid "Value entered incorrectly in the field \"Negative reactance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Reatância negativa\"." #: SyncMachineForm.cpp:402 SyncMachineForm.cpp:536 msgid "Value entered incorrectly in the field \"Zero resistance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Resistência zero\"." #: SyncMachineForm.cpp:406 SyncMachineForm.cpp:540 msgid "Value entered incorrectly in the field \"Zero reactance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Reatância zero\"." #: SyncMachineForm.cpp:410 SyncMachineForm.cpp:544 msgid "Value entered incorrectly in the field \"Ground resistance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Resistência de aterramento\"." #: SyncMachineForm.cpp:414 SyncMachineForm.cpp:548 msgid "Value entered incorrectly in the field \"Ground reactance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Reatância de aterramento\"." #: SyncMotor.cpp:17 msgid "Edit Synchronous Condenser" -msgstr "" +msgstr "Editar Compensador Síncrono" #: SyncMotor.cpp:26 msgid "Synchronous Condenser" -msgstr "" - -#: TextForm.cpp:855 -msgid "Voltage" -msgstr "" - -#: TextForm.cpp:856 -msgid "Angle" -msgstr "" +msgstr "Compensador síncrono" #: TextForm.cpp:857 TextForm.cpp:868 TextForm.cpp:879 TextForm.cpp:890 msgid "Fault current" -msgstr "" +msgstr "Corrente de falta" #: TextForm.cpp:858 msgid "Fault voltage" -msgstr "" +msgstr "Tensão de falta" #: TextForm.cpp:859 msgid "Short-circuit power" @@ -1799,169 +2155,200 @@ msgstr "Nível de curto-circuito" #: TextForm.cpp:875 TextForm.cpp:886 msgid "Active power flow" -msgstr "" +msgstr "Fluxo de potência ativa" #: TextForm.cpp:876 TextForm.cpp:887 msgid "Reactive power flow" -msgstr "" +msgstr "Fluxo de potência reativa" #: TextForm.cpp:877 TextForm.cpp:888 msgid "Losses" -msgstr "" +msgstr "Perdas" #: TextForm.cpp:878 TextForm.cpp:889 msgid "Current" -msgstr "" +msgstr "Corrente" #: TextForm.cpp:962 msgid "Degrees" -msgstr "" +msgstr "Graus" #: TextForm.cpp:963 msgid "Radians" -msgstr "" +msgstr "Radianos" #: TextForm.cpp:968 msgid "A" -msgstr "" +msgstr "A" #: TextForm.cpp:969 msgid "kA" -msgstr "" +msgstr "kA" #: TextForm.cpp:973 msgid "VA" -msgstr "" +msgstr "VA" #: TextForm.cpp:974 msgid "kVA" -msgstr "" +msgstr "kVA" #: TextForm.cpp:975 msgid "MVA" -msgstr "" +msgstr "MVA" #: TextForm.cpp:981 msgid "W" -msgstr "" +msgstr "W" #: TextForm.cpp:982 msgid "kW" -msgstr "" +msgstr "kW" #: TextForm.cpp:983 msgid "MW" -msgstr "" +msgstr "MW" #: TextForm.cpp:989 msgid "VAr" -msgstr "" +msgstr "VAr" #: TextForm.cpp:990 msgid "kVAr" -msgstr "" +msgstr "kVAr" #: TextForm.cpp:991 msgid "MVAr" -msgstr "" +msgstr "MVAr" #: TextForm.cpp:1206 msgid "There are blank fields." -msgstr "" +msgstr "Existem campos em branco." #: TransferFunctionForm.cpp:55 msgid "Value entered incorrectly in the field \"Numerator parameters\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Parâmetros do numerador\"." #: TransferFunctionForm.cpp:68 msgid "Value entered incorrectly in the field \"Denominator parameters\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Parâmetros do denominador\"." #: Transformer.cpp:256 msgid "Edit tranformer" -msgstr "" +msgstr "Editar Transformador" #: TransformerForm.cpp:112 msgid "Transfomer: Switching" -msgstr "" +msgstr "Transformador: Chaveamento" #: TransformerForm.cpp:153 msgid "Value entered incorrectly in the field \"Indutive reactance\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Reatância indutiva\"." #: TransformerForm.cpp:195 msgid "Value entered incorrectly in the field \"Turns ratio\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"TAP\"." #: TransformerForm.cpp:199 msgid "Value entered incorrectly in the field \"Phase shift\"." -msgstr "" +msgstr "Valor inserido incorretamente no campo \"Defasagem\"." #: TransformerForm.cpp:205 msgid "Value entered incorrectly in the field \"Zero sequence resistance\"." msgstr "" +"Valor inserido incorretamente no campo \"Resistência de sequência zero\"." #: TransformerForm.cpp:210 msgid "" "Value entered incorrectly in the field \"Zero sequence indutive reactance\"." msgstr "" +"Valor inserido incorretamente no campo \"Reatância indutiva de sequência zero" +"\"." #: TransformerForm.cpp:214 msgid "Value entered incorrectly in the field \"Primary ground resistance\"." msgstr "" +"Valor inserido incorretamente no campo \"Resistência de aterramento do " +"primário\"." #: TransformerForm.cpp:218 msgid "Value entered incorrectly in the field \"Primary ground reactance\"." msgstr "" +"Valor inserido incorretamente no campo \"Reatância de aterramento do primário" +"\"." #: TransformerForm.cpp:222 msgid "Value entered incorrectly in the field \"Secondary ground resistance\"." msgstr "" +"Valor inserido incorretamente no campo \"Resistência de aterramento do " +"secundário\"." #: TransformerForm.cpp:226 msgid "Value entered incorrectly in the field \"Secondary ground reactance\"." msgstr "" +"Valor inserido incorretamente no campo \"Reatância de aterramento do " +"secundário\"." -#: Workspace.cpp:269 +#: Workspace.cpp:275 msgid "Do you want to change the rated voltage of the path?" -msgstr "" +msgstr "Você quer mudar a tensão nominal do trecho?" -#: Workspace.cpp:270 +#: Workspace.cpp:276 msgid "Warning" -msgstr "" +msgstr "Atenção" -#: Workspace.cpp:655 +#: Workspace.cpp:661 msgid "Insert Text: Click to insert, ESC to cancel." -msgstr "" +msgstr "Inserir Texto: Clique para inserir, ESC para cancelar." -#: Workspace.cpp:795 +#: Workspace.cpp:802 msgid "MODE: DRAG" -msgstr "" +msgstr "MODO: ARRASTAR" -#: Workspace.cpp:800 +#: Workspace.cpp:807 msgid "MODE: PASTE" -msgstr "" +msgstr "MODO: COLAR" -#: Workspace.cpp:807 +#: Workspace.cpp:814 msgid "MODE: INSERT" -msgstr "" +msgstr "MODO: INSERÇÃO" -#: Workspace.cpp:816 +#: Workspace.cpp:823 msgid "MODE: EDIT" -msgstr "" +msgstr "MODO: EDIÇÃO" -#: Workspace.cpp:820 +#: Workspace.cpp:827 #, c-format msgid "ZOOM: %d%%" -msgstr "" +msgstr "ZOOM: %d%%" -#: Workspace.cpp:1153 Workspace.cpp:1261 +#: Workspace.cpp:1159 Workspace.cpp:1267 msgid "It was not possible to paste from clipboard." -msgstr "" +msgstr "Não foi possível colar da área de transferência." -#: Workspace.cpp:1269 +#: Workspace.cpp:1275 msgid "Click to paste." -msgstr "" +msgstr "Clique para colar." + +#: Workspace.cpp:1425 +msgid "Speed error" +msgstr "Erro de velocidade" + +#: Workspace.cpp:1426 +msgid "Delta error" +msgstr "Erro do delta" + +#: Workspace.cpp:1427 +msgid "Eq error" +msgstr "Erro do Eq" + +#: Workspace.cpp:1428 +msgid "Ed error" +msgstr "Erro do Ed" + +#: Workspace.cpp:1429 +msgid "Number iterations" +msgstr "Número de iterações" #~ msgid "Export Import" #~ msgstr "Exportar Importar" @@ -1972,9 +2359,6 @@ msgstr "" #~ msgid "Project settings" #~ msgstr "Opções do projeto" -#~ msgid "Save as..." -#~ msgstr "Salvar como..." - #~ msgid "Add element" #~ msgstr "Adicionar elemento" @@ -1987,24 +2371,12 @@ msgstr "" #~ msgid "Handling" #~ msgstr "Manipulação" -#~ msgid "Calculations" -#~ msgstr "Cálculos" - -#~ msgid "Power flow" -#~ msgstr "Fluxo de carga" - #~ msgid "Data report" #~ msgstr "Relatório de dados" #~ msgid "Settings" #~ msgstr "Opções" -#~ msgid "Opens the stability settings" -#~ msgstr "Abre as opções de estabilidade" - -#~ msgid "Run" -#~ msgstr "Executar" - #~ msgid "Data" #~ msgstr "Dados" diff --git a/Project/main.cpp b/Project/main.cpp index e24860d..397cbfa 100644 --- a/Project/main.cpp +++ b/Project/main.cpp @@ -2,19 +2,79 @@ #include <wx/event.h> #include <wx/image.h> #include <wx/stdpaths.h> +#include <wx/textfile.h> #include "MainFrame.h" +#include "PropertiesData.h" // Define the MainApp class MainApp : public wxApp { -public: + public: MainApp() {} virtual ~MainApp() {} - void LoadCatalogs(wxLocale* locale) + bool LoadInitFile(PropertiesData* propertiesData) { - // Load computer settings. - locale->Init(locale->GetSystemLanguage(), wxLOCALE_DONT_LOAD_DEFAULT); + wxTextFile file("config.ini"); + auto data = propertiesData->GetGeneralPropertiesData(); + + if(!file.Create()) { + if(!file.Open()) return false; + + wxString line; + for(line = file.GetFirstLine(); !file.Eof(); line = file.GetNextLine()) { + wxString tag = ""; + wxString tagValue = ""; + bool parseValue = false; + for(unsigned int i = 0; i < line.Len(); ++i) { + if(line[i] == '=') { + parseValue = true; + } else { + if(parseValue) + tagValue += line[i]; + else + tag += line[i]; + } + } + // Language + if(tag == "lang") { + if(tagValue == "pt-br" || tagValue == "pt") { + data.language = wxLANGUAGE_PORTUGUESE_BRAZILIAN; + } else if(tagValue == "en" || tagValue == "en-us" || tagValue == "en-uk") { + data.language = wxLANGUAGE_ENGLISH; + } + } + if(tag == "theme") { + if(tagValue == "light") { + data.theme = THEME_LIGHT; + } else if(tagValue == "dark") { + data.theme = THEME_DARK; + } + } + } + file.Close(); + } else { // Create default init file. + if(!file.Open()) return false; + + // Default parameters. + file.AddLine("lang=en"); + file.AddLine("theme=light"); + + file.Write(); + file.Close(); + + data.language = wxLANGUAGE_ENGLISH; + data.theme = THEME_LIGHT; + propertiesData->SetGeneralPropertiesData(data); + } + + propertiesData->SetGeneralPropertiesData(data); + return true; + } + + void LoadCatalogs(wxLocale* locale, PropertiesData* propertiesData) + { + locale->Init(propertiesData->GetGeneralPropertiesData().language, wxLOCALE_DONT_LOAD_DEFAULT); wxFileName fn(wxStandardPaths::Get().GetExecutablePath()); wxString langPath = fn.GetPath() + "\\..\\data\\lang"; @@ -29,10 +89,13 @@ public: wxImage::AddHandler(new wxPNGHandler); wxImage::AddHandler(new wxJPEGHandler); + PropertiesData* propertiesData = new PropertiesData(); + LoadInitFile(propertiesData); + wxLocale* locale = new wxLocale(); - LoadCatalogs(locale); + LoadCatalogs(locale, propertiesData); - MainFrame* mainFrame = new MainFrame(NULL, locale); + MainFrame* mainFrame = new MainFrame(NULL, locale, propertiesData); SetTopWindow(mainFrame); return GetTopWindow()->Show(); } |