Variant Subsystems control by Model Workspace variables?

조회 수: 4 (최근 30일)
Tilman
Tilman 2014년 8월 31일
댓글: Lee 2022년 1월 25일
Dear Community,
does there exist a way to use Model Workspace variables instead of Base Workspace variables for variant control?
I would like to avoid using callbacks for variant override.
I wonder why hierarchical symbol resolution ( http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/ ) does not apply for variant control ...
Best regards,
Tilman
  댓글 수: 4
Markus
Markus 2021년 2월 19일
I agree to the above. I would also prefer to have Simulink Variant objects in the model workspace.
Lee
Lee 2022년 1월 25일
Where is this limitation even mentioned in the documentation? I don't understand why variables referenced by variant control conditions would need to be present in a specific workspace. Furthermore, even after moving said variables into the base workspace, Simulink throws an error as it's still unable to evaluate logical expressions such as 'and' or '|' or 'not'

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

답변 (2개)

Mobashar Ahmad
Mobashar Ahmad 2019년 10월 28일
Any updates on this? i would also like to use the Model Workspace to manage the variants control variables.
  댓글 수: 1
Markus
Markus 2020년 6월 24일
Same here. These make more sense in the model workspace anyway.
Any update from a staff member?

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


Jonas
Jonas 2020년 6월 25일
편집: Jonas 2020년 6월 25일
You can create a Simulink.Variant variable and put it inside a Data Dictionary, and then link this Data Dictionary to the model.

카테고리

Help CenterFile Exchange에서 Component-Based Modeling에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by