summaryrefslogtreecommitdiffstats
path: root/Project/PowerFlow.h
blob: 29e205a69887a4cc3f5780915426f5cd72d62e3e (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
#ifndef POWERFLOW_H
#define POWERFLOW_H

#include "ElectricCalculation.h"

#include <wx/string.h>
#include <wx/intl.h> //_()

class PowerFlow : public ElectricCalculation
{
public:
    PowerFlow();
    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