diff --git a/src/apex/exhaustive.cpp b/src/apex/exhaustive.cpp index f99a5340..048cf36f 100644 --- a/src/apex/exhaustive.cpp +++ b/src/apex/exhaustive.cpp @@ -56,18 +56,20 @@ class log_wrapper { }; void Exhaustive::evaluate(double new_cost) { + /* static log_wrapper log(vars); static size_t count{0}; if (++count % 10000 == 0) { std::cout << count << std::endl; } log.getstream() << count << ","; for (auto& v : vars) { log.getstream() << v.second.toString() << ","; } log.getstream() << new_cost << std::endl; + */ if (new_cost < cost) { if (new_cost < best_cost) { best_cost = new_cost; std::cout << "New best! " << new_cost << " k: " << k; for (auto& v : vars) { v.second.save_best(); } - for (auto& v : vars) { std::cout << ", value: " << v.second.toString(); } + for (auto& v : vars) { std::cout << ", " << v.first << ": " << v.second.toString(); } std::cout << std::endl; } cost = new_cost; diff --git a/src/apex/genetic_search.cpp b/src/apex/genetic_search.cpp index 1c9e133c..04d312e8 100644 --- a/src/apex/genetic_search.cpp +++ b/src/apex/genetic_search.cpp @@ -158,16 +158,18 @@ void GeneticSearch::getNewSettings() { } void GeneticSearch::evaluate(double new_cost) { + /* static log_wrapper log(vars); log.getstream() << k << ","; for (auto& v : vars) { log.getstream() << v.second.toString() << ","; } log.getstream() << new_cost << std::endl; + */ if (new_cost < cost) { if (new_cost < best_cost) { best_cost = new_cost; std::cout << "New best! " << new_cost << " k: " << k; for (auto& v : vars) { v.second.save_best(); } - for (auto& v : vars) { std::cout << ", value: " << v.second.toString(); } + for (auto& v : vars) { std::cout << ", " << v.first << ": " << v.second.toString(); } std::cout << std::endl; } cost = new_cost; diff --git a/src/apex/random.cpp b/src/apex/random.cpp index dba2b6eb..7bd271db 100644 --- a/src/apex/random.cpp +++ b/src/apex/random.cpp @@ -57,18 +57,20 @@ class log_wrapper { }; void Random::evaluate(double new_cost) { + /* static log_wrapper log(vars); static size_t count{0}; if (++count % 10000 == 0) { std::cout << count << std::endl; } log.getstream() << count << ","; for (auto& v : vars) { log.getstream() << v.second.toString() << ","; } log.getstream() << new_cost << std::endl; + */ if (new_cost < cost) { if (new_cost < best_cost) { best_cost = new_cost; std::cout << "New best! " << new_cost << " k: " << k; for (auto& v : vars) { v.second.save_best(); } - for (auto& v : vars) { std::cout << ", value: " << v.second.toString(); } + for (auto& v : vars) { std::cout << ", " << v.first << ": " << v.second.toString(); } std::cout << std::endl; } cost = new_cost; diff --git a/src/apex/simulated_annealing.cpp b/src/apex/simulated_annealing.cpp index 6ed8a299..33f7f893 100644 --- a/src/apex/simulated_annealing.cpp +++ b/src/apex/simulated_annealing.cpp @@ -55,7 +55,7 @@ void SimulatedAnnealing::evaluate(double new_cost) { best_cost = new_cost; std::cout << "New best! " << new_cost << " k: " << k << " temp: " << temp; for (auto& v : vars) { v.second.save_best(); } - for (auto& v : vars) { std::cout << ", value: " << v.second.toString(); } + for (auto& v : vars) { std::cout << ", " << v.first << ": " << v.second.toString(); } std::cout << std::endl; since_restart = 1; }