HiGHS multi-objective optimization stuck in infinite loop

I’m refactoring my code to go from custom multi objective optimization to using MultiObjectiveAlgorithms.jl with Lexicographic. When I run my optimization it never stops, with this repeated log message:

So it looks like it repeats the exact same optimization over and over. I found that this does not always happen. Here is a vector of objectives for which it does happen:

10-element Vector{AffExpr}:
 level_demand_error[Basin #7,1,lower,first] + level_demand_error[Basin #7,1,upper,first]
 level_demand_error[Basin #7,1,lower,second] + level_demand_error[Basin #7,1,upper,second]
 user_demand_error[UserDemand #10,2,first]
 user_demand_error[UserDemand #10,2,second]
 user_demand_error[UserDemand #9,3,first]
 user_demand_error[UserDemand #9,3,second]
 user_demand_error[UserDemand #6,4,first]
 user_demand_error[UserDemand #6,4,second]
 -low_storage_factor[Basin #3] - low_storage_factor[Basin #7]
 0.0005 flow[(FlowBoundary #1, Basin #7)] + 0.0005 flow[(FlowBoundary #2, Basin #3)] + 0.00025 flow[(Basin #3, TabulatedRatingCurve #4)] + 0.001 flow[(UserDemand #6, Basin #3)] + 0.00025 flow[(Basin #7, TabulatedRatingCurve #8)] + 0.00025 flow[(Basin #7, UserDemand #6)] + 0.00025 flow[(Basin #7, UserDemand #9)] + 0.00025 flow[(Basin #7, UserDemand #10)] + 0.001 flow[(UserDemand #9, Basin #3)] + 0.001 flow[(UserDemand #10, Basin #3)]

And here is a vector of objectives for which it does not happen (also with different variables and constraints):

2-element Vector{AffExpr}:
 -low_storage_factor[Basin #1]
 0.00025 flow[(Basin #1, LinearResistance #2)]

I also don’t understand why it says without presolve, I explicitly set it to ‘on’.

Should Lexicographic be able to handle empty (feasibility) objectives? Or should I filter those out?

I also found that writing a model with a vector valued objective function to file is not supported, that problem is easily reproducable: Add support for writing models with a vector-valued objective to file · Issue #4052 · jump-dev/JuMP.jl

Hmm, maybe my problem is related to what is discussed here and what I’m experiencing is terrible scaling in the number of objectives. I’ll try what’s suggested there.

Hi @BdeKoning, can you please make a reproducible example with write_to_file(model, "model.mof.json") and then open an issue at: GitHub - jump-dev/MultiObjectiveAlgorithms.jl: A Julia package for solving multi-objective optimization problems

Sadly I cannot create a reproducible example from my code, writing the problem to file and reading it resolves the problem.

I now use JuMP.set_attribute(model, MOA.LexicographicAllPermutations(), false) and that solves very quickly. It makes sense that it took very long before if it was going through all 10! objective permutations for the problematic model, I’m only interested in the specific order of the objectives that I provide.

1 Like

Maybe should turn off the complete search if N >3? Defaults are hard…

1 Like

I would make the complete search opt-in (or even a different algorithm), I suspect users would find this difference in behavior based on such a threshold confusing. That being said, I’m not too familiar with the LP solve community so I don’t know what people would expect.

To avoid breaking existing workflow, the proposal in Add a warning when lexicographic used with default args and 5+ objectives by odow · Pull Request #138 · jump-dev/MultiObjectiveAlgorithms.jl · GitHub is to throw a prominent warning. I probably made the wrong decision with the default, but it’s there now.

1 Like