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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @Ricardo, was Kavika F'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

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:

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.