How do I have a Multicast tag in an Entity Multicast block that reads from a vector whose elements change over time rather than a fixed string?

1 次查看(过去 30 天)
Hi,
Below I have attached a picture of the system I am trying to build. What I would like to achieve is the following:
I would like to send entities from the "Entity Multicast" block to one of two potential "Multicast Receive" blocks (which have tags "T1" and "T2" in the picture below).
I have declared a vector "ReworkTeamIDs" which changes over time during the simulation. It may be equal to the following at any given time: i) ["T1", "T2"], or ["T1"], or ["T2"]. The idea is that the "Entity Multicast" block would read the first entry of ReworkTeamIDs (ie ReworkTeamIDs(1,1)) and set that as the Multicast tag parameter. However, when I do this, I get the error seen in the screenshot below.
If there any way I can get the Multicast tag parameter to read from a vector which contains string elements that change over time? Any help would be greatly appreciated!
PS I run matlab 2017a

回答(1 个)

Julia Antoniou
Julia Antoniou 2017-10-26
I do not believe the "Entity Multicast" block can communicate with more than one "Multicast Receive Queue" block if those receivers have different tags. For example, in the MathWorks demo linked below, each transmitting block has its own receiving block. https://www.mathworks.com/help/simevents/examples/effects-of-communication-delays-on-an-abs-control-system.html The multicast blocks in this example are within the blue "CAN" subsystems.

类别

Help CenterFile Exchange 中查找有关 Discrete-Event Simulation 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by