jump-dev / jump-dev/MathOptInterface.jl

MOI.is_valid can be falsely positive for bridged constraints

Ouverte
#2,696 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Submodule: Bridges
Langage dominant
Julia
Étoiles
504
Forks
101
Merge moyen
6 h 26 min
PR mergées (30 j)
22

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start with the reproduction in test/Bridges/sdpa_models.jl and verify the two MOI.is_valid calls for the bridged constraint. Then inspect the referenced pull request diff, especially the linked lines, to trace how constraint validity is checked. Done means the original constraint remains valid while the incremented index returns false.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
julia
Domaine
backend-api-design
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.