| 29 | using namespace solidity::phaser; |
| 30 | |
| 31 | void AlgorithmRunner::run(GeneticAlgorithm& _algorithm) |
| 32 | { |
| 33 | populationAutosave(); |
| 34 | printInitialPopulation(); |
| 35 | cacheClear(); |
| 36 | |
| 37 | clock_t totalTimeStart = clock(); |
| 38 | for (size_t round = 0; !m_options.maxRounds.has_value() || round < m_options.maxRounds.value(); ++round) |
| 39 | { |
| 40 | clock_t roundTimeStart = clock(); |
| 41 | cacheStartRound(round + 1); |
| 42 | |
| 43 | m_population = _algorithm.runNextRound(m_population); |
| 44 | randomiseDuplicates(); |
| 45 | |
| 46 | printRoundSummary(round, roundTimeStart, totalTimeStart); |
| 47 | printCacheStats(); |
| 48 | populationAutosave(); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | void AlgorithmRunner::printRoundSummary( |
| 53 | size_t _round, |
no test coverage detected