GAMULTIOBJ function does not take into account the upper bound (ub)

1 回表示 (過去 30 日間)
Haritz Odriozola Olalde
Haritz Odriozola Olalde 2021 年 7 月 29 日
編集済み: Haritz Odriozola Olalde 2021 年 7 月 29 日
Hi everyone,
I am designing an Genetic Algorythm for which the genes of the population must be between the values 0 and 150. For thius purpose, I have established the lower bound (lb) and the upper bound (ub) to 0 and 150 respectively as it can be seen in the code below.
for i=1:numberOfVariables
lb(i)= 0; % lower bound of the genes
ub(i)= 150; % upper bound of the genes
end
% Inequality restrictions definition
A = []; b = []; % without inequality restrictions
Aeq = []; beq = [];
% GAMULTIOBJ solver execution
options = gaoptimset('PlotFcns',[]);
options = gaoptimset(options,'PopulationSize',numPop);
options = gaoptimset(options,'PopInitRange',[(-1);(1)]);
options = gaoptimset(options,'CrossoverFcn',@crossoverheuristic);
options = gaoptimset(options,'MutationFcn',@mutationadaptfeasible);
options = gaoptimset(options,'TimeLimit',tm);
options = gaoptimset(options,'Generations',numGenerations);
[x,Fval,exitFlag,Output] = gamultiobj (FitnessFunction,...
numberOfVariables,A,b,Aeq,beq,lb,ub,options);
Every time I execute the code, I have observed that the genes of the population values are between 0 and around 1.2 (it rarely exceeds 1 in any value) as it can be seen in the image below.
If I have delimited the boundaries between 0 and 150 I do not understand why the obtained values are only between 0 and 1.2.
This is not supposed to happen, is it? What am I doing wrong? Why does this happen? How can I solve this?
Thanks a lot.

回答 (0 件)

カテゴリ

Help Center および File ExchangeGenomics and Next Generation Sequencing についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by