question

ROBIN avatar image
0 Likes"
ROBIN asked ROBIN commented

3 types of items in a separator with different Splitting quantity

Hello guys ! I'm new to the Flexsim and I need your help with my project.
I have a source that gives three types of items (by percentage) and each of these items needs to go into a separator with different split quantity. I need to label the splitted parts according to the labels and quantities presented in the table attached.
screenshot-2025-03-14-at-025438.png
it doesn't matter if the different items go into one of different queues.

Thank you guys in advance!!

FlexSim 23.2.3
labelsseparatorsplitting
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 ROBIN commented

I would use the OnEntry trigger of the separator to create an array of values which will be assigned to the exiting items.

  1. Array subTypes = [];
  2. Table splitData = Table("SplitData");
  3. for(int col = 1; col <= splitData.numCols; col++)
  4. {
  5.     string name = splitData.getColHeader(col);
  6.     int qty = splitData[item.Type][col];
  7.     subTypes.append(Array(qty).fill(name));
  8. }
  9.  
  10. current.setProperty("SeparateQty", subTypes.length);
  11. current.SubTypes = subTypes;

In OnExit trigger the first element of the array would then be assigned to the item and removed from the array (so the array is empty once all items have exited).

· 6
5 |100000

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