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

5 views (last 30 days)
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

Answers (2)

Matt J
Matt J on 10 Jun 2013
See the WAITBAR command.
  2 Comments
Matt J
Matt J on 11 Jun 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 on 11 Jun 2013
Edited: Matt J on 11 Jun 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.

Sign in to comment.


Chavdar
Chavdar on 11 Jun 2013
Edited: Matt J on 11 Jun 2013
Relocated to Comment by Matt J

Categories

Find more on Dialog Boxes in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!