what is the problem of this crossover ?

1 次查看(过去 30 天)
hello everybody... i am code decision variable space to consider it as a chromosome (the value of x from (1 to 56 ))
% Initialize Position of chromosome
pop(1).Position=randi(VarMax); ( i.e individual1 represent x1=7)
pop(1).Position=randi(VarMax); ( i.e individual2 represent x2=7)
when i using this type of crossover and when for example the value of x1=7 , x2=7 , always y1 and y2 = 7 .
what is the type of crossover that enhanced the values of y1,y2 ?
x1=7 , x2=7 , gamma=0.3 , VarMin = 1 , VarMax = 56 ( decision variable space is integer)
is this type of crossover is correct ???
function [y1, y2]=Crossover(x1,x2,gamma,VarMin,VarMax)
alpha=unifrnd(-gamma,1+gamma,size(x1));
y1=alpha.*x1+(1-alpha).*x2;
y2=alpha.*x2+(1-alpha).*x1;
y1=max(y1,VarMin);
y1=min(y1,VarMax);
y1=round(y1);
y2=max(y2,VarMin);
y2=min(y2,VarMax);
y2=round(y2);
end
please help me..

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by