jump-dev / jump-dev/MathOptInterface.jl

MOI.is_valid can be falsely positive for bridged constraints

未关闭
#2,696 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Submodule: Bridges
主要语言
Julia
星标
504
派生
101
平均合并
6 小时 26 分钟
30 天内合并 PR
22

描述

Found as part of #2695. But it does't need to hold that up merging.

The last `MOI.is_valid` should return `false`:

```Julia
julia> import MathOptInterface as MOI

julia> include("test/Bridges/sdpa_models.jl")

julia> model = MOI.instantiate(StandardSDPAModel{Float64}; with_bridge_type = Float64);

julia> x = MOI.add_variables(model, 2);

julia> c = MOI.add_constraint(model, MOI.VectorOfVariables(x), MOI.Nonpositives(2));

julia> MOI.is_valid(model, c)
true

julia> MOI.is_valid(model, typeof(c)(c.value + 1))
true
```

See
https://github.com/jump-dev/MathOptInterface.jl/pull/2695/files#diff-87c703874f7251d45788070ce6ab50219cfe8b7561d08e6f6148d44afba24ccbR249-R251

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 test/Bridges/sdpa_models.jl 中的复现开始,并验证针对 bridged constraint 的两次 MOI.is_valid 调用。然后检查所引用 pull request 的 diff,尤其是链接的行,以追踪 constraint 有效性是如何检查的。当原始 constraint 仍然有效,而递增后的索引返回 false 时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
julia
领域
backend-api-design
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。