@@ -32,6 +32,24 @@ This algorithm is restricted to problems with:
3232"""
3333struct TambyVanderpooten <: AbstractAlgorithm end
3434
35+ """
36+ const _TAMBY_VANDERPOOTEN_ATOL = 1e-3
37+
38+ This constant is important.
39+
40+ When we have a solution, we need to decide if the `Y` vector is at the edge of
41+ one of the bounds. The paper assumes exact arithmetic. Solvers have tolerances.
42+
43+ In theory the algorithm works only for problems with integer-valued objectives.
44+ So we could make this as big as `0.5` or something. We previously used `1e-6`,
45+ but this caused problems when the solver's feasibility tolerance meant that the
46+ objective value was something like `1234.00005`.
47+
48+ In future, we could consider how to rewrite the algorithm to make it more robust
49+ to numerical issues like this.
50+ """
51+ const _TAMBY_VANDERPOOTEN_ATOL = 1e-3
52+
3553# This is Algorithm 1 from the paper.
3654function _update_search_region (
3755 U_N:: Dict {Vector{Float64},Vector{Vector{Vector{Float64}}}},
@@ -110,7 +128,7 @@ function _select_search_zone(
110128)
111129 k_star, u_star, v_star = 1 , yN, - Inf
112130 for k in 1 : length (yI), u in keys (U_N)
113- if ! isapprox (u[k], yN[k]; atol = 1e-6 )
131+ if ! isapprox (u[k], yN[k]; atol = _TAMBY_VANDERPOOTEN_ATOL )
114132 v = _h (k, u, yI)
115133 if v > v_star
116134 k_star, u_star, v_star = k, u, v
@@ -205,6 +223,7 @@ function _minimize_multiobjective!(
205223 break
206224 end
207225 k, u = _select_search_zone (U_N, yI, yN)
226+ @show k, u
208227 # Solve problem Π¹(k, u)
209228 MOI. set (inner, MOI. ObjectiveFunction {typeof(scalars[k])} (), scalars[k])
210229 # Update the constraints y_i < u_i. Note that this is a strict
@@ -240,7 +259,7 @@ function _minimize_multiobjective!(
240259 push! (V[k], (u, Y))
241260 # We want `if !(Y in U_N[u][k])` but this tests exact equality. We
242261 # want an approximate comparison.
243- if all (! isapprox (Y; atol = 1e-6 ), U_N[u][k])
262+ if all (! isapprox (Y; atol = _TAMBY_VANDERPOOTEN_ATOL ), U_N[u][k])
244263 _update_search_region (U_N, Y, yN)
245264 solutions[Y] = X
246265 end
270289
271290function _clean_search_region_inner (u′, U_N, yI, V, k)
272291 for (u′_k, yI_k) in zip (u′, yI)
273- if isapprox (u′_k, yI_k; atol = 1e-6 )
292+ if isapprox (u′_k, yI_k; atol = _TAMBY_VANDERPOOTEN_ATOL )
274293 return true
275294 end
276295 end
@@ -285,7 +304,7 @@ function _clean_search_region_inner(u′, U_N, yI, V, k)
285304end
286305
287306function _comparison_line_16 (u′, u, y_k, k)
288- if ! ≈ (y_k[k], u′[k]; atol = 1e-6 )
307+ if ! ≈ (y_k[k], u′[k]; atol = _TAMBY_VANDERPOOTEN_ATOL )
289308 return false
290309 end
291310 for (i, (u′_i, u_i)) in enumerate (zip (u′, u))
0 commit comments