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

7 Ansichten (letzte 30 Tage)
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!

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 21 Okt. 2018
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 Kommentare
Yuan Chen
Yuan Chen am 1 Nov. 2018
I have tried the debugger and have saved the results successfully. Your answer is very helpful! Thank you!
Rohit Sachdeva
Rohit Sachdeva am 11 Nov. 2024
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?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Dhanesh R
Dhanesh R am 2 Dez. 2024
Bearbeitet: Dhanesh R am 2 Dez. 2024
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.

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by