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

조회 수: 3 (최근 30일)
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

답변 (2개)

Matt J
Matt J 2013년 6월 10일
See the WAITBAR command.
  댓글 수: 2
Matt J
Matt J 2013년 6월 11일
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 2013년 6월 11일
편집: Matt J 2013년 6월 11일
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.

댓글을 달려면 로그인하십시오.


Chavdar
Chavdar 2013년 6월 11일
편집: Matt J 2013년 6월 11일
Relocated to Comment by Matt J

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by