diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2019-07-25 01:11:17 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2019-07-25 01:11:17 -0300 |
commit | c7ef9a883031c68506357f9ef1b1a0b79c79f4da (patch) | |
tree | 06646fb4511030daa7fb6426dfab9dc2413a7253 /Project/SimulationsSettingsForm.cpp | |
parent | 4f434e4a1cccce69e4b680e4734df52244d3a30b (diff) | |
download | PSP.git-c7ef9a883031c68506357f9ef1b1a0b79c79f4da.tar.gz PSP.git-c7ef9a883031c68506357f9ef1b1a0b79c79f4da.tar.xz PSP.git-c7ef9a883031c68506357f9ef1b1a0b79c79f4da.zip |
Motor integration with PF
Newton bug fixed
Newton inertia implemented
Gauss-Newton implemented
Diffstat (limited to 'Project/SimulationsSettingsForm.cpp')
-rw-r--r-- | Project/SimulationsSettingsForm.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Project/SimulationsSettingsForm.cpp b/Project/SimulationsSettingsForm.cpp index a9890a8..5b3cb1c 100644 --- a/Project/SimulationsSettingsForm.cpp +++ b/Project/SimulationsSettingsForm.cpp @@ -60,6 +60,7 @@ SimulationsSettingsForm::SimulationsSettingsForm(wxWindow* parent, PropertiesDat m_textCtrlPFTolerance->SetValue(wxString::Format("%g", data.powerFlowTolerance)); m_textCtrlPFMaxIterations->SetValue(wxString::Format("%d", data.powerFlowMaxIterations)); m_textCtrlPFSlackBusAngle->SetValue(Element::StringFromDouble(data.initAngle)); + m_textCtrlPFNewtonInertia->SetValue(Element::StringFromDouble(data.newtonInertia)); m_textCtrlPFGaussTolerance->SetValue(wxString::Format("%g", data.gaussTolerance)); m_textCtrlTimeStep->SetValue(wxString::Format("%g", data.timeStep)); m_textCtrlSimTime->SetValue(Element::StringFromDouble(data.stabilitySimulationTime)); @@ -136,6 +137,9 @@ bool SimulationsSettingsForm::ValidateData() if(!Element::DoubleFromString(this, m_textCtrlPFSlackBusAngle->GetValue(), data.initAngle, _("Value entered incorrectly in the field \"Slack bus angle\"."))) return false; + if(!Element::DoubleFromString(this, m_textCtrlPFNewtonInertia->GetValue(), data.newtonInertia, + _("Value entered incorrectly in the field \"Newton inertia (Power flow)\"."))) + return false; if(!Element::DoubleFromString(this, m_textCtrlPFGaussTolerance->GetValue(), data.gaussTolerance, _("Value entered incorrectly in the field \"Gauss tolerance (Power flow)\"."))) return false; @@ -240,4 +244,8 @@ void SimulationsSettingsForm::UpdatePFFieldStatus() m_textCtrlPFGaussTolerance->Enable(); else m_textCtrlPFGaussTolerance->Enable(false); + if(m_choicePFMethod->GetSelection() == 1 || m_choicePFMethod->GetSelection() == 2) + m_textCtrlPFNewtonInertia->Enable(); + else + m_textCtrlPFNewtonInertia->Enable(false); } |