Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for starting values in bridges #684

Closed
blegat opened this issue Mar 4, 2019 · 9 comments
Closed

Add support for starting values in bridges #684

blegat opened this issue Mar 4, 2019 · 9 comments
Labels
Submodule: Bridges About the Bridges submodule
Milestone

Comments

@blegat
Copy link
Member

blegat commented Mar 4, 2019

Updated list

Constraint Bridge ConstraintPrimal ConstraintDual
GreaterToIntervalBridge x x
LessToIntervalBridge x x
GreaterToLessBridge x x
LessToGreaterBridge x x
NonnegToNonposBridge x x
NonposToNonnegBridge x x
VectorizeBridge x x
ScalarizeBridge x x
ScalarSlackBridge x x
VectorSlackBridge x x
ScalarFunctionizeBridge x x
VectorFunctionizeBridge x x
SplitComplexEqualToBridge x x
SplitComplexZerosBridge x x
SplitIntervalBridge x x
SOCtoRSOCBridge x x
RSOCtoSOCBridge x x
SOCtoNonConvexQuadBridge NA NA
RSOCtoNonConvexQuadBridge NA NA
QuadtoSOCBridge NA NA
SOCtoPSDBridge
RSOCtoPSDBridge
NormInfinityBridge x x
NormOneBridge x x
GeoMeantoRelEntrBridge x x
GeoMeanBridge
RelativeEntropyBridge x x
NormSpectralBridge
NormNuclearBridge x x
SquareBridge
RootDetBridge
LogDetBridge x x
IndicatorActiveOnFalseBridge NA NA
IndicatorSOS1Bridge NA NA
SemiToBinaryBridge NA NA
ZeroOneBridge NA NA
AllDifferentToCountDistinctBridge NA NA
BinPackingToMILPBridge NA NA
CircuitToMILPBridge NA NA
CountAtLeastToCountBelongsBridge NA NA
CountBelongsToMILPBridge NA NA
CountDistinctToMILPBridge NA NA
CountGreaterThanToMILPBridge NA NA
TableToMILPBridge NA NA
Variable Bridge VariablePrimal ConstraintPrimal ConstraintDual
FreeBridge x
NonposToNonnegBridge x
RSOCtoPSDBridge
RSOCtoSOCBridge
SOCtoRSOCBridge
VectorizeBridge x
ZerosBridge
@odow
Copy link
Member

odow commented Feb 4, 2022

Another missing one is square to triangular PSD matrices: #1730

@odow

This comment was marked as outdated.

@odow
Copy link
Member

odow commented Nov 2, 2023

function get_unsupported_bridges()
    dict = Dict{String,Vector{String}}()
    for attr in ("VariablePrimalStart", "ConstraintPrimalStart", "ConstraintDualStart")
        ret = String[]
        for t in ("Constraint", "Objective", "Variable")
            dir = "src/Bridges/$t/bridges"
            for file in readdir(dir)
                filename = joinpath(dir, file)
                contents = read(filename, String)
                if occursin("SetMapBridge", contents)
                    continue
                end
                if !occursin("::MOI.$attr", contents)
                    push!(ret, filename)
                end
            end
        end
        dict[attr] = ret
    end
    return dict
end
dict = get_unsupported_bridges()

Then with a bit of manual culling, I thing we can get things down to:

julia> dict["ConstraintPrimalStart"]
31-element Vector{String}:
 "src/Bridges/Constraint/bridges/det.jl"
 "src/Bridges/Constraint/bridges/geomean.jl"
 "src/Bridges/Constraint/bridges/norm_to_power.jl"
 "src/Bridges/Constraint/bridges/number_conversion.jl"
 "src/Bridges/Constraint/bridges/soc_to_nonconvex_quad.jl"
 "src/Bridges/Constraint/bridges/square.jl"

julia> dict["ConstraintDualStart"]
33-element Vector{String}:
 "src/Bridges/Constraint/bridges/det.jl"
 "src/Bridges/Constraint/bridges/geomean.jl"
 "src/Bridges/Constraint/bridges/norm_to_power.jl"
 "src/Bridges/Constraint/bridges/number_conversion.jl"
 "src/Bridges/Constraint/bridges/soc_to_nonconvex_quad.jl"
 "src/Bridges/Constraint/bridges/square.jl"

julia> dict["VariablePrimalStart"]
44-element Vector{String}:
 "src/Bridges/Variable/bridges/parameter.jl"
 "src/Bridges/Variable/bridges/rsoc_to_psd.jl"

@odow
Copy link
Member

odow commented Nov 2, 2023

With the latest PRs (and excluding src/Bridges/Constraint/bridges/soc_to_nonconvex_quad.jl), we're down to

julia> dict["ConstraintPrimalStart"]
31-element Vector{String}:
 "src/Bridges/Constraint/bridges/det.jl"
 "src/Bridges/Constraint/bridges/geomean.jl"
 "src/Bridges/Constraint/bridges/norm_to_power.jl"

julia> dict["ConstraintDualStart"]
33-element Vector{String}:
 "src/Bridges/Constraint/bridges/det.jl"
 "src/Bridges/Constraint/bridges/geomean.jl"
 "src/Bridges/Constraint/bridges/norm_to_power.jl"

@odow
Copy link
Member

odow commented Nov 2, 2023

But actually, the LogDet bridge does support starting values. And the geo-mean and norm bridge are niche enough that there isn't a big drive. They're also slightly complicated to work out the duals for?

So maybe this issue can be closed. There's still the unresolved #2117.

And since there's a better error message telling people to open an issue if they hit a case that isn't implemented, we can re-open if there is demand.

@odow
Copy link
Member

odow commented Dec 21, 2023

@blegat are you ready to close this?

@blegat
Copy link
Member Author

blegat commented Dec 21, 2023

There are still a few missing

@odow
Copy link
Member

odow commented Apr 10, 2024

Sure. But are they useful? We have an error message telling people to open an issue, and no one has 😄

@blegat
Copy link
Member Author

blegat commented Apr 10, 2024

I think we're good, these are not the only attributes not implemented by bridges

@blegat blegat closed this as completed Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Submodule: Bridges About the Bridges submodule
Development

No branches or pull requests

2 participants