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

1 view (last 30 days)
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.

Answers (0)

Categories

Find more on Genomics and Next Generation Sequencing in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!