Skip to content

Fix lotsizing_lazy example: lock variables in conslock - #1252

Merged
Joao-Dionisio merged 4 commits into
masterfrom
fix-lotsizing-lazy-conslock
Nov 5, 2026
Merged

Joao-Dionisio merged 4 commits into
masterfrom
fix-lotsizing-lazy-conslock

Conversation

@Joao-Dionisio

@Joao-Dionisio Joao-Dionisio commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Supersedes #1228. @abb-omidi , do you mind taking a look?

The example's conslock was empty. The handler is included with needscons=False, so SCIP relies on it to lock the variables it enforces. Without the locks, presolve aggregated the relaxed y variables away (a weak dual reduction, so allowstrongdualreds=0 didn't help), and the cuts added later cut off the optimum (75 instead of 57).

Now conslock locks x and y, the allowstrongdualreds workaround is gone, and a test runs the example and checks that both objectives are 57.

@abb-omidi

Copy link
Copy Markdown

@Joao-Dionisio, do I have to check something?

@Joao-Dionisio

Copy link
Copy Markdown
Member Author

@abb-omidi you don't have to, of course, just if you have the time :)

You can see here the changes I made, essentially adding variable locks.

@Joao-Dionisio

Copy link
Copy Markdown
Member Author

Later on we might want to run the examples before releases as well, this is something we've been neglecting.

@Joao-Dionisio
Joao-Dionisio merged commit 9b8a20f into master Nov 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants