Combining merges in top and sub system: error
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Rohit Reddy Madasani
il 15 Lug 2016
Modificato: Rohit Reddy Madasani
il 15 Lug 2016
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.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Subsystems in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!