Optimization variable zero or one
古いコメントを表示
Hi
I have written my optimization problem in Matlab. The problem has 10 variables, such as x(i), i=1,2...10.
But there is a restriction that x(i) either zero or one.
How can I set these constratints in MATLAB.
Greatly appreciate your help.
Rizvi
回答 (1 件)
John D'Errico
2020 年 11 月 12 日
0 投票
You have 10 variables, which can take on only 2 levels each. Just evaluate the function at all 2^10 = 1024 points and be done with it.
カテゴリ
ヘルプ センター および File Exchange で Problem-Based Optimization Setup についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!