I need efficiently initialize a population of soldiers (particles) with random positions within feasible bounds in MATLAB?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
chaitanya
am 31 Dez. 2023
Beantwortet: recent works
am 31 Dez. 2023
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 Kommentare
Akzeptierte Antwort
recent works
am 31 Dez. 2023
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surrogate Optimization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!