@@ -580,23 +580,24 @@ end
580
580
function MOI. optimize! (model:: Optimizer )
581
581
start_time = time ()
582
582
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))
586
583
model. termination_status = MOI. OPTIMIZE_NOT_CALLED
587
584
if model. f === nothing
588
585
model. termination_status = MOI. INVALID_MODEL
586
+ empty! (model. ideal_point)
589
587
return
590
588
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))
591
592
algorithm = something (model. algorithm, default (Algorithm ()))
592
593
status, solutions = optimize_multiobjective! (algorithm, model)
593
594
model. termination_status = status
594
- if MOI. get (model, ComputeIdealPoint ())
595
- _compute_ideal_point (model, start_time)
596
- end
597
595
if solutions != = nothing
598
596
model. solutions = solutions
599
597
end
598
+ if MOI. get (model, ComputeIdealPoint ())
599
+ _compute_ideal_point (model, start_time)
600
+ end
600
601
if MOI. supports (model. inner, MOI. TimeLimitSec ())
601
602
MOI. set (model. inner, MOI. TimeLimitSec (), nothing )
602
603
end
0 commit comments