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!