I need efficiently initialize a population of soldiers (particles) with random positions within feasible bounds in MATLAB?
조회 수: 2 (최근 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에서 Problem-Based Optimization Setup에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!