How to examine and to save the results calculated so far without interupting or stopping the gamultiobj?

3 ビュー (過去 30 日間)
My procedure of multi-objective optimization (gamultiobj) has been running for more than 3 weeks. I am very worried that if the computer was shut down or restarted in an accident, the 3-week calculation will be wasted. Are there methods to examine and to save the results calculated so far without interupting or stopping the procedure? The calculted results include the points and function values on the Pareto front, that is, the m-by-nvars array and the m-by-nf array. What will happen if I press the buttom "pause" on the figure window of "Genetic Algorithm"? Thank you!

採用された回答

Walter Roberson
Walter Roberson 2018 年 10 月 21 日
Pause would wait for you to click to continue, but would not in itself give access to the accumulated results.
If you happened to invoke gamultiobj by way of code started from the editor in a relatively recent version of MATLAB then the green Run button would have become a blue pause button in the editor. If you were to click that and wait for it to finish the current operation then you would be dropped into the debugger. You could then dbup/dbdown to find the workspace with the accumulated results, and then you could save() that information to a file and then dbcont to resume.
You would not be able to use the saved information to restart, not without a bunch of work, but you would be able to examine it.
  2 件のコメント
Yuan Chen
Yuan Chen 2018 年 11 月 1 日
I have tried the debugger and have saved the results successfully. Your answer is very helpful! Thank you!
Rohit Sachdeva
Rohit Sachdeva 2024 年 11 月 11 日
I am facing a very similar situation ... but I am unable to locate the variable and function values which are being currently dispayed on the Pareto-Front (as I pause), in any of the debugger steps. Could you help me figure this out?

サインインしてコメントする。

その他の回答 (1 件)

Dhanesh R
Dhanesh R 2024 年 12 月 2 日
編集済み: Dhanesh R 2024 年 12 月 2 日
I understand I'm too late to answer. Hope it may help others with the same requirement.
I made the objective function to store the results of the current evaluation as and when the objective function is called. This way, I could store the results for both gamultiobj and paretosearch. Moreover, if you only use gamultiobj, you could also modify the OutputFcn to store the population and corresponding scores after every generation.

カテゴリ

Help Center および File ExchangeMultiobjective Optimization についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by