From c36b1354b05982972a3220c009c739cc7b91d880 Mon Sep 17 00:00:00 2001 From: Thomas Bittar Date: Tue, 10 Dec 2024 18:27:31 +0100 Subject: [PATCH 1/3] Not erasing sub pb mps file in merge --- src/cpp/benders/merge_mps/MergeMPS.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cpp/benders/merge_mps/MergeMPS.cpp b/src/cpp/benders/merge_mps/MergeMPS.cpp index d1679e32b..066c87ae3 100644 --- a/src/cpp/benders/merge_mps/MergeMPS.cpp +++ b/src/cpp/benders/merge_mps/MergeMPS.cpp @@ -33,9 +33,10 @@ void MergeMPS::launch() { if (kvp.first != _options.MASTER_NAME) { solver_l->read_prob_mps(problem_name); - std::filesystem::remove(problem_name); + // std::filesystem::remove(problem_name); int mps_ncols(solver_l->get_ncols()); + // -------- Change sub pb objective to take weights into account ------- DblVector o(mps_ncols); IntVector sequence(mps_ncols); for (int i(0); i < mps_ncols; ++i) { @@ -47,6 +48,9 @@ void MergeMPS::launch() { c *= weigth; } solver_l->chg_obj(sequence, o); + // -------- End change sub pb objective to take weights into account ----- + + } else { solver_l->read_prob_mps(problem_name); } From c6a495ab9f34478d52402000eadf762f3822ca36 Mon Sep 17 00:00:00 2001 From: Thomas Bittar Date: Wed, 11 Dec 2024 09:54:31 +0100 Subject: [PATCH 2/3] Remove comments --- src/cpp/benders/merge_mps/MergeMPS.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cpp/benders/merge_mps/MergeMPS.cpp b/src/cpp/benders/merge_mps/MergeMPS.cpp index 066c87ae3..291400405 100644 --- a/src/cpp/benders/merge_mps/MergeMPS.cpp +++ b/src/cpp/benders/merge_mps/MergeMPS.cpp @@ -33,10 +33,8 @@ void MergeMPS::launch() { if (kvp.first != _options.MASTER_NAME) { solver_l->read_prob_mps(problem_name); - // std::filesystem::remove(problem_name); int mps_ncols(solver_l->get_ncols()); - // -------- Change sub pb objective to take weights into account ------- DblVector o(mps_ncols); IntVector sequence(mps_ncols); for (int i(0); i < mps_ncols; ++i) { @@ -48,10 +46,8 @@ void MergeMPS::launch() { c *= weigth; } solver_l->chg_obj(sequence, o); - // -------- End change sub pb objective to take weights into account ----- - - } else { + } else { solver_l->read_prob_mps(problem_name); } StandardLp lpData(*solver_l); From 0de070298978e89a261e903f0bf73f2532215ad9 Mon Sep 17 00:00:00 2001 From: Thomas Bittar Date: Wed, 8 Jan 2025 16:16:08 +0100 Subject: [PATCH 3/3] Fix indentation in MergeMPS.cpp for better readability --- src/cpp/benders/merge_mps/MergeMPS.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cpp/benders/merge_mps/MergeMPS.cpp b/src/cpp/benders/merge_mps/MergeMPS.cpp index 291400405..113d17f81 100644 --- a/src/cpp/benders/merge_mps/MergeMPS.cpp +++ b/src/cpp/benders/merge_mps/MergeMPS.cpp @@ -46,8 +46,7 @@ void MergeMPS::launch() { c *= weigth; } solver_l->chg_obj(sequence, o); - - } else { + } else { solver_l->read_prob_mps(problem_name); } StandardLp lpData(*solver_l);