From c1a07f4c0aab810da64fd823f5aeee5480275dfc Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sat, 4 Oct 2025 12:44:02 +0000 Subject: [PATCH 01/18] bump --- benchmarks/linear_programming/cuopt/run_mip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/linear_programming/cuopt/run_mip.cpp b/benchmarks/linear_programming/cuopt/run_mip.cpp index a4f52cb4ed..9ea0d6e78c 100644 --- a/benchmarks/linear_programming/cuopt/run_mip.cpp +++ b/benchmarks/linear_programming/cuopt/run_mip.cpp @@ -221,7 +221,7 @@ int run_single_file(std::string file_path, benchmark_info.objective_of_initial_population, benchmark_info.last_improvement_of_best_feasible, benchmark_info.last_improvement_after_recombination); - // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); + // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 1 std::chrono::milliseconds duration; auto end = std::chrono::high_resolution_clock::now(); duration = std::chrono::duration_cast(end - start_run_solver); From 1ae7d8d677de8ababec774b1efe460faee7ccbdb Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Fri, 3 Oct 2025 09:12:02 +0000 Subject: [PATCH 02/18] early improvement log --- cpp/src/mip/diversity/population.cu | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/src/mip/diversity/population.cu b/cpp/src/mip/diversity/population.cu index 0b506cbcb4..94e8215ef9 100644 --- a/cpp/src/mip/diversity/population.cu +++ b/cpp/src/mip/diversity/population.cu @@ -172,6 +172,10 @@ void population_t::add_external_solution(const std::vector& solut solution_origin_to_string(origin), external_solution_queue.size(), problem_ptr->get_user_obj_from_solver_obj(objective)); + if (objective < best_feasible_objective) { + CUOPT_LOG_DEBUG("Found new best solution %g in external queue", + problem_ptr->get_user_obj_from_solver_obj(objective)); + } if (external_solution_queue.size() >= 5) { early_exit_primal_generation = true; } } From ea7a1d0b66ac3fdd030ef989651f1b190e6329b7 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Fri, 3 Oct 2025 09:09:54 +0000 Subject: [PATCH 03/18] shorter lp and probing --- cpp/src/mip/diversity/diversity_config.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/mip/diversity/diversity_config.hpp b/cpp/src/mip/diversity/diversity_config.hpp index 6acac8fbb5..b046814e6d 100644 --- a/cpp/src/mip/diversity/diversity_config.hpp +++ b/cpp/src/mip/diversity/diversity_config.hpp @@ -21,9 +21,9 @@ namespace cuopt::linear_programming::detail { struct diversity_config_t { double time_ratio_on_init_lp = 0.1; - double max_time_on_lp = 30; + double max_time_on_lp = 7.5; double time_ratio_of_probing_cache = 0.04; - double max_time_on_probing = 60; + double max_time_on_probing = 5.0; size_t max_iterations_without_improvement = 15; int max_var_diff = 256; size_t max_solutions = 32; From 5c0fa70cc6f378209ba4708dcb1947b81be0fe39 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Mon, 29 Sep 2025 14:58:46 +0000 Subject: [PATCH 04/18] new primal weight computation --- cpp/src/linear_programming/pdlp.cu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/src/linear_programming/pdlp.cu b/cpp/src/linear_programming/pdlp.cu index 87d9f58563..d1676439e8 100644 --- a/cpp/src/linear_programming/pdlp.cu +++ b/cpp/src/linear_programming/pdlp.cu @@ -1620,7 +1620,8 @@ __global__ void compute_weights_initial_primal_weight_from_squared_norms(const f c_vec_norm_, pdlp_hyper_params::primal_importance); #endif - *primal_weight = pdlp_hyper_params::primal_importance * (c_vec_norm_ / b_vec_norm_); + *primal_weight = + pdlp_hyper_params::primal_importance * ((c_vec_norm_ + 1.0) / (b_vec_norm_ + 1.0)); *best_primal_weight = *primal_weight; } else { *primal_weight = pdlp_hyper_params::primal_importance; From 4f18835a9f55101c4719d403972a0617913e70ba Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Fri, 3 Oct 2025 13:22:49 +0000 Subject: [PATCH 05/18] LS restart --- cpp/src/mip/local_search/local_search.cu | 39 +++++++++++++++++++++++ cpp/src/mip/local_search/local_search.cuh | 4 +-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/cpp/src/mip/local_search/local_search.cu b/cpp/src/mip/local_search/local_search.cu index fd4ff9c9d4..593992b96e 100644 --- a/cpp/src/mip/local_search/local_search.cu +++ b/cpp/src/mip/local_search/local_search.cu @@ -230,6 +230,45 @@ bool local_search_t::do_fj_solve(solution_t& solution, fj_t& in_fj, const std::string& source) { + CUOPT_LOG_DEBUG( + "best overall: %g/%g", pop_ptr->best_feasible().get_objective(), local_search_best_obj); + if (pop_ptr && pop_ptr->is_feasible() && + pop_ptr->best_feasible().get_objective() < local_search_best_obj) { + std::vector default_weights(context.problem_ptr->n_constraints, 1.); + + CUOPT_LOG_DEBUG( + "******* Local search obj %g vs best overall %g, should perform a restart (new best)", + context.problem_ptr->get_user_obj_from_solver_obj(local_search_best_obj), + context.problem_ptr->get_user_obj_from_solver_obj(pop_ptr->best_feasible().get_objective())); + local_search_best_obj = pop_ptr->best_feasible().get_objective(); + + scratch_cpu_fj[1].stop_cpu_solver(); + scratch_cpu_fj[1].wait_for_cpu_solver(); + + scratch_cpu_fj[1].fj_cpu = + scratch_cpu_fj[1].fj_ptr->create_cpu_climber(pop_ptr->best_feasible(), + default_weights, + default_weights, + 0., + fj_settings_t{}, + /*randomize=*/true); + + scratch_cpu_fj[1].fj_cpu->log_prefix = "******* scratch restard: "; + scratch_cpu_fj[1].fj_cpu->improvement_callback = [this](f_t obj, + const std::vector& h_vec) { + pop_ptr->add_external_solution(h_vec, obj, solution_origin_t::CPUFJ); + if (obj < local_search_best_obj) { + CUOPT_LOG_DEBUG("******* New local search best obj %g, best overall %g", + context.problem_ptr->get_user_obj_from_solver_obj(obj), + context.problem_ptr->get_user_obj_from_solver_obj( + pop_ptr->is_feasible() ? pop_ptr->best_feasible().get_objective() + : std::numeric_limits::max())); + local_search_best_obj = obj; + } + }; + scratch_cpu_fj[1].start_cpu_solver(); + } + auto h_weights = cuopt::host_copy(in_fj.cstr_weights, solution.handle_ptr->get_stream()); auto h_objective_weight = in_fj.objective_weight.value(solution.handle_ptr->get_stream()); for (auto& cpu_fj : ls_cpu_fj) { diff --git a/cpp/src/mip/local_search/local_search.cuh b/cpp/src/mip/local_search/local_search.cuh index e8dc016e2d..22fd767b56 100644 --- a/cpp/src/mip/local_search/local_search.cuh +++ b/cpp/src/mip/local_search/local_search.cuh @@ -139,8 +139,8 @@ class local_search_t { feasibility_pump_t fp; std::mt19937 rng; - std::array, 8> ls_cpu_fj; - std::array, 1> scratch_cpu_fj; + std::array, 4> ls_cpu_fj; + std::array, 2> scratch_cpu_fj; cpu_fj_thread_t scratch_cpu_fj_on_lp_opt; problem_t problem_with_objective_cut; bool cutting_plane_added_for_active_run{false}; From e888c952a04ceff1920282dfa7831ee634d302fd Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sat, 4 Oct 2025 14:41:56 +0000 Subject: [PATCH 06/18] timing tweaks --- cpp/src/mip/diversity/diversity_config.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/mip/diversity/diversity_config.hpp b/cpp/src/mip/diversity/diversity_config.hpp index b046814e6d..44d095f013 100644 --- a/cpp/src/mip/diversity/diversity_config.hpp +++ b/cpp/src/mip/diversity/diversity_config.hpp @@ -21,7 +21,7 @@ namespace cuopt::linear_programming::detail { struct diversity_config_t { double time_ratio_on_init_lp = 0.1; - double max_time_on_lp = 7.5; + double max_time_on_lp = 15.0; double time_ratio_of_probing_cache = 0.04; double max_time_on_probing = 5.0; size_t max_iterations_without_improvement = 15; From b1c49b9efc25bf179115c08a6877427642b5cd61 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sat, 4 Oct 2025 14:42:16 +0000 Subject: [PATCH 07/18] bump --- benchmarks/linear_programming/cuopt/run_mip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/linear_programming/cuopt/run_mip.cpp b/benchmarks/linear_programming/cuopt/run_mip.cpp index 9ea0d6e78c..41a35cc267 100644 --- a/benchmarks/linear_programming/cuopt/run_mip.cpp +++ b/benchmarks/linear_programming/cuopt/run_mip.cpp @@ -221,7 +221,7 @@ int run_single_file(std::string file_path, benchmark_info.objective_of_initial_population, benchmark_info.last_improvement_of_best_feasible, benchmark_info.last_improvement_after_recombination); - // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 1 + // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 2 std::chrono::milliseconds duration; auto end = std::chrono::high_resolution_clock::now(); duration = std::chrono::duration_cast(end - start_run_solver); From 24ca057f25c38e4abe6d4e4b28c46db627dbe6b5 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sat, 4 Oct 2025 14:44:24 +0000 Subject: [PATCH 08/18] no restart --- cpp/src/mip/local_search/local_search.cu | 76 ++++++++++++------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/cpp/src/mip/local_search/local_search.cu b/cpp/src/mip/local_search/local_search.cu index 593992b96e..d06fc3a0d4 100644 --- a/cpp/src/mip/local_search/local_search.cu +++ b/cpp/src/mip/local_search/local_search.cu @@ -230,44 +230,44 @@ bool local_search_t::do_fj_solve(solution_t& solution, fj_t& in_fj, const std::string& source) { - CUOPT_LOG_DEBUG( - "best overall: %g/%g", pop_ptr->best_feasible().get_objective(), local_search_best_obj); - if (pop_ptr && pop_ptr->is_feasible() && - pop_ptr->best_feasible().get_objective() < local_search_best_obj) { - std::vector default_weights(context.problem_ptr->n_constraints, 1.); - - CUOPT_LOG_DEBUG( - "******* Local search obj %g vs best overall %g, should perform a restart (new best)", - context.problem_ptr->get_user_obj_from_solver_obj(local_search_best_obj), - context.problem_ptr->get_user_obj_from_solver_obj(pop_ptr->best_feasible().get_objective())); - local_search_best_obj = pop_ptr->best_feasible().get_objective(); - - scratch_cpu_fj[1].stop_cpu_solver(); - scratch_cpu_fj[1].wait_for_cpu_solver(); - - scratch_cpu_fj[1].fj_cpu = - scratch_cpu_fj[1].fj_ptr->create_cpu_climber(pop_ptr->best_feasible(), - default_weights, - default_weights, - 0., - fj_settings_t{}, - /*randomize=*/true); - - scratch_cpu_fj[1].fj_cpu->log_prefix = "******* scratch restard: "; - scratch_cpu_fj[1].fj_cpu->improvement_callback = [this](f_t obj, - const std::vector& h_vec) { - pop_ptr->add_external_solution(h_vec, obj, solution_origin_t::CPUFJ); - if (obj < local_search_best_obj) { - CUOPT_LOG_DEBUG("******* New local search best obj %g, best overall %g", - context.problem_ptr->get_user_obj_from_solver_obj(obj), - context.problem_ptr->get_user_obj_from_solver_obj( - pop_ptr->is_feasible() ? pop_ptr->best_feasible().get_objective() - : std::numeric_limits::max())); - local_search_best_obj = obj; - } - }; - scratch_cpu_fj[1].start_cpu_solver(); - } + // CUOPT_LOG_DEBUG( + // "best overall: %g/%g", pop_ptr->best_feasible().get_objective(), local_search_best_obj); + // if (pop_ptr && pop_ptr->is_feasible() && + // pop_ptr->best_feasible().get_objective() < local_search_best_obj) { + // std::vector default_weights(context.problem_ptr->n_constraints, 1.); + + // CUOPT_LOG_DEBUG( + // "******* Local search obj %g vs best overall %g, should perform a restart (new best)", + // context.problem_ptr->get_user_obj_from_solver_obj(local_search_best_obj), + // context.problem_ptr->get_user_obj_from_solver_obj(pop_ptr->best_feasible().get_objective())); + // local_search_best_obj = pop_ptr->best_feasible().get_objective(); + + // scratch_cpu_fj[1].stop_cpu_solver(); + // scratch_cpu_fj[1].wait_for_cpu_solver(); + + // scratch_cpu_fj[1].fj_cpu = + // scratch_cpu_fj[1].fj_ptr->create_cpu_climber(pop_ptr->best_feasible(), + // default_weights, + // default_weights, + // 0., + // fj_settings_t{}, + // /*randomize=*/true); + + // scratch_cpu_fj[1].fj_cpu->log_prefix = "******* scratch restard: "; + // scratch_cpu_fj[1].fj_cpu->improvement_callback = [this](f_t obj, + // const std::vector& h_vec) { + // pop_ptr->add_external_solution(h_vec, obj, solution_origin_t::CPUFJ); + // if (obj < local_search_best_obj) { + // CUOPT_LOG_DEBUG("******* New local search best obj %g, best overall %g", + // context.problem_ptr->get_user_obj_from_solver_obj(obj), + // context.problem_ptr->get_user_obj_from_solver_obj( + // pop_ptr->is_feasible() ? pop_ptr->best_feasible().get_objective() + // : std::numeric_limits::max())); + // local_search_best_obj = obj; + // } + // }; + // scratch_cpu_fj[1].start_cpu_solver(); + // } auto h_weights = cuopt::host_copy(in_fj.cstr_weights, solution.handle_ptr->get_stream()); auto h_objective_weight = in_fj.objective_weight.value(solution.handle_ptr->get_stream()); From 73789417a4faa2ee47952875ccce27b2858df3e3 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sat, 4 Oct 2025 14:45:07 +0000 Subject: [PATCH 09/18] bump --- benchmarks/linear_programming/cuopt/run_mip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/linear_programming/cuopt/run_mip.cpp b/benchmarks/linear_programming/cuopt/run_mip.cpp index 41a35cc267..b2f3c77af9 100644 --- a/benchmarks/linear_programming/cuopt/run_mip.cpp +++ b/benchmarks/linear_programming/cuopt/run_mip.cpp @@ -221,7 +221,7 @@ int run_single_file(std::string file_path, benchmark_info.objective_of_initial_population, benchmark_info.last_improvement_of_best_feasible, benchmark_info.last_improvement_after_recombination); - // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 2 + // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 3 std::chrono::milliseconds duration; auto end = std::chrono::high_resolution_clock::now(); duration = std::chrono::duration_cast(end - start_run_solver); From fff76bb9500e963764eda518964792f05a83d0e9 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sat, 4 Oct 2025 15:00:13 +0000 Subject: [PATCH 10/18] ls thread tweak --- cpp/src/mip/local_search/local_search.cuh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/mip/local_search/local_search.cuh b/cpp/src/mip/local_search/local_search.cuh index 22fd767b56..e8dc016e2d 100644 --- a/cpp/src/mip/local_search/local_search.cuh +++ b/cpp/src/mip/local_search/local_search.cuh @@ -139,8 +139,8 @@ class local_search_t { feasibility_pump_t fp; std::mt19937 rng; - std::array, 4> ls_cpu_fj; - std::array, 2> scratch_cpu_fj; + std::array, 8> ls_cpu_fj; + std::array, 1> scratch_cpu_fj; cpu_fj_thread_t scratch_cpu_fj_on_lp_opt; problem_t problem_with_objective_cut; bool cutting_plane_added_for_active_run{false}; From 65b7571e3921f13025c2f14f86a76f3cf71ef6b9 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sat, 4 Oct 2025 15:01:20 +0000 Subject: [PATCH 11/18] bump --- benchmarks/linear_programming/cuopt/run_mip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/linear_programming/cuopt/run_mip.cpp b/benchmarks/linear_programming/cuopt/run_mip.cpp index b2f3c77af9..48cde6e92c 100644 --- a/benchmarks/linear_programming/cuopt/run_mip.cpp +++ b/benchmarks/linear_programming/cuopt/run_mip.cpp @@ -221,7 +221,7 @@ int run_single_file(std::string file_path, benchmark_info.objective_of_initial_population, benchmark_info.last_improvement_of_best_feasible, benchmark_info.last_improvement_after_recombination); - // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 3 + // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 4 std::chrono::milliseconds duration; auto end = std::chrono::high_resolution_clock::now(); duration = std::chrono::duration_cast(end - start_run_solver); From 3712cf51ae1fa88fcbde13e8ed0d4f1b8d645c99 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sat, 4 Oct 2025 17:05:49 +0000 Subject: [PATCH 12/18] relaxed lp stable3 --- cpp/src/mip/relaxed_lp/relaxed_lp.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/mip/relaxed_lp/relaxed_lp.cu b/cpp/src/mip/relaxed_lp/relaxed_lp.cu index a32b3cf82f..508470301f 100644 --- a/cpp/src/mip/relaxed_lp/relaxed_lp.cu +++ b/cpp/src/mip/relaxed_lp/relaxed_lp.cu @@ -59,7 +59,7 @@ optimization_problem_solution_t get_relaxed_lp_solution( pdlp_settings.concurrent_halt = settings.concurrent_halt; pdlp_settings.per_constraint_residual = settings.per_constraint_residual; pdlp_settings.first_primal_feasible = settings.return_first_feasible; - pdlp_settings.pdlp_solver_mode = pdlp_solver_mode_t::Stable2; + pdlp_settings.pdlp_solver_mode = pdlp_solver_mode_t::Stable3; set_pdlp_solver_mode(pdlp_settings); // TODO: set Stable3 here? pdlp_solver_t lp_solver(op_problem, pdlp_settings); From da39c844e16dfecbb04eaf9b04b7f06d4a896722 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sat, 4 Oct 2025 17:06:34 +0000 Subject: [PATCH 13/18] bump --- benchmarks/linear_programming/cuopt/run_mip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/linear_programming/cuopt/run_mip.cpp b/benchmarks/linear_programming/cuopt/run_mip.cpp index 48cde6e92c..5d46643588 100644 --- a/benchmarks/linear_programming/cuopt/run_mip.cpp +++ b/benchmarks/linear_programming/cuopt/run_mip.cpp @@ -221,7 +221,7 @@ int run_single_file(std::string file_path, benchmark_info.objective_of_initial_population, benchmark_info.last_improvement_of_best_feasible, benchmark_info.last_improvement_after_recombination); - // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 4 + // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 5 std::chrono::milliseconds duration; auto end = std::chrono::high_resolution_clock::now(); duration = std::chrono::duration_cast(end - start_run_solver); From c8af7456a35d4e98d7017470bf488767b9ef807c Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sun, 5 Oct 2025 11:35:22 +0000 Subject: [PATCH 14/18] Revert "relaxed lp stable3" This reverts commit 3712cf51ae1fa88fcbde13e8ed0d4f1b8d645c99. --- cpp/src/mip/relaxed_lp/relaxed_lp.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/mip/relaxed_lp/relaxed_lp.cu b/cpp/src/mip/relaxed_lp/relaxed_lp.cu index 508470301f..a32b3cf82f 100644 --- a/cpp/src/mip/relaxed_lp/relaxed_lp.cu +++ b/cpp/src/mip/relaxed_lp/relaxed_lp.cu @@ -59,7 +59,7 @@ optimization_problem_solution_t get_relaxed_lp_solution( pdlp_settings.concurrent_halt = settings.concurrent_halt; pdlp_settings.per_constraint_residual = settings.per_constraint_residual; pdlp_settings.first_primal_feasible = settings.return_first_feasible; - pdlp_settings.pdlp_solver_mode = pdlp_solver_mode_t::Stable3; + pdlp_settings.pdlp_solver_mode = pdlp_solver_mode_t::Stable2; set_pdlp_solver_mode(pdlp_settings); // TODO: set Stable3 here? pdlp_solver_t lp_solver(op_problem, pdlp_settings); From 886bdc4ec3fb9a90598613dde896d09707e1c16a Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sun, 5 Oct 2025 11:35:58 +0000 Subject: [PATCH 15/18] Revert "bump" This reverts commit da39c844e16dfecbb04eaf9b04b7f06d4a896722. --- benchmarks/linear_programming/cuopt/run_mip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/linear_programming/cuopt/run_mip.cpp b/benchmarks/linear_programming/cuopt/run_mip.cpp index 5d46643588..48cde6e92c 100644 --- a/benchmarks/linear_programming/cuopt/run_mip.cpp +++ b/benchmarks/linear_programming/cuopt/run_mip.cpp @@ -221,7 +221,7 @@ int run_single_file(std::string file_path, benchmark_info.objective_of_initial_population, benchmark_info.last_improvement_of_best_feasible, benchmark_info.last_improvement_after_recombination); - // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 5 + // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 4 std::chrono::milliseconds duration; auto end = std::chrono::high_resolution_clock::now(); duration = std::chrono::duration_cast(end - start_run_solver); From 0f1d5834cdaa0a20109e8428c878ba4216dddfb9 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Sun, 5 Oct 2025 11:37:12 +0000 Subject: [PATCH 16/18] cleanup --- .../linear_programming/cuopt/run_mip.cpp | 2 +- cpp/src/mip/local_search/local_search.cu | 39 ------------------- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/benchmarks/linear_programming/cuopt/run_mip.cpp b/benchmarks/linear_programming/cuopt/run_mip.cpp index 48cde6e92c..a4f52cb4ed 100644 --- a/benchmarks/linear_programming/cuopt/run_mip.cpp +++ b/benchmarks/linear_programming/cuopt/run_mip.cpp @@ -221,7 +221,7 @@ int run_single_file(std::string file_path, benchmark_info.objective_of_initial_population, benchmark_info.last_improvement_of_best_feasible, benchmark_info.last_improvement_after_recombination); - // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); 4 + // solution.write_to_sol_file(base_filename + ".sol", handle_.get_stream()); std::chrono::milliseconds duration; auto end = std::chrono::high_resolution_clock::now(); duration = std::chrono::duration_cast(end - start_run_solver); diff --git a/cpp/src/mip/local_search/local_search.cu b/cpp/src/mip/local_search/local_search.cu index d06fc3a0d4..fd4ff9c9d4 100644 --- a/cpp/src/mip/local_search/local_search.cu +++ b/cpp/src/mip/local_search/local_search.cu @@ -230,45 +230,6 @@ bool local_search_t::do_fj_solve(solution_t& solution, fj_t& in_fj, const std::string& source) { - // CUOPT_LOG_DEBUG( - // "best overall: %g/%g", pop_ptr->best_feasible().get_objective(), local_search_best_obj); - // if (pop_ptr && pop_ptr->is_feasible() && - // pop_ptr->best_feasible().get_objective() < local_search_best_obj) { - // std::vector default_weights(context.problem_ptr->n_constraints, 1.); - - // CUOPT_LOG_DEBUG( - // "******* Local search obj %g vs best overall %g, should perform a restart (new best)", - // context.problem_ptr->get_user_obj_from_solver_obj(local_search_best_obj), - // context.problem_ptr->get_user_obj_from_solver_obj(pop_ptr->best_feasible().get_objective())); - // local_search_best_obj = pop_ptr->best_feasible().get_objective(); - - // scratch_cpu_fj[1].stop_cpu_solver(); - // scratch_cpu_fj[1].wait_for_cpu_solver(); - - // scratch_cpu_fj[1].fj_cpu = - // scratch_cpu_fj[1].fj_ptr->create_cpu_climber(pop_ptr->best_feasible(), - // default_weights, - // default_weights, - // 0., - // fj_settings_t{}, - // /*randomize=*/true); - - // scratch_cpu_fj[1].fj_cpu->log_prefix = "******* scratch restard: "; - // scratch_cpu_fj[1].fj_cpu->improvement_callback = [this](f_t obj, - // const std::vector& h_vec) { - // pop_ptr->add_external_solution(h_vec, obj, solution_origin_t::CPUFJ); - // if (obj < local_search_best_obj) { - // CUOPT_LOG_DEBUG("******* New local search best obj %g, best overall %g", - // context.problem_ptr->get_user_obj_from_solver_obj(obj), - // context.problem_ptr->get_user_obj_from_solver_obj( - // pop_ptr->is_feasible() ? pop_ptr->best_feasible().get_objective() - // : std::numeric_limits::max())); - // local_search_best_obj = obj; - // } - // }; - // scratch_cpu_fj[1].start_cpu_solver(); - // } - auto h_weights = cuopt::host_copy(in_fj.cstr_weights, solution.handle_ptr->get_stream()); auto h_objective_weight = in_fj.objective_weight.value(solution.handle_ptr->get_stream()); for (auto& cpu_fj : ls_cpu_fj) { From 5f1e374bd46eaed810f82826a1440a550984d560 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Mon, 6 Oct 2025 08:45:06 +0000 Subject: [PATCH 17/18] longer probing --- cpp/src/mip/diversity/diversity_config.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/mip/diversity/diversity_config.hpp b/cpp/src/mip/diversity/diversity_config.hpp index 44d095f013..fd938f4957 100644 --- a/cpp/src/mip/diversity/diversity_config.hpp +++ b/cpp/src/mip/diversity/diversity_config.hpp @@ -23,7 +23,7 @@ struct diversity_config_t { double time_ratio_on_init_lp = 0.1; double max_time_on_lp = 15.0; double time_ratio_of_probing_cache = 0.04; - double max_time_on_probing = 5.0; + double max_time_on_probing = 15.0; size_t max_iterations_without_improvement = 15; int max_var_diff = 256; size_t max_solutions = 32; From 81eb0f451dbd58000503064279b54dbfef64c2c9 Mon Sep 17 00:00:00 2001 From: Alice Boucher Date: Mon, 6 Oct 2025 12:11:55 +0000 Subject: [PATCH 18/18] remove leftover, revert pdlp change --- cpp/src/linear_programming/pdlp.cu | 3 +-- cpp/src/mip/local_search/local_search.cu | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/cpp/src/linear_programming/pdlp.cu b/cpp/src/linear_programming/pdlp.cu index d1676439e8..87d9f58563 100644 --- a/cpp/src/linear_programming/pdlp.cu +++ b/cpp/src/linear_programming/pdlp.cu @@ -1620,8 +1620,7 @@ __global__ void compute_weights_initial_primal_weight_from_squared_norms(const f c_vec_norm_, pdlp_hyper_params::primal_importance); #endif - *primal_weight = - pdlp_hyper_params::primal_importance * ((c_vec_norm_ + 1.0) / (b_vec_norm_ + 1.0)); + *primal_weight = pdlp_hyper_params::primal_importance * (c_vec_norm_ / b_vec_norm_); *best_primal_weight = *primal_weight; } else { *primal_weight = pdlp_hyper_params::primal_importance; diff --git a/cpp/src/mip/local_search/local_search.cu b/cpp/src/mip/local_search/local_search.cu index fd4ff9c9d4..4b69330d8a 100644 --- a/cpp/src/mip/local_search/local_search.cu +++ b/cpp/src/mip/local_search/local_search.cu @@ -176,9 +176,6 @@ void local_search_t::start_cpufj_scratch_threads(population_t