Anonymous (virtual?) composite entity creators
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm trying to create a common library block that accepts and routes messages (using SimEvents messages) of a type that is unknown until they're placed in their usage location. In the process of performing this routing, I'm using the Composite Entity Creator and Composite Entity Splitter to combine and then split those unknown message types on their way into and out of the block.
But, I'm running into an error "Block [Composite Entity Creator inside the common block] is redefining the entity type named [the name that I've entered into the common Composite Entity Creator] using different data properties for attributes. This entity type has already been defined by another block in the model...". It's true, because I've instantiated that common block 4 times, and they all share the same name but have different types going into them for each instance. However, it shouldn't really matter--all I'm doing is combining and then splitting those Composite Entities without actually worrying about them inside of the common block.
So, what I'm looking for is a way to have anonymous Composite Entity Creators which I can later split--like a mux and demux, or maybe virtual bus creator/splitter. Does anything like this exist, or is there some way to simulate this behavior? The best I can come up with right now is to get rid of Composite Entity Creators from my common library block and do all of the entity creation/splitting before it reaches the common block.
0 comentarios
Respuesta aceptada
Mo Zhao
el 7 de Dic. de 2017
The error is because that the two subsystems linked to the same library block create two distinguished composite entity types with the same name "Combined";. If we break the link and change the composite entity name in the second subsystem to "Combined2", the model can work. Thus, you can create a mask for the library block with a promote parameter of the combined entity type name for each instance.
Más respuestas (0)
Ver también
Categorías
Más información sobre Discrete-Event Simulation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!