question

JoseVM avatar image
0 Likes"
JoseVM asked Regan Blackett answered

Batches Transport after Separator

Hello everybody.

I have some problems in my simulation related to transporting batches after a separator. The blue cylinder simulate a long pipe that is splited into several smaller pipes (15) in the Separator. After cutting, I would like to simulate how the Operator takes the whole batch and moves it to the next Queue. However, I only got a single item transported.

To simulate that logic I created a "Create Tokens" Activity, where depending of the type of item, the processor splits the pipe in a different quantity. After that, I tried to combine that tokens into a batch using "Batch" activity, looking for a way to make the operator trasports the whole batch at the same time, but it does not work. I would be greatful if someone could help me. I attach the .fsm file

ejemplo-propio.fsm

Thanks in advance!

FlexSim 19.1.1
separatortransportbatching
ejemplo-propio.fsm (67.0 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

·
Regan Blackett avatar image
0 Likes"
Regan Blackett answered

There are a few things you should be doing differently here. First you should know the Create Token activity isn’t doing you may think it is. It looks like you are using it to create tokens meant to represent the “separated” pieces of you original flowitem, but that’s not what it’s doing. It’s just creating more tokens, unrelated to anything else. One token comes into the Create Tokens activity and then (in the case of the first flowitem) *16* are sent to the Delay; that’s the original token + the quantity set in the activity.

So first you have more tokens than you have separated Flowitems, and second those new tokens don’t have a reference to the separated Flowitems. This also means your Batch is building the wrong size because there is one token left over. Typically, the way Create Tokens is used, is to let 1 token create new tokens in a separate set of processes.

This is why the operator is only moving one flowitem; the array you build on the Batch is an array of references to the same original flowitem not the results of the separator’s split function. The new tokens have nothing to do with what the separator did, they are created as children of the original token. Which means they only know what the original token knew at the time of creation; the original flowitem.

I think you are making this problem more difficult than it has to be and simply using the standard object logic of making port connections and setting the Separator to use transport, is much more direct for the result it looks like you are going for. What are you gaining with Process Flow here that the standard logic doesn’t provide?

If you absolutely must take this approach, you can streamline it quite a bit by setting your Event Triggered Source activity to listen for the Send to Port event of the Separator. This is the first event the Separator “knows” about the Flowitems created from a split. As far as I can see there is no reason to create the tokens before this event because you only care about the tokens when it’s time to transport the pieces. This approach will give you a number of tokens equal to the number of separated Flowitems with unique references for all, which will allow the Batch and the Subflow for loading/unloading to work correctly. However, your going to run into an issue where the number of separated Flowitems varies by Type, which means the batch size you collect has to accommodate that. Set the batch quantity to collect quantities by case, much like you did on the separator split/unpack quantity.

ejemplo-propio-1-fixed.fsm


5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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