jump-dev / jump-dev/MathOptInterface.jl

Reconsider supports of constraint attributes in bridges

Đang mở
#1,993 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Submodule: Bridges Type: Bug
Ngôn ngữ chính
Julia
Star
504
Fork
101
Merge trung bình
6 giờ 26 phút
Pull request đã merge (30 ngày)
22

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.