question

Jaime G avatar image
0 Likes"
Jaime G asked tannerp commented

I require reading random process times from global table

Dear collaborators. I must read random process times from a table whose cells I have declared in flexscript format. But simulating the model warrants this error message:

time: 16.289937 exception: FlexScript exception: Property "dataType" accessed on invalid node . at <no path>

Annex the model, which includes the global table: Time Process invoked from each processor.

Modelo: Flujo empleando tiempos aleatorios desde tabla.fsm


FlexSim 20.0.0
flexsim 20.0.0
5 |100000

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

Regan Blackett avatar image
1 Like"
Regan Blackett answered Jaime G commented

While you can use the expression:

getstream(current)

within the cell of a global table, it's a little difficult, because there is no built in reference to 'current' in the code for a table cell; you would have to construct one yourself.

What is easier is just using a stream number parameter instead so use something like:

normal(12,1.2,1);
return triangular(5,12,1.2,2);
return uniform(3,5.6,3);

with numbers in the last parameter in the distribution instead of getstream()

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

Jaime G avatar image Jaime G commented ·

@Regan Blackett

Dear Regan, thank you very much for your collaboration.


0 Likes 0 ·
Jeff Nordgren avatar image
1 Like"
Jeff Nordgren answered

@James G,

Attached is your model with the changes that I've made. @Regan Blackett answer is correct. This just shows you how to implement it into your model.

If you have any questions or problem, please let us know.

Thanks.

flujo-empleando-tiempos-aleatorios-desde-tabla-JN1.fsm


5 |100000

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

Jaime G avatar image
0 Likes"
Jaime G answered Joerg Vogel edited

Dear collaborators . In order to generate seed randomly, I tried this code in the global table and it gave no error. From a statistical point of view, is this correct?

double Semilla = duniform(1,100,4);

return normal(12,1.2,Semilla);

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

Joerg Vogel avatar image Joerg Vogel commented ·

No, it is not correct, because you load your model and the seed values are the same again. But if you have a license and you set a global preference on the environment tab to “initialize random streams based on system time“ you get around this problem. You don’t even need a duniform to choose a different stream anymore, because you choose a first value somewhere else on the stream then before.

But be aware of the main menu Statistics option “Repeat Random Streams“. If it is set for finding errors in your model, every run gets same results, This behavior is default always set to on in express licensed version and you can‘t get around it.

0 Likes 0 ·

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.