How to set a suitable range for variables in Genetic Algorithm Optimization
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi, I have a optimization problem and its variable x has some limitations as belows:
For my understanding, the ga function will generate 300 random values within the range of x(i) and calculate the fitness fcn. if all constraints are met.
Such as:
rng(0,'twister');
variable_num=300;
LB=zeros(1,variable_num);
UB=100*ones(1,variable_num);
A=ones(1,variable_num);
b=1000;
GASetting = optimoptions(@ga,'PopulationSize',10000,'MaxGenerations',1000);
[x,fval,exitflag,output,population,scores] = ga(@test,variable_num,A,b,[],[],LB,UB,[],1:variable_num,GASetting);
Is there any functions or settings for forcing the software to generate a total number where less than 1000 and distributed to each variables randomly? Because in the code displayed before, GA cannot find a feasible points for calculating the user-defined function.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Genetic Algorithm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!