Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[presolve] fix local/global bounds computation #1101

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading