Skip to content

Commit

Permalink
[presolve] fix local/global bounds computation (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
guimarqu authored Oct 16, 2023
1 parent b86bc22 commit 064794f
Show file tree
Hide file tree
Showing 9 changed files with 689 additions and 439 deletions.
7 changes: 4 additions & 3 deletions src/Algorithm/presolve/helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function tighten_bounds_presolve_form_repr(form::PresolveFormRepr, tightened_bou
col_mask
end

function partial_sol_update(form::PresolveFormRepr, lm, um)
function partial_sol_update(form::PresolveFormRepr, lm, um, store_unpropagated_partial_sol)
coef_matrix = form.col_major_coef_matrix
rhs = form.rhs
sense = form.sense
Expand Down Expand Up @@ -286,7 +286,7 @@ function partial_sol_update(form::PresolveFormRepr, lm, um)

return PresolveFormRepr(
coef_matrix, new_rhs, sense, new_lbs, new_ubs, partial_sol, lm, um;
unpropagated_partial_solution = new_partial_sol
unpropagated_partial_solution = store_unpropagated_partial_sol ? new_partial_sol : nothing
),
row_mask,
col_mask
Expand Down Expand Up @@ -343,6 +343,7 @@ function PresolveFormRepr(
tighten_bounds = true,
partial_sol = true,
shrink = true,
store_unpropagated_partial_sol = true
)
row_mask = ones(Bool, presolve_form_repr.nb_constrs)
col_mask = ones(Bool, presolve_form_repr.nb_vars)
Expand All @@ -353,7 +354,7 @@ function PresolveFormRepr(
)
end
if partial_sol
presolve_form_repr, row_mask, col_mask = partial_sol_update(presolve_form_repr, lm, um)
presolve_form_repr, row_mask, col_mask = partial_sol_update(presolve_form_repr, lm, um, store_unpropagated_partial_sol)
end
if shrink
presolve_form_repr, row_mask, col_mask, fixed_vars = shrink_presolve_form_repr(
Expand Down
Loading

0 comments on commit 064794f

Please sign in to comment.