Skip to content

Commit 0ba9da8

Browse files
committed
Update
1 parent f525ac4 commit 0ba9da8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/MultiObjectiveAlgorithms.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -580,23 +580,24 @@ end
580580
function MOI.optimize!(model::Optimizer)
581581
start_time = time()
582582
empty!(model.solutions)
583-
# We need to clear the ideal point prior to starting the solve. Algorithms
584-
# may update this during the solve, otherwise we will update it at the end.
585-
model.ideal_point = fill(NaN, MOI.output_dimension(model.f))
586583
model.termination_status = MOI.OPTIMIZE_NOT_CALLED
587584
if model.f === nothing
588585
model.termination_status = MOI.INVALID_MODEL
586+
empty!(model.ideal_point)
589587
return
590588
end
589+
# We need to clear the ideal point prior to starting the solve. Algorithms
590+
# may update this during the solve, otherwise we will update it at the end.
591+
model.ideal_point = fill(NaN, MOI.output_dimension(model.f))
591592
algorithm = something(model.algorithm, default(Algorithm()))
592593
status, solutions = optimize_multiobjective!(algorithm, model)
593594
model.termination_status = status
594-
if MOI.get(model, ComputeIdealPoint())
595-
_compute_ideal_point(model, start_time)
596-
end
597595
if solutions !== nothing
598596
model.solutions = solutions
599597
end
598+
if MOI.get(model, ComputeIdealPoint())
599+
_compute_ideal_point(model, start_time)
600+
end
600601
if MOI.supports(model.inner, MOI.TimeLimitSec())
601602
MOI.set(model.inner, MOI.TimeLimitSec(), nothing)
602603
end

0 commit comments

Comments
 (0)