@@ -105,22 +105,40 @@ function minimize_multiobjective!(
105105 MOI. set (model. inner, MOI. ObjectiveFunction {typeof(f2)} (), f2)
106106 # Add epsilon constraint
107107 variables = MOI. get (model. inner, MOI. ListOfVariableIndices ())
108- bound = right - ε
109- constant = MOI. constant (f1, Float64)
110- ci = MOI. Utilities. normalize_and_add_constraint (
108+ bound_1 = right - ε
109+ constant_1 = MOI. constant (f1, Float64)
110+ ci_1 = MOI. Utilities. normalize_and_add_constraint (
111111 model,
112112 f1,
113- MOI. LessThan {Float64} (bound);
114- allow_modify_function = true ,
113+ MOI. LessThan (bound_1),
115114 )
116- bound -= constant
115+ yN = max (solution_1[1 ]. y[2 ], solution_2[1 ]. y[2 ])
116+ constant_2 = MOI. constant (f2, Float64)
117+ ci_2 = MOI. Utilities. normalize_and_add_constraint (
118+ model,
119+ f2,
120+ MOI. LessThan (yN)
121+ )
122+ bound_1 -= constant_1
117123 status = MOI. OPTIMAL
118124 for _ in 3 : n_points
119125 if (ret = _check_premature_termination (model)) != = nothing
120126 status = ret
121127 break
122128 end
123- MOI. set (model, MOI. ConstraintSet (), ci, MOI. LessThan {Float64} (bound))
129+ # First-stage solve: minimize f₂: f₂ <= bound_1
130+ MOI. set (model. inner, MOI. ObjectiveFunction {typeof(f2)} (), f2)
131+ MOI. set (model, MOI. ConstraintSet (), ci_1, MOI. LessThan (bound_1))
132+ MOI. set (model, MOI. ConstraintSet (), ci_2, MOI. LessThan (yN - constant_2))
133+ optimize_inner! (model)
134+ if ! _is_scalar_status_optimal (model)
135+ break
136+ end
137+ # First-stage solve: minimize f₁: f₂ <= f₂^*
138+ f_2_star = MOI. get (model. inner, MOI. ObjectiveValue ()):: Float64
139+ MOI. set (model. inner, MOI. ObjectiveFunction {typeof(f1)} (), f1)
140+ bound_2 = f_2_star - constant_2
141+ MOI. set (model, MOI. ConstraintSet (), ci_2, MOI. LessThan (bound_2))
124142 optimize_inner! (model)
125143 if ! _is_scalar_status_optimal (model)
126144 break
@@ -130,8 +148,9 @@ function minimize_multiobjective!(
130148 if isempty (solutions) || ! (Y ≈ solutions[end ]. y)
131149 push! (solutions, SolutionPoint (X, Y))
132150 end
133- bound = min (Y[1 ] - constant - ε, bound - ε)
151+ bound_1 = min (Y[1 ] - constant_1 - ε, bound_1 - ε)
134152 end
135- MOI. delete (model, ci)
153+ MOI. delete (model, ci_1)
154+ MOI. delete (model, ci_2)
136155 return status, solutions
137156end
0 commit comments