Gamultiobj takes too long to run. Is there a workaround?

7 views (last 30 days)
Good evening,
in the past few weeks I've been trying to solve a multi-objective optimization model I found in an article by using gamultiobj. In the attached files you can find said model, as well as the code I implemented in Matlab with the input taken from an example devised by the authors.
In the article the model has been solved using an exact method and it is stated that computation time is under three hours. This is the main reason I decided to use gamultiobj. My aim was to verify how fast a metaheustic method manages to find the Pareto frontier as opposed to an exact approach, which is known to take longer. However, with the code attached (I'm new to this so it's probably extremely inefficient) each generation roughly requires from 20 to 24 hours. Therefore, if MaxGenerations = 20 (as in my code) the overall computation time would be excessive. My intention was to evaluate how the Pareto frontier varies between between different scenarios, such as, for instance, MaxGenerations = 100 and MaxGenerations = 250. But with the current code that would be impractical. Also, as things stand, the algorithm after finding a first point on the Pareto frontier gets stuck, therefore the termination condition of MaxStallGenerations ensues.
Do you have any suggestions on how to improve the attached code so as to significantly reduce computation time? Any help will be greatly appreciated.
Note: the summation with the condition "o: rit = 0" is like a selective summation. Not all parts require certain operations in their production cycle. That's why I tried to implement this part of the model by using "if-elseif" construct.
Let me know if you need any additional information or clarification on the model and code.
Thank you for taking the time to read through my post.
Kind regards,

Accepted Answer

Alan Weiss
Alan Weiss on 5 Jan 2023
I am sorry, but I do not have time to understand your model in detail. However, I notice that you are using the problem-based approach using many levels of nested for loops to define your optimization quantities.
I suggest that you examine the Static Analysis topics in Improve Problem-Based Organization and Performance. In particular, the topics Create for Loop for Static Analysis and Convert Constraints in for Loops for Static Analysis discuss how to accelerate your formulation and solution processes using the latest features of R2022b.
Sorry that I cannot help more,
Alan Weiss
MATLAB mathematical toolbox documentation
  1 Comment
William on 11 Jan 2023
Thank you for your answer and for taking the time to look at my code/problem. I greatly appreciate it!
Kind regards,

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!