diff --git a/src/Algorithm/benders.jl b/src/Algorithm/benders.jl index f591d55b5..ff88a2f0d 100644 --- a/src/Algorithm/benders.jl +++ b/src/Algorithm/benders.jl @@ -464,7 +464,6 @@ end function bend_cutting_plane_main_loop!( algo::BendersCutGeneration, env::Env, algdata::BendersCutGenRuntimeData, reform::Reformulation ) - nb_bc_iterations = 0 masterform = getmaster(reform) one_spsol_is_a_relaxed_sol = false diff --git a/src/Algorithm/colgen.jl b/src/Algorithm/colgen.jl index 406eb27a7..ad1d045b0 100644 --- a/src/Algorithm/colgen.jl +++ b/src/Algorithm/colgen.jl @@ -141,6 +141,11 @@ function run!(algo::ColumnGeneration, env::Env, reform::Reformulation, input::Op if !isnothing(result.master_ip_primal_sol) update_ip_primal_sol!(optstate, result.master_ip_primal_sol) end + + if !isnothing(result.db) + set_lp_dual_bound!(optstate, DualBound(master, result.db)) + set_ip_dual_bound!(optstate, DualBound(master, result.db)) + end return optstate end diff --git a/src/Algorithm/colgen/default.jl b/src/Algorithm/colgen/default.jl index 5cd213eb8..cabb22ea0 100644 --- a/src/Algorithm/colgen/default.jl +++ b/src/Algorithm/colgen/default.jl @@ -264,8 +264,8 @@ function ColGen.check_primal_ip_feasibility!(master_lp_primal_sol, ctx::ColGenCo end # Check if violated essential cuts new_cut_in_master = _violates_essential_cuts!(ColGen.get_master(ctx), master_lp_primal_sol, env) - # Returns projection on original variables if feasible and integral. - return MathProg.proj_cols_on_rep(master_lp_primal_sol), new_cut_in_master + # Returns disaggregated solution if feasible and integral. + return master_lp_primal_sol, new_cut_in_master end ColGen.isbetter(new_ip_primal_sol::PrimalSolution, ip_primal_sol::Nothing) = true diff --git a/src/optimize.jl b/src/optimize.jl index fa44b0a45..76aa07fc4 100644 --- a/src/optimize.jl +++ b/src/optimize.jl @@ -102,7 +102,7 @@ function optimize!( ip_primal_sols = get_ip_primal_sols(algstate) if !isnothing(ip_primal_sols) for sol in ip_primal_sols - add_ip_primal_sol!(outstate, sol) + add_ip_primal_sol!(outstate, proj_cols_on_rep(sol)) end end diff --git a/test/e2e_extra/advanced_colgen/pricing_callback.jl b/test/e2e_extra/advanced_colgen/pricing_callback.jl index cd4893ab1..be2b905c2 100644 --- a/test/e2e_extra/advanced_colgen/pricing_callback.jl +++ b/test/e2e_extra/advanced_colgen/pricing_callback.jl @@ -93,6 +93,6 @@ function gap_with_pricing_callback_and_stages() # a little bit with versions due to numerical errors. @test JuMP.objective_value(model) ≈ 75.0 @test JuMP.termination_status(model) == MOI.OPTIMAL - @test_broken ClD.GeneralizedAssignment.print_and_check_sol(data, model, x) + @test ClD.GeneralizedAssignment.print_and_check_sol(data, model, x) end register!(e2e_extra_tests, "pricing_callback", gap_with_pricing_callback_and_stages) \ No newline at end of file diff --git a/test/e2e_extra/gap/gap.jl b/test/e2e_extra/gap/gap.jl index 3205993f0..c64323371 100644 --- a/test/e2e_extra/gap/gap.jl +++ b/test/e2e_extra/gap/gap.jl @@ -16,7 +16,7 @@ function gap_small_instance() @test JuMP.termination_status(model) == MOI.OPTIMAL @test ClD.GeneralizedAssignment.print_and_check_sol(data, model, x) end -register!(e2e_extra_tests, "gap", gap_small_instance; x = true) +register!(e2e_extra_tests, "gap", gap_small_instance) function gap_node_limit() data = ClD.GeneralizedAssignment.data("mediumgapcuts3.txt")