24enum LoadType { CONST_POWER = 0, CONST_IMPEDANCE };
28 double activePower = 100.0;
29 ElectricalUnit activePowerUnit = ElectricalUnit::UNIT_MW;
30 double reactivePower = 0.0;
31 ElectricalUnit reactivePowerUnit = ElectricalUnit::UNIT_Mvar;
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;
73class Load :
public Shunt
81 virtual bool AddParent(
Element* parent, wxPoint2DDouble position,
bool isOpening =
false);
83 virtual void DrawDC(
GUIColour* guiColour,wxPoint2DDouble translation,
double scale, wxGraphicsContext* gc)
const;
84 virtual void DrawDC(
GUIColour* guiColour,wxPoint2DDouble translation,
double scale, wxDC& dc)
const;
85 virtual void Rotate(
bool clockwise =
true);
88 virtual bool ShowForm(wxWindow* parent,
Element* element, wxWindow* workspace =
nullptr);
92 void SetElectricalData(
const LoadElectricalData& electricalData) { m_electricalData = electricalData; }
95 virtual rapidxml::xml_node<>* SaveElement(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementListNode);
96 virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList);
99 std::vector<wxPoint2DDouble> m_triangPts;
virtual wxString GetTipText() const
Get the tip text.
virtual void DrawDC(GUIColour *guiColour, wxPoint2DDouble translation, double scale, wxGraphicsContext *gc) const
Draw the element using GDI+.
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 AddParent(Element *parent, wxPoint2DDouble position, bool isOpening=false)
Add a parent to the element. This method must be used on power elements that connect to a bus,...
virtual bool GetPlotData(ElementPlotData &plotData, PlotStudy study=PlotStudy::STABILITY)
Fill the plot data.
virtual bool ShowForm(wxWindow *parent, Element *element, wxWindow *workspace=nullptr)
Show element data form.