Jump to content

Collect statistics on workers

Recommended Posts

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 ElectricVehicle and the Vehicle*** 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?


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
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.