question

alice avatar image
0 Likes"
alice asked Andrew O commented

Can't get statistics for chairs1

Emergencyroomsim1_autosave.fsm

Why aren't we able to get any statistics from chairs1? We want to measure the amount of time the patients have to wait there. Can someone help us?


Version 20.0.2

Other (please specify)
Other
statisticshospital
· 1
5 |100000

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

Andrew O avatar image Andrew O commented ·

Hi @alice, was Kavika F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Kavika F avatar image
0 Likes"
Kavika F answered

Hey @alice, I can't really run your model because I get a bunch of errors; however, I hear what you're trying to do. Here's a sample model you can look at with a Statistics Collector that keeps track of a person's arrival, exit, and total staytime at a set of chairs.

Chairs Staytime Statistics Collector.fsm

I'll break it down. Start by adding two events to listen to: Chairs1 - On Entry and Chairs1 - On Exit. When a person enters the Chairs1 waiting area, it will record the Model.time. Then, when that same person exits the Chairs1 waiting area, it will record the Model.time. After that, I do a simple subtraction between the exit time and the entry time to get the total staytime of a person in those Chairs.

1671755400478.png

1671755418222.png

1671755424707.png

1671755433812.png

Note: for the Staytime Column Value, I opened the Custom Code to define "table" as Table("StatisticsCollector1") to make things prettier.

Also, make sure to directly link those events and columns:

1671755486784.png



5 |100000

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