From 3c03160a98c9275802004ef7372134c5e980e77d Mon Sep 17 00:00:00 2001 From: Jason N Date: Tue, 20 Jun 2023 11:57:13 +1000 Subject: [PATCH] Activate MIP domains verbose mode using verbose flag Fixes #705 --- changes.rst | 2 ++ lib/MIPdomains.cpp | 4 ++-- lib/passes/compile_pass.cpp | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/changes.rst b/changes.rst index bb688be93..e5200acd7 100644 --- a/changes.rst +++ b/changes.rst @@ -11,6 +11,8 @@ Changes: - Change the library and solver configuration path of builtin version of Chuffed to prevent file conflicts (:bugref:`708`). +- Use the verbose compilation flag to control the verbosity of the MIP domains + stage (:bugref:`705`). Bug fixes: ^^^^^^^^^^ diff --git a/lib/MIPdomains.cpp b/lib/MIPdomains.cpp index 31a6a222e..e1951c1cd 100644 --- a/lib/MIPdomains.cpp +++ b/lib/MIPdomains.cpp @@ -2077,7 +2077,7 @@ class MIPD { double nSubintvAve = MIPD_stats[N_POSTs_NSubintvSum] / nc; MZN_MIPD_assert_hard(MIPD_stats[N_POSTs_NSubintvSum]); double dSubSizeAve = MIPD_stats[N_POSTs_SubSizeSum] / MIPD_stats[N_POSTs_NSubintvSum]; - os << MIPD_stats[N_POSTs_all] + os << " " << MIPD_stats[N_POSTs_all] << " POSTs" #ifdef MZN_MIPDOMAINS_PRINTMORESTATS " [ "; @@ -2104,7 +2104,7 @@ class MIPD { os << TCliqueSorter::LinEqGraph::dCoefMin << "--" << TCliqueSorter::LinEqGraph::dCoefMax << " abs coefs"; } - os << " ... "; + os << std::endl; } }; // namespace MiniZinc diff --git a/lib/passes/compile_pass.cpp b/lib/passes/compile_pass.cpp index 5cff7fe08..a06ea5887 100644 --- a/lib/passes/compile_pass.cpp +++ b/lib/passes/compile_pass.cpp @@ -153,9 +153,9 @@ Env* CompilePass::run(Env* store, std::ostream& log) { if (!_compflags.noMIPdomains) { if (_compflags.verbose) { - log << "MIP domains ..."; + log << "MIP domains ..." << std::endl; } - mip_domains(*new_env, _compflags.statistics); + mip_domains(*new_env, _compflags.verbose); if (_compflags.verbose) { log << " done (" << lasttime.stoptime() << ")" << std::endl; }