How Replicate module can generate variable number of replications using a signal in SimEvents?

1 回表示 (過去 30 日間)
summyia qamar
summyia qamar 2018 年 7 月 21 日
回答済み: Krishna Akella 2018 年 12 月 10 日
If the signal is number of items departed from a server or number of entities in a queue and I want replicate module to generate replications using that signal value.

回答 (1 件)

Krishna Akella
Krishna Akella 2018 年 12 月 10 日

Hi Summyia,
Have you tried something along the following lines:
Call a simulink function from an event action, just before the original entity enters the replicator, and set the number of replications in an attribute of the entity. Then use this attribute as the replication amount source.
I have attached a simple model where I tried to read a signal from the number of entities in a queue and set the number of replicas based on that value. I have set the 'Hold original entity until replicas depart' to true. Please find it attached.
- Krishna

カテゴリ

Help Center および File ExchangeSimEvents についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by