21#include "../Element.h"
22#include "../../utils/ElementPlotData.h"
142 wxPoint2DDouble parentPoint,
143 wxPoint2DDouble secondPoint)
const;
192 virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit);
230 virtual double GetValueFromUnit(
double value,
ElectricalUnit valueUnit);
232 virtual void SaveCADProperties(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementNode);
233 virtual void SaveSwitchingData(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* electricalNode);
234 virtual bool OpenElement(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList) {
return true; }
235 virtual bool OpenCADProperties(rapidxml::xml_node<>* elementNode, std::vector<Element*> parentList);
236 virtual bool OpenSwitchingData(rapidxml::xml_node<>* electricalNode);
240 std::vector<std::vector<wxPoint2DDouble> > m_powerFlowArrow;
243 wxColour m_busColour;
244 wxColour m_onlineElementColour;
245 wxColour m_offlineElementColour;
246 wxColour m_closedSwitchColour;
247 wxColour m_openedSwitchColour;
248 wxColour m_powerFlowArrowColour;
249 wxColour m_dynamicEventColour;
251 bool m_dynEvent =
false;
ElectricalUnit
Electrical units.
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 void DrawDCSwitches(wxGraphicsContext *gc) const
Draw switch.
virtual bool SwitchesContains(wxPoint2DDouble position) const
Check if switch contains position.
virtual PowerFlowDirection GetPowerFlowDirection() const
Return the direction of the power flow.
virtual SwitchingData GetSwitchingData()
Returns the switching data of the element.
virtual void UpdateSwitches()
Update the switch position.
virtual void DrawDCPowerFlowPts(wxGraphicsContext *gc) const
Draw power flow arrows.
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