Trigger based in quantity in a batch

Trigger based in quantity in a batch

Yashpat
Not applicable
19 Views
1 Reply
Message 1 of 2

Trigger based in quantity in a batch

Yashpat
Not applicable

[ FlexSim 24.2.2 ]

Hi, I am working on a model where I am making batches of 8, but in process I want to start a parallel process when quantity in a batch reaches 6. So I am trying to set a trigger source where token in generated when any batch reaches 6 to run another process flow inheriting common labels for that batch. I tried to look in to the triggers available with batch but non of then checks each batch in the batch process. Could you please guide me in what other triggers can I use. 1732129712065.png1732129791572.png

0 Likes
Accepted solutions (1)
20 Views
1 Reply
Reply (1)
Message 2 of 2

moehlmann_fe
Explorer
Explorer
Accepted solution

Edit: Nevermind what I wrote below. It does work but there is a way easier option. Listen to the "On Batch Change" event and assign the tokens to a label. You can then check if there are currently six tokens in the batch.

partial-batch-trigger_1.fsm

Original Answer:

You can react to each token entering the activity though and check if the respective batch has reached a quantity of 6.

The attached model showcases two possibilities of how this could be implemented.

One is an Event-Triggered Source, followed by a "Breathe" and then a Decide that checks the batch quantity. The issue here is that two tokens being added to a batch at the same time will break this, due to the "Breathe" (which in turn is necessary to first let the entering get added to a batch).

Alternatively you can forego the "Breathe" and instead check if the batch the token will get added to will reach a quantity of six immediately. This is implemented in the code of the "Group By" field of the Batch activity. This code gets run for each arriving token and has the benefit of having a direct reference to the activity. The code creates a new token and writes some information about the batch to it in an adjacent "Start" activity.

partial-batch-trigger.fsm