question

tr-simulation avatar image
0 Likes"
tr-simulation asked Andrew O commented

Can a triangular distribution function be edited to only output whole numbers?

the uniform distribution can be written as "duniform" so it only output whole numbers. How can we get the triangular distribution function to only output whole numbers too?

FlexSim 22.2.2
flexsim healthcare
· 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.

Andrew O avatar image Andrew O commented ·

Hi @tr-simulation, was Matthew Gillespie'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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered

There isn't a separate, discrete version of the triangular distribution like there is for uniform.

You could use the round() command to round the value to the nearest integer:

round(triangular(1, 5, 3))

Or you could create an Empirical Distribution that returns discrete values:

Empirical("EmpiricalDistribution1").get()

1673996471475.png



1673996471475.png (11.7 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.