39 PowerFlow(std::vector<Element*> elementList);
41 virtual bool InitPowerFlow(std::vector<BusType>& busType,
42 std::vector<std::complex<double> >& voltage,
43 std::vector<std::complex<double> >& power,
44 std::vector<std::complex<double> >& loadPower,
45 std::vector<ReactiveLimits>& reactiveLimit,
46 double systemPowerBase = 100e6,
47 double initAngle = 0.0);
48 virtual bool RunGaussSeidel(
double systemPowerBase = 100e6,
49 int maxIteration = 5000,
51 double initAngle = 0.0,
52 double accFactor = 1.0);
53 virtual bool RunNewtonRaphson(
double systemPowerBase = 100e6,
54 int maxIteration = 5000,
56 double initAngle = 0.0,
57 double inertia = 1.0);
58 virtual bool RunGaussNewton(
double systemPowerBase = 100e6,
59 int maxIteration = 5000,
61 double initAngle = 0.0,
62 double accFactor = 1.0,
63 double gaussTol = 1e-2,
64 double inertia = 1.0);
66 virtual wxString GetErrorMessage() {
return m_errorMsg; }
67 virtual int GetIterations() {
return m_iterations; }
68 virtual void ResetVoltages();
71 void GetNumPVPQ(std::vector<BusType> busType,
int& numPQ,
int& numPV);
79 std::vector<std::vector<double>> CalculateJacobianMatrix(
80 const std::vector<std::complex<double>>& voltage,
81 const std::vector<std::complex<double>>& power,
82 const std::vector<BusType>& busType,
86 bool CheckReactiveLimits(std::vector<BusType>& busType,
87 std::vector<ReactiveLimits>& reactiveLimit,
88 std::vector<std::complex<double> >& power,
89 std::vector<std::complex<double> > loadPower);
91 double GaussSeidel(std::vector<BusType> busType,
92 std::vector<std::complex<double> >& voltage,
93 std::vector<std::complex<double> > oldVoltage,
94 std::vector<std::complex<double> >& power,
96 void NewtonRaphson(std::vector<BusType> busType,
97 std::vector<std::complex<double> >& voltage,
98 std::vector<std::complex<double> > power,
101 std::vector<double> dPdQ,
103 bool CalculateMotorsReactivePower(std::vector<std::complex<double> > voltage,
104 std::vector<std::complex<double> >& power);
106 bool HasInvalidValue(
const std::vector< std::complex<double> >& voltage);
108 std::vector<std::vector<std::complex<double> > > m_yBus;
109 wxString m_errorMsg =
"";
110 int m_numberOfBuses = 0;
111 int m_iterations = 0;