How can we flush queue in simevents?

1 回表示 (過去 30 日間)
Aditi Gupta
Aditi Gupta 2019 年 12 月 26 日
回答済み: Teresa Hubscher-Younger 2020 年 1 月 3 日
Is there anyway to flush unsent entities from the queue in simevents?

回答 (2 件)

Teresa Hubscher-Younger
Teresa Hubscher-Younger 2020 年 1 月 3 日
Are you asking if we can clear the queue based on some event? The way I can think to do this to use a MATLAB Discrete Event System block. Actually, there is a good example showing this: Flush Entities from a Queue Server.https://www.mathworks.com/help/simevents/examples/flush-entities-from-a-queue-server.html
  1 件のコメント
Walter Roberson
Walter Roberson 2020 年 1 月 3 日
That example appears to flush received events, not unsent events?

サインインしてコメントする。


Teresa Hubscher-Younger
Teresa Hubscher-Younger 2020 年 1 月 3 日
I'm confused by the question I think. Are you saying that the Entity Generator or Message Send block would lose entities if a queue is full? I'm having a hard time understanding what structure the entities are in (a server?). Are you talking about something like task preemption? (https://www.mathworks.com/help/simevents/ug/task-preemption-in-an-operating-system.html?searchHighlight=preemption&s_tid=doc_srchtitle)

カテゴリ

Help Center および File ExchangeDiscrete-Event Simulation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by