MATLAB Answers

How do i find out if a queue is not empty?

5 views (last 30 days)
Baf85
Baf85 on 18 Jun 2021
Commented: Baf85 on 26 Jun 2021
Hi. I'm modelling an elevator with SimEvents. Therefore i want to know at certain points, if there's someone waiting in the different levels of the building, which means there's an entity in the respective entity queue. My idea was to compare the number of entities in the queue with a compare to constant block. But then i don't know how to continue.
Regards!

Answers (1)

Abdolkarim Mohammadi
Abdolkarim Mohammadi on 24 Jun 2021
At such points, the next block to which the Compare blocks are connected, is a Hit crossing block.
  2 Comments
Baf85
Baf85 on 26 Jun 2021
In the picture above is an error. It should be if(u8==1), elseif(u8==2)...

Sign in to comment.

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!