From 004257e2abebbf448ba8d1fba32daae216b2c88e Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Wed, 2 Nov 2016 23:11:44 -0200 Subject: Gauss-Seidel implemented --- Project/PowerFlow.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'Project/PowerFlow.h') diff --git a/Project/PowerFlow.h b/Project/PowerFlow.h index 76b17e4..b30b82f 100644 --- a/Project/PowerFlow.h +++ b/Project/PowerFlow.h @@ -3,18 +3,29 @@ #include "ElectricCalculation.h" -#include //temp +#include +#include //_() #include //temp +enum BusType +{ + BUS_SLACK = 0, + BUS_PV, + BUS_PQ +}; + class PowerFlow : public ElectricCalculation { public: PowerFlow(std::vector elementList); ~PowerFlow(); - virtual bool RunGaussSeidel(); + 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 > > m_yBus; + wxString m_errorMsg = ""; }; #endif // POWERFLOW_H -- cgit