How do I retain multiple model reference variants without cluttering the workspace with unused variant objects?

조회 수: 2 (최근 30일)
Hello, I am building a large model containing multiple referenced sub-models. Each referenced model has multiple variants that can be selected when loading, which I would prefer to do programatically. Initially, I loaded all the variant objects at startup, then cleared all but the required variant objects when loading the top-level .slx. For example, if I wanted to load Variant 1, I set Variant==1, and deleted all but the corresponding variant objects. I recently found a better way to organize this from this post, but this does not solve my fundamental problem.
The problem: Every time I load the model like this, in the Block Parameters menu of each Model Reference, the Conditions tab for every variant except the currently-loaded one reverts to N/A, and I get errors when I build. From this, I infer that I must keep ALL variant objects for all Referenced Models loaded in the workspace at all times.
My question: Is there a way to keep multiple variants listed in a Model Reference block, but keep in the workspace only the variant objects corresponding to the currently-active model variants?
Thanks!

채택된 답변

Gareth Thomas
Gareth Thomas 2015년 2월 12일
i believe that data dictionary will help: what is a data dictionary?
  댓글 수: 1
Stefan
Stefan 2015년 3월 6일
Thanks. Using a data dictionary solves the immediate problem of de-cluttering the workspace. The disadvantage is I have had to write a series of scripts to modify the DD if I make changes to the constants, bus structures, etc. in the base model, and change other aspects of the model to make them compatible with DD.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Manage Variant Modeling Components에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by