Skip to content

Commit ef55699

Browse files
committed
Update
1 parent b7c20b3 commit ef55699

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/algorithms/DominguezRios.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ function minimize_multiobjective!(algorithm::DominguezRios, model::Optimizer)
190190
solutions = SolutionPoint[]
191191
k = 0
192192
status = MOI.OPTIMAL
193-
B_prevs = Vector{_DominguezRiosBox}(undef, n)
193+
B_prevs = Vector{Union{Nothing, _DominguezRiosBox}}(nothing, n)
194194
iter = 0
195195
while any(!isempty(l) for l in L)
196196
iter += 1
@@ -201,9 +201,11 @@ function minimize_multiobjective!(algorithm::DominguezRios, model::Optimizer)
201201
i, k = _select_next_box(L, k)
202202
B = L[k][i]
203203
if iter > n
204-
if (B_prevs[k].l B.l) && (B_prevs[k].u B.u)
205-
deleteat!(L[k], i)
206-
continue
204+
if !isnothing(B_prevs[k])
205+
if (B_prevs[k].l B.l) && (B_prevs[k].u B.u)
206+
deleteat!(L[k], i)
207+
continue
208+
end
207209
end
208210
end
209211
B_prevs[k] = B

0 commit comments

Comments
 (0)