question

Jon Perez avatar image
0 Likes"
Jon Perez asked Jeanette F commented

Divide the items of a queue in two queues

Hello, I want to divide the number of items that I have in a queue in 2 queues. For example, I have 360 items in a queue and I want to send 150 to a queue and 210 to another queue. How would I need to do it? I was thinking about doing it by percentage, but it is not a whole number.

Divide items.fsm



FlexSim 23.2.1
divide item
divide-items.fsm (27.6 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Jon Perez, was Iago MF's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Iago MF avatar image
0 Likes"
Iago MF answered Iago MF commented

If you know the fixed numbers then you just have to limit the max content of the last queues to 150 and 210. If the numbers depends on the simulation, then you can create a logic with a counter (or ask for the current content of the queues) to send the correct quantity to each queue.

· 4
5 |100000

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

Jon Perez avatar image Jon Perez commented ·
I cannot do it limiting the max content because on the big simulation there are more items arriving to the first queue that are going to be divided into different ones, so how can I do it with a counter or in another way?
0 Likes 0 ·
Iago MF avatar image Iago MF Jon Perez commented ·

How this queues should work? For example, the first queue works as a batch? And what's the criteria to send to one queue or another?

The solution depends on what are you trying to represent.

0 Likes 0 ·
Jon Perez avatar image Jon Perez Iago MF commented ·
The first queue will receive 360 that are going to be created from a previous join process. Then, I want to send 150 of these items to another queue because these are going to be processed again in another combiner, and, I want to send 210 of the other items to another queue because these are going to be processed in a different combiner.
0 Likes 0 ·
Show more comments