Skip to content

Commit a5fc81c

Browse files
committed
Update DR
1 parent 209ff1c commit a5fc81c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/algorithms/DominguezRios.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,24 @@ function minimize_multiobjective!(algorithm::DominguezRios, model::Optimizer)
190190
solutions = SolutionPoint[]
191191
k = 0
192192
status = MOI.OPTIMAL
193+
B_prevs = Vector{_DominguezRiosBox}(undef, n)
194+
iter = 0
193195
while any(!isempty(l) for l in L)
196+
iter += 1
194197
if (ret = _check_premature_termination(model)) !== nothing
195198
status = ret
196199
break
197200
end
198201
i, k = _select_next_box(L, k)
199202
B = L[k][i]
203+
if iter > n
204+
if (B_prevs[k].l B.l) && (B_prevs[k].u B.u)
205+
@info "B and B_prev are the same!"
206+
deleteat!(L[k], i)
207+
continue
208+
end
209+
end
210+
B_prevs[k] = B
200211
# We're going to scale `w` here by `scale` instead of the usual
201212
# `1 / max(...)`. It will show up in a few places bbelow.
202213
w = scale ./ max.(1, B.u - yI)

0 commit comments

Comments
 (0)