question

Gui Vaccaro avatar image
0 Likes"
Gui Vaccaro asked Felix Möhlmann commented

How to create a list partition when it is populated with "toFlatArray()" ?

Hello, is there a way to partition a list when the values are pushed using "toFlatArray"? In this picture, I am trying to use a label (""shift") from the objects being added as the partition. I added an extra label-column ("shift") to the list to use it as a partition, but none of the alternatives found in the documentation seem to partition the list.

1733590875723.png

Thank you for any help.

FlexSim 24.2.2
listpartition id
1733590875723.png (202.9 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

I am not aware of a method to push multiple values to a list at once while dynamically determining their partition. You'd have to do (at least) as many pushes as there are different partition IDs.

Easiest option would probably be to use a sub flow.

5 |100000

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

Gui Vaccaro avatar image
0 Likes"
Gui Vaccaro answered Felix Möhlmann commented

Hi, @Felix Möhlmann , thank you. Could I pre-define that list field as the partition somehow? The model can have a variable number of shifts defined, but the partition will be always by shift. I do not see an option for pre-defining partitions in the list configuration, though. Thank you.

· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·

No, the partition must be defined for each push.

1733755605673.png

0 Likes 0 ·
1733755605673.png (62.8 KiB)