Skip to content

MOI.is_valid can be falsely positive for bridged constraints #2696

Open
@odow

Description

@odow

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

The last MOI.is_valid should return false:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions