SimEvents. How can I simulate a queue timeout?

조회 수: 11 (최근 30일)
Wilco Kelderman
Wilco Kelderman 2020년 12월 14일
답변: Wilco Kelderman 2020년 12월 15일
Hi,
I'm a SimEvents rookie trying to learn the ropes to model discrete systems. I'm following the tutorial to model the restaurant's server system and I'm stuck on part 7.
The model uses a Schedule Timeout block which is now obsolete in R2020b (version I'm using). So my question is, how can I simulate entities dropping from a queue in R2020b?
Thanks in advance.
  댓글 수: 2
RenatoL
RenatoL 2020년 12월 15일
Someone has asked a question about this and there is an answer for it (here), but there's not any confirmation if it worked or not.
Wilco Kelderman
Wilco Kelderman 2020년 12월 15일
Thanks for your input, it somehow helps, as it points to an idea I already had.
I was wondering if this could be achieved programatically by iterating thru the entities in my SimEvents FIFO queue and incrementing the WaitingTime attribute each unit of time, then all I would need to do is to extract from the queue those entities where WaitingTime = Patience (I hope that makes sense).

댓글을 달려면 로그인하십시오.

채택된 답변

Wilco Kelderman
Wilco Kelderman 2020년 12월 15일
After SimEvents onRamp my next port of call for training was the video series "Model a Discrete Event System", unfortunately the series date back from 2013, using an older version of MATLAB. The timeout block used in the video 7 is not available anymore, and according to the migration of legacy libraries page:
If your legacy model contains timeout blocks, do not migrate the model. You can still access legacy blocks to continue developing older models by using the blocks in the Legacy Block Library.
However, as per the reply above, there is one suggestion on how to achieve this programmatically. I'm marking my question as answered as there is no obvious way to implement timeouts with the default Entity blocks. Using the MATLAB Discrete-Event System instead seems the way to go.

추가 답변 (0개)

카테고리

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