- 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?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Alan Weiss
2015년 3월 5일
"The output function returns the following arguments to ga:
Alan Weiss
MATLAB mathematical toolbox documentation
댓글 수: 3
Sean de Wolski
2015년 3월 5일
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Genetic Algorithm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!