- state — Structure containing information about the current generation. The State Structure describes the fields of state. To stop the iterations, set state.StopFlag to a nonempty string."
How to create STOP button in GUI to stop my GA optimization?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hossein
am 4 Mär. 2015
Kommentiert: Hossein
am 5 Mär. 2015
I have a GUI with "Optimize" and "Stop" pushbuttons. Pressing "Optimize" will call "ga" command to run an optimization process with iteration display being on. Now, I'd like for the user to be able to stop the GA process whenever "Stop" button is clicked. Could you please help me how to invoke GA from GUI to stop and then retrieve the best set of parameters GA has found so far? Thanks!
0 Kommentare
Akzeptierte Antwort
Alan Weiss
am 5 Mär. 2015
"The output function returns the following arguments to ga:
Alan Weiss
MATLAB mathematical toolbox documentation
3 Kommentare
Sean de Wolski
am 5 Mär. 2015
You'll need to add a drawnow to flush the event queue (I.e. capture the mouse click event).
The optimizer will still finish the iteration it's on either way.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Genetic Algorithm finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!