Skip to content

Commit c4a5b9c

Browse files
committed
Update
1 parent bc13f56 commit c4a5b9c

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

src/algorithms/DominguezRios.jl

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -207,27 +207,26 @@ function minimize_multiobjective!(algorithm::DominguezRios, model::Optimizer)
207207
new_f = t_max + ϵ * sum(w[i] * (scalars[i] - yI[i]) for i in 1:n)
208208
MOI.set(model.inner, MOI.ObjectiveFunction{typeof(new_f)}(), new_f)
209209
MOI.optimize!(model.inner)
210-
if !_is_scalar_status_optimal(model)
210+
if _is_scalar_status_optimal(model)
211+
X, Y = _compute_point(model, variables, model.f)
212+
obj = MOI.get(model.inner, MOI.ObjectiveValue())
213+
# We need to undo the scaling of the scalar objective. There's no
214+
# need to unscale `Y` because we have evaluated this explicitly from
215+
# the modified `model.f`.
216+
obj /= scale
217+
if (obj < 1) && all(yI .< B.u)
218+
push!(solutions, SolutionPoint(X, Y))
219+
_update!(L, Y, yI, yN)
220+
else
221+
deleteat!(L[k], i)
222+
end
223+
else
211224
# In theory, this shouldn't happen, because this subproblem is meant
212225
# to always be feasible. However, in some of our testing, HiGHS will
213226
# fail and return something like OTHER_ERROR (e.g., because the
214227
# numerics are challenging). Rather than error completely, let's
215228
# just skip this box.
216229
deleteat!(L[k], i)
217-
MOI.delete.(model.inner, constraints)
218-
continue
219-
end
220-
X, Y = _compute_point(model, variables, model.f)
221-
obj = MOI.get(model.inner, MOI.ObjectiveValue())
222-
# We need to undo the scaling of the scalar objective. There's no
223-
# need to unscale `Y` because we have evaluated this explicitly from
224-
# the modified `model.f`.
225-
obj /= scale
226-
if (obj < 1) && all(yI .< B.u)
227-
push!(solutions, SolutionPoint(X, Y))
228-
_update!(L, Y, yI, yN)
229-
else
230-
deleteat!(L[k], i)
231230
end
232231
MOI.delete.(model.inner, constraints)
233232
end

0 commit comments

Comments
 (0)