question

Valentin O avatar image
0 Likes"
Valentin O asked Valentin O commented

HELP PLEASE Separator for dividing one item into two types of multiple items ?

So the logic is:

From the source I have only 1 item that has to be separated (split) into 450 items. But These 450 should then be divided into 300 items and 150 items, with different color. I want to put 150 on the queue above and 300 on the queue below. I have troubles trying this, can you please help me?

All the other elements in the picture above have the default settings.

Thank you!

FlexSim 18.2.3
separatorsplittypeseparatorsseparating
capture.jpg (454.3 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

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

This is a method for the modulus operator. It is a integer division with the rest as the result of the operation.

  • 1%3 = 1
  • 2%3 = 2
  • 3%3 = 0
  • 4%3 = 1
  • 5%3 = 2
You select for the input of this operation the statistical output value of your separator in the send to port function with the picklist option Port By Case.
  1. current.stats.output.value%3
This is the value you are looking for the output port.
It’s up to you which results you divert to the output ports. For example
  • default : port 1
  • case 1: port 1
  • case 2: port 2
The results [0,1] are sent to port 1 and the result [2] is sent to port 2.

You can change the color and type in the OnExit trigger matching with the port the item is leaving the object.




· 8
5 |100000

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