T2.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * @file malaria/Si.cpp
  3. *
  4. * This file is part of VLE, a framework for multi-modeling, simulation
  5. * and analysis of complex dynamical systems
  6. * http://www.vle-project.org
  7. *
  8. * Copyright (c) 2011 INRA http://www.inra.fr
  9. *
  10. * See the AUTHORS or Authors.txt file for copyright owners and contributors
  11. *
  12. * This program is free software: you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation, either version 3 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  24. */
  25. /* @@tagdepends: vle.extension.differential-equation @@endtagdepends
  26. @@tagdynamic@@ */
  27. #include <vle/extension/DifferentialEquation.hpp>
  28. #include <iostream>
  29. #include <sstream>
  30. #include <math.h>
  31. namespace malariaspread {
  32. namespace ved = vle::extension::differential_equation;
  33. class T2 :
  34. public ved::DifferentialEquation
  35. {
  36. public:
  37. T2(const vle::devs::DynamicsInit& model,
  38. const vle::devs::InitEventList& events) :
  39. ved::DifferentialEquation(model,events)
  40. {
  41. _T2 = createVar("T2");
  42. }
  43. virtual ~T2()
  44. { }
  45. void compute(const vle::devs::Time& /* time */)
  46. {
  47. // grad(_T2)= _T2();
  48. }
  49. private:
  50. Var _T2;
  51. };
  52. } // namespace malariaspread
  53. DECLARE_DYNAMICS(malariaspread::T2)