question

AdvitSphinX avatar image
0 Likes"
AdvitSphinX asked Felix Möhlmann commented

Why is source making this type of issue?

I want a source to make 4 types of products.

To achieve that, I added a trigger in source, 'on creation --> set label and color and added the value "duniform(1, 4, getstream(current))''.

This created first a green color product, then a red then a blue and then again red. But I wanted a 4th different part. The 4th yellow part comes but then many other blue, red and green parts come again before it.

How can I make the source to give me 4 types of parts then again 4 types and then again like that?

Kindly Guide

Some images are attached below for reference.

1712767682883.png1712767711138.png

1712767752775.png


FlexSim 24.0.1
sourcetypes of products
1712767711138.png (12.0 KiB)
1712767752775.png (254.6 KiB)
· 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.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Felix Möhlmann commented

"duniform()" is a random distribution. Each item has an equal change of being assigned any of the possible values.

You can instead use a repeating sequence table and only assign the color in the On Creation trigger.

capture1.png

Or, if you want to use the inter-arrival time, use a modulo expression that determines the type based on the source's output statistic.

capture1.png


capture1.png (40.6 KiB)
capture1.png (8.3 KiB)
· 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.