Parallel processing in ga using 'UseParallel'

5 views (last 30 days)
Jonas
Jonas on 9 Aug 2022
Answered: Matt J on 10 Aug 2022
Hello all,
I want to use the ga() function to optimize a cooling system. The simulation program is a co-simulation with Simulink models, GT models and so on. The idea is that I put the script that runs in the co-simulation into the objective function. Unfortunately I have a very high computation time (up to 6h). Therefore, I would like to compute part of the generation in parallel (e.g. ten individuals at once).
Does anyone have an idea how 'UseParallel' works exactly? Is it that it calls the objective function in parallel? And can I specify in the parallel pool settings that only 10 are called in parallel at a time?
If anyone has an answer to my questions, or perhaps has another idea on how to tackle this problem, I would be very grateful.

Answers (1)

Matt J
Matt J on 10 Aug 2022
Is it that it calls the objective function in parallel?
Yes.
And can I specify in the parallel pool settings that only 10 are called in parallel at a time?
That is determined by the pool size that you set.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!