Skip to content
Permalink
Browse files

Remove MOIB

  • Loading branch information...
blegat committed Aug 25, 2019
1 parent 0a6211c commit 6968fbee5450f5da9cd708f1d494d2e61d2f8c01
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/JuMP.jl
@@ -318,36 +318,36 @@ function bridge_constraints(model::Model)
end

function _moi_add_bridge(model::Nothing,
BridgeType::Type{<:MOIB.AbstractBridge})
BridgeType::Type{<:MOI.Bridges.AbstractBridge})
# No optimizer is attached, the bridge will be added when one is attached
return
end
function _moi_add_bridge(model::MOI.ModelLike,
BridgeType::Type{<:MOIB.AbstractBridge})
BridgeType::Type{<:MOI.Bridges.AbstractBridge})
error("Cannot add bridge if `bridge_constraints` was set to `false` in the",
" `Model` constructor.")
end
function _moi_add_bridge(bridge_opt::MOI.Bridges.LazyBridgeOptimizer,
BridgeType::Type{<:MOIB.AbstractBridge})
BridgeType::Type{<:MOI.Bridges.AbstractBridge})
MOI.Bridges.add_bridge(bridge_opt, BridgeType{Float64})
return
end
function _moi_add_bridge(caching_opt::MOIU.CachingOptimizer,
BridgeType::Type{<:MOIB.AbstractBridge})
BridgeType::Type{<:MOI.Bridges.AbstractBridge})
_moi_add_bridge(caching_opt.optimizer, BridgeType)
return
end

"""
add_bridge(model::Model,
BridgeType::Type{<:MOIB.AbstractBridge})
BridgeType::Type{<:MOI.Bridges.AbstractBridge})
Add `BridgeType` to the list of bridges that can be used to transform
unsupported constraints into an equivalent formulation using only constraints
supported by the optimizer.
"""
function add_bridge(model::Model,
BridgeType::Type{<:MOIB.AbstractBridge})
BridgeType::Type{<:MOI.Bridges.AbstractBridge})
push!(model.bridge_types, BridgeType)
# The type of `backend(model)` is not type-stable, so we use a function
# barrier (`_moi_add_bridge`) to improve performance.

2 comments on commit 6968fbe

@blegat

This comment has been minimized.

Copy link
Member Author

replied Aug 25, 2019

@JuliaRegistrator register()

@JuliaRegistrator

This comment has been minimized.

Copy link

replied Aug 25, 2019

Registration pull request updated: JuliaRegistries/General/2927

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.20.0 -m "<description of version>" 6968fbee5450f5da9cd708f1d494d2e61d2f8c01
git push origin v0.20.0
Please sign in to comment.
You can’t perform that action at this time.