question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Felix Möhlmann commented

How to Link Empirical Distribution in Input Global Table?

Hi Team,

I am trying to link process time with empirical distribution defined in input global table. But it is not working for me.

What is the right way to do it?

LinkEmpiricalDistributionWithGlobalTable.fsm

Thank you!

FlexSim 21.0.10
global tableempirical distributionlink
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

Currently you are only creating a reference to the distributions node. To generate a value you have to use 'Empirical.get()'. Either you add this to the end of your current code line. Or you can also reference the distribution by name directly.

In any case, you also have to return the value the distribution generates as the value of the table cell when it gets read.

return Model.find("Tools/EmpiricalDistributions/EmpiricalDistribution1").as(Empirical).get();

or

return Empirical("EmpiricalDistribution1").get();
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ankur A3 avatar image Ankur A3 commented ·

Hi @Felix Möhlmann,

I have 1 question here. Suppose I want to give only distribution name in Input table. Can I attach .get() in process time?

1653488645306.png

I am not able to fetch value in this case.

Thank you!

0 Likes 0 ·
1653488645306.png (15.7 KiB)
Felix Möhlmann avatar image Felix Möhlmann Ankur A3 commented ·

Type just the name in the table and call 'Empirical().get()' with the table cell as argument.

1653498893329.png

0 Likes 0 ·
1653498893329.png (13.9 KiB)