tests.cpp 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /**
  2. * @file tests/boost_graph/tests.cpp
  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 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. #include <common/RootCoordinator.hpp>
  26. #include <tests/boost_graph/models.hpp>
  27. #include <tests/boost_graph/graph_builder.hpp>
  28. #include <tests/boost_graph/graph_manager.hpp>
  29. #include <tests/boost_graph/graph_partitioning.hpp>
  30. using namespace paradevs::common;
  31. using namespace paradevs::common::scheduler;
  32. using namespace paradevs::pdevs;
  33. using namespace paradevs::tests::boost_graph;
  34. void flat_test()
  35. {
  36. RootCoordinator <
  37. DoubleTime,
  38. paradevs::pdevs::Coordinator <
  39. DoubleTime,
  40. SchedulerType,
  41. SchedulerHandle,
  42. InBuildFlatGraphManager <
  43. SchedulerHandle,
  44. FlatGraphBuilder >,
  45. paradevs::common::NoParameters,
  46. paradevs::common::NoParameters >
  47. > rc(0, 100, "root", NoParameters(), NoParameters());
  48. rc.run();
  49. }
  50. void hierarchical_test()
  51. {
  52. RootCoordinator <
  53. DoubleTime,
  54. paradevs::pdevs::Coordinator <
  55. DoubleTime,
  56. SchedulerType,
  57. SchedulerHandle,
  58. HierarchicalGraphManager <
  59. SchedulerHandle,
  60. HierarchicalGraphBuilder >,
  61. paradevs::common::NoParameters,
  62. paradevs::common::NoParameters >
  63. > rc(0, 100, "root", NoParameters(), NoParameters());
  64. rc.run();
  65. }
  66. void partitionning_test()
  67. {
  68. RootCoordinator <
  69. DoubleTime,
  70. paradevs::pdevs::Coordinator <
  71. DoubleTime,
  72. SchedulerType,
  73. SchedulerHandle,
  74. HierarchicalGraphManager <
  75. SchedulerHandle,
  76. PartitioningGraphBuilder >,
  77. paradevs::common::NoParameters,
  78. paradevs::common::NoParameters >
  79. > rc(0, 100, "root", NoParameters(), NoParameters());
  80. // rc.run();
  81. }
  82. int main()
  83. {
  84. // flat_test();
  85. // hierarchical_test();
  86. partitionning_test();
  87. return 0;
  88. }