Skip to content

[Bridges] change graph to favor Constraint bridges over Variable bridges#2981

Open
odow wants to merge 1 commit intomasterfrom
od/change-bridges
Open

[Bridges] change graph to favor Constraint bridges over Variable bridges#2981
odow wants to merge 1 commit intomasterfrom
od/change-bridges

Conversation

@odow
Copy link
Member

@odow odow commented Mar 26, 2026

x-ref jump-dev/ParametricOptInterface.jl#201 (comment)

I wonder if we should go further: should we use variable bridges iff we cannot do anything else? This would apply for CSDP and free variables, and ParameterToEqualTo. But not much else.

import MathOptInterface as MOI
using Clarabel
begin
    inner = MOI.instantiate(Clarabel.Optimizer; with_cache_type = Float64)
    model = MOI.Bridges.full_bridge_optimizer(inner, Float64)
    x, _ = MOI.add_constrained_variable(model, MOI.GreaterThan(1.0))
    MOI.Bridges.print_active_bridges(model)
    print(inner)
end

 * Supported objective: MOI.ScalarAffineFunction{Float64}
 * Unsupported constraint: MOI.VariableIndex-in-MOI.GreaterThan{Float64}
 |  bridged by:
 |   MOIB.Constraint.VectorizeBridge{Float64, MOI.VectorAffineFunction{Float64}, MOI.Nonnegatives, MOI.VariableIndex}
 |  may introduce:
 |   * Supported constraint: MOI.VectorAffineFunction{Float64}-in-MOI.Nonnegatives
Feasibility

Subject to:

VectorAffineFunction{Float64}-in-Nonnegatives
 ┌               ┐
 │-1.0 + 1.0 v[1]│
 └               ┘  Nonnegatives(1)

@odow odow force-pushed the od/change-bridges branch from bdd6f96 to 0ea4d27 Compare March 26, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant