# Hierarchical multi-objective linear programming

**URL:** <https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump\
**Created:** [February 7, 2017, 2:14pm UTC](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957 "2017-02-07T14:14:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [February 7, 2017, 2:14pm UTC](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957/1 "2017-02-07T14:14:15Z")

</div>

Hierarchical (or lexicographic) multi-objective linear programming is when you have more than one linear objective, and you optimize them in order.

Gurobi’s documentation states that it supports this.

How can I do this in Julia, using any of the packages for linear programming (Gurobi.jl, MathProgBase, JuMP, etc.)? Do any of them offer a way to do this?

From the documentation I think that JuMP does not support hierarchical multi-objective linear programming… Will it be supported in the near future?

---

<div class="post-metadata">

**Author:** ![joehuchette](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joehuchette/32/32_2.png) [@joehuchette](https://discourse.julialang.org/u/joehuchette)\
**Post date:** [February 7, 2017, 2:22pm UTC](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957/2 "2017-02-07T14:22:24Z")

</div>

JuMP itself doesn’t support multiple objectives, and I don’t know of any extensions that add support either. I don’t think any of the core developers are likely to add this feature in the foreseeable future. However, it should be relatively straightforward to 1) build a JuMP extension for modeling multiple objectives, and 2) wrapping the necessary methods in the Gurobi C interface.

-Joey

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [February 7, 2017, 4:10pm UTC](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957/3 "2017-02-07T16:10:35Z")

</div>

@joehuchette I guess one has to start by adding this feature in Gurobi.jl. I’ll have to inspect the code and figure out where it should be done.

Right now I’m trying to do this “by hand” with JuMP. Basically, I am solving the first LP with the primary objective. Then I add a constrain to fix this to the optimal value, and optimize the secondary objective.

This approach seems to have numerical issues, since I am getting that the second optimization is infeasible (I know it isn’t). Any ideas of what I could do as a workaround?

---

<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 7, 2017, 7:31pm UTC](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957/4 "2017-02-07T19:31:48Z")

</div>

[https://github.com/anriseth/MultiJuMP.jl](https://github.com/anriseth/MultiJuMP.jl)

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [February 7, 2017, 8:15pm UTC](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957/5 "2017-02-07T20:15:00Z")

</div>

@odow It doesn’t seem to support hierarchical LP.

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [February 10, 2017, 2:04pm UTC](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957/6 "2017-02-10T14:04:09Z")

</div>

[https://github.com/JuliaOpt/Gurobi.jl/issues/82](https://github.com/JuliaOpt/Gurobi.jl/issues/82)

[https://github.com/JuliaOpt/Gurobi.jl/pull/86](https://github.com/JuliaOpt/Gurobi.jl/pull/86)

---

<div class="post-metadata">

**Author:** ![XavierG](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xavierg/32/1768_2.png) [@XavierG](https://discourse.julialang.org/u/XavierG)\
**Post date:** [August 2, 2017, 12:20pm UTC](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957/7 "2017-08-02T12:20:35Z")

</div>

Hi.

We are developping vOptSolver ([https://github.com/vOptSolver](https://github.com/vOptSolver)), and methods for the lexicographic optimization (for 2 and 3 linear objectives) will be available soon (we are testing and documenting the code now) with vOptGeneric ([GitHub - vOptSolver/vOptGeneric.jl: Solver of multiobjective linear optimization problems (MOMIP, MOLP, MOIP, MOCO): generic part](https://github.com/vOptSolver/vOptGeneric.jl)).

- modeling: JuMP has been extended to deal with multiple linear objectives
- solving: your favorite MILP solver callable by JuMP (it will be tested with GLPK and CPLEX)

Xavier

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [August 2, 2017, 12:45pm UTC](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957/8 "2017-08-02T12:45:57Z")

</div>

@XavierG Nice! Will you be able to handle hierarchical multiple objectives with GLPK? Because I think GLPK does not support this natively.

> [@XavierG](#):
>
> modeling: JuMP has been extended to deal with multiple linear objectives

You mean that a recent version of JuMP now supports multi-objectives? I did not find it.

---

<div class="post-metadata">

**Author:** ![XavierG](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xavierg/32/1768_2.png) [@XavierG](https://discourse.julialang.org/u/XavierG)\
**Post date:** [August 2, 2017, 1:30pm UTC](https://discourse.julialang.org/t/hierarchical-multi-objective-linear-programming/1957/9 "2017-08-02T13:30:22Z")

</div>

Indeed, with vOptGeneric, the user describes the MOIP model with JuMP, and solves it with a MILP embedded into an exact and classic MOP algorithm among:

- epsilon-constraint (=\> Y\_N : all non-dominated points)
- Chalmet algorithm (=\> Y\_N : all non-dominated points)
- dichotomic (Aneja-Nair algorithm) (=\> Y\_{SN} : all supported points)
- lexicographic method (=\> Y\_{Lex} : lex points)  
These algorithms make calls to the MILP.

We have modified JuMP; now multiple objectives may be defined and handled by the mentioned algorithms. See here for examples:

[https://github.com/vOptSolver/vOptSolver/blob/master/examples/examples.pdf](https://github.com/vOptSolver/vOptSolver/blob/master/examples/examples.pdf)  
[https://github.com/vOptSolver/vOptSolver/blob/master/talks/IFORS2017/ifors2017.pdf](https://github.com/vOptSolver/vOptSolver/blob/master/talks/IFORS2017/ifors2017.pdf)
