Skip to content

Commit a68e5ad

Browse files
authored
Merge pull request #98 from tso-martin/dev_unrelax
fix: 🐛 Return functions to undo relax_integrality
2 parents 42f3242 + d66a068 commit a68e5ad

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/optimizer_interface.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,8 @@ function JuMP.optimize!(node::OptiNode; kwargs...)
383383
end
384384

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

391390
function set_node_primals(

0 commit comments

Comments
 (0)