==============================================================================
| 102 | |
| 103 | //============================================================================== |
| 104 | void testZDT1(MultiObjectiveSolver& solver) |
| 105 | { |
| 106 | #if DART_BUILD_MODE_RELEASE |
| 107 | std::size_t numSolutions = 50; |
| 108 | #else |
| 109 | std::size_t numSolutions = 10; |
| 110 | #endif |
| 111 | #if DART_BUILD_MODE_RELEASE |
| 112 | std::size_t iterationNum = 1000; |
| 113 | #else |
| 114 | std::size_t iterationNum = 200; |
| 115 | #endif |
| 116 | |
| 117 | auto problem = std::make_shared<ZDT1>(); |
| 118 | problem->setLowerBounds(lowerLimits); |
| 119 | problem->setUpperBounds(upperLimits); |
| 120 | |
| 121 | solver.setProblem(problem); |
| 122 | solver.setPopulationSize(numSolutions); |
| 123 | solver.setNumPopulations(100); |
| 124 | solver.setNumIterationsPerEvolution(iterationNum); |
| 125 | solver.solve(100); |
| 126 | |
| 127 | EXPECT_TRUE(solver.getPopulation(0).getSize() == numSolutions); |
| 128 | EXPECT_TRUE(solver.getPopulation(1).getSize() == numSolutions); |
| 129 | EXPECT_TRUE(solver.getNumPopulations() == 100); |
| 130 | } |
| 131 | |
| 132 | //============================================================================== |
| 133 | void testZDT1Generic(MultiObjectiveSolver& solver) |
no test coverage detected