How to get the optimized population data after stopping the gamultiobj function while using the HybridFcn fgoalattain

1 次查看(过去 30 天)
I am using the gamultiobj function with the HybridFcn fgoalattain option. Once a required level of optimization has been reached I am requesting a stop from the plot. The console says "optimization terminated: stop requested from the plot function". However, the Matlab console is still showing busy. I understand that the HybridFcn is working post the ga optmization and has been going on for sometime. Will I get the optimized population once the HybridFcn operation is complete. Asking this since the last time I did this the console seemed stuck at "busy" for about 5-6 hrs and I had to finally kill the process.

回答(1 个)

Alan Weiss
Alan Weiss 2016-3-21
I do not know what is going on with your problem. However, you are free to add a line to your plot function that causes it to output the best member of the population, or even the entire population, at the point where it decides to stop the iterations, if something seems amiss with the hybrid function.
Alan Weiss
MATLAB mathematical toolbox documentation
  2 个评论
Samarth Behura
Samarth Behura 2016-3-21
Hi Alan, Thanks for the comment. Following is the snippet of code for my options set up:
options = gaoptimset('SelectionFcn',{@selectiontournament,4},...
'PopulationSize',100,...
'HybridFcn',@fgoalattain,...
'DistanceMeasureFcn',{@distancecrowding,'phenotype'},...
'ParetoFraction',0.5,'PlotFcns',{@gaplotpareto,@gaplotscorediversity},...
'UseParallel',true,'Vectorized', 'off');
. . I am using the out of the box plot options.Is there any option for getting the complete population ?
Also, coming to my question again, doesn't the hybrid solver ever stop if I am terminating it from the plot unless it finds the optimal solution?? Since, I have been running the optimization from sometime on this session..is there a possibility I could get the optimized data without having to force kill the session ??
Alan Weiss
Alan Weiss 2016-3-21
Sorry, I misunderstood you before, I thought that you had written a custom plot function that stopped the solver when it reached a criterion you set. in that case, it would be simple to add a line of code to your custom plot function. I guess now that you manually hit the stop button on the plot window, which is different.
I do not know anything about how stopping the plot function might interact with the hybrid function. Sorry. You might not be able to get the solution out of your poor stuck MATLAB session. Yeah, that really is a bummer.
Alan Weiss
MATLAB mathematical toolbox documentation

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by