Multiple instances of referenced models in Normal mode
조회 수: 12 (최근 30일)
이전 댓글 표시
Hi all,
I'm trying to design a simple model of a car by using Model Referencing. I have modeled a wheel, and I referenced this wheel model four times but with different parameters. I wish to simulate the entire system in Normal mode. However, the error I get is the following:
"Although multiple instances of a referenced model can simulate in Accelerator mode, only one instance of a referenced model can simulate in Normal mode at a time. Model 'VehicleDynamics' directly or indirectly references model 'WheelDynamics' more than once via Model blocks that are configured for Normal mode. One such Model block is 'VehicleDynamics/FR wheel'. To fix this problem, first run depview('VehicleDynamics', 'ModelReferenceInstance', true) or from the top model menu choose Tools > Model Dependencies > Model Dependency Viewer > Referenced Model Instances. The dependency viewer puts a red octagon on models referenced more than once in Normal mode. Change the parents of the blocks with red octagons so that at most one Normal mode instance exists per model."
So it seems that I cannot use multiple instances in the same model when using Normal mode. This is strange to me and I don't understand why. Is there some shortcut to simulate my model in Normal mode by using multiple references? Any suggestion will be greatly appreciated. Thanks,
Ubaldo
--
댓글 수: 0
채택된 답변
Kaustubha Govind
2012년 4월 17일
You can still simulate your top-level model "VehicleDynamics" in Normal mode, however, just the model reference blocks that point to "WheelDynamics" (directly or indirectly) need to be configured to run in Accelerator mode. To change this, right-click on the Model block and select "Accelerator" for Simulation mode.
However, if you did intend even your referenced models (with multiple instances) to run in Normal mode, I believe that capability was added in R2010b. Are you using an older version?
댓글 수: 0
추가 답변 (1개)
Ubaldo Tiberi
2012년 4월 18일
댓글 수: 4
Kaustubha Govind
2012년 4월 18일
Btw, did you configure all the models in question "SingleWheelTEST", "WheelDynamics" and "LocalController" to use a Fixed-Step solver? Or just tje top-level model?
참고 항목
카테고리
Help Center 및 File Exchange에서 Using MATLAB Projects in Simulink에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!