question

Hans D avatar image
0 Likes"
Hans D asked Hans D edited

Strange Error Executing Table Cell

I am trying to execute a probability distribution that is in a global table cell. I would like to assign the result to a label, and also use the value to define a delay.

It is strange that is works perfectly on one computer. On the other computer I am getting this error:

exception: FlexScript exception: Property "dataType" accessed on invalid node. at MODEL:/Tools/GlobalTables/GlobalTable1>variables/data/Row 1/Col 1

Here is the test model:

Distribution_From_Table_RevA.fsm

Thanks!

FlexSim 21.2.4
global table
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

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Hans D edited

The error is complaing about calling getstream() in your code. To properly use streams in a global table, you need to make two changes:

  1. Change your code in the global table to say
     uniform(10, 20 param(1))
  2. To pass in the stream, you need to evaluate the cell. In the Assign Labels, use
    Table("GlobalTable1").cell(1, 1).evaluate(getstream(activity))

I will also say that this feels like a model parameter. You can add a parameter (in a separate Parameter Table, if you want), and set its type to Expression. Then you can add the exact same code in step 1 above. The step 2 code would change to:

Model.parameters["MyParameter"].evaluate(getstream(activity))
· 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.

Hans D avatar image Hans D commented ·

Thanks for you response. The model works after making the changes.

I think there is a comma missing in your code for the global table.

uniform(10, 20, param(1))

I agree, this could be a model parameter. I will look into it. In the parameters table, I am not sure what to set as reference and On Set. I using the eyedropper to reference one of the delay activities but it does not accept it.

snag-673090.png

0 Likes 0 ·
snag-673090.png (92.4 KiB)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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