# Number of points in Pareto front

**URL:** <https://discourse.julialang.org/t/number-of-points-in-pareto-front/84741>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [July 25, 2022, 8:55am UTC](https://discourse.julialang.org/t/number-of-points-in-pareto-front/84741 "2022-07-25T08:55:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenr86](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chenr86/32/36785_2.png) [@chenr86](https://discourse.julialang.org/u/chenr86)\
**Post date:** [July 25, 2022, 8:55am UTC](https://discourse.julialang.org/t/number-of-points-in-pareto-front/84741/1 "2022-07-25T08:55:01Z")

</div>

Hello,

I’m using MultiJuMP.jl to solve a MOO problem with 2 objectives, f1 and f2. Here, f1 is a continuous function to minimize, f2 is an integer function to maximize.

When I post `model.pointsperdim = 10`, I got a pareto front with 10 points(in blue). Compared values of f1 for the same value of f2, the points linked with red line might be better. So I decrease the number of points to 7  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/4/94520f003b0567f87c6c8aedcbe04b50a60231b1.png)

The result with `model.pointsperdim = 7` is below, I got different result:  
 ![multim](https://global.discourse-cdn.com/julialang/original/3X/5/1/51aeb34ea1684d00651ad63ebf1929d2d06d2e88.png)

Again, with `model.pointsperdim = 5`, only 2 points in pareto front are catched:  
 ![multim_1res_5pts](https://global.discourse-cdn.com/julialang/original/3X/3/0/30459c0c639fd782db32e84ee499314f480376e0.png)  
Why this happens? How many points in pareto front are appropriate?

---

<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:** [July 25, 2022, 9:13am UTC](https://discourse.julialang.org/t/number-of-points-in-pareto-front/84741/2 "2022-07-25T09:13:47Z")

</div>

Hard to say without a reproducible example.

Are you sure you’re not trying to maximize the x axis and minimize the y axis?

---

<div class="post-metadata">

**Author:** ![chenr86](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chenr86/32/36785_2.png) [@chenr86](https://discourse.julialang.org/u/chenr86)\
**Post date:** [July 25, 2022, 9:21am UTC](https://discourse.julialang.org/t/number-of-points-in-pareto-front/84741/3 "2022-07-25T09:21:59Z")

</div>

Yes, I am sure with code below f1 should be min, f2 should be max

```julia
obj1 = SingleObjective(f1, sense = MOI.MIN_SENSE)
obj2 = SingleObjective(f2, sense = MOI.MAX_SENSE)

```

---

<div class="post-metadata">

**Author:** ![chenr86](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chenr86/32/36785_2.png) [@chenr86](https://discourse.julialang.org/u/chenr86)\
**Post date:** [July 26, 2022, 1:49am UTC](https://discourse.julialang.org/t/number-of-points-in-pareto-front/84741/4 "2022-07-26T01:49:57Z")

</div>

The result might due to the fact that the variables are not exactly integers. You can see in the table below, each column corresponds to one point in the pareto front plot. In my case, f2 is the sum of six elements(values for each row). As there are values of 0.99999999, f2 are not exactly equal to each other for the 5th point and the 6th point.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/f/6fb78c2489478dc603cef6b13ed1614ac4c24fb7.png)  
Why the value is not exactly binary? I have `@variable(model, time60[1:numtime], Bin)`

---

<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:** [July 26, 2022, 3:46am UTC](https://discourse.julialang.org/t/number-of-points-in-pareto-front/84741/5 "2022-07-26T03:46:56Z")

</div>

It’s hard to say anything without a reproducible example.

Note that no solver will produce values which are exactly integers; they all use some sort of tolerance to check whether the value is “integer.” In this case, values like 0.999999 are expected.

---

<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:** [July 28, 2022, 8:56am UTC](https://discourse.julialang.org/t/number-of-points-in-pareto-front/84741/6 "2022-07-28T08:56:11Z")

</div>

Hard to say anything without knowing your model. For 2-MILP, the efficient solutions in the decision space may correspond to (1) points, (2) closed segments, and (3) opened/closed segments in the objective space, and these non-dominated “points” are not connected in general (see e.g. [Multiple objective branch and bound for mixed 0-1 linear programming: Corrections and improvements for the biobjective case - ScienceDirect](https://www.sciencedirect.com/science/article/pii/S0305054812001682?casa_token=RBT0mQ4XddQAAAAA:I8Qdl9lX5oV4xuFd3bLqJpSg6hLGo-2NvrP-cMscCMShmg9A7Vu-vVzW3poOCioLEcw7Xvw-Nw)).
