[BUG] MIP with default presolve returns OPTIMAL with x = 0 for `-1e6 * x <= -7`, x binary (row violated by 7)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reproducing the single binary-variable MPS case in the Python script, comparing default presolve with presolve disabled and a tighter integrality tolerance. The report points to PaPILO's hard-coded feasibility tolerance (#1502) as a possible lead, but says the cause has not been traced. Done means presolve no longer returns an infeasible point as OPTIMAL or as an incumbent; verify the reported case and the MIPLIB cdma rows against an independent feasibility check.
由索引模型根据 Issue 内容生成。
描述
Drafted by Claude Code (an AI agent) for Berk Orbay, who reviewed it before posting.
Describe the bug
A binary x with the single row -1e6 * x <= -7 must be 1. With presolve on (the default, 1 or 2), cuOpt 26.10.0
returns OPTIMAL with x = 0, which violates the row by 7. That is far above any feasibility tolerance (default
mip_absolute_tolerance is 1e-6). Lowering mip_integrality_tolerance to 1e-9 does not change it. With
presolve = 0 and mip_integrality_tolerance = 1e-9, the result is correct (x = 1).
The result flips where the implied bound 7/a crosses 1e-5: wrong at a = 7e5 (bound 1.0e-5), right at a = 5e5
(bound 1.4e-5). That value matches PaPILO's hard-coded feastol = 1e-5 (#1502), so the cause may be the same line.
The consequence is different, though: not a 1e-5-level violation, but a row violated by its whole right-hand side,
on the default MIP path, and reported as OPTIMAL. We have not traced it in the source.
Minimal reproduction (Python; script below)
minimise x x binary
s.t. -a * x <= -7 (x >= 7/a, so x must be 1)
| a | implied bound 7/a | cuOpt 26.10.0, default settings | HiGHS 1.15.1 | SCIP 10.0 |
|---|---|---|---|---|
| 10, 1e3, 1e5, 2e5, 5e5 | 0.7 … 1.4e-5 | OPTIMAL, x = 1 | x = 1 | — |
| 7e5 | 1.0e-5 | OPTIMAL, x = 0 | x = 1 | x = 1 |
| 1e6, 1.2e6, 1e7, 1e9 | 7e-6 … 7e-9 | OPTIMAL, x = 0 | x = 1 | x = 1 (1e6, 1e9) |
For a = 1e6:
| presolve | mip_integrality_tolerance | cuOpt 26.10.0 |
|---|---|---|
| default | default (1e-5) | OPTIMAL, x = 0 (row violated by 7) |
| 1 | default | OPTIMAL, x = 0 |
| 2 | default | OPTIMAL, x = 0 |
| default, 1, 2 | 1e-9 | OPTIMAL, x = 0 |
| 0 | default | OPTIMAL, x = 7e-6 (integral within the default tolerance; expected, not part of this report) |
| 0 | 1e-9 | OPTIMAL, x = 1 (correct) |
Where we met it: MIPLIB 2017 cdma. It has five singleton rows -1.2e6 * x <= rhs on binaries, with rhs −7, −11,
−11, −12 and −13, so implied bounds 5.8e-6, 9.2e-6, 9.2e-6, 1.0e-5 and 1.08e-5.
- Callback incumbents. In three runs of cuOpt alone (5 threads, 120 s and 2 × 300 s), 12 of the 22 incumbents
reported through the MIP callback fail an independent check (HiGHS-read model, 1e-6). Every violated row is one of
the −7, −11 and −12 rows, with x = 0. The −13 row (bound 1.08e-5) is never violated. - Final solution. The final solution returned by
Solve()is infeasible in the same way: default settings,
120 s, objective −1.24e16, 2 rows violated. Withpresolve = 0andmip_integrality_tolerance = 1e-9, every
incumbent and the final solution pass the check, at a weaker objective (−5.56e14). - Objective gap. The infeasible points look up to 3.3× better than cuOpt's own best valid incumbent (−1.70e16 vs
−5.19e15). They are not better than the best known feasible value (−2.48e16).
Expected behavior
A point that violates a model row by more than the feasibility tolerance should not be returned as OPTIMAL (or
as an incumbent). A guess at the fix: when presolve derives a bound for an integer variable, it should round it in
the integer sense, lb = ceil(7e-6 - int_tol) = 1 here, rather than treat it as 0 within a continuous tolerance.
Environment
cuOpt 26.10.0 (cuopt-cu13, Python 3.12), NVIDIA DGX Spark (GB10, aarch64), driver 580.173.02, CUDA 13.0, Ubuntu
24.04. Not tested on 26.10.1, which moved the PaPILO pin.
repro script (Python, cuOpt 26.10.0)
import os, tempfile
import numpy as np
from cuopt.linear_programming import ParseMps, Solve, SolverSettings
def mps(a: float) -> str:
return f"""NAME singleton
ROWS
N obj
L r1
COLUMNS
MARKER 'MARKER' 'INTORG'
x obj 1.0 r1 {-a!r}
MARKER 'MARKER' 'INTEND'
RHS
rhs r1 -7.0
BOUNDS
UP bnd x 1.0
ENDATA
"""
def run(path, presolve=None, int_tol=None):
s = SolverSettings()
s.set_parameter("time_limit", 10.0)
if presolve is not None:
s.set_parameter("presolve", presolve)
if int_tol is not None:
s.set_parameter("mip_integrality_tolerance", int_tol)
sol = Solve(ParseMps(path), s)
return int(sol.get_termination_status()), float(sol.get_primal_objective()), list(np.asarray(sol.get_primal_solution()))
with tempfile.TemporaryDirectory() as d:
for a in [10.0, 1e3, 1e5, 2e5, 5e5, 7e5, 1e6, 1.2e6, 1e7, 1e9]:
p = os.path.join(d, "s.mps"); open(p, "w").write(mps(a))
print(f"a={a:g} x>={7/a:.2e}", run(p))
p = os.path.join(d, "s.mps"); open(p, "w").write(mps(1e6))
for pre, itol in ((None, None), (1, None), (2, None), (0, None), (None, 1e-9), (0, 1e-9)):
print("a=1e6 presolve", pre, "int_tol", itol, run(p, pre, itol))
- 主要语言
- Cuda
- 星标
- 1.1k
- 派生
- 266
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 54
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/cuopt 的其他 Issue
-
[BUG] cuDSS 1.0 rejects libcudss_mtlayer_cuopt.so (status = 3): missing cudssThreadingGetProperty未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
[BUG] Python: Problem.addConstraint accepts the same Constraint twice可能已有人在做 @pcbeingused333 于 16 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
[BUG] Fully presolved MILP returns FeasibleFound with an infinite bound since 26.10.0可能已有人在做 @j3soon 于 7 天前认领。 未关闭bug
难度 4/5 3-5 天 新手友好度 15/100
维护者通常 1 天内回复
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 82/100
BCStudentSoftwareDevTeam/cas#491 ·
维护者通常 8 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
OpenSAK-Org/OpenSAK#1418 ·
维护者通常 1 天内回复
-
bug triage
难度 2/5 1-3 小时 新手友好度 78/100
envoyproxy/envoy#49711 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
substrait-io/substrait#1355 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
genfeedai/genfeed.ai#11820 ·
维护者通常 1 天内回复