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
编辑: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 CenterFile Exchange 中查找有关 Subsystems 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by