From 077270f0294d236c6047d850703c5d011cb4b711 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sat, 3 Sep 2016 01:10:18 -0300 Subject: Motor implementation done, elements classes reorganized --- Project/IndMotor.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Project/IndMotor.h (limited to 'Project/IndMotor.h') diff --git a/Project/IndMotor.h b/Project/IndMotor.h new file mode 100644 index 0000000..911edd1 --- /dev/null +++ b/Project/IndMotor.h @@ -0,0 +1,16 @@ +#ifndef INDMOTOR_H +#define INDMOTOR_H + +#include "Machines.h" + +class IndMotor : public Machines +{ +public: + IndMotor(); + ~IndMotor(); + + virtual void DrawSymbol() const; + virtual bool GetContextMenu(wxMenu& menu); +}; + +#endif // INDMOTOR_H -- cgit From 02c5a1d22a078c132aca40ea14b95800dd8257e9 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Thu, 27 Oct 2016 17:26:24 -0200 Subject: All elements forms implemented --- Project/IndMotor.h | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'Project/IndMotor.h') diff --git a/Project/IndMotor.h b/Project/IndMotor.h index 911edd1..7624e71 100644 --- a/Project/IndMotor.h +++ b/Project/IndMotor.h @@ -3,14 +3,30 @@ #include "Machines.h" +class IndMotorForm; + +struct IndMotorElectricalData { + wxString name; + double activePower = 100.0; + ElectricalUnit activePowerUnit = UNIT_MW; + double reactivePower = 0.0; + ElectricalUnit reactivePowerUnit = UNIT_MVAr; +}; + class IndMotor : public Machines { -public: - IndMotor(); - ~IndMotor(); - - virtual void DrawSymbol() const; - virtual bool GetContextMenu(wxMenu& menu); + public: + IndMotor(); + IndMotor(wxString name); + ~IndMotor(); + + virtual void DrawSymbol() const; + virtual bool GetContextMenu(wxMenu& menu); + virtual bool ShowForm(wxWindow* parent, Element* element); + virtual IndMotorElectricalData GetElectricalData() { return m_electricalData; } + virtual void SetElectricalData(IndMotorElectricalData electricalData) { m_electricalData = electricalData; } + protected: + IndMotorElectricalData m_electricalData; }; -#endif // INDMOTOR_H +#endif // INDMOTOR_H -- cgit 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/IndMotor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Project/IndMotor.h') diff --git a/Project/IndMotor.h b/Project/IndMotor.h index 7624e71..491c714 100644 --- a/Project/IndMotor.h +++ b/Project/IndMotor.h @@ -5,7 +5,8 @@ class IndMotorForm; -struct IndMotorElectricalData { +struct IndMotorElectricalData +{ wxString name; double activePower = 100.0; ElectricalUnit activePowerUnit = UNIT_MW; @@ -24,6 +25,7 @@ class IndMotor : public Machines virtual bool GetContextMenu(wxMenu& menu); virtual bool ShowForm(wxWindow* parent, Element* element); virtual IndMotorElectricalData GetElectricalData() { return m_electricalData; } + virtual IndMotorElectricalData GetPUElectricalData(double systemPowerBase); virtual void SetElectricalData(IndMotorElectricalData electricalData) { m_electricalData = electricalData; } protected: IndMotorElectricalData m_electricalData; -- cgit