blob: 22aa027886600159cd404860dafc80a1117d970e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "PowerFlow.h"
PowerFlow::PowerFlow(std::vector<Element*> elementList) : ElectricCalculation()
{
GetElementsFromList(elementList);
}
PowerFlow::~PowerFlow()
{
}
bool PowerFlow::RunGaussSeidel()
{
GetYBus(m_yBus, 100e6);
wxString str = "";
for(int i=0; i<(int)m_yBus.size(); i++) {
for(int j=0; j<(int)m_yBus[i].size(); j++) {
str += wxString::Format("%.2f + j%.2f\t", m_yBus[i][j].real(), m_yBus[i][j].imag());
}
str += "\n";
}
wxLogMessage(str);
return true;
}
|