Skip to content

Commit ed6f3f7

Browse files
committed
add time limits to dichotomy starting solves
1 parent 0587ede commit ed6f3f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/algorithms/Dichotomy.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,17 @@ function optimize_multiobjective!(algorithm::Dichotomy, model::Optimizer)
8181
error("Only scalar or bi-objective problems supported.")
8282
end
8383
if MOI.output_dimension(model.f) == 1
84+
if _time_limit_exceeded(model, start_time)
85+
return MOI.TIME_LIMIT, nothing
86+
end
8487
status, solution = _solve_weighted_sum(model, algorithm, [1.0])
8588
return status, [solution]
8689
end
8790
solutions = Dict{Float64,SolutionPoint}()
8891
for w in (0.0, 1.0)
92+
if _time_limit_exceeded(model, start_time)
93+
return MOI.TIME_LIMIT, nothing
94+
end
8995
status, solution = _solve_weighted_sum(model, algorithm, w)
9096
if !_is_scalar_status_optimal(status)
9197
return status, nothing

0 commit comments

Comments
 (0)