diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-05-11 17:07:11 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-05-11 17:07:11 -0300 |
commit | 6cf253651521f0cdaf3a80f8ae58e9917fe2ec57 (patch) | |
tree | 2b5e7680483e44caa3bb96a5384ec2c7e4a920bb /Project/ControlElementSolver.h | |
parent | 4269e9370873ac31fe671c710536958ca4374aad (diff) | |
download | PSP.git-6cf253651521f0cdaf3a80f8ae58e9917fe2ec57.tar.gz PSP.git-6cf253651521f0cdaf3a80f8ae58e9917fe2ec57.tar.xz PSP.git-6cf253651521f0cdaf3a80f8ae58e9917fe2ec57.zip |
Initialization implemented
Diffstat (limited to 'Project/ControlElementSolver.h')
-rw-r--r-- | Project/ControlElementSolver.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Project/ControlElementSolver.h b/Project/ControlElementSolver.h index e51c40d..6d0ad3f 100644 --- a/Project/ControlElementSolver.h +++ b/Project/ControlElementSolver.h @@ -27,10 +27,11 @@ class ControlElementSolver bool startAllZero = false, double input = 0.0); ~ControlElementSolver() {} - virtual void InitializeValues(double input, bool startAllZero); + 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 FillAllConnectedChildren(ConnectionLine* parent); ConnectionLine* SolveNextElement(ConnectionLine* currentLine); @@ -39,6 +40,7 @@ class ControlElementSolver double m_timeStep; double m_integrationError; std::vector<double> m_solutions; + bool m_isOK = false; IOControl* m_inputControl = NULL; IOControl* m_outputControl = NULL; |