LazyConstraint based MIP yields incorrect optimum
- Vorherrschende Sprache
- Linear Programming
- Sterne
- 600
- Forks
- 108
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
**Describe the bug**
Solving a MIP with lazy constraints yields a sub optimal solution. Yet, the solver reports the solution to be optimal.
My assumption is that adding all constraints (a) up-front, (b) as lazy constraints, or (c) using a lazy constraint generator should not affect the optimal of the solution. Is this assumption incorrect?
**To Reproduce**
A minimal example with 1 continuous variable (the objective), 4 integer variables, and 2 constraint is provided.
The problem is solved three times: (a) complete model, (b) lazy constraints, (c) using lazy constraint generator.
Solving the complete model yields the true optimal solution. Both lazy variants provide a sub-optimal solution.
Variant (c) shows that both constraints are generated and added to the model in the first call to the lazy constraint generator.
**Expected behavior**
Using (generated) lazy constraints should yield the same optimum as solving the complete model with all constraint provided up front.
**Desktop (please complete the following information):**
- Operating System, version: macOS Monterey 12.4 (M1)
- Python version: 3.9.6
- Python-MIP version (we recommend you to test with the latest version): 1.14.2
- CBC built from coin-or/cbc/0713c30b8e5e2b2a8e1b804ee9d98087fc524530 (23.Nov 2022)
Example Program and Execution Log:
[lazy-minimal-example.py.txt](https://github.com/coin-or/python-mip/files/10377597/lazy-minimal-example.py.txt)
[lazy-minimal-example.log](https://github.com/coin-or/python-mip/files/10377600/lazy-minimal-example.log)
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit der angehängten Datei lazy-minimal-example.py.txt und vergleiche deren complete-model-, lazy-constraint- und lazy-constraint-generator-Läufe mit dem Ausführungsprotokoll. Verfolge die Behandlung von lazy constraints durch Python-MIP mit CBC; abgeschlossen ist die Aufgabe, wenn beide lazy-Varianten dasselbe Optimum wie das complete model erzeugen und es korrekt melden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 30/100