Skip to content

Conversation

@kofgokhan
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Dec 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (209ff1c) to head (2ea7d5f).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #166   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines         1206      1213    +7     
=========================================
+ Hits          1206      1213    +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@odow
Copy link
Member

odow commented Dec 15, 2025

I'd write it like this:

diff --git a/src/algorithms/DominguezRios.jl b/src/algorithms/DominguezRios.jl
index e5d8d4c..54ca9ae 100644
--- a/src/algorithms/DominguezRios.jl
+++ b/src/algorithms/DominguezRios.jl
@@ -148,6 +148,10 @@ function _update!(
     return
 end
 
+_isapprox(::Nothing, ::_DominguezRiosBox) = false
+
+_isapprox(A::_DominguezRiosBox, B::_DominguezRiosBox) = A.l ≈ B.l && A.u ≈ B.u
+
 function minimize_multiobjective!(algorithm::DominguezRios, model::Optimizer)
     @assert MOI.get(model.inner, MOI.ObjectiveSense()) == MOI.MIN_SENSE
     n = MOI.output_dimension(model.f)
@@ -190,6 +194,7 @@ function minimize_multiobjective!(algorithm::DominguezRios, model::Optimizer)
     solutions = SolutionPoint[]
     k = 0
     status = MOI.OPTIMAL
+    B_prev = Vector{Union{Nothing,_DominguezRiosBox}}(nothing, n)
     while any(!isempty(l) for l in L)
         if (ret = _check_premature_termination(model)) !== nothing
             status = ret
@@ -197,6 +202,11 @@ function minimize_multiobjective!(algorithm::DominguezRios, model::Optimizer)
         end
         i, k = _select_next_box(L, k)
         B = L[k][i]
+        if _isapprox(B_prev[k], B)
+            deleteat!(L[k], i)
+            continue
+        end
+        B_prev[k] = B
         # We're going to scale `w` here by `scale` instead of the usual
         # `1 / max(...)`. It will show up in a few places bbelow.
         w = scale ./ max.(1, B.u - yI)

Copy link
Member

@odow odow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the alternative is to change the _update! function so that we don't keep adding previously searched boxes?

@odow odow merged commit f1d87ee into jump-dev:master Dec 16, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants