question

SudheerReddy avatar image
0 Likes"
SudheerReddy asked Matthew Gillespie answered

Attach label to Separator split quantity

I am trying to use the separator to split the flow items. I have given split Quantity as 2, now the items which are leaving the separator I need to attach label Type 1 for first flow item and Type 2 for second flow item.

How to achieve this. I am attaching the model for your reference.

sep.fsm

FlexSim 20.0.0
separators
separator.jpg (46.0 KiB)
sep.fsm (24.9 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

·
Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered

In this model I use the object's output value to figure out which item is currently exiting. So when the first item leaves the output is 0 so I assign it type 10. The second gets type 9 ... and then the 10th item gets type 1. The 11th item then gets type 10 again.

int splitQuantity = 10;
int curNum = splitQuantity - current.stats.output.value % splitQuantity;

item.color = Color.fromPalette(curNum);
item.Type = curNum;

separatornumber.fsm


separatornumber.fsm (25.2 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.

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.