Skip to content

Commit

Permalink
Address @odow comments
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Sep 4, 2019
1 parent 7a81976 commit aa618fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bridges/Objective/slack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions src/Bridges/bridge_optimizer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aa618fc

Please sign in to comment.