question

Scott M2 avatar image
0 Likes"
Scott M2 asked Scott M2 commented

Queue Pull Strategy - Distribution & Types

I'm attempting to pull from a set of queues as if an order is coming in to pull x amount of items of various types at different times to another queue.

Order arrival times are on the "Orders" table with the quantity required for each order.

I would like to stay away from creating a process flow since I haven't needed to use it in the rest of the simulation.

Any help is much appreciated.

Thanks in advance,

Scott

queue-pull-problem.fsm

FlexSim 18.0.5
different item typespull items
· 8
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 ·

It shows the count as 20 for the orders, but of that 20 how should it it be split among the various types of items.

0 Likes 0 ·
Scott M2 avatar image Scott M2 Joshua S commented ·

Each order would contain two types (50/50 split is fine); 10 of type 1, 10 of type 3 for example. The decision of which two to grab can be random/uniform, no real restrictions on that.

0 Likes 0 ·
Joshua S avatar image Joshua S Scott M2 commented ·

Without using process flow you are going to have to write code everywhere. You will use the command senddelayedmessage() for each of the ArrivalTimes in your Orders table and input those in code in the "OnReset" trigger. Then on your "OnMessage" trigger you would open the port, then on your "OnEntry" trigger decrement a counter till only 20 items enter, then close the port and wait till the next message is sent.

Using process flow would only require you to use 5 activities as shown below

1 Like 1 ·
pic1.png (4.9 KiB)
Show more comments
Scott M2 avatar image Scott M2 commented ·

@Joshua S The distribution would replace all the separate arrival times for the orders. Maybe instead of needing all the different calls in the OnReset trigger, I could use a distribution for interarrival times.

0 Likes 0 ·
Joshua S avatar image Joshua S Scott M2 commented ·

I don't see how that would change how your orders are structured. You have a lot of items come in through your source at different times, which then flow into your array of Queues, which you want pulled into your outgoing Table queue based on your Order table. What you are trying to set up is a way to pull 20 items from your array of queues at certain times specified in your Order table. Is this correct?

0 Likes 0 ·
Scott M2 avatar image Scott M2 Joshua S commented ·

Yes, that's correct. The point I was trying to make about the distribution is, if I could convert the time between orders into a statistical distribution of interarrival times, could that be done easier than having to call out each order in the code separately?

0 Likes 0 ·

1 Answer

Joshua S avatar image
1 Like"
Joshua S answered Scott M2 commented

See if this is what you are looking for. I connected the end to another Queue so you can see what is being pulled.

13745-queue-pull-problem.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.

Scott M2 avatar image Scott M2 commented ·

@Joshua S Looks really good. I'll have to work with the types that it's pulling, but this helped a lot. Thanks!

0 Likes 0 ·