Segmentation fault when adding lazy constaints to CBC
- 主要言語
- Linear Programming
- スター
- 600
- フォーク
- 108
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
**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?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、リンクされた gist のスクリプトと出力を Python-MIP 1.13.0 および CBC で実行し、次に model.optimize() を lazy_constrs_generator と cuts_generator の経路を通して追跡します。ConstrsGenerator.generate_constrs に到達するか確認してください。最適化で segfaults が発生しなくなり、設定したジェネレーターが期待どおりに呼び出されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100