question

Christian_c21 avatar image
0 Likes"
Christian_c21 asked Jason Lightfoot commented

Single source with different flow items and colors for each item?

How can I use a single source to follow a 1 hr schedule that creates a total of 500 items. The items are boxes, cylinders , sphere. The amount of spheres & cylinders have different triangle distributions and the boxes are the remainder of the 500. All 3 flow items can be either red, blue, or black and the items have equal probability of being one of the colors. How can this be done?

FlexSim 23.2.1
labelssourceflowitemclass
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @Christian_c21, was Joerg Vogel's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Felix Möhlmann commented

You cannot achieve a total discrete sum just by a statistical distribution. You need to integrate a balancing mechanism that adjust distribution parameters dynamically. Or you leave the path of total randomness and you let draw 500 values statistical distributed every hour that you scale to fit into an hour by a factor build from sum of all values and an hour.

· 2
5 |100000

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

Christian_c21 avatar image Christian_c21 commented ·
Can you attempt this in a flexsim file so I can fully understand what you mean
0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Christian_c21 commented ·

To distribute a known number of types randomly, I'd first create an array with all types that should be assigned, then choose a random entry from that array each time an item is created and remove that value from the array.

Since the colors are independent, you could use the "Color by Case" option with a uniform distribution as the case value.

type-from-array.fsm

0 Likes 0 ·
type-from-array.fsm (32.4 KiB)