question

Robert Hambright avatar image
0 Likes"
Robert Hambright asked Robert Hambright commented

How do I use max wait timer on a Batch activity in process flow?

Hello.

I have a very simple question regarding the batch activity in process flow. How do I use the max wait timer option? For example, if the batch size is 2 and items are created every 5 seconds. I want the max wait timer to be 1 second between item arrivals in the batch. How do I get the activity to release only the first token when the 1 second is up?

batch-max-wait.fsm

FlexSim 17.0.0
process flowbatchmax wait timer
batch-max-wait.fsm (17.8 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.

1 Answer

Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered Robert Hambright commented

If you're looking to wait 1 second between arrivals, you should use the Max Idle Timer instead. (Max Wait Time measures the wait time since the first token enters the batch, and will fire if the batch number is not met in that amount of time. Max Idle Timer measures the wait time between tokens arriving, and will fire if no new tokens arrive.)

So, select the Use Max Idle Timer, set your time requirement, then edit the OnIdleTimerFired options. (You can remove the Set Label logic, as well as the Release Batch logic since you only want to release one token.) Then add a new operation, Release Token, and set the value of the token field to "gettoken(current, activity, 1)" This will return the first token in the current activity. (If you want the released token to go to a different route than the other batched items you can also set the connector number here.)

I've attached a simple example model to demonstrate:

batchsample.fsm


batchsample.fsm (19.6 KiB)
· 2
5 |100000

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

Robert Hambright avatar image Robert Hambright commented ·

Using your model, how would I finish an incomplete batch after the idle timer is triggered? For example, 3/5 tokens are in the batch, then the wait timer is triggered. How can I release all three tokens and begin a different batch.

0 Likes 0 ·
Robert Hambright avatar image Robert Hambright Robert Hambright commented ·

I figured this out...I used the release batch.

1 Like 1 ·