How can I set bounds for ga that change with the values of the optimization variables?
2 ビュー (過去 30 日間)
古いコメントを表示
Radu Andrei Matei
2022 年 3 月 13 日
コメント済み: Radu Andrei Matei
2022 年 3 月 14 日
Hi. I have lower and upper bounds for my ga optimization variables that depend on those variables' values. Is there a way to input the values of the variables in each iteration of the ga into functions that compute the lower and upper bounds vectors and input those lb and ub back into the ga?
0 件のコメント
採用された回答
John D'Errico
2022 年 3 月 13 日
You cannot. Bounds are FIXED constants. They do not vary at all, and the optimizer assumes that as fact.
If you have a constraint that is a function of the parameters, then that is a nonlinear constraint. Or a linear one, if it can be writtten as a linear combination of the parameters.
その他の回答 (1 件)
Torsten
2022 年 3 月 13 日
Instead of using the array lb and ub, you will have to prescribe such bounds that depend on the solution variables in the Constraint Function, usually called "nonlcon" in the documentation.
2 件のコメント
Walter Roberson
2022 年 3 月 13 日
However, it is common to use lb ub and linear or nonlinear constraints. lb and ub are the fastest kind of constraints; linear constraints are a little slower (they require multiplications), and nonlinear constraints are slowest.
参考
カテゴリ
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!