diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-09-04 20:05:30 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-04 20:05:30 -0300 |
commit | 926af7f34aaf5aebdbac0cbc550ed75647874258 (patch) | |
tree | 4df26f8c631aeeeed6e5c9e8aab87c4c663bd30f /Project/ControlElementSolver.h | |
parent | 17d1dd82ec065eff08546ef1fd2a188ce77471b2 (diff) | |
parent | 6f3421c4150e49af026432a2a2be0171d741ad03 (diff) | |
download | PSP.git-926af7f34aaf5aebdbac0cbc550ed75647874258.tar.gz PSP.git-926af7f34aaf5aebdbac0cbc550ed75647874258.tar.xz PSP.git-926af7f34aaf5aebdbac0cbc550ed75647874258.zip |
Merge pull request #33 from Thales1330/wip/electromechanical-calc
Wip electromechanical calc
Diffstat (limited to 'Project/ControlElementSolver.h')
-rw-r--r-- | Project/ControlElementSolver.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Project/ControlElementSolver.h b/Project/ControlElementSolver.h index 6d0ad3f..26b8ec5 100644 --- a/Project/ControlElementSolver.h +++ b/Project/ControlElementSolver.h @@ -1,7 +1,7 @@ #ifndef CONTROLELEMENTSOLVER_H #define CONTROLELEMENTSOLVER_H -#include <stddef.h> // NULL definition +#include <wx/window.h> #include <vector> class ControlElementContainer; @@ -24,15 +24,22 @@ class ControlElementSolver ControlElementSolver(ControlEditor* controlEditor, double timeStep = 1e-3, double integrationError = 1e-3, - bool startAllZero = false, + bool startAllZero = true, double input = 0.0); - ~ControlElementSolver() {} + ControlElementSolver(ControlElementContainer* ctrlContainer, + double timeStep = 1e-3, + double integrationError = 1e-3, + bool startAllZero = true, + double input = 0.0, + wxWindow* parent = NULL); + virtual ~ControlElementSolver() {} virtual bool InitializeValues(double input, bool startAllZero); virtual void SolveNextStep(double input); virtual std::vector<double> GetSolutions() { return m_solutions; } virtual double GetLastSolution() { return m_solutions[m_solutions.size() - 1]; } virtual bool IsOK() const { return m_isOK; } protected: + void Initialize(wxWindow* parent, double timeStep, double integrationError, bool startAllZero, double input); void FillAllConnectedChildren(ConnectionLine* parent); ConnectionLine* SolveNextElement(ConnectionLine* currentLine); |