21#include "../Element.h"
22#include "../../utils/ElementPlotData.h"
114 wxPoint2DDouble parentPoint,
115 wxPoint2DDouble secondPoint)
const;
164 virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit);
202 virtual double GetValueFromUnit(
double value, ElectricalUnit valueUnit)
const;
204 virtual void SaveCADProperties(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementNode);
205 virtual void SaveSwitchingData(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* electricalNode);
206 virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) {
return true; }
207 virtual bool OpenCADProperties(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList);
208 virtual bool OpenSwitchingData(rapidxml::xml_node<>* electricalNode);
212 std::vector<std::vector<wxPoint2DDouble> > m_powerFlowArrow;
215 wxColour m_busColour;
216 wxColour m_onlineElementColour;
217 wxColour m_offlineElementColour;
218 wxColour m_closedSwitchColour;
219 wxColour m_openedSwitchColour;
220 wxColour m_powerFlowArrowColour;
221 wxColour m_dynamicEventColour;
223 bool m_dynEvent =
false;
FaultData
Information about fault (type and location).
PowerFlowDirection
Direction of power flow arrows.
SwitchingType
Type of switching.
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Abstract class of power elements.
virtual void SetNominalVoltage(std::vector< double > nominalVoltage, std::vector< ElectricalUnit > nominalVoltageUnit)
Set nominal voltage of the element.
virtual void SetSwitchingData(SwitchingData data)
Set the switching data of the element.
virtual bool GetPlotData(ElementPlotData &plotData, PlotStudy study=PlotStudy::STABILITY)
Fill the plot data.
virtual ~PowerElement()
Destructor.
virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection)
Set the direction of the power flow.
PowerElement()
Constructor.
virtual void SetDynamicEvent(bool dynEvent=true)
Set if the power element have dynamic event.
virtual void CalculatePowerFlowPts(std::vector< wxPoint2DDouble > edges)
Calculate the points of the power flow arrows.
virtual bool SwitchesContains(wxPoint2DDouble position) const
Check if switch contains position.
virtual PowerFlowDirection GetPowerFlowDirection() const
Return the direction of the power flow.
virtual void DrawDCPowerFlowPts(GUIColour *guiColour, wxGraphicsContext *gc) const
Draw power flow arrows.
virtual SwitchingData GetSwitchingData()
Returns the switching data of the element.
virtual void UpdateSwitches()
Update the switch position.
virtual void DrawDCSwitches(GUIColour *guiColour, wxGraphicsContext *gc) const
Draw switch.
virtual wxPoint2DDouble GetSwitchPoint(Element *parent, wxPoint2DDouble parentPoint, wxPoint2DDouble secondPoint) const
Get the correct switch position.
virtual bool HaveDynamicEvent() const
Check if the power element have dynamic event.
Integration constants to calculate dynamic elements through trapezoidal integration method.
Switching data of power elements.
std::vector< double > swTime
std::vector< SwitchingType > swType