question

Brandon I avatar image
0 Likes"
Brandon I asked Braydn T answered

How to use decision point to split 3:2 between 2 conveyors

Hi there,

Is there a way to simply have a 3:2 ratio of flow items at the conveyor split (3 top, 2 bottom) using a decision point?

I have tried to make use of the modulus condition but I'm not too sure how it works, and only managed to achieve a 3:1 with:

  1. current.stats.input.value%4

conveyordecision-autosave.fsm

Kind regards,

Brandon

FlexSim 19.0.0
decision pointsconveyor decision pointmodulus
5 |100000

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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel commented

The modulus seems to do it in conjunction with "send item by case".

The division is by 5 and you can choose two cases of from {0,1,2,3,4} to go one send to connection and by default to go to the other connection.

If you rather need a more randomly approach, you replace the modulus division by a discrete uniform distribution in “send item by case” function for example

  1. duniform(1,5)

where cases of 1 and 2 go to one decision point and by default to the other decision point.

conveyor-distribute-3-to-2.fsm


· 4
5 |100000

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

Braydn T avatar image
0 Likes"
Braydn T answered

@Brandon I

You would use something like this:

  1. int stream = getstream(current);
  2. double randomnum = uniform(0.0, 100.0, stream);
  3. double total = 0.0;
  4.  
  5.  
  6. total += 66;
  7. if (randomnum <= total)
  8. return 1;
  9. total += 33;
  10. if (randomnum <= total)
  11. return 2;

1 and 2 being ports. 66 and 33 are percentages.

5 |100000

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

Sebastian Hemmann avatar image
0 Likes"
Sebastian Hemmann answered Brandon I commented

Hi, I think "bernoulli();" is what you are looking for. It gives you the option to set percentages ;-)

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