Skip to content

Move time limit check to solve loop in Dichotomy #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/algorithms/Dichotomy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ function optimize_multiobjective!(algorithm::Dichotomy, model::Optimizer)
end
solutions = Dict{Float64,SolutionPoint}()
for (i, w) in (1 => 1.0, 2 => 0.0)
if (ret = _check_premature_termination(model, start_time)) !== nothing
return ret, nothing
end
status, solution = _solve_weighted_sum(model, algorithm, [w, 1.0 - w])
if !_is_scalar_status_optimal(status)
return status, nothing
Expand Down
2 changes: 1 addition & 1 deletion test/algorithms/Dichotomy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ function test_time_limit()
)
MOI.optimize!(model)
@test MOI.get(model, MOI.TerminationStatus()) == MOI.TIME_LIMIT
@test MOI.get(model, MOI.ResultCount()) == 0
@test MOI.get(model, MOI.ResultCount()) == 2
return
end

Expand Down
Loading