question

Nguyen Thai avatar image
0 Likes"
Nguyen Thai asked Jeanette F commented

How to send items to port according to the specified quantity

a queue have 10 item and i want send 3 item to port 1 and 7 item to port 2

FlexSim 19.0.0
send to port
· 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 @Nguyen Thai , was Felix Möhlmann'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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Nguyen Thai commented

In a given order or at random?

In both cases I would first initialize an array with the distribution of port numbers (7 ones and 3 twos).

If the order is fixed, the array should contain the port numbers in that order and you call them according to the output stat of the queue.

If random, pick and remove a random entry from the array and send the item there.

· 6
5 |100000

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

Nguyen Thai avatar image Nguyen Thai commented ·

thanks for your help
flow item similar to my attached file mophong cell 4 buoc_autosave.fsm
but layout look quite complicated
How can i make it look simpler.

And have a problem at the end order, because batch at queue 1 is 10 due to some WIP inventory at queue, i want it go to queue next

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Nguyen Thai commented ·
You could just set a maximum wait time in the queue. For example, if it normally takes 852s for a batch to complete after the initial item arrives (71*12) you might set a maximum wait time of 900s to release partial batches after that time.

Other than that you would need a way to determine that no more items are expected to arrive. If the source creates a fixed number of items, you could alter the batch quantity after all full batches have been released.

0 Likes 0 ·
Nguyen Thai avatar image Nguyen Thai Felix Möhlmann commented ·
i can't set maximum wait time because i set batchsize 15 for the first flow item and update down to 12 after
0 Likes 0 ·
Show more comments