diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-08-30 20:42:27 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-08-30 20:42:27 -0300 |
commit | 516cdb72d3ff99a1ee786d3ea24c9b579272fe76 (patch) | |
tree | 6017213d5e270f94c1063d11e793c196e3c969f8 /Project/PowerElement.h | |
parent | 1fcb990bd02da945ac0204caaed6a9aa1f6a7d5f (diff) | |
download | PSP.git-516cdb72d3ff99a1ee786d3ea24c9b579272fe76.tar.gz PSP.git-516cdb72d3ff99a1ee786d3ea24c9b579272fe76.tar.xz PSP.git-516cdb72d3ff99a1ee786d3ea24c9b579272fe76.zip |
COI (center of inertia) implemented
See Milano's book p. 342
Diffstat (limited to 'Project/PowerElement.h')
-rw-r--r-- | Project/PowerElement.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Project/PowerElement.h b/Project/PowerElement.h index 033d697..e1afc7a 100644 --- a/Project/PowerElement.h +++ b/Project/PowerElement.h @@ -173,13 +173,22 @@ class PowerElement : public Element * @return Power flow direction. */ virtual PowerFlowDirection GetPowerFlowDirection() const { return m_pfDirection; } - /** * @brief Fill the plot data. * @param plotData Plot data to be filled. * @return true if the plot data was successfully filled, false otherwise. */ virtual bool GetPlotData(ElementPlotData& plotData) { return false; } + /** + * @brief Check if the power element have dynamic event. + * @return true if the element have dynamic an event, false otherwise. + */ + virtual bool HaveDynamicEvent() const { return m_dynEvent; } + /** + * @brief Set if the power element have dynamic event. + * @param dynEvent Event occurrence. + */ + virtual void SetDynamicEvent(bool dynEvent = true) { m_dynEvent = dynEvent; } protected: SwitchingData m_swData; std::vector<std::vector<wxPoint2DDouble> > m_powerFlowArrow; @@ -191,6 +200,9 @@ class PowerElement : public Element OpenGLColour m_closedSwitchColour; OpenGLColour m_openedSwitchColour; OpenGLColour m_powerFlowArrowColour; + OpenGLColour m_dynamicEventColour; + + bool m_dynEvent = false; }; #endif // POWERELEMENT_H |