Combining merges in top and sub system: error

1 vue (au cours des 30 derniers jours)
Julia Bever
Julia Bever le 29 Juin 2016
Commenté : Julia Bever le 15 Juil 2016
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 commentaires
Rohit Reddy Madasani
Rohit Reddy Madasani le 15 Juil 2016
Modifié(e) : Rohit Reddy Madasani le 15 Juil 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.
Julia Bever
Julia Bever le 15 Juil 2016
Ok cool, that's helpful, thank you!

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Subsystems dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by