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

#include "ElectricCalculation.h"

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

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