question

Tony S avatar image
0 Likes"
Tony S asked Tony S commented

How to track the time an object spends in queue and set output port accordingly?

model1-1.fsm

My model is fairly simple, 2 queues and two processors. If an object spends more than 6 hours in queue 2, I wish to send it back to queue 1. If it spends less than 6 hours in queue 2, it should go to processor 2 as long as processor 2 is free. Where can I learn more about this?

FlexSim 18.1.0
send to porttime in system
model1-1.fsm (36.3 KiB)
5 |100000

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

1 Answer

Jeff Nordgren avatar image
1 Like"
Jeff Nordgren answered Tony S commented

@Tony S,

Attached is your model with the changes that I've made. I change the Processor2 and EntryTransfer1 to use Pull instead of having Processor1 do a push. So, with your model being in minutes, 6 hours is equal to 360 minutes, which is reflected in the Pull code. And with it being in minutes, it isn't until after around 50,000 time units that flowitems are actually sent to the conveyor (Queue1). Also had to increase the max content of your queues so that the model wouldn't lock up because the queues are full.

Let me know if a solution like this would work for you.

Thanks.

tony-model1-1-jn1.fsm


· 1
5 |100000

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

Tony S avatar image Tony S commented ·

Thank you! Things are a little more clear now. However, even in the model file you've uploaded, an item can spend way more than 6 hours in the queue and still not get pulled on to the conveyor.

(I've made some changes to the model to help you understand what I mean. The changes are: I've reduced the process times to 10 and 100 for processors 1 and 2, the source creates items every 10 minutes, and I've disabled batching in queue 2)

If you run this model, you see that at time = 420 minutes, the item box with the "Entered" label value of 60 is still in Queue 2 (What I want the model to do: since the item has spent 420-60 = 360 mins in the queue, to go onto the conveyor.) I've tried to work on the pull code for the EntryTransfer1 output to do this, but to no avail.

Thanks for your help!

11469-tony-model1-1-jn1-mod.fsm

0 Likes 0 ·