From 74d795cb074b6ae9aa93bcfacee8995d7e6d5945 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sat, 6 May 2017 18:28:23 -0300 Subject: Streight control solver implemented Buggy, running 2x... Why?? --- Project/ControlElementSolver.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Project/ControlElementSolver.h') diff --git a/Project/ControlElementSolver.h b/Project/ControlElementSolver.h index 47838d7..9ca6e02 100644 --- a/Project/ControlElementSolver.h +++ b/Project/ControlElementSolver.h @@ -1,7 +1,7 @@ #ifndef CONTROLELEMENTSOLVER_H #define CONTROLELEMENTSOLVER_H -#include // NULL definition +#include // NULL definition #include class ControlElementContainer; @@ -21,19 +21,23 @@ class ControlElementSolver { public: ControlElementSolver() {} - ControlElementSolver(ControlEditor* controlEditor, double timeStep = 1e-3, bool startAllZero = false, double input = 0.0); + ControlElementSolver(ControlEditor* controlEditor, + double timeStep = 1e-3, + bool startAllZero = false, + double input = 0.0); ~ControlElementSolver() {} - virtual void InitializeValues(double input); virtual void SolveNextStep(double input); virtual std::vector GetSolutions() { return m_solutions; } - virtual double GetLastSolution() {return m_solutions[m_solutions.size() - 1];} - + virtual double GetLastSolution() { return m_solutions[m_solutions.size() - 1]; } protected: + void FillAllConnectedChildren(ConnectionLine* parent); + ConnectionLine* SolveNextElement(ConnectionLine* currentLine); + ControlElementContainer* m_ctrlContainer = NULL; double m_timeStep; std::vector m_solutions; - + IOControl* m_inputControl = NULL; IOControl* m_outputControl = NULL; }; -- cgit