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 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