@@ -107,22 +107,40 @@ function minimize_multiobjective!(
107107 MOI. set (inner, MOI. ObjectiveFunction {typeof(f2)} (), f2)
108108 # Add epsilon constraint
109109 variables = MOI. get (inner, MOI. ListOfVariableIndices ())
110- bound = right - ε
111- constant = MOI. constant (f1, Float64)
112- ci = MOI. Utilities. normalize_and_add_constraint (
113- model ,
110+ bound_1 = right - ε
111+ constant_1 = MOI. constant (f1, Float64)
112+ ci_1 = MOI. Utilities. normalize_and_add_constraint (
113+ inner ,
114114 f1,
115- MOI. LessThan {Float64} (bound);
116- allow_modify_function = true ,
115+ MOI. LessThan (bound_1),
117116 )
118- bound -= constant
117+ yN = max (solution_1[1 ]. y[2 ], solution_2[1 ]. y[2 ])
118+ constant_2 = MOI. constant (f2, Float64)
119+ ci_2 = MOI. Utilities. normalize_and_add_constraint (
120+ inner,
121+ f2,
122+ MOI. LessThan (yN)
123+ )
124+ bound_1 -= constant_1
119125 status = MOI. OPTIMAL
120126 for _ in 3 : n_points
121127 if (ret = _check_premature_termination (model)) != = nothing
122128 status = ret
123129 break
124130 end
125- MOI. set (model, MOI. ConstraintSet (), ci, MOI. LessThan {Float64} (bound))
131+ # First-stage solve: minimize f₂: f₂ <= bound_1
132+ MOI. set (inner, MOI. ObjectiveFunction {typeof(f2)} (), f2)
133+ MOI. set (inner, MOI. ConstraintSet (), ci_1, MOI. LessThan (bound_1))
134+ MOI. set (inner, MOI. ConstraintSet (), ci_2, MOI. LessThan (yN - constant_2))
135+ optimize_inner! (model)
136+ if ! _is_scalar_status_optimal (model)
137+ break
138+ end
139+ # First-stage solve: minimize f₁: f₂ <= f₂^*
140+ f_2_star = MOI. get (inner, MOI. ObjectiveValue ()):: Float64
141+ MOI. set (inner, MOI. ObjectiveFunction {typeof(f1)} (), f1)
142+ bound_2 = f_2_star - constant_2
143+ MOI. set (inner, MOI. ConstraintSet (), ci_2, MOI. LessThan (bound_2))
126144 optimize_inner! (model)
127145 if ! _is_scalar_status_optimal (model)
128146 break
@@ -132,8 +150,9 @@ function minimize_multiobjective!(
132150 if isempty (solutions) || ! (Y ≈ solutions[end ]. y)
133151 push! (solutions, SolutionPoint (X, Y))
134152 end
135- bound = min (Y[1 ] - constant - ε, bound - ε)
153+ bound_1 = min (Y[1 ] - constant_1 - ε, bound_1 - ε)
136154 end
137- MOI. delete (model, ci)
155+ MOI. delete (inner, ci_1)
156+ MOI. delete (inner, ci_2)
138157 return status, solutions
139158end
0 commit comments