question

Christopher S2 avatar image
1 Like"
Christopher S2 asked Matthew Gillespie commented

Exception with distribution in a global table caused by getstream(current)

Good morning,

I am using a global table to look up cycle times for my processors based on their names. This works fine. I then tried to add in a distribution into the table, by assigning the cell data type to Flexscript. I used a beta distribution:

  1. beta(138.8, 200, 2, 10, getstream(current))

This results in the following exception, and the cycle time of the processor becomes instantaneous (or close to it).

  1. time: 0.000000 exception: FlexScript exception: Property "dataType" accessed on invalid node. at /0

If I remove the getstream(current) and replace it with an integer, everything functions as normal.

Do I have to select a stream manually? Or am I doing something wrong in trying to use the default getstream(current) function?

FlexSim 18.2.2
global tableflexscriptflexscript exceptiondistribution parametersdatatype
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

Joerg Vogel avatar image
2 Likes"
Joerg Vogel answered Matthew Gillespie commented

"current" isn't a pointer in the scope of the method executeCell of the object you call the function. If you place a direct pointer like model() or model().find(obj name) this works.

· 5
5 |100000

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