Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

LazyConstraint based MIP yields incorrect optimum

オープン
#331 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
tooling

調査の方向性

添付された lazy-minimal-example.py.txt から始め、その complete-model、lazy-constraint、lazy-constraint-generator の実行結果を実行ログと比較します。CBC を使用した Python-MIP の lazy constraint 処理を追跡します。両方の lazy バリアントが complete model と同じ最適値を生成し、それを正しく報告すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug cbc

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
lazy-minimal-example.log

主要言語
Linear Programming
スター
605
フォーク
108
平均マージ
1日 22分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coin-or/python-mip のほかの issue

coin-or/python-mip の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。