How to implement a progress bar for multistart global optimization when using parallel computing?

5 vues (au cours des 30 derniers jours)
Dear all,
I've been looking for a way to create a progress bar nested in a gui that shows the advancement of the calculations within a multistart (MS) global optimization. Ideally, there would be separate bars for each run of the solver on a different worker and a major one for the progress of the global optimization.
Do you have some ideas how one could achieve this?
Thank you in advance for your help.
greetings Chavdar

Réponses (2)

Matt J
Matt J le 10 Juin 2013
See the WAITBAR command.
  2 commentaires
Matt J
Matt J le 11 Juin 2013
Chavdar commented
Hi Matt,
thanks for your answer. I of course know the 'waitbar' option, however, it is not obvious to me how one can integrate it in a global optimization routine using parallel processing. The problem is that in this case the global optimization does not support output functions.
Any ideas on that part of the problem?
greetings Chavdar
Matt J
Matt J le 11 Juin 2013
Modifié(e) : Matt J le 11 Juin 2013
Chavdar,
I was thinking that you would call waitbar() within the objective function to measure the progress of each objective function evaluation. I'm not aware of any reason each parallel clone of the objective function couldn't be displaying a waitbar to the screen.
As for measuring the progress of the optimization as a whole, normally you cannot know in advance how long an optimization will take, because it uses an iterative algorithm with an indefinite number of iterations: the algorithm stops only when one of several convergence criteria are met. If you plan to use a set number of iterations, e.g., using the MaxIter option, you could use persistent variables inside the objective function to measure how many iterations have passed (i.e. a persistent waitbar handle and a counter that would increment with each objective function call) in relation to MaxIter, and advance a waitbar based on that.
However, if the iterations finish earlier than expected, i.e., in less than MaxIter, due to a different stopping criterion, I imagine your progress bars would just be wiped from the screen when the parallel session closes. Not sure if you care about that or what you would want the progress bars to do in that instance instead... There are ways to turn off other stopping mechanisms so that MaxIter iterations will definitely be performed.

Connectez-vous pour commenter.


Chavdar
Chavdar le 11 Juin 2013
Modifié(e) : Matt J le 11 Juin 2013
Relocated to Comment by Matt J

Catégories

En savoir plus sur Dialog Boxes dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by