question

Johan Sebastian VDA avatar image
0 Likes"
Johan Sebastian VDA asked Cliff King edited

¿How I can remove or send to a sink items from an incomplete batching?

Hey,

I have 6 queues with a target batch size of 120, but at the end of the model (1 AM) I have to remove all the items from this queue or send them to a sink because at this point of the model there are no more items to complete the batch and also I can't have any items at the end.

I can't use "Max Wait Time" or Process Flow. Just have to work with triggers or variables. It does not matter the quantity of the last batch.

Thanks for your attention.

ModeloFinal.fsm


FlexSim 21.0.0
flexsim 21.0.0batch size
modelofinal.fsm (255.6 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

Cliff King avatar image
0 Likes"
Cliff King answered Cliff King edited

One thought would be to use a User Event at time 1AM that releases all the items that are currently in the queue by calling the command "releaseitem()" on each item. I just tested the following code in a Script Console and it seemed to work:

If the queue needs to be reset for another batch arriving later after 1AM, then you may need to reset the current batch size property of the queue as well by adding this line of code to the end of the code snippit above:

obj.setProperty("currentbatchsize", 0);



1607632154525.png (18.6 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.