How to limit ga parameter to certain values.
5 ビュー (過去 30 日間)
古いコメントを表示
Hi
I have a vector X that I’m optimizing with a ga. This vector some of this values may just take 2 values 0 or Xn while others are contained by la lower and upper limit.
How can I limit this elements to this 2 values?
0 件のコメント
回答 (1 件)
Walter Roberson
2018 年 3 月 14 日
Do an integer constraint on that variable, constrain to 0 and 1. Then internally multiply the passed in variable by Xn.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Nonlinear Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!