diff options
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); |