Skip to content

Commit 16542fb

Browse files
authored
Move time limit check to solve loop in Dichotomy (#149)
1 parent eee9a90 commit 16542fb

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/algorithms/Dichotomy.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ function optimize_multiobjective!(algorithm::Dichotomy, model::Optimizer)
8585
end
8686
solutions = Dict{Float64,SolutionPoint}()
8787
for (i, w) in (1 => 1.0, 2 => 0.0)
88-
if (ret = _check_premature_termination(model, start_time)) !== nothing
89-
return ret, nothing
90-
end
9188
status, solution = _solve_weighted_sum(model, algorithm, [w, 1.0 - w])
9289
if !_is_scalar_status_optimal(status)
9390
return status, nothing

test/algorithms/Dichotomy.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ function test_time_limit()
262262
)
263263
MOI.optimize!(model)
264264
@test MOI.get(model, MOI.TerminationStatus()) == MOI.TIME_LIMIT
265-
@test MOI.get(model, MOI.ResultCount()) == 0
265+
@test MOI.get(model, MOI.ResultCount()) == 2
266266
return
267267
end
268268

0 commit comments

Comments
 (0)