Global optimization toolbox - GA solver
2 ビュー (過去 30 日間)
古いコメントを表示
I used the following commands to generate random numbers in the range 0 to 5 for my input variable a and b. I also put 0 as the lower bound and 5 as upper bound in the constraints. The rest remain at default values.
a=rand*5; b=rand*5;
When I run the GA solver, I expect the value for final point should be between 0 to 5. Surprisingly, why I got the final point outside the range of 0 to 5. I got the numbers such as 9.473, -0.651 etc.
Secondly, the current iteration will always stop at the figure I provided at the generation, stopping criteria. e.g if I provide 600, the current iteration will stop at 600, I put 4000, it will stop at 4000 and so on.
0 件のコメント
回答 (1 件)
Alan Weiss
2012 年 10 月 10 日
ga is a strictly feasible algorithm with respect to bounds and linear constraints, so if you give bounds properly, you will never get a member of a population to violate the constraints. Therefore, you did something wrong.
You don't provide the exact commands that you use, so I am going to have to guess what you did. I suppose that your problem has at least two dimensions, and that you gave the following bounds:
lb = 0;
ub = 5;
lb = zeros(N,1);
ub = 5*ones(N,1);
Here N is the number of dimensions of your problem.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
0 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!