summaryrefslogtreecommitdiffstats
path: root/Project/PowerFlow.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-11-04 18:02:03 -0200
committerThales1330 <thaleslima.ufu@gmail.com>2016-11-04 18:02:03 -0200
commit9919f24692c1fe9b8e11fde5c6d5c18f169b5c10 (patch)
treeb8980db8f053d38adcad362f08fce88541cf45bf /Project/PowerFlow.cpp
parent4799019fb948226daf5777d0d3ba41257dd55657 (diff)
downloadPSP.git-9919f24692c1fe9b8e11fde5c6d5c18f169b5c10.tar.gz
PSP.git-9919f24692c1fe9b8e11fde5c6d5c18f169b5c10.tar.xz
PSP.git-9919f24692c1fe9b8e11fde5c6d5c18f169b5c10.zip
Validation implemented
Diffstat (limited to 'Project/PowerFlow.cpp')
-rw-r--r--Project/PowerFlow.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/Project/PowerFlow.cpp b/Project/PowerFlow.cpp
index 40ee498..ff79722 100644
--- a/Project/PowerFlow.cpp
+++ b/Project/PowerFlow.cpp
@@ -214,8 +214,8 @@ bool PowerFlow::RunGaussSeidel(double systemPowerBase,
power[i] = sBus;
}
- /*wxString str = "";
- for(int i = 0; i < numberOfBuses; i++) {
+ wxString str = "";
+ /*for(int i = 0; i < numberOfBuses; i++) {
str += wxString::Format("%.5f/_%.2f\n", std::abs(voltage[i]), wxRadToDeg(std::arg(voltage[i])));
}
wxLogMessage(str);
@@ -228,7 +228,14 @@ bool PowerFlow::RunGaussSeidel(double systemPowerBase,
wxLogMessage(wxString::Format("Num iteracoes = %d", iteration));*/
- ValidateElementsPowerFlow(voltage, power, systemPowerBase);
+ ValidateElementsPowerFlow(voltage, power, busType, systemPowerBase);
+
+ for(auto itb = m_busList.begin(); itb != m_busList.end(); itb++) {
+ Bus* bus = *itb;
+ BusElectricalData data = bus->GetEletricalData();
+ str += wxString::Format("%.5f/_%.2f\n", std::abs(data.voltage), wxRadToDeg(std::arg(data.voltage)));
+ }
+ wxLogMessage(str);
return true;
}