question

Armand J avatar image
0 Likes"
Armand J asked Armand J answered

Releasing a batch based on a minimum number of token

Hi everyone,

I have a model working with Process flow.

At time 0, Supermarket fullfilled, and orders arrived. I pick parts in the supermarket and released "kanban" to the prduction area.

as a trigger to produce, I used "batch" function to release a certain amount of cards in once to avoid to process each part individually. So in my case, batch of 6.

But, I realized that's not how it should work, due to the fact that if I have 7, production should receive the 7 orders. (now, 1 batch of 6 released and the 7th stay in the batch activity waiting next day order)

How to do with a "minimum" batch ? or to program a decide or custom code to work with quantity of token?

Thanks for your info back.



FlexSim 20.2.2
flexsim 20.2.2custom codeconditional decidebatch sizekanban
· 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 ·

Hello @Armand J

The Batch activity doesn't seem to allow that kind of logic. It would be helpful to see your model to find an alternative solution. Could you post your model or a model that demonstrates what you are trying to accomplish?

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

As you describe it. Add another process that does what you want. If your batch activity lets exit a token and there is waiting another token, you preempt this token batching activity.

On Event create token activity > get tokens of batch activity as an array in custom code> decide if array is not empty > run sub flow > preempt every single token of the array to be in next activity of their process > finish.

5 |100000

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

Armand J avatar image
0 Likes"
Armand J answered

Hi @Jörg Vogel, @Jeanette F,

Thanks for your answers and interest to my question.

With a direct support, I succeed to do that, please see below the way.


Batch quantity increased to inachievable level (here 100), using "Use Max Wait Timer" to release Batch with a criteria "collected >= 6".

This was working fine but my trigger for production have a different quantity per P/N, this was not sufficient.

The next step is to use a Table to get different condition level in the criteria, as "collected >= Table("BatchperType")[token.Try.TypePart]["Batch_min"]"

Now, after a time of 20s, if my number of token per type achieved the required minium, my batch moved to next step.




Thanks @Clair A for support


batch-min.jpg (44.3 KiB)
batch-table.jpg (47.1 KiB)
table.jpg (13.4 KiB)
5 |100000

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