blob: b30b82fa86a3b9d5e973068d713d08fca8ecba9a (
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
28
29
30
31
|
#ifndef POWERFLOW_H
#define POWERFLOW_H
#include "ElectricCalculation.h"
#include <wx/string.h>
#include <wx/intl.h>//_()
#include <wx/log.h>//temp
enum BusType
{
BUS_SLACK = 0,
BUS_PV,
BUS_PQ
};
class PowerFlow : public ElectricCalculation
{
public:
PowerFlow(std::vector<Element*> elementList);
~PowerFlow();
virtual bool RunGaussSeidel(double systemPowerBase = 100e6, int maxIteration = 5000, double error = 1e-6, double initAngle = 0.0, double accFactor = 1.0);
virtual wxString GetErrorMessage() { return m_errorMsg; }
protected:
std::vector<std::vector<std::complex<double> > > m_yBus;
wxString m_errorMsg = "";
};
#endif // POWERFLOW_H
|