question

Ernesto B avatar image
0 Likes"
Ernesto B asked Jason Lightfoot edited

How do I restrict the maximum height of a queue?

In my process I want to stack boxes on a queue, but up to a maximum height.

FlexSim 18.1.2
queuequeue contentprocess maximum content
· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joshua S avatar image Joshua S commented ·

If you know how many boxes it will take to get to that height, then you can set the max content to that amount

0 Likes 0 ·
pic1.png (15.8 KiB)
Ernesto B avatar image Ernesto B Joshua S commented ·

Thanks Joshua, the problem I have with that is that I have boxes of different heights, so the exact amount of boxes is unpredictable

0 Likes 0 ·
Joshua S avatar image Joshua S Ernesto B commented ·

That makes sense. So there is a way, but it would have to be coded. The code would check the tallest item in the queues contents against the max height you set, and see if it can allow the next item.

0 Likes 0 ·
Show more comments

1 Answer

·
Joshua S avatar image
0 Likes"
Joshua S answered Jason Lightfoot edited

Here is your model with the adjustments. You can click all the code boxes to see all the code that was added, but the pictures show the 3 places I changed or added anything.13330-practice-project.fsm


pic1.png (32.8 KiB)
pic2.png (11.0 KiB)
pic3.png (11.5 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ernesto B avatar image Ernesto B commented ·

Hey Joshua,

First, thank you for all your help. I just had a quick question about the code you use. In line 6, I get that that is making sure that all the spaces in the Queue are filled, but what does the "%13" do?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Ernesto B commented ·

It's finding if the content of the queue is a multiple of 13. % is the integer modulo operator.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.