Skip to content

Why is Bridges.Variable.ZerosBridge needed? #1767

Closed
@odow

Description

@odow

When a VectorOfVariables-in-Zeros constraint gets added, for example:

if use_VectorOfVariables
vs = MOI.add_constraint(model, vov, MOI.Zeros(1))

It may get bridged by
"""
ZerosBridge{T} <: Bridges.Variable.AbstractBridge
Transforms constrained variables in [`MathOptInterface.Zeros`](@ref) to zeros,
which ends up creating no variables in the underlying model.
The bridged variables are therefore similar to parameters with zero values.
Parameters with non-zero value can be created with constrained variables in
[`MOI.EqualTo`](@ref) by combining a [`VectorizeBridge`](@ref) and this bridge.
The functions cannot be unbridged, given a function, we cannot determine, if
the bridged variables were used.
The dual values cannot be determined by the bridge but they can be determined
by the bridged optimizer using [`MathOptInterface.Utilities.get_fallback`](@ref)
if a `CachingOptimizer` is used (since `ConstraintFunction` cannot be got
as functions cannot be unbridged).
"""

The lack of dual variables causes problems in ECOS and Clp:

The solution is just to remove the bridge. In what cases is it actually useful? I get that it can make some formulations simpler, but which ones? Why not just add the extra variables?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions