Skip to content

Commit

Permalink
Merge pull request #98 from tso-martin/dev_unrelax
Browse files Browse the repository at this point in the history
fix: 🐛 Return functions to undo relax_integrality
  • Loading branch information
jalving authored Nov 28, 2023
2 parents 42f3242 + d66a068 commit a68e5ad
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/optimizer_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,8 @@ function JuMP.optimize!(node::OptiNode; kwargs...)
end

function JuMP.relax_integrality(graph::OptiGraph)
for node in all_nodes(graph)
JuMP.relax_integrality(jump_model(node))
end
# Returns vector of functions to revert the relaxation. Call via map(x->x()).
return [JuMP.relax_integrality(jump_model(node)) for node in all_nodes(graph)]
end

function set_node_primals(
Expand Down

0 comments on commit a68e5ad

Please sign in to comment.