Genetic Algorithm - limiting significant digits of Optimization Variable
显示 更早的评论
Hello All,
What is the correct options setting for limiting the sgnificant digits after the decimal point of the input variables to the fitness function.
Follwoing Example:
function [y] = fitnessfunction(XX)
%% ======================================================================== % Initialize for two objectives y = zeros(2,1);
% Compute first objective for i = 1:6 y(1) = y(1) - 10*exp(-0.2*sqrt(XX(i)^2 + XX(i+1)^2)); end
% Compute second objective for i = 1:6 y(2) = y(2) + abs(XX(i))^0.8 + 5*sin(XX(i)^3); end end
**************************************************** ****************************************************** options = gaoptimset( 'InitialPopulation', initpop, ... 'PopInitRange' ,[lower_bounds; upper_bounds], ... 'Vectorized', 'off', 'PlotFcns',@gaplotpareto,'StallGenLimit',150);
[X,FVAL,REASON,OUTPUT,POPULATION,SCORES] = gamultiobj(fitnessFunction,nvars,Aineq,Bineq,Aeq,Beq,LB,UB,options);
How can I change the setting such that 'gamultiobj' changes parameters XX to limit pricision to 2 digits.
Thanks, Yash
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Surrogate Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!