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!