I need efficiently initialize a population of soldiers (particles) with random positions within feasible bounds in MATLAB?
1 回表示 (過去 30 日間)
古いコメントを表示
I'm working on WSO for optimal placement of capacitor. How can you efficiently initialize a population of soldiers (particles) with random positions within feasible bounds in MATLAB?
0 件のコメント
採用された回答
recent works
2023 年 12 月 31 日
Use the rand function to generate random numbers within the specified limits for each decision variable.
Example, to create a 50x2 matrix of random capacitor locations between buses 2 and 33
soldier_positions = 2 + (32-2).*rand(50,2);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Surrogate Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!