Skip to content

Commit

Permalink
Free data in the feasibility check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Deborah Hendrych committed Nov 17, 2023
1 parent 3252179 commit 376a5e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MOI_bounded_oracle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,17 @@ end
Check if problem is bounded and feasible, i.e. no contradicting constraints.
"""
function Boscia.check_feasibility(blmo::MathOptBLMO)
# clear previous data
free_model(blmo)
MOI.set(
blmo.o,
MOI.ObjectiveFunction{MOI.ScalarAffineFunction{Float64}}(),
MOI.ScalarAffineFunction{Float64}([], 0.0),
)
MOI.optimize!(blmo.o)
status = MOI.get(blmo.o, MOI.TerminationStatus())
# clear previous data
free_model(blmo)
return status
end

Expand Down

0 comments on commit 376a5e1

Please sign in to comment.