summaryrefslogtreecommitdiffstats
path: root/Project/Workspace.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-08-09 21:01:41 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-08-09 21:01:41 -0300
commit8a1ffbc01135a1466ad7400518e4c56a4bdc3af5 (patch)
treed27db60347d5cb69781b3667d436601ae17b018e /Project/Workspace.cpp
parentd7550fe1c173f1be296f1ce7991ad6d70ed90ceb (diff)
downloadPSP.git-8a1ffbc01135a1466ad7400518e4c56a4bdc3af5.tar.gz
PSP.git-8a1ffbc01135a1466ad7400518e4c56a4bdc3af5.tar.xz
PSP.git-8a1ffbc01135a1466ad7400518e4c56a4bdc3af5.zip
Stability properties implemented
Diffstat (limited to 'Project/Workspace.cpp')
-rw-r--r--Project/Workspace.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp
index f2caee8..e55b9ad 100644
--- a/Project/Workspace.cpp
+++ b/Project/Workspace.cpp
@@ -21,6 +21,8 @@
#include "ElementPlotData.h"
#include "ChartView.h"
+#include "PropertiesData.h"
+
// Workspace
Workspace::Workspace() : WorkspaceBase(NULL) {}
Workspace::Workspace(wxWindow* parent, wxString name, wxStatusBar* statusBar) : WorkspaceBase(parent)
@@ -38,6 +40,8 @@ Workspace::Workspace(wxWindow* parent, wxString name, wxStatusBar* statusBar) :
const int widths[4] = {-3, -1, 100, 100};
m_statusBar->SetStatusWidths(4, widths);
+
+ m_properties = new PropertiesData();
}
Workspace::~Workspace()
@@ -51,6 +55,7 @@ Workspace::~Workspace()
if(m_camera) delete m_camera;
if(m_glContext) delete m_glContext;
if(m_tipWindow) delete m_tipWindow;
+ if(m_properties) delete m_properties;
}
void Workspace::OnPaint(wxPaintEvent& event)
@@ -1400,7 +1405,7 @@ bool Workspace::RunStability()
// Run power flow before stability.
RunPowerFlow();
- Electromechanical stability(this, GetElementList());
+ Electromechanical stability(this, GetElementList(), m_properties->GetSimulationPropertiesData());
bool result = stability.RunStabilityCalculation();
if(!result) {
wxMessageDialog msgDialog(this, stability.GetErrorMessage(), _("Error"), wxOK | wxCENTRE | wxICON_ERROR);