Skip to content

Commit

Permalink
call local global bounds propagation in presolve (#1091)
Browse files Browse the repository at this point in the history
* call local global bounds propagation in presolve

* propagation of local bounds in presolve
  • Loading branch information
guimarqu authored Oct 10, 2023
1 parent 2863910 commit 202149b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Algorithm/presolve/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,18 @@ end

function update_reform_from_presolve!(reform::Reformulation{DwMaster}, presolve_reform::DwPresolveReform)
master = getmaster(reform)

# Update master
presolve_restricted_master = presolve_reform.restricted_master
update_form_from_presolve!(master, presolve_restricted_master)

update_form_from_presolve!(master, presolve_reform.restricted_master)
# Update subproblems
presolve_repr_master = presolve_reform.restricted_master
for (spid, sp) in get_dw_pricing_sps(reform)
update_form_from_presolve!(sp, presolve_reform.dw_sps[spid])
sp_presolve_form = presolve_reform.dw_sps[spid]
Coluna.Algorithm.propagate_local_bounds!(sp_presolve_form, presolve_restricted_master, sp, master)
Coluna.Algorithm.propagate_global_bounds!(presolve_repr_master, presolve_restricted_master, master)
update_form_from_presolve!(sp, sp_presolve_form)
end
return
end
Expand Down Expand Up @@ -343,7 +349,7 @@ function run!(algo::PresolveAlgorithm, ::Env, reform::Reformulation, input::Pres
MathProg.setcubub!(getmaster(reform), varid, val)
end
end

presolve_reform = create_presolve_reform(reform)

tightened_bounds = bounds_tightening(presolve_reform.restricted_master.form)
Expand Down
1 change: 1 addition & 0 deletions src/Algorithm/presolve/propagation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function propagate_local_bounds!(presolve_sp::PresolveFormulation, presolve_mast
varid = getid(var)
column = @view pool.solutions[varid,:]
for (varid, val) in column
getduty(varid) <= DwSpPricingVar || continue
sp_var_col = presolve_sp.var_to_col[varid]
partial_solution[sp_var_col] += val * partial_sol_value
end
Expand Down

0 comments on commit 202149b

Please sign in to comment.