Skip to content

Commit 6507382

Browse files
committed
allow interrupt inner solve
1 parent 1a25bab commit 6507382

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/MultiObjectiveAlgorithms.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ packages.
715715
"""
716716
function optimize_inner!(model::Optimizer)
717717
start_time = time()
718-
MOI.optimize!(model.inner)
718+
_check_interrupt(() -> MOI.optimize!(model.inner))
719719
model.solve_time_inner += time() - start_time
720720
model.subproblem_count += 1
721721
return
@@ -811,6 +811,9 @@ function _check_interrupt(f)
811811
end
812812

813813
function _check_premature_termination(model::Optimizer)
814+
if model.termination_status == MOI.INTERRUPTED
815+
return MOI.INTERRUPTED
816+
end
814817
return _check_interrupt() do
815818
time_limit = MOI.get(model, MOI.TimeLimitSec())
816819
if time_limit !== nothing

0 commit comments

Comments
 (0)