Combining merges in top and sub system: error
조회 수: 2 (최근 30일)
이전 댓글 표시
I'm trying to understand some of the details of the merge block, and it appears there are inconsistent results between using it on the top level and using it in a subsystem. The following diagram has no function other than to help in communication, though its design is similar to something I'm working on.
Running this subsystem as an individual model, I was able to get a valid output even for a condition that did not execute the cases connected to the merge as shown.

But when I insert it as a subsystem and run the same condition as shown

I get the following error:


Based on the error message, I would think that even in the subsystem as an individual system I would get that message as none of the inputs are active. Rather it outputted zero, yet that zero is not passed through to the top system when it is run as a subsystem.
Can anyone explain why this happens? And/or suggest a different way to handle conditional cases that effect various outputs?
Thanks in advance
댓글 수: 2
Rohit Reddy Madasani
2016년 7월 15일
편집: Rohit Reddy Madasani
2016년 7월 15일
Hi Julia,
The likely cause for this error could be due to the following reason:
When you have a hierarchy of merge blocks, the last one is the root-merge. The ones before are non-root. You will receive this error if no block writes to a non-root Merge block.
When you have a three of merge blocks, they all share one single space in memory. If we allow a non-root merge block to be active, but have no writer to it, then this can lead to problems and, in particular, confusing results.
One of the main goals of the simplified mode is to avoid this type of confusing behavior.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Subsystems에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!