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

조회 수: 7 (최근 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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by