Skip to content

Conversation

@akifcorduk
Copy link
Contributor

@akifcorduk akifcorduk commented May 19, 2025

There was a bug in pre_process_assignment function. During initial solve() we are doing preprocess and then trivial_presolve. That means, the free var replacements are added first then the variable eliminations are done. For that reason the user solution preprocessing should follow the same order.

The bug of set_solution is called multiple times in the tests if fixed: we should to pop the back solution after solution is being set, otherwise it will always be set.

The bug of he assignment resize is fixed: it should be called before the gather, if not the resize will enlarge it and it will have junk values, causing mismatch in objective costs and sometimes infeasible solutions.

This also changes a slight issue where we assign 2x for y and x for z when x is positive, for large initial values this might cause numerical issues, that's why we now assign x for y and 0 for z.

This PR also fixes the bug of empty solutions not being handled correctly after a presolve (previously we handled it only for trivial presolve).

@akifcorduk akifcorduk requested a review from a team as a code owner May 19, 2025 20:24
@akifcorduk akifcorduk requested review from chris-maes and kaatish May 19, 2025 20:24
@akifcorduk akifcorduk added bug Something isn't working improvement Improves an existing functionality non-breaking Introduces a non-breaking change and removed improvement Improves an existing functionality labels May 19, 2025
@rgsl888prabhu
Copy link
Collaborator

@akifcorduk Does this also cover @hlinsen bug fix?

@akifcorduk
Copy link
Contributor Author

Yes, it should cover that. But i think @hlinsen should also review. Maybe there is some conflicts.

@chris-maes chris-maes added this to the 25.05 milestone May 19, 2025
Copy link
Contributor

@hlinsen hlinsen left a comment

Choose a reason for hiding this comment

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

lgtm. One small coding style comment.

@akifcorduk
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 036dde8 into NVIDIA:branch-25.05 May 20, 2025
82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants