Skip to content

Commit

Permalink
Fix the primal and dual bounds set by the node finalizer (#1021)
Browse files Browse the repository at this point in the history
  • Loading branch information
artalvpes authored Jul 27, 2023
1 parent 8fd92b8 commit 9139444
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/Algorithm/conquer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ function run_node_finalizer!(::ColCutGenContext, node_finalizer, env, reform, no

# make sure that the gap is closed for the current node
dual_bound = DualBound(reform, getvalue(get_ip_primal_bound(conquer_output)))
update_lp_dual_bound!(conquer_output, dual_bound)
update_ip_dual_bound!(conquer_output, dual_bound)
else
if !isnothing(ip_primal_sols) && length(ip_primal_sols) > 0
Expand Down
3 changes: 3 additions & 0 deletions src/Algorithm/treesearch/branch_and_bound.jl
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ end
function after_conquer!(space::BaBSearchSpace, current, conquer_output)
@assert !isnothing(conquer_output)
treestate = space.optstate
for sol in get_ip_primal_sols(conquer_output)
store_ip_primal_sol!(space.inc_primal_manager, sol)
end
current.records = create_records(space.reformulation)
current.conquerwasrun = true
space.nb_nodes_treated += 1
Expand Down
6 changes: 1 addition & 5 deletions test/e2e_extra/advanced_colgen/node_finalizer_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,7 @@ function test_node_finalizer(heuristic_finalizer)

JuMP.optimize!(model)
@show JuMP.objective_value(model)
if heuristic_finalizer
@test JuMP.termination_status(model) == MOI.OPTIMAL
else
@test JuMP.termination_status(model) == MOI.OTHER_LIMIT
end
@test JuMP.termination_status(model) == MOI.OPTIMAL
for b in B
sets = BD.getsolutions(model, b)
for s in sets
Expand Down

2 comments on commit 9139444

@guimarqu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: Error in (Julia)Project.toml: Package 'ColunaDemos' with UUID: a54e61d4-7723-11e9-2469-af255fcaa246 not found in registry or stdlib

Please sign in to comment.