jump-dev / jump-dev/MathOptInterface.jl
Reconsider supports of constraint attributes in bridges
- 主要语言
- Julia
- 星标
- 504
- 派生
- 101
- 平均合并
- 6 小时 26 分钟
- 30 天内合并 PR
- 22
描述
See discussion in #1992, and these tests:
https://github.com/jump-dev/MathOptInterface.jl/blob/d9c998ac49a80ed8f740d5009133320e982af977/test/Bridges/bridge_optimizer.jl#L898-L933
The issue is that the bridge/model may support an attribute for a variable-in-set constraint if it was added via `add_constrained_variable(s)` but not via `add_constraint` (or vice versa). However, we have no way of telling which way the constraint was added based on the type alone.
We can either default to `&&`, in which case we may return a false negative (the model supports the attribute but `supports` returns `false`) or `||`, in which case we may return a false positive (the model supports the attribute for one of the ways, but we added it the other way). It's not obvious which is better, but our tests are passing with the current implementation, so we should wait for a solver to complain before reconsidering.
贡献指南
这个仓库没有索引到贡献指南
调研方向
Read the discussion in issue #1992, then inspect test/Bridges/bridge_optimizer.jl around lines 898-933. Compare the current supports behavior for constraints added through add_constrained_variable(s) and add_constraint; the issue does not define a resolution, and completion depends on deciding how to handle a solver complaint.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- julia
- 领域
- backend-api-design
- Issue 类型
- 重构
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100