anriseth / MultiJuMP.jl

MultiJuMP enables the user to easily run multiobjective optimisation problems and generate Pareto fronts.
Other
61 stars 11 forks source link

fixed Dimension for mdata.Phi array #33

Open Rym28 opened 5 years ago

Rym28 commented 5 years ago

Hi,

I would like to run an ILP model with three objectives.

the problem in the types.jl, the Phi is fixed at two dimensions, as using WeightedSum method, i can deal with more than two objectives,

So, I could not check the value of the third dimension in Phi.

thanks

anriseth commented 5 years ago

Phi is a matrix of size #objectives times #objectives. Column i represents the values of all the objectives at the minimizer of objective i.

So the values of the third objective area in row three.

Rym28 commented 5 years ago

Yes , I get the idea?

Unfortunatly, that for the nadir and utopia points are not developped in the MultiJuMP package, which represent important informations for the generated Pareto front set.

anriseth commented 5 years ago

You can extract the Nadir and Utopia points from Phi: https://github.com/anriseth/MultiJuMP.jl/blob/07474f7e1bd8e4066f8de92430c1f4b869745f56/src/linear.jl#L30-L31 Just remember to adjust for whether you are minimizing or maximizing an objective to get the correct signs of Fmin and Fmax.

I don't understand what this has to do with making the dimension of Phi equal to the number of objectives though?

Rym28 commented 5 years ago

I fthough that Phi is always fixed to 2D as mentionned in types.jl mutable struct MultiData{Tx,To} objectives::Vector{SingleObjective} f1::SingleObjective f2::SingleObjective normalf1 normalf2

linear::Bool
# Number of points in each direction
# of Pareto submanifold
pointsperdim::Int
#
# stored values
utopiavarvalues::Vector{Vector{Tx}}
utopia::Vector{To}
nadir::Vector{Tx}
paretovarvalues::Vector{Vector{To}}
paretofront

Phi::Array{To,2}
Fstar::Vector{To}
inequality::Bool

end

Also, writing mdata.utopia, i got empty array.

Otherwise, I'm ooking to get the knee point: by finding the solution which has the best trade-off between objectives amon all the generated non-dominated solutions.

thanks

thanks

anriseth commented 5 years ago

I fthough that Phi is always fixed to 2D as mentionned in types.jl

Yes, Phi is a matrix, that is, a 2-dimensional Array, but the size (number of rows and columns) is equal to the number of objectives.

Also, writing mdata.utopia, i got empty array.

Yes, that was an old field that was not in use anymore. I've added some functionality back in #34.

Otherwise, I'm ooking to get the knee point: by finding the solution which has the best trade-off between objectives amon all the generated non-dominated solutions.

Maybe I have misunderstood you, but the "best" trade-off sounds rather subjective when you have multiple objectives?

Rym28 commented 5 years ago

Thanks for these clarifications.

Otherwise, after generating multiple non-dominated solutions, we have to help the Decision maker which is solution is more closer to his preferences. This vector or solution is the Knee point in the litreature.

anriseth commented 5 years ago

we have to help the Decision maker which is solution is more closer to his preferences.

Feel free to submit a PR to support such functionality ;)