Segmentation fault when adding lazy constaints to CBC
- Lingua principale
- Linear Programming
- Stelle
- 600
- Fork
- 108
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**Describe the bug**
I create a small MIP model, using CBC. I also create a `ConstrsGenerator` and add it via `model.lazy_constrs_generator`.
When I call `model.optimize()`, Python crashes with a segmentation faul.
**To Reproduce**
See [script and output in gist](https://gist.github.com/rschwarz/7ed3135a19d7ecd24307d6f56e475732).
**Desktop (please complete the following information):**
- Operating System, version: Linux t440p 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux
- Python version: CPython 3.7.3
- Python-MIP version (we recommend you to test with the latest version): 1.13.0
**Additional context**
I believe that the `generate_constrs` method of the `ConstrsGenerator` is not even called. Also, when adding it via `model.cuts_generator`, there is no crash (but it's also never called?).
Maybe this has to do with the *limited preprocessing* in CBC that the documentation hints at?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start by running the script and output in the linked gist with Python-MIP 1.13.0 and CBC, then trace model.optimize() through the lazy_constrs_generator and cuts_generator paths. Check whether ConstrsGenerator.generate_constrs is reached; done means optimization no longer segfaults and the configured generator is invoked as expected.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100