climate.hpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /**
  2. * @file tests/plot/climate.hpp
  3. * @author The PARADEVS Development Team
  4. * See the AUTHORS or Authors.txt file
  5. */
  6. /*
  7. * PARADEVS - the multimodeling and simulation environment
  8. * This file is a part of the PARADEVS environment
  9. *
  10. * Copyright (C) 2013-2015 ULCO http://www.univ-litoral.fr
  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. #ifndef TESTS_PLOT_CLIMATE_HPP
  26. #define TESTS_PLOT_CLIMATE_HPP 1
  27. namespace paradevs { namespace tests { namespace plot {
  28. class Climate
  29. {
  30. public:
  31. Climate()
  32. {
  33. }
  34. virtual void get_humidities(typename common::DoubleTime::type t,
  35. std::vector < double >& humidities) const
  36. {
  37. humidities.clear();
  38. for (unsigned int i = 0; i < 24; ++i) {
  39. humidities.push_back(95.);
  40. }
  41. }
  42. virtual void get_temperatures(typename common::DoubleTime::type t,
  43. std::vector < double >& temperatures) const
  44. {
  45. temperatures.clear();
  46. for (unsigned int i = 0; i < 9; ++i) {
  47. temperatures.push_back(10.);
  48. }
  49. for (unsigned int i = 9; i < 19; ++i) {
  50. temperatures.push_back(20.);
  51. }
  52. for (unsigned int i = 19; i < 24; ++i) {
  53. temperatures.push_back(10.);
  54. }
  55. }
  56. virtual void get_wind_direction(
  57. typename common::DoubleTime::type t,
  58. std::vector < double >& wind_direction) const
  59. {
  60. wind_direction.clear();
  61. for (unsigned int i = 0; i < 24; ++i) {
  62. wind_direction.push_back(0.);
  63. }
  64. }
  65. virtual void get_wind_speed(typename common::DoubleTime::type t,
  66. std::vector < double >& wind_speed) const
  67. {
  68. wind_speed.clear();
  69. for (unsigned int i = 0; i < 24; ++i) {
  70. wind_speed.push_back(20.);
  71. }
  72. }
  73. };
  74. } } } // namespace paradevs tests plot
  75. #endif