# MultiObjectiveAlgorithms.jl (skipping infeasible solutions)

**URL:** <https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [February 17, 2025, 6:07pm UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003 "2025-02-17T18:07:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![saikrishna-nadella](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/saikrishna-nadella/32/215020_2.png) [@saikrishna-nadella](https://discourse.julialang.org/u/saikrishna-nadella)\
**Post date:** [February 17, 2025, 6:07pm UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003/1 "2025-02-17T18:07:24Z")

</div>

Hi,  
I am using MultiObjectiveAlgorithms.jl with EpsilonConstraint method. When a small number of SolutionLimit is used, it went well and pareto front could be obtained. But, when I increase SolutionLimit to higher values, the entire program stops at some iteration and says the model is infeasible. I think it is due to this part of code.

```julia
if !_is_scalar_status_optimal(model)
            break
        end

```

How to avoid stopping of the program due to infeasibility for a particular case? I mean, probably specific bound of objective function may not be achievable (I even doubt, why does it happen in an LP !?). That can be skipped, and rest of the solution space can be ventured to find other non-dominated solutions.

To further investigate the issue, is there any way to print the constraint generated in following line of code

`MOI.set(model, MOI.ConstraintSet(), ci, SetType(bound))`

I observed that lines 76 to 95 in EpsilonConstraint.jl determine objective bounds. Could you please tell, why a bound within this interval of objective function leads to infeasibility of the problem?

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [February 17, 2025, 6:19pm UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003/2 "2025-02-17T18:19:42Z")

</div>

Can ypu post a reproducible example of a model that this happens to?

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [February 17, 2025, 6:35pm UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003/3 "2025-02-17T18:35:25Z")

</div>

> [@saikrishna-nadella](#):
>
> the entire program stops at some iteration and says the model is infeasible

How did you check this? What is the final output of `solution_summary(model)`?

It might just be that we cannot find the `SolutionLimit` number of non-dominated points.

---

<div class="post-metadata">

**Author:** ![saikrishna-nadella](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/saikrishna-nadella/32/215020_2.png) [@saikrishna-nadella](https://discourse.julialang.org/u/saikrishna-nadella)\
**Post date:** [February 18, 2025, 2:48am UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003/4 "2025-02-18T02:48:02Z")

</div>

Hi,  
I have uploaded my code here. Sorry for not being able to produce smallest working example.

[saikrishna-nadella/MOO\_testingcode: For testing issues (https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003)](https://github.com/saikrishna-nadella/MOO_testingcode/)

The program is co-optimizing ‘total system cost’ and ‘emissions’ of a power system with some generators already present and new generators to be selected to meet the total demand.

It is clear that for very low ‘total system cost’, it may not be possible to meet the demand at any emission level. Similarly, for given system configuration it may not be possible to achieve very low ‘emissions’. I thought such issues would be resolved when objective bounds (left, right) are determined in EpsilonConstraint.jl. Am I missing something?

---

<div class="post-metadata">

**Author:** ![saikrishna-nadella](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/saikrishna-nadella/32/215020_2.png) [@saikrishna-nadella](https://discourse.julialang.org/u/saikrishna-nadella)\
**Post date:** [February 18, 2025, 2:50am UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003/5 "2025-02-18T02:50:55Z")

</div>

I did not silent the solver to just see what is it doing (for initial testing purpose). From the following output for test run, I understood that infeasibility is coming at 4th iteration. solution summary is also included therein.

```julia
Total energy demand is: 2.500080489880405e6 MWh
Problem
  Name :
  Objective sense : minimize        
  Type : LO (linear optimization problem)
  Constraints : 254057
  Affine conic cons. : 0
  Disjunctive cons. : 0
  Cones : 0
  Scalar variables : 122656
  Matrix variables : 0
  Integer variables : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 52562
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 8759
Eliminator terminated.
Eliminator - tries : 2 time : 0.00
Lin. dep. - tries : 1 time : 0.05
Lin. dep. - primal attempts : 1 successes : 1
Lin. dep. - dual attempts : 0 successes : 0
Lin. dep. - primal deps. : 0 dual deps. : 0
Presolve terminated. Time: 1.64
GP based matrix reordering started.
GP based matrix reordering terminated.
Optimizer - threads : 4
Optimizer - solved problem : the primal      
Optimizer - Constraints : 143563
Optimizer - Cones : 0
Optimizer - Scalar variables : 225806 conic : 0
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 4.69
Factor - dense det. time : 0.09 GP order time : 3.36
Factor - nonzeros before factor : 8.34e+05 after factor : 1.34e+06
Factor - dense dim. : 8 flops : 2.16e+07
Factor - GP saved nzs : -1927 GP saved flops : 2.02e+05
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.3e+05 2.2e+03 2.4e+06 0.00e+00 2.487605236e+06 8.356159816e+04 1.9e+01 7.22
1 1.0e+05 1.8e+03 1.9e+06 -5.70e-01 2.173969598e+06 4.376815586e+04 1.6e+01 7.83
2 7.5e+04 1.3e+03 1.4e+06 5.15e-01 1.608958278e+06 2.288554775e+05 1.1e+01 8.44
3 6.1e+04 1.0e+03 1.1e+06 1.21e+00 1.267642033e+06 2.672454728e+05 9.1e+00 9.12
4 6.1e+04 1.0e+03 1.1e+06 8.80e-01 1.596049478e+06 4.042101170e+05 9.1e+00 9.67
5 6.1e+04 1.0e+03 1.1e+06 1.20e+00 1.584598353e+06 4.194065431e+05 9.1e+00 10.56
6 3.9e+04 6.6e+02 7.3e+05 1.14e+00 1.161296180e+06 5.020797952e+05 5.8e+00 11.52 
7 3.9e+04 6.6e+02 7.3e+05 1.27e+00 1.134982756e+06 4.605911794e+05 5.8e+00 12.22 
8 2.9e+04 5.0e+02 5.5e+05 1.31e+00 9.531343303e+05 4.835872356e+05 4.4e+00 12.78 
9 2.3e+04 3.9e+02 4.3e+05 1.32e+00 8.566982159e+05 5.086402325e+05 3.5e+00 13.50 
10 1.5e+04 2.6e+02 2.9e+05 1.34e+00 7.456848046e+05 5.384617494e+05 2.3e+00 14.27 
11 1.5e+04 2.6e+02 2.9e+05 1.30e+00 7.784263086e+05 5.586494844e+05 2.3e+00 14.78 
12 9.1e+03 1.6e+02 1.7e+05 1.38e+00 6.994242772e+05 5.812660820e+05 1.4e+00 15.89 
13 6.0e+03 1.0e+02 1.1e+05 1.27e+00 6.633440303e+05 5.905184662e+05 8.9e-01 17.16 
14 3.9e+03 6.6e+01 7.3e+04 1.19e+00 6.415390189e+05 5.959103141e+05 5.8e-01 18.08 
15 3.9e+03 6.6e+01 7.3e+04 1.11e+00 6.462403446e+05 5.995111839e+05 5.8e-01 18.83 
16 2.1e+03 3.5e+01 3.9e+04 1.12e+00 6.277837661e+05 6.034735220e+05 3.1e-01 19.42 
17 1.0e+03 1.8e+01 1.9e+04 1.07e+00 6.175236778e+05 6.056303808e+05 1.6e-01 19.94 
18 5.4e+02 9.2e+00 1.0e+04 1.04e+00 6.128290304e+05 6.066740657e+05 8.1e-02 20.50 
19 3.1e+02 5.2e+00 5.8e+03 1.02e+00 6.106433365e+05 6.071737200e+05 4.6e-02 21.05 
20 2.0e+02 3.4e+00 3.7e+03 1.01e+00 6.096531522e+05 6.074002119e+05 3.0e-02 21.45 
21 1.4e+02 2.3e+00 2.6e+03 1.01e+00 6.090723392e+05 6.075322575e+05 2.0e-02 21.97 
22 9.0e+01 1.5e+00 1.7e+03 1.01e+00 6.086412636e+05 6.076306036e+05 1.3e-02 22.55 
23 6.4e+01 1.1e+00 1.2e+03 1.00e+00 6.084059036e+05 6.076847495e+05 9.6e-03 23.28 
24 4.4e+01 7.6e-01 8.3e+02 1.00e+00 6.082257441e+05 6.077263461e+05 6.7e-03 24.11 
25 2.6e+01 4.4e-01 4.9e+02 1.00e+00 6.080579370e+05 6.077655587e+05 3.9e-03 24.88 
26 2.0e+01 3.4e-01 3.8e+02 1.00e+00 6.080050323e+05 6.077783124e+05 3.0e-03 25.73 
27 1.2e+01 2.0e-01 2.2e+02 1.00e+00 6.079276416e+05 6.077968580e+05 1.7e-03 26.50 
28 9.5e+00 1.6e-01 1.8e+02 1.00e+00 6.079083412e+05 6.078015653e+05 1.4e-03 27.12 
29 6.6e+00 1.1e-01 1.2e+02 1.00e+00 6.078821626e+05 6.078079433e+05 9.9e-04 27.97 
30 2.5e+00 4.2e-02 4.6e+01 1.00e+00 6.078445494e+05 6.078169005e+05 3.7e-04 28.48 
31 1.4e+00 2.4e-02 2.6e+01 1.00e+00 6.078347918e+05 6.078191760e+05 2.1e-04 28.77 
32 5.2e-01 8.8e-03 9.7e+00 1.00e+00 6.078268334e+05 6.078209955e+05 7.8e-05 29.05 
33 3.1e-01 5.3e-03 5.8e+00 1.00e+00 6.078249071e+05 6.078214323e+05 4.6e-05 29.31 
34 2.2e-01 3.7e-03 4.1e+00 1.00e+00 6.078240576e+05 6.078216247e+05 3.2e-05 29.55 
35 8.9e-02 1.5e-03 1.7e+00 1.00e+00 6.078228900e+05 6.078218879e+05 1.3e-05 29.84 
36 7.8e-02 1.3e-03 1.5e+00 1.00e+00 6.078227887e+05 6.078219108e+05 1.2e-05 30.11 
37 4.3e-02 7.3e-04 8.0e-01 1.00e+00 6.078224652e+05 6.078219835e+05 6.4e-06 30.39 
38 3.0e-02 5.1e-04 5.6e-01 1.00e+00 6.078223475e+05 6.078220094e+05 4.5e-06 30.89 
39 1.7e-02 2.9e-04 3.2e-01 1.00e+00 6.078222260e+05 6.078220363e+05 2.5e-06 31.22 
40 1.0e-02 1.8e-04 1.9e-01 1.00e+00 6.078221658e+05 6.078220496e+05 1.5e-06 31.95 
41 6.2e-03 1.1e-04 1.2e-01 1.00e+00 6.078221282e+05 6.078220579e+05 9.4e-07 32.67 
42 3.6e-03 6.2e-05 6.9e-02 1.00e+00 6.078221042e+05 6.078220631e+05 5.5e-07 33.12 
43 2.3e-03 3.9e-05 4.3e-02 1.00e+00 6.078220919e+05 6.078220659e+05 3.5e-07 33.38 
44 1.3e-03 2.2e-05 2.4e-02 1.00e+00 6.078220824e+05 6.078220679e+05 1.9e-07 33.66 
45 8.0e-04 1.4e-05 1.5e-02 1.00e+00 6.078220779e+05 6.078220689e+05 1.2e-07 34.02 
46 4.9e-04 8.3e-06 9.2e-03 1.00e+00 6.078220750e+05 6.078220695e+05 7.3e-08 34.47 
47 2.4e-04 4.1e-06 4.5e-03 1.00e+00 6.078220728e+05 6.078220700e+05 3.6e-08 34.97 
48 1.3e-04 2.2e-06 2.4e-03 1.00e+00 6.078220717e+05 6.078220703e+05 1.9e-08 35.38 
49 6.7e-05 1.1e-06 1.3e-03 1.00e+00 6.078220712e+05 6.078220704e+05 1.0e-08 35.84 
50 3.8e-05 6.6e-07 7.4e-04 1.00e+00 6.078220709e+05 6.078220704e+05 5.8e-09 36.12 
51 2.4e-05 4.1e-07 4.6e-04 1.00e+00 6.078220707e+05 6.078220705e+05 3.6e-09 36.42 
52 1.3e-05 2.3e-07 2.6e-04 1.00e+00 6.078220706e+05 6.078220705e+05 2.0e-09 36.73 
53 7.2e-06 1.2e-07 1.4e-04 1.00e+00 6.078220706e+05 6.078220705e+05 1.1e-09 37.00 
54 4.8e-06 8.1e-08 9.2e-05 1.00e+00 6.078220706e+05 6.078220705e+05 7.1e-10 37.44 
55 1.8e-06 3.1e-08 4.9e-05 1.00e+00 6.078220705e+05 6.078220705e+05 2.7e-10 38.97 
56 3.2e-06 1.3e-08 1.7e-05 1.00e+00 6.078220705e+05 6.078220705e+05 1.1e-10 40.23 
57 3.2e-06 1.3e-08 1.7e-05 1.00e+00 6.078220705e+05 6.078220705e+05 1.1e-10 41.94 
58 2.6e-06 9.8e-09 1.3e-05 1.00e+00 6.078220705e+05 6.078220705e+05 8.9e-11 43.75 
Basis identification started.
Primal basis identification phase started.
Primal basis identification phase terminated. Time: 3.66
Dual basis identification phase started.
Dual basis identification phase terminated. Time: 1.42
Simplex reoptimization started.
Primal simplex reoptimization started.
ITER DEGITER(%) PFEAS DFEAS POBJ DOBJ TIME
0 0.00 1.15e+08 NA 6.071663880421e+05 NA 0.05    
2500 17.67 1.64e+02 NA 5.957916504554e+05 NA 11.39   
5000 16.34 0.00e+00 NA 6.091009271373e+05 NA 22.80   
7500 11.20 0.00e+00 NA 6.079273553597e+05 NA 28.44   
10000 8.64 0.00e+00 NA 6.078515448069e+05 NA 31.95   
12500 8.34 0.00e+00 NA 6.078261409560e+05 NA 38.75   
15000 9.53 0.00e+00 NA 6.078220920118e+05 NA 46.36   
17500 9.18 0.00e+00 NA 6.078220722011e+05 NA 49.53   
18187 9.22 0.00e+00 NA 6.078220705189e+05 NA 51.55   
Primal simplex reoptimization terminated. Time: 51.55   
Simplex reoptimization terminated. Time: 51.67
Basis identification terminated. Time: 57.53
Optimizer terminated. Time: 101.48  

Problem
  Name :
  Objective sense : minimize
  Type : LO (linear optimization problem)
  Constraints : 254057
  Affine conic cons. : 0
  Disjunctive cons. : 0
  Cones : 0
  Scalar variables : 122656
  Matrix variables : 0
  Integer variables : 0

Optimizer started.
Optimizer terminated. Time: 3.77    

Problem
  Name :
  Objective sense : minimize
  Type : LO (linear optimization problem)
  Constraints : 254057
  Affine conic cons. : 0
  Disjunctive cons. : 0
  Cones : 0
  Scalar variables : 122656
  Matrix variables : 0
  Integer variables : 0

Optimizer started.
Simplex reoptimization started.
Primal simplex reoptimization started.
ITER DEGITER(%) PFEAS DFEAS POBJ DOBJ TIME
0 0.00 1.15e+08 NA 6.071663880421e+05 NA 0.06    
2500 17.67 1.64e+02 NA 5.957916504554e+05 NA 7.83    
5000 16.34 0.00e+00 NA 6.091009271373e+05 NA 17.86   
7500 11.20 0.00e+00 NA 6.079273553597e+05 NA 23.34   
10000 8.64 0.00e+00 NA 6.078515448069e+05 NA 26.75   
12500 8.34 0.00e+00 NA 6.078261409560e+05 NA 33.03   
15000 9.53 0.00e+00 NA 6.078220920118e+05 NA 40.25   
17500 9.18 0.00e+00 NA 6.078220722011e+05 NA 43.44   
18187 9.22 0.00e+00 NA 6.078220705189e+05 NA 45.45   
Primal simplex reoptimization terminated. Time: 45.45   
Simplex reoptimization terminated. Time: 45.52
Optimizer terminated. Time: 63.86   

Problem
  Name :
  Objective sense : minimize
  Type : LO (linear optimization problem)
  Constraints : 254058
  Affine conic cons. : 0
  Disjunctive cons. : 0
  Cones : 0
  Scalar variables : 122656
  Matrix variables : 0
  Integer variables : 0

Optimizer started.
Simplex reoptimization started.
Primal simplex reoptimization started.
ITER DEGITER(%) PFEAS DFEAS POBJ DOBJ TIME
0 0.00 2.38e+00 NA 1.146008666778e+06 NA 0.03    
0 0.00 2.38e+00 NA 1.146008666778e+06 NA 0.06    
Primal simplex reoptimization terminated. Time: 0.06    
Simplex reoptimization terminated. Time: 0.16
Optimizer terminated. Time: 49.50

* Solver : MOA[algorithm=MultiObjectiveAlgorithms.EpsilonConstraint, optimizer=Mosek]

* Status
  Result count : 0
* Status
  Result count : 0
  Result count : 0
  Termination status : INFEASIBLE
  Message from the solver:
  "Solve complete. Found 0 solution(s)"

* Candidate solution (result #1)
  Primal status : NO_SOLUTION
  Dual status : NO_SOLUTION
  Objective bound : [6.07822e+05,7.31493e+05]

* Work counters
  Solve time (sec) : 2.31002e+02

0

```

In EpsilonConstraint.jl, I could not understand whether the left and right bounds determined avoid infeasibility cases. A possible alternative way to avoid infeasibility is to providing objective bounds (left, right) by us as input.

I tried reversing the objective functions order. But, got same problem in 3rd iteration.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [February 18, 2025, 4:02am UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003/6 "2025-02-18T04:02:09Z")

</div>

I don’t really have a good answer for you. This is erroring before it even gets to the epsilon constraint because of numerical issues. But when I look at your model, nothing really stands out as being problematic. I think this model needs [Tools to test and debug JuMP models · Issue #3664 · jump-dev/JuMP.jl · GitHub](https://github.com/jump-dev/JuMP.jl/issues/3664) (cc @joaquimg)

It’s a very unusual model. I don’t have a Mosek license, so I can’t reproduce this. But here’s what Gurobi does:

The first solution is to minimize total cost. Then, it tries to fix the total cost and minimize CO2. Gurobi tries to be clever, so it warm-starts the solve from the previous solution. Except that solution is an exceedingly bad starting point.

```Julia
Gurobi Optimizer version 12.0.0 build v12.0.0rc1 (mac64[x86] - Darwin 24.1.0 24B83)

CPU model: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Thread count: 4 physical cores, 8 logical processors, using up to 8 threads

Optimize a model with 254059 rows, 122658 columns and 730504 nonzeros
Coefficient statistics:
  Matrix range [6e-05, 9e+02]
  Objective range [1e+00, 1e+00]
  Bounds range [0e+00, 0e+00]
  RHS range [7e+00, 3e+05]
LP warm-start: use basis

Iteration Objective Primal Inf. Dual Inf. Time
       0 -6.4875105e+34 3.561665e+36 6.487511e+04 0s
    2040 -5.4801631e+34 9.304666e+35 7.014609e+06 5s
    3850 -4.4166311e+34 9.184955e+35 5.653288e+06 10s

```

I got limited success by forcing Gurobi to use Barrier:

```Julia
set_optimizer(
    new_model,
    () -> MOA.Optimizer(
        optimizer_with_attributes(Gurobi.Optimizer, "Method" => 2 #=Barrier=#),
    ),
)

```

But I still eventually ran into numerical trouble:

```julia
Iteration Objective Primal Inf. Dual Inf. Time
   24806 1.1460087e+06 0.000000e+00 4.056194e+04 29s
Warning: very big Kappa = 3.80068e+12, try parameter NumericFocus

Solved in 24986 iterations and 29.19 seconds (22.95 work units)
Infeasible or unbounded model

User-callback calls 76075, time in user-callback 0.02 sec

```

which results in

```Julia
julia> solution_summary(new_model)
* Solver : MOA[algorithm=MultiObjectiveAlgorithms.EpsilonConstraint, optimizer=Gurobi]

* Status
  Result count : 0
  Termination status : INFEASIBLE_OR_UNBOUNDED
  Message from the solver:
  "Solve complete. Found 0 solution(s)"

* Candidate solution (result #1)
  Primal status : NO_SOLUTION
  Dual status : NO_SOLUTION
  Objective bound : [6.07822e+05,7.31493e+05]

* Work counters
  Solve time (sec) : 8.50202e+01

```

Same thing when I used `LPWarmStart`: `optimizer_with_attributes(Gurobi.Optimizer, "LPWarmStart" => 0),`

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [February 18, 2025, 4:47am UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003/7 "2025-02-18T04:47:11Z")

</div>

Okay. I got something that worked: But Gurobi still struggled on a number of the iterates. (The five subproblems took 20, 5, 276, 85, and 142 seconds to solve)

```julia
set_optimizer(
    new_model,
    () -> MOA.Optimizer(
        optimizer_with_attributes(Gurobi.Optimizer, "LPWarmStart" => 0),
    ),
)
set_attribute(new_model, MOA.Algorithm(), MOA.Dichotomy())
set_attribute(new_model, MOA.SolutionLimit(), 5)
optimize!(new_model)

julia> solution_summary(new_model)
* Solver : MOA[algorithm=MultiObjectiveAlgorithms.Dichotomy, optimizer=Gurobi]

* Status
  Result count : 5
  Termination status : OPTIMAL
  Message from the solver:
  "Solve complete. Found 5 solution(s)"

* Candidate solution (result #1)
  Primal status : FEASIBLE_POINT
  Dual status : NO_SOLUTION
  Objective value : [6.07822e+05,1.14601e+06]
  Objective bound : [6.07822e+05,7.31493e+05]

* Work counters
  Solve time (sec) : 6.83438e+02

```

---

<div class="post-metadata">

**Author:** ![saikrishna-nadella](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/saikrishna-nadella/32/215020_2.png) [@saikrishna-nadella](https://discourse.julialang.org/u/saikrishna-nadella)\
**Post date:** [February 18, 2025, 3:37pm UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003/8 "2025-02-18T15:37:48Z")

</div>

Hi @odow,  
Thank you for your inputs. The model was initially used extensively with single objective (Total cost) and emissions declared as a constraint. In that setting, the model works well and converges to optimality. If I need to make a pareto-front, two choices I have.

1. Put the entire program in a for-loop and keep changing RHS of emissions constraint and repeat,
2. Put emissions as a second objective in MOO framework and use some algorithm like epsilon-constraint.

I just tried option 2 to explore how it works.

Thank you so much for sharing the link to ‘Tools to test and debug JuMP models’. I could see lot of insights to come from that discussion. I will go through it thoroughly.

Is there any way to print the left, right bounds obtained in EpsilonConstraint.jl and also the constraint generated in each iteration by following line?

```julia
MOI.set(model, MOI.ConstraintSet(), ci, SetType(bound))

```

> This is erroring before it even gets to the epsilon constraint because of numerical issues.

It is interesting to know that solver didn’t enter yet to EpsilonConstraint for-loop in the example discussed.

> Its a very unusual model.

Can you please elaborate on ‘unusual’?

When I use Dichotomy(), with

```julia
set_optimizer(model, () -> MOA.Optimizer(optimizer_with_attributes(Mosek.Optimizer, "SIM_HOTSTART" => Mosek.MSK_SIM_HOTSTART_NONE)))

```

I get following error at 7th iteration (including 2 initial iterations to find objective bounds)

```julia
Total energy demand is: 2.500080489880405e6 MWh
Problem
  Name :
  Objective sense : minimize        
  Type : LO (linear optimization problem)
  Constraints : 254057
  Affine conic cons. : 0
  Disjunctive cons. : 0
  Cones : 0
  Scalar variables : 122656
  Matrix variables : 0
  Integer variables : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 52562
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 8759
Eliminator terminated.
Eliminator - tries : 2 time : 0.00
Lin. dep. - tries : 1 time : 0.06
Lin. dep. - primal attempts : 1 successes : 1
Lin. dep. - dual attempts : 0 successes : 0
Lin. dep. - primal deps. : 0 dual deps. : 0
Presolve terminated. Time: 0.59
GP based matrix reordering started.
GP based matrix reordering terminated.
Optimizer - threads : 4
Optimizer - solved problem : the primal      
Optimizer - Constraints : 143563
Optimizer - Cones : 0
Optimizer - Scalar variables : 225806 conic : 0
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 1.88
Factor - dense det. time : 0.05 GP order time : 1.25
Factor - nonzeros before factor : 8.34e+05 after factor : 1.34e+06
Factor - dense dim. : 8 flops : 2.16e+07
Factor - GP saved nzs : -1927 GP saved flops : 2.02e+05
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.3e+05 2.2e+03 2.4e+06 0.00e+00 2.487605236e+06 8.356159816e+04 1.9e+01 2.75
1 1.0e+05 1.8e+03 1.9e+06 -5.70e-01 2.173969598e+06 4.376815586e+04 1.6e+01 2.98  
2 7.5e+04 1.3e+03 1.4e+06 5.15e-01 1.608958278e+06 2.288554775e+05 1.1e+01 3.19  
3 6.1e+04 1.0e+03 1.1e+06 1.21e+00 1.267642033e+06 2.672454728e+05 9.1e+00 3.39  
4 6.1e+04 1.0e+03 1.1e+06 8.80e-01 1.596049478e+06 4.042101170e+05 9.1e+00 3.58  
5 6.1e+04 1.0e+03 1.1e+06 1.20e+00 1.584598353e+06 4.194065431e+05 9.1e+00 3.78  
6 3.9e+04 6.6e+02 7.3e+05 1.14e+00 1.161296180e+06 5.020797952e+05 5.8e+00 4.08  
7 3.9e+04 6.6e+02 7.3e+05 1.27e+00 1.134982756e+06 4.605911794e+05 5.8e+00 4.28  
8 2.9e+04 5.0e+02 5.5e+05 1.31e+00 9.531343303e+05 4.835872356e+05 4.4e+00 4.64  
9 2.3e+04 3.9e+02 4.3e+05 1.32e+00 8.566982159e+05 5.086402325e+05 3.5e+00 5.02  
10 1.5e+04 2.6e+02 2.9e+05 1.34e+00 7.456848046e+05 5.384617494e+05 2.3e+00 5.47  
11 1.5e+04 2.6e+02 2.9e+05 1.30e+00 7.784263086e+05 5.586494844e+05 2.3e+00 5.84  
12 9.1e+03 1.6e+02 1.7e+05 1.38e+00 6.994242772e+05 5.812660820e+05 1.4e+00 6.27  
13 6.0e+03 1.0e+02 1.1e+05 1.27e+00 6.633440303e+05 5.905184662e+05 8.9e-01 6.67  
14 3.9e+03 6.6e+01 7.3e+04 1.19e+00 6.415390189e+05 5.959103141e+05 5.8e-01 6.89  
15 3.9e+03 6.6e+01 7.3e+04 1.11e+00 6.462403446e+05 5.995111839e+05 5.8e-01 7.09  
16 2.1e+03 3.5e+01 3.9e+04 1.12e+00 6.277837661e+05 6.034735220e+05 3.1e-01 7.27  
17 1.0e+03 1.8e+01 1.9e+04 1.07e+00 6.175236778e+05 6.056303808e+05 1.6e-01 7.47  
18 5.4e+02 9.2e+00 1.0e+04 1.04e+00 6.128290304e+05 6.066740657e+05 8.1e-02 7.69  
19 3.1e+02 5.2e+00 5.8e+03 1.02e+00 6.106433365e+05 6.071737200e+05 4.6e-02 7.89  
20 2.0e+02 3.4e+00 3.7e+03 1.01e+00 6.096531522e+05 6.074002119e+05 3.0e-02 8.09  
21 1.4e+02 2.3e+00 2.6e+03 1.01e+00 6.090723392e+05 6.075322575e+05 2.0e-02 8.30  
22 9.0e+01 1.5e+00 1.7e+03 1.01e+00 6.086412636e+05 6.076306036e+05 1.3e-02 8.50  
23 6.4e+01 1.1e+00 1.2e+03 1.00e+00 6.084059036e+05 6.076847495e+05 9.6e-03 8.70  
24 4.4e+01 7.6e-01 8.3e+02 1.00e+00 6.082257441e+05 6.077263461e+05 6.7e-03 8.91  
25 2.6e+01 4.4e-01 4.9e+02 1.00e+00 6.080579370e+05 6.077655587e+05 3.9e-03 9.11  
26 2.0e+01 3.4e-01 3.8e+02 1.00e+00 6.080050323e+05 6.077783124e+05 3.0e-03 9.31  
27 1.2e+01 2.0e-01 2.2e+02 1.00e+00 6.079276416e+05 6.077968580e+05 1.7e-03 9.52  
28 9.5e+00 1.6e-01 1.8e+02 1.00e+00 6.079083412e+05 6.078015653e+05 1.4e-03 9.70  
29 6.6e+00 1.1e-01 1.2e+02 1.00e+00 6.078821626e+05 6.078079433e+05 9.9e-04 9.91  
30 2.5e+00 4.2e-02 4.6e+01 1.00e+00 6.078445494e+05 6.078169005e+05 3.7e-04 10.16 
31 1.4e+00 2.4e-02 2.6e+01 1.00e+00 6.078347918e+05 6.078191760e+05 2.1e-04 10.55 
32 5.2e-01 8.8e-03 9.7e+00 1.00e+00 6.078268334e+05 6.078209955e+05 7.8e-05 11.00 
33 3.1e-01 5.3e-03 5.8e+00 1.00e+00 6.078249071e+05 6.078214323e+05 4.6e-05 11.39 
34 2.2e-01 3.7e-03 4.1e+00 1.00e+00 6.078240576e+05 6.078216247e+05 3.2e-05 11.78 
35 8.9e-02 1.5e-03 1.7e+00 1.00e+00 6.078228900e+05 6.078218879e+05 1.3e-05 12.20 
36 7.8e-02 1.3e-03 1.5e+00 1.00e+00 6.078227887e+05 6.078219108e+05 1.2e-05 12.47 
37 4.3e-02 7.3e-04 8.0e-01 1.00e+00 6.078224652e+05 6.078219835e+05 6.4e-06 12.69 
38 3.0e-02 5.1e-04 5.6e-01 1.00e+00 6.078223475e+05 6.078220094e+05 4.5e-06 12.88 
39 1.7e-02 2.9e-04 3.2e-01 1.00e+00 6.078222260e+05 6.078220363e+05 2.5e-06 13.08 
40 1.0e-02 1.8e-04 1.9e-01 1.00e+00 6.078221658e+05 6.078220496e+05 1.5e-06 13.28 
41 6.2e-03 1.1e-04 1.2e-01 1.00e+00 6.078221282e+05 6.078220579e+05 9.4e-07 13.48 
42 3.6e-03 6.2e-05 6.9e-02 1.00e+00 6.078221042e+05 6.078220631e+05 5.5e-07 13.67 
43 2.3e-03 3.9e-05 4.3e-02 1.00e+00 6.078220919e+05 6.078220659e+05 3.5e-07 13.86 
44 1.3e-03 2.2e-05 2.4e-02 1.00e+00 6.078220824e+05 6.078220679e+05 1.9e-07 14.08 
45 8.0e-04 1.4e-05 1.5e-02 1.00e+00 6.078220779e+05 6.078220689e+05 1.2e-07 14.25 
46 4.9e-04 8.3e-06 9.2e-03 1.00e+00 6.078220750e+05 6.078220695e+05 7.3e-08 14.45 
47 2.4e-04 4.1e-06 4.5e-03 1.00e+00 6.078220728e+05 6.078220700e+05 3.6e-08 14.66 
48 1.3e-04 2.2e-06 2.4e-03 1.00e+00 6.078220717e+05 6.078220703e+05 1.9e-08 14.86 
49 6.7e-05 1.1e-06 1.3e-03 1.00e+00 6.078220712e+05 6.078220704e+05 1.0e-08 15.06 
50 3.8e-05 6.6e-07 7.4e-04 1.00e+00 6.078220709e+05 6.078220704e+05 5.8e-09 15.27 
51 2.4e-05 4.1e-07 4.6e-04 1.00e+00 6.078220707e+05 6.078220705e+05 3.6e-09 15.47 
52 1.3e-05 2.3e-07 2.6e-04 1.00e+00 6.078220706e+05 6.078220705e+05 2.0e-09 15.67 
53 7.2e-06 1.2e-07 1.4e-04 1.00e+00 6.078220706e+05 6.078220705e+05 1.1e-09 15.88 
54 4.8e-06 8.1e-08 9.2e-05 1.00e+00 6.078220706e+05 6.078220705e+05 7.1e-10 16.28 
55 1.8e-06 3.1e-08 4.9e-05 1.00e+00 6.078220705e+05 6.078220705e+05 2.7e-10 17.06 
56 3.2e-06 1.3e-08 1.7e-05 1.00e+00 6.078220705e+05 6.078220705e+05 1.1e-10 17.59 
57 3.2e-06 1.3e-08 1.7e-05 1.00e+00 6.078220705e+05 6.078220705e+05 1.1e-10 18.11 
58 2.6e-06 9.8e-09 1.3e-05 1.00e+00 6.078220705e+05 6.078220705e+05 8.9e-11 18.53 
Basis identification started.
Primal basis identification phase started.
Primal basis identification phase terminated. Time: 1.05
Dual basis identification phase started.
Dual basis identification phase terminated. Time: 0.58
Simplex reoptimization started.
Primal simplex reoptimization started.
ITER DEGITER(%) PFEAS DFEAS POBJ DOBJ TIME
0 0.00 1.15e+08 NA 6.071663880421e+05 NA 0.03    
2500 17.67 1.64e+02 NA 5.957916504554e+05 NA 6.88    
5000 16.34 0.00e+00 NA 6.091009271373e+05 NA 16.61   
7500 11.20 0.00e+00 NA 6.079273553597e+05 NA 21.72   
10000 8.64 0.00e+00 NA 6.078515448069e+05 NA 25.14   
12500 8.34 0.00e+00 NA 6.078261409560e+05 NA 31.42   
15000 9.53 0.00e+00 NA 6.078220920118e+05 NA 38.58   
17500 9.18 0.00e+00 NA 6.078220722011e+05 NA 41.75   
18187 9.22 0.00e+00 NA 6.078220705189e+05 NA 43.75   
Primal simplex reoptimization terminated. Time: 43.75   
Simplex reoptimization terminated. Time: 43.81
Basis identification terminated. Time: 45.83
Optimizer terminated. Time: 64.44   

Problem
  Name :
  Objective sense : minimize
  Type : LO (linear optimization problem)
  Constraints : 254057
  Affine conic cons. : 0
  Disjunctive cons. : 0
  Cones : 0
  Scalar variables : 122656
  Matrix variables : 0
  Integer variables : 0

Optimizer started.
Optimizer terminated. Time: 4.78    

Problem
  Name :
  Objective sense : minimize
  Type : LO (linear optimization problem)
  Constraints : 254057
  Affine conic cons. : 0
  Disjunctive cons. : 0
  Cones : 0
  Scalar variables : 122656
  Matrix variables : 0
  Integer variables : 0

Optimizer started.
Optimizer terminated. Time: 4.80    

Problem
  Name :
  Objective sense : minimize
  Type : LO (linear optimization problem)
  Constraints : 254057
  Affine conic cons. : 0
  Disjunctive cons. : 0
  Cones : 0
  Scalar variables : 122656
  Matrix variables : 0
  Integer variables : 0

Optimizer started.
Simplex reoptimization started.
Primal simplex reoptimization started.
ITER DEGITER(%) PFEAS DFEAS POBJ DOBJ TIME
0 0.00 1.15e+08 NA 6.071663880421e+05 NA 0.02    
2500 17.67 1.64e+02 NA 5.957916504554e+05 NA 8.14    
5000 16.34 0.00e+00 NA 6.091009271373e+05 NA 17.84   
7500 11.20 0.00e+00 NA 6.079273553597e+05 NA 23.59   
10000 8.64 0.00e+00 NA 6.078515448069e+05 NA 28.03   
12500 8.34 0.00e+00 NA 6.078261409560e+05 NA 35.56   
15000 9.53 0.00e+00 NA 6.078220920118e+05 NA 42.59   
17500 9.18 0.00e+00 NA 6.078220722011e+05 NA 45.83   
18187 9.22 0.00e+00 NA 6.078220705189e+05 NA 47.75   
Primal simplex reoptimization terminated. Time: 47.75   
Simplex reoptimization terminated. Time: 47.88
Optimizer terminated. Time: 70.11   

Problem
  Name :
  Objective sense : minimize
  Type : LO (linear optimization problem)
  Constraints : 254057
  Affine conic cons. : 0
  Disjunctive cons. : 0
  Cones : 0
  Scalar variables : 122656
  Matrix variables : 0
  Integer variables : 0

Optimizer started.
Simplex reoptimization started.
Dual simplex reoptimization started.
ITER DEGITER(%) PFEAS DFEAS POBJ DOBJ TIME
0 0.00 NA 0.00e+00 NA 7.314393670557e+05 0.02
404 99.75 NA 0.00e+00 NA 7.314393670914e+05 1.62    
Dual simplex reoptimization terminated. Time: 1.62    
Simplex reoptimization terminated. Time: 1.70
Optimizer terminated. Time: 19.69   

Problem
  Name :
  Objective sense : minimize
  Type : LO (linear optimization problem)
  Constraints : 254057
  Affine conic cons. : 0
  Disjunctive cons. : 0
  Cones : 0
  Scalar variables : 122656
  Matrix variables : 0
  Integer variables : 0

Optimizer started.
Optimizer terminated. Time: 4.78    

Problem
  Name :
  Objective sense : minimize
  Type : LO (linear optimization problem)
  Constraints : 254057
  Affine conic cons. : 0
  Disjunctive cons. : 0
  Cones : 0
  Scalar variables : 122656
  Matrix variables : 0
  Integer variables : 0

Optimizer started.
Simplex reoptimization started.
Primal simplex reoptimization started.
ITER DEGITER(%) PFEAS DFEAS POBJ DOBJ TIME
0 0.00 5.66e+160 NA nan NA 0.03
6 0.00 5.66e+160 NA nan NA 0.05    
Primal simplex reoptimization terminated. Time: 0.05    
Simplex reoptimization terminated. Time: 0.09
Optimizer terminated. Time: 25.36   

ERROR: Mosek.MosekError(3100, "")

```

As per Mosek documentation, it means,

> A step size in an optimizer was unexpectedly unbounded. For instance, if the step-size becomes unbounded in phase 1 of the simplex algorithm then an error occurs. Normally this will happen only if the problem is badly formulated. Please contact MOSEK support if this error occurs.

If I use EpsilonConstraint with HOTSTART disabled also, the result is similar to the initial post

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [February 18, 2025, 11:45pm UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003/9 "2025-02-18T23:45:30Z")

</div>

(1) is exactly what the `EpsilonConstraint` method does. You’ll likely run into the same issue as you are here.

> Is there any way to print the left, right bounds

Nope

> Can you please elaborate on ‘unusual’?

Each objective is relatively easy to solve, but a convex combination of them is difficult and leads to numerical issues.

> As per Mosek documentation, it means,

This is just the numerical issue thing again. There is something “wrong” with the formulation of your model when the objective is a weighted sum of the two objectives. But it’s hard to know why.

---

<div class="post-metadata">

**Author:** ![saikrishna-nadella](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/saikrishna-nadella/32/215020_2.png) [@saikrishna-nadella](https://discourse.julialang.org/u/saikrishna-nadella)\
**Post date:** [February 19, 2025, 4:32pm UTC](https://discourse.julialang.org/t/multiobjectivealgorithms-jl-skipping-infeasible-solutions/126003/10 "2025-02-19T16:32:16Z")

</div>

Thank you 🤝
