how to get the output variable of a queue ?

how to get the output variable of a queue ?

mohamed_slama
Not applicable
184 Views
3 Replies
Message 1 of 4

how to get the output variable of a queue ?

mohamed_slama
Not applicable

In my model I need the value of the output of the queue during my simulation.

Can someone helps me to get this value with a code ? Something like 'getvarnum'...

Thank you

Accepted solutions (1)
185 Views
3 Replies
Replies (3)
Message 2 of 4

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

int output = getoutput(node Queue); // node Queue is the reference to your queue-object

int output = getoutput(model().find("Queue100")); // if you use the find method.

Message 3 of 4

joerg_vogel_HsH
Mentor
Mentor

It is even simplier, if you use the sampler tool (Icon of an eye dropper). Then you move this tool over the Queue and click the left mouse button. You choose from the opening window the entry "Getters..." and then the appropriate line of code.

7313-sampler-tool-stats-output.gif

@Mohamed Slama

Message 4 of 4

Matthew_Gillespie
Autodesk
Autodesk

As @Jörg Vogel shows in his comment, the Object class has a stats property that lets you access a bunch of statistical values that the object keeps track of. To get the output it looks like this:

Object obj = model().find("Queue1");
int output = obj.stats.output.value;


Matthew Gillespie
FlexSim Software Developer

0 Likes