question

Felipe T avatar image
0 Likes"
Felipe T asked jing.c commented

How can I clear statistic values of a Sink during the simulation?

Hi !. I'm trying to figure out how can I add a step in PF or 3D that would make the statistics values of a "sink" or "queue" (input, output, content, staytime...) go back to zero at a specific moment. Anyone know how I can do this?

Thank you.

FlexSim 17.2.3
sinkinput port
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

Raja Sekaran avatar image
4 Likes"
Raja Sekaran answered jing.c commented

Hi @Felipe T

Use resetstats() command to clear the statistics values of the objects.

In the attached model, used this command in the OnEntry trigger of Sink.

I hope this is what you want.

Thanks.

support.fsm


support.fsm (16.7 KiB)
· 4
5 |100000

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

Felipe T avatar image Felipe T commented ·

Thank you! It was very helpful.

1 Like 1 ·
jing.c avatar image jing.c commented ·

Hi, @Raja Sekaran Do you know how to only reset the statistics values of specified object, not all the object?

1 Like 1 ·
Raja Sekaran avatar image Raja Sekaran jing.c commented ·

Hi @jing.chen,

Try this,

Object current = ownerobject(c);
Object inObject = current.inObjects[1];

current.stats.input.reset();
inObject.stats.input.reset();
4 Likes 4 ·
jing.c avatar image jing.c Raja Sekaran commented ·

yes! It works well! Thanks~

1 Like 1 ·