question

gio-c avatar image
0 Likes"
gio-c asked gio-c answered

How to perform loading task for a variable quantity set in a global table

I have a model where operator1 travel to the destination and has to load a quantity of boxes. I tried using an iterative way with a label called counter, but it only does the load once and goes to the next queue. How can i solve this?
Thanks in advance. HELP.fsm

FlexSim 25.0.2
load
help.fsm (141.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.

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

If the Create Objects activity creates more than one object at a time, the label they are assigned to will be an array label.

In the Load activity you reference "token.box" which defaults to the first entry in the array label, so the operator is loading the same item multiple times. You can use the counter label as the array index to refer to the next box ("token.box[token.counter]").

help_1.fsm

I would recommend to use a Run Sub Flow activity instead of the loop structure though.

help_2.fsm


help-1.fsm (77.8 KiB)
help-2.fsm (78.2 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.

gio-c avatar image
0 Likes"
gio-c answered

Thank you very much it works perfectly

5 |100000

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