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

Valentin O avatar image Valentin O commented ·
@Jörg Vogel

Thank you but it doesn't work. I get this message: "

erroneous-model.fsmLabel property Type retrieved on /Separator1/Product. Label does not exist. at MODEL:/Separator1>variables/sendtoport"

I should have stated that I am a beginner with FlexSim. I can provide you the model, it's attached in this message if you want to take a look upon what I have done.

0 Likes 0 ·
erroneous-model.fsm (19.2 KiB)
Joerg Vogel avatar image Joerg Vogel Valentin O commented ·

@Valentin O, I enhanced my answer with pictures and an example model,

0 Likes 0 ·
Valentin O avatar image Valentin O Joerg Vogel commented ·

@Jörg Vogel

Thank you again. I have done the settings provided by you but I can't fully grasp how can I control the exact number of elements that will after go to queue above and the number of elements that will go to queue below.

As you can see, the processor2 (above) has an output of 67 items while the one below has an output of 33. This is what I am trying to do. To try to control the exact numbers of elements that go out of the separator to their specific ways downstream.

What am I doing wrong /?

0 Likes 0 ·
2.jpg (255.7 KiB)
Show more comments
Joerg Vogel avatar image Joerg Vogel commented ·

The basic setting to get 450 items is a parameter of the Separator properties page:

0 Likes 0 ·
Valentin O avatar image Valentin O Joerg Vogel commented ·

@Jörg Vogel

You are right, I have mistakenly put 100 there in the model provided first and was different than the initial question. I changed according to your instructions. Unfortunately apparently the version of the model you provided is not compatible with the version I have. erroneous-model-autosave.fsm This is the model with the modifications. It still is erroneous, having something to do with the labels. But the settings are just as you instructed, and they seem now logical to me.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Valentin O commented ·

Yes, there is a error in your settings!

I have written above the code that you should insert there!

current.stats.output.value%3
0 Likes 0 ·
Valentin O avatar image Valentin O commented ·

@Jörg Vogel

It works now. Thank you very much for your time and answers.

0 Likes 0 ·