question

Kshitij Dhake avatar image
0 Likes"
Kshitij Dhake asked Felix Möhlmann commented

Only Separate flow items with specific label value

Sample Separter.fsmI have a pallet which is combined with 4 Flow items with value 1 or 0. I only want to separate flow items with value 1 and let the pallet and the rest flow items flow in the system

FlexSim 22.2.0
labelseparator
sample-separter.fsm (30.5 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

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

You'll need custom logic for this. For that it's pretty much always easier to start with a more basic object and build out the desired logic in Process Flow than it is to try and customize an object with a specific functionality such as the separator.

In the attached model I use a Queue and handle the separation and release logic in an Object Process Flow.

sample-separter_1.fsm


· 2
5 |100000

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

Kshitij Dhake avatar image Kshitij Dhake commented ·

Thanks. This is what I was looking. Will you be able to explain how is split/join working and also this code 1726686132627.png

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Kshitij Dhake commented ·

See the documentation for how split/join work. In short (and not 100% precise): Split sends a copy of the arriving token out through each connector. Join collects those tokens again, holding them until all have arrived.

In the model I use it because I want to wait until the item has actually left the queue after it is released before I continue the logic. Placing the activities consecutively does not always work. If the item can leave immediately, then placing the "Wait for Exit" activity after the release would miss the exit event and the token would become stuck. I send the first token from the split (note the connector rankings) to the Wait for Exit, so it is already waiting when the second token triggers the release.

Your picture did not upload successfully, so I don't know what code you are referring to. But the only custom code used in the model is in the "Get Type 1 Items" activity. As the name suggests, the code loops through all items on the pallet and creates a an array that contains all items of type 1 which then gets returned and thus assigned to the "ItemsToSeparate" label.

0 Likes 0 ·