summaryrefslogtreecommitdiffstats
path: root/Project/PowerFlow.h
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2016-11-02 23:11:44 -0200
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2016-11-02 23:11:44 -0200
commit004257e2abebbf448ba8d1fba32daae216b2c88e (patch)
tree592ff32b18911e32ece4a7008d119627e856bd68 /Project/PowerFlow.h
parentb306118b2683cf6f264b5f1617c3e0e62a6c9042 (diff)
downloadPSP.git-004257e2abebbf448ba8d1fba32daae216b2c88e.tar.gz
PSP.git-004257e2abebbf448ba8d1fba32daae216b2c88e.tar.xz
PSP.git-004257e2abebbf448ba8d1fba32daae216b2c88e.zip
Gauss-Seidel implemented
Diffstat (limited to 'Project/PowerFlow.h')
-rw-r--r--Project/PowerFlow.h15
1 files changed, 13 insertions, 2 deletions
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 <wx/string.h>//temp
+#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();
+ 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