diff options
Diffstat (limited to 'Project')
-rw-r--r-- | Project/ControlElementSolver.cpp | 6 | ||||
-rw-r--r-- | Project/Electromechanical.cpp | 8 | ||||
-rw-r--r-- | Project/Project.mk | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/Project/ControlElementSolver.cpp b/Project/ControlElementSolver.cpp index 55cb313..7c58512 100644 --- a/Project/ControlElementSolver.cpp +++ b/Project/ControlElementSolver.cpp @@ -35,7 +35,11 @@ ControlElementSolver::ControlElementSolver(ControlElementContainer* ctrlContaine Initialize(parent, timeStep, integrationError, startAllZero, input); } -void ControlElementSolver::Initialize(wxWindow* parent, double timeStep, double integrationError, bool startAllZero, double 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; diff --git a/Project/Electromechanical.cpp b/Project/Electromechanical.cpp index c08e4fd..8d683c4 100644 --- a/Project/Electromechanical.cpp +++ b/Project/Electromechanical.cpp @@ -322,7 +322,7 @@ void Electromechanical::SetEvent(double currentTime) 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); + m_yBus[n][n] -= std::complex<double>(0.0, data.reactivePower); } // Insert capacitor (only disconnected capacitors) @@ -330,7 +330,7 @@ void Electromechanical::SetEvent(double currentTime) 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); + m_yBus[n][n] += std::complex<double>(0.0, data.reactivePower); } } } @@ -348,7 +348,7 @@ void Electromechanical::SetEvent(double currentTime) 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); + m_yBus[n][n] -= std::complex<double>(0.0, -data.reactivePower); } // Insert inductor (only disconnected inductors) @@ -356,7 +356,7 @@ void Electromechanical::SetEvent(double currentTime) 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); + m_yBus[n][n] += std::complex<double>(0.0, -data.reactivePower); } } } diff --git a/Project/Project.mk b/Project/Project.mk index ced1e97..c794b8e 100644 --- a/Project/Project.mk +++ b/Project/Project.mk @@ -13,7 +13,7 @@ CurrentFileName := CurrentFilePath := CurrentFileFullPath := User :=NDSE-69 -Date :=30/05/2017 +Date :=02/06/2017 CodeLitePath :="C:/Program Files/CodeLite" LinkerName :=C:/TDM-GCC-64/bin/g++.exe SharedObjectLinkerName :=C:/TDM-GCC-64/bin/g++.exe -shared -fPIC |