Skip to content

Commit 1fcaa22

Browse files
committed
Update
1 parent 012cf80 commit 1fcaa22

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/algorithms/KirlikSayin.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ function minimize_multiobjective!(algorithm::KirlikSayin, model::Optimizer)
169169
end
170170
X, Y = _compute_point(model, variables, model.f)
171171
Y_proj = _project(Y, k)
172-
if !(Y in YN)
172+
# We want `if !(Y in YN)` but this tests exact equality. We want
173+
# an approximate comparison.
174+
if all(!isapprox(Y; atol = 1e-6), YN)
173175
push!(solutions, SolutionPoint(X, Y))
174176
push!(YN, Y)
175177
L = _update_list(L, Y_proj)

src/algorithms/TambyVanderpooten.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ function minimize_multiobjective!(
180180
MOI.delete.(model, ε_constraints)
181181
MOI.delete(model, y_k_constraint)
182182
push!(V[k], (u, Y))
183-
if Y U_N[u][k]
183+
# We want `if !(Y in U_N[u][k])` but this tests exact equality. We want
184+
# an approximate comparison.
185+
if all(!isapprox(Y; atol = 1e-6), U_N[u][k])
184186
_update_search_region(U_N, Y, yN)
185187
solutions[Y] = X
186188
end
@@ -205,6 +207,5 @@ function minimize_multiobjective!(
205207
end
206208
end
207209
end
208-
solutions_vec = [SolutionPoint(X, Y) for (Y, X) in solutions]
209-
return status, filter_nondominated(MOI.MIN_SENSE, solutions_vec)
210+
return status, [SolutionPoint(X, Y) for (Y, X) in solutions]
210211
end

0 commit comments

Comments
 (0)