SimBiology and the parallel toolbox

2 ビュー (過去 30 日間)
Scott
Scott 2015 年 6 月 16 日
コメント済み: Edric Ellis 2015 年 6 月 17 日
I am trying to wrap a parfor loop around a simbiology simulation and am getting odd results that I don't get when I use a regular for loop.
For example, the following line:
set(modelObj.Species(3),'InitialAmount',2000);
gives me this error:
Error using simulateModel>(parfor body) (line 51)
Attempt to reference field of non-structure array.
Another example is this line:
cs=getconfigset(modelObj,'default');
which gives me this error:
Error using simulateModel>(parfor body) (line 54)
Cannot find an exact (case-sensitive) match for 'getconfigset'
The closest match is: getConfigSet in
/Applications/MATLAB_R2014a.app/toolbox/simulink/simulink/getConfigSet.m
Both of these work in a regular for loop. I'm particularly perplexed about the getconfigset. It is almost as if MATLAB forgets about the SimBiology toolbox altogether when running the parallel toolbox and doesn't recognize SimBio functions or objects.
Any suggestions would be much appreciated.
  1 件のコメント
Edric Ellis
Edric Ellis 2015 年 6 月 17 日
What is the class of modelObj?

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

回答 (1 件)

Ingrid Tigges
Ingrid Tigges 2015 年 6 月 17 日
Have a look at this link SimBiology model objects and parallel computing on how you can use model objects in a "parfor" loop.
There are two things I am not sure about based on your question:
  1. Why do you want to use a SimBiology model object in this way?
  2. Are you aware of this parallel example from the documentation?

コミュニティ

その他の回答  SimBiology コミュニティ

カテゴリ

Help Center および File ExchangeScan Parameter Ranges についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by