Skip to content

Pass attributes through Objective.FunctionConversionBridge #287

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/bridges.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
# Use of this source code is governed by an MIT-style license that can be found
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.

function MOI.get(

Check warning on line 6 in src/bridges.jl

View check run for this annotation

Codecov / codecov/patch

src/bridges.jl#L6

Added line #L6 was not covered by tests
model::MOI.ModelLike,
attr::ObjectiveFunctionAttribute{ReverseObjectiveFunction,G},
::MOI.Bridges.Objective.FunctionConversionBridge{T,F,G},
) where {T,F,G}
return MOI.get(model, ObjectiveFunctionAttribute{ReverseObjectiveFunction,F}(attr.attr))

Check warning on line 11 in src/bridges.jl

View check run for this annotation

Codecov / codecov/patch

src/bridges.jl#L11

Added line #L11 was not covered by tests
end

function MOI.set(

Check warning on line 14 in src/bridges.jl

View check run for this annotation

Codecov / codecov/patch

src/bridges.jl#L14

Added line #L14 was not covered by tests
model::MOI.ModelLike,
attr::ObjectiveFunctionAttribute{ForwardObjectiveFunction,G},
::MOI.Bridges.Objective.FunctionConversionBridge{T,F,G},
value,
) where {T,F,G}
return MOI.set(model, ObjectiveFunctionAttribute{ForwardObjectiveFunction,F}(attr.attr), value)

Check warning on line 20 in src/bridges.jl

View check run for this annotation

Codecov / codecov/patch

src/bridges.jl#L20

Added line #L20 was not covered by tests
end

function MOI.get(
model::MOI.ModelLike,
::ObjectiveFunctionAttribute{ReverseObjectiveFunction},
Expand Down
Loading