diff --git a/src/Bridges/Objective/slack.jl b/src/Bridges/Objective/slack.jl index b4ec0f9fce..a1cc85da46 100644 --- a/src/Bridges/Objective/slack.jl +++ b/src/Bridges/Objective/slack.jl @@ -8,7 +8,7 @@ The `SlackBridge` converts an objective function of type `G` into a `MOI.Utilities.promote_operation(-, T, G, MOI.SingleVariable}`. Note that when using this bridge, changing the optimization sense is not supported. Set the sense to `MOI.FEASIBILITY_SENSE` first -in order to delete the bridge in order to change the sense. +to delete the bridge in order to change the sense, then re-add the objective. """ struct SlackBridge{T, F<:MOI.AbstractScalarFunction, G<:MOI.AbstractScalarFunction} <: AbstractBridge slack::MOI.VariableIndex diff --git a/src/Bridges/bridge_optimizer.jl b/src/Bridges/bridge_optimizer.jl index 409de0930f..d4f309fba8 100644 --- a/src/Bridges/bridge_optimizer.jl +++ b/src/Bridges/bridge_optimizer.jl @@ -518,6 +518,15 @@ function MOI.supports(b::AbstractBridgeOptimizer, return MOI.supports(b.model, attr) end end + +""" + struct ObjectiveFunctionValue{F<:MOI.AbstractScalarFunction} end + +Attribute for the value of the objective function of type `F`. If the objective +of the objective function does not depend on `F`, the type `F` determines +whether the computation is redirected to an objective bridge or to the +underlying model. +""" struct ObjectiveFunctionValue{F<:MOI.AbstractScalarFunction} end function MOI.get(b::AbstractBridgeOptimizer, attr::ObjectiveFunctionValue{F}) where F