question

Patrick Cloutier avatar image
0 Likes"
Patrick Cloutier asked Jason Lightfoot commented

How to batch tokens but combine all labels from both inputs

I have multiple Sources in a ProcessFlow that create tokens with different labels on them.

Eventually in the process, those tokens are Batched (Groupby one of the labels).

That works well BUT the resulting token only contains the labels from the left input of the Batch.

Is there a way to automatically create (on the outgoing token) the labels that were on the token from the right input of the Batch as well as the left?

I'm not taking about aggregation as I don't want to do a calculation. I just want to have all the labels from the incoming tokens on the outgoing token.

Is that possible?

FlexSim 20.2.3
labelsflexsim 20.2.3tokens
· 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.

Patrick Cloutier avatar image Patrick Cloutier commented ·

I found a different approach by placing my info in a Global Table instead of a Source and then create labels and copy all table info to those labels.

It's not elegant but it works.

So my question is: Was there a way to do it automatically with Batch or Join as described above that I might have missed?

Thanks,

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

I can't see a standard way for doing this.

As Matt has mentioned in another post, accessing by rank is not strictly supported - but in the absense of being able to get an array of token labels, and with the caveat that it might break in the future and in will not work (as-is) with parent labels here's an example using the release Quantity field to merge the labels.

BatchMergesLabels.fsm


· 4
5 |100000

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

Patrick Cloutier avatar image Patrick Cloutier commented ·

Thanks Jason. I see it's saved in 2021. I will try it when I install 2021 which I haven't had time to do yet as I'm in a big rush to finish this project for this week. I will use the alternate method I found above which will not cause problems in the future for my customer who will be using this model. Thanks a lot.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Patrick Cloutier commented ·

Ah - sorry. Here you go.

20.2_BatchMergeLabels.fsm

1 Like 1 ·
Patrick Cloutier avatar image Patrick Cloutier Jason Lightfoot ♦♦ commented ·

That works great. Thanks Jason. However, since you indicated that this might not be "future proof", I don't think I will use this in a model that my customer will be using in the future.

0 Likes 0 ·
Show more comments