question

Ricardo avatar image
0 Likes"
Ricardo asked Jason Lightfoot commented

Build a dice game in the production flow

How is it possible to define a source supply with a random variation of 1 to 6? Like a dice game? Each round a random number ranging from 1 to 6 is set and this will be the number of pieces to be placed in the production downstream. Does anyone know how I define Arrival Style and Inter-Arrival Time in the Source to work this way?

FlexSim 23.2.1
schedule source
· 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

Kavika F avatar image
0 Likes"
Kavika F answered

Hey @Ricardo, if you have a Schedule Source in Process Flow (or a Date Time Source), you can spawn a certain amount of tokens based on a duniform distribution to choose a whole number randomly from the range 1-6.

1702493480257.png

The equation:

  1. duniform(1, 6, getstream(current))

You can also have the value be a label on a token so you can use it in a Create Object activity:

1702493574935.png


1702493480257.png (32.1 KiB)
1702493574935.png (25.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.