parsim in parfor loop

4 ビュー (過去 30 日間)
Julian Narimany Kojour
Julian Narimany Kojour 2021 年 1 月 2 日
回答済み: Prabhanjan Mentla 2021 年 1 月 5 日
I have to run thousands of simulations which base on the same simulink model and I'm trying to shorten the runtime. Some of them vary only in variable values, so I run them using parsim. Above it, there are two forloops, whose purpose is to change the model by commenting/uncommenting some blocks. A simplificatio of the concept in the picture.
Will it shorten the runtime if I use parfors instead of fors?
(Does a parfor over parsim change anything? Do I get parallelization on both levels? Or just once?)
for...
%commenting/uncommenting blocks
for...
%commenting/uncommenting blocks
parsim
end
end
  1 件のコメント
Walter Roberson
Walter Roberson 2021 年 1 月 2 日
Just once .

サインインしてコメントする。

採用された回答

Prabhanjan Mentla
Prabhanjan Mentla 2021 年 1 月 5 日
Hi,
parfor-loop+sim = parsim to run simulink simulations in parallel.You cannot use a parfor-loop inside another parfor-loop. For more information you may check this link1 and link2.
Hope this helps.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRun Multiple Simulations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by