question

Robert F2 avatar image
1 Like"
Robert F2 asked Jason Lightfoot answered

Pull Item from Queue based on downflow Processor

Hello,

I have 6 queues each containing a different item type. These items are all processed and then sent to another Queue/Processor based on item.TYPE. I need help creating a way that Operator1 will only load Processor10 if its corresponding queue is open. For example:

- If Queue1 is empty, load Processor10 with item from Queue7

- If Queue2 is empty, load Processor10 with item from Queue8

- If Queue3 is empty, load Processor10 with item from Queue9

What's happening currently is Operator1 will load an item from Queue7, but Queue1 is full and this prevents the other processors from being filled.

Thanks for any help!

FlexSim 20.1.2
flexsim 20.1.2port by case
snip.png (268.0 KiB)
· 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.

Robert F2 avatar image Robert F2 commented ·

PullItemByCase.fsm

FlexSim model for reference.

0 Likes 0 ·
pullitembycase.fsm (37.4 KiB)
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

Attached is a version that just uses the pull requirement of

opavailable(current,port) 

and forces it to reevaluate when any item leaves the second group of queues (by opening the processors input, even though it's already open).

pullitembycase_jl.fsm


5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

The queues of the second stage are values of a list. They stay there as unique entries but they have a dynamic label field on the list telling you the state they are in. You pull a queue from the list and assign the reference of the queue to a token label, if you like, you can translate the pointer into a port number or type. Now you can tell the processor which item type or from which port a pull must be done. Then you change the dynamic label state field value to be unavailable by changing a label at the queue on the list or by pushing the queue again to the list.

You reset the label value, if an item leaves the second stage queue.

It is not necessary to let the queues staying on the list and to change a label value. You can do this just with pulling and pushing of queues of the second stage alone. But it is necessary to have an initial content on the list. This content are the queues of the second stage or at least something that represent them.

5 |100000

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