question

Alexander Muff avatar image
0 Likes"
Alexander Muff asked Jeff Nordgren commented

How do I batch by multiple labels in a single batch process block?

I am trying to batch by two labels: setID and type. There are 3 unique type's. The setID will increase indefinitely as the model runs. You can't batch different setID's together.

Type 1Type 2Type 3
Qty/set231
batchSize221
setIDindexes every 2 tokensindexes every 3 tokensindexes every 1 tokens

In the attached model. I have written the ProcessFlow to include separate process streams. How do I combine this batch logic into a single batch process block?

Example: GroupBy: type AND setID

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

Jeff Nordgren avatar image
1 Like"
Jeff Nordgren answered Jeff Nordgren commented

@Alexander Muff,

Attached is your model with the blocks that I added in the Process Flow. If I'm understanding what you are wanting to happen, this should do that. I added more fields to your global table to help in figuring the setID label. So what happens is that each item type is batched into the BatchSize in the global table. Each new batch is given a new setID or batch ID. When a token goes into the Delay block, there should only be one token representing the batch (setID).

Take a look at the model and see if this is what you were wanting to do. Let me know if you have any questions or problems.

batching-test-model-jn1.fsm

Alexander,

I've taken the added information you gave above and modified my model. I added a global table (2) that has the "Color" and "Shape" information in it. I use numeric fields because they are a lot easier and more efficient to use that string fields. So really the numbers represent colors and shapes. In the table there are 9 different combinations of colors and shapes.

For each combination of colors and shapes, the row of the table represents the "Type" of unique combination.

Take a look at the attached model and see if it now does what you are wanting it to do. I will create 9 different types of batches (combinations) with the batch sized determined by the global table. And for each "Type", it keeps tracks of a unique SetID (number of batches created for that Type).

batching-test-model-jn2.fsm


· 8
5 |100000

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