Skip to content

Commit

Permalink
Remove MOIB
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Aug 25, 2019
1 parent 0a6211c commit 6968fbe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/JuMP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

2 comments on commit 6968fbe

@blegat
Copy link
Member Author

@blegat blegat commented on 6968fbe Aug 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.