question

Bryan Suharik avatar image
0 Likes"
Bryan Suharik asked Sam Stubbs commented

When Itemtype exits, it repleneshes with the same item type?

Hello, i'm searching for a simple solution via scipt to replenish a queue when an itemtype exits. It needs to replenish with the same itemtype that left the Queue.

Queue 1 has a "do not release" send to port as i don't want it to release until an item type leaves queue 2. But there are 5 different item types, so i don't want the pull to just pull the next in line item type from queue 1.

I've tried with the exit triggers to activate the pull requirement. But i can't figure out how the pull requirement can determine what itemtype just left Queue2 and call that one. Perhaps the sendmessage to Queue 1 from Queue 2 would be a good strategy, but i don't know how that would look via code.

QUEUE 1 ---> QUEUE 2 (leaving queue)

My entire model is built from GUI script on opening, so code solution is most desired.

Thanks in advance!!

FlexSim 16.2.2
codeoperatorspull strategy
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

Sam Stubbs avatar image
1 Like"
Sam Stubbs answered Sam Stubbs commented

One option, rather than use a script, is to use Process Flow. Have all of your items be pushed to a list, instead of flowing straight into the queue. Then have an event triggered source in your Process Flow, each time the trigger happens you can pull from the list and use a query to match the item type to the one that left.

Here's a quick example I created:

replenishitemtype.fsm


· 7
5 |100000

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