21#include "../../forms/LoadForm.h"
24enum LoadType { CONST_POWER = 0, CONST_IMPEDANCE };
28 double activePower = 100.0;
30 double reactivePower = 0.0;
32 LoadType loadType = CONST_POWER;
35 bool plotLoad =
false;
37 bool useCompLoad =
false;
47 double constImpedanceActive = 100.0;
48 double constCurrentActive = 0.0;
49 double constPowerActive = 0.0;
50 double constImpedanceReactive = 100.0;
51 double constCurrentReactive = 0.0;
52 double constPowerReactive = 0.0;
53 std::complex<double> y0;
55 double constCurrentUV = 0.7;
57 double constPowerUV = 0.7;
60 std::complex<double> voltage;
61 std::vector<std::complex<double> > voltageVector;
62 std::complex<double> electricalPower;
63 std::vector<std::complex<double> > electricalPowerVector;
83 virtual void DrawDC(wxPoint2DDouble translation,
double scale, wxGraphicsContext* gc)
const;
84 virtual void DrawDC(wxPoint2DDouble translation,
double scale, wxDC& dc)
const;
85 virtual void Rotate(
bool clockwise =
true);
91 void SetElectricalData(
const LoadElectricalData& electricalData) { m_electricalData = electricalData; }
94 virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode);
95 virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList);
98 std::vector<wxPoint2DDouble> m_triangPts;
ElectricalUnit
Electrical units.
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Loas shunt power element.
virtual wxString GetTipText() const
Get the tip text.
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
virtual Element * GetCopy()
Get a the element copy.
virtual void Rotate(bool clockwise=true)
Rotate the element.
virtual bool GetPlotData(ElementPlotData &plotData, PlotStudy study=PlotStudy::STABILITY)
Fill the plot data.
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus,...
virtual void DrawDC(wxPoint2DDouble translation, double scale, wxGraphicsContext *gc) const
Draw the element using GDI+.
Abstract class for shunt power elements.