summaryrefslogtreecommitdiffstats
path: root/Project/PowerElement.h
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-08-30 20:42:27 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-08-30 20:42:27 -0300
commit516cdb72d3ff99a1ee786d3ea24c9b579272fe76 (patch)
tree6017213d5e270f94c1063d11e793c196e3c969f8 /Project/PowerElement.h
parent1fcb990bd02da945ac0204caaed6a9aa1f6a7d5f (diff)
downloadPSP.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.h14
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