I require reading random process times from global table

I require reading random process times from global table

jaiagiraldog
Participant Participant
629 Views
5 Replies
Message 1 of 6

I require reading random process times from global table

jaiagiraldog
Participant
Participant

[ FlexSim 20.0.0 ]

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


0 Likes
Accepted solutions (1)
630 Views
5 Replies
Replies (5)
Message 2 of 6

regan_blackett
Autodesk
Autodesk
Accepted solution

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()

Message 3 of 6

jeff_nordgren
Not applicable

@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

Message 4 of 6

jaiagiraldog
Participant
Participant

@Regan Blackett

Dear Regan, thank you very much for your collaboration.


0 Likes
Message 5 of 6

jaiagiraldog
Participant
Participant

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);

0 Likes
Message 6 of 6

joerg_vogel_HsH
Mentor
Mentor

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