question

Binck avatar image
0 Likes"
Binck asked Binck commented

Value keeps giving out 0, where did we go wrong?

For our study in Industrial Engineering at Inholland University, we are using Flexsim for a simulation project. We're attempting to simulate patients with a chance to receive a specific value in a label. For this purpose, we are thinking to add a discrete empirical distribution to a label. However, each time we attempt this, the value of the label remains at 0 (see Figure 1; the label is called 'SpCode'). Figure 2 depicts the table we are utilizing, and Figure 3 displays the code specifications. Could anyone assist us in identifying where the issue lies? Our project group is all fairly new to Flexsim, so it would be helpful if the answer is clearly explained for us to follow easily.

Thank you in advance!

1715683921999.png1715683927680.png

1715683934238.png


FlexSim 24.1.0
labeldempericalwrong value
1715683921999.png (169.7 KiB)
1715683927680.png (107.2 KiB)
1715683934238.png (285.5 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.

1 Answer

Patrick Zweekhorst avatar image
1 Like"
Patrick Zweekhorst answered Binck commented

Hi @Binck ,

The dempirical command only return numbers, so that is where it goes wrong.

An easy solution for this would be to add an extra column to your table. The 2nd column will just have the row numbers, and the 3rd column will have the text value you need:


1715684751960.png



In you assign labels activity you then first sample the row using the dempirical function. Then use that row to read the text value:


1715684813447.png



Attached is the example model.

dempiricalVoorbeeld.fsm

Good luck with the model!

Patrick


· 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.

Binck avatar image Binck commented ·
Hi Patrick,

Thanks a lot for your answer, it really helped!

0 Likes 0 ·