Jump to content
Simio Forum
khaterehhadi

Collect statistics on workers

Recommended Posts

I have a network of transfer nodes with workers moving between them. I want to calculate the time that each worker spends in each node. How do that?

Thanks,
Kati

Share this post


Link to post
Share on other sites
It depends in part on how many combinations you have and what you want your output to look like.

In general, you will probably want to have some process logic executed on the entry and exit from the node, that captures in a TallyStatistic the time that the worker spent in that node. An alternative to a TallyStatistic might be a State array or simply writing to a file. That process logic could potentially be on either the Worker or on each Node.

I don't think we have a SimBit that does that, but you might look at [b]ElectricVehicle[/b] and the [b]Vehicle***[/b] SimBits for some ideas.

Share this post


Link to post
Share on other sites
I have limited number of nodes and workers so it wouldn't be a problem to repeat the process for each node/worker. I have 6 node with a boolean state assigned to them. Three of them are assigned "true" and the other three to "false". I want to calculate the time that each worker spends in each "true" node and then have the total time spent in "true" nodes for each worker.

I set Add-on process triggers for one of the workers and used processed logic. On "Entered node", I collected Tally statistics of TimeEntered using the expression of "Run.TimeNow". On "ExitedNode", I collected Tally statistics of TimeExited using the same expression. I have the time entered and exited from the node, but couldn't calculate the time in between (which is time spent in the node) since the Tally statistics are referenced elements and are not numbers to be subtracted, I guess. any hints on how to solve this?

Thanks.

Share this post


Link to post
Share on other sites
Yes, instead have a state on the worker named something like TimeEntered.
On entry assign TimeEntered = TimeNow.
On exit tally the expression "TimeNow-TimeEntered" to record an observation for how long it was in the node.
That will give you min, max, average, and number of observations. You can multiply the last two to get a total.

Share this post


Link to post
Share on other sites

×