question

Vothan Salomão avatar image
0 Likes"
Vothan Salomão asked Logan Gold commented

Issue when using the separator (split) with item.rank

Hello, I’m having an issue with creating a model using a separator (Split). I created this simplified model to demonstrate my problem. When I try to use item.rank to separate the lb_Massa label according to a custom code in the Send to Port.

I’m trying to use the split for a quantity of 3 items, however, it assigns rank 2 more often, then rank 1, and almost never rank 3, and when it does assign rank 3, the model freezes.

What is the assignment criterion for .rank?

Separator Bug.fsm

1725477316005.png


FlexSim 24.2.0
separator.ranksplit mode
1725477316005.png (285.1 KiB)
separator-bug.fsm (28.0 KiB)
· 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.

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel commented

A send to port is executed on the items rank by state of still kept items in your separator.

Once an item left there are only n-1 items available to evaluate a condition. This is a mismatch many time occurs. First time you evaluate a state you may think it stays static until all items are gone. But this is not true, It is more a dynamic process. To evaluate for a rank three if no more items than two exists won't succeed. Maybe you turn around your logic or you set labels at your items to store there exit ports, when all of them are still present in your separator.

mode_of_splitting_and_involved_rank.fsm

Edit: Attached is a model. I send items by round robin for a separator in split mode on exit and print exiting items rank into the output console. You can always test a behavior of a model function. Commonly objects behaves as meant, but most often not as you assume they should behave. In such circumstances it is a good practice to build a test model to understand what happens. A separator is basically an object to unpack and then optionally to split. This said last kept item is by default a container. All others are a content of the container.


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