I'm interested to know the different methods the AnyLogic community uses to record time in state statistics. To explain what I mean, I'll give you an example:
Say I am modelling a movie theatre with multiple cinemas. Each cinema is modelled as an agent with a state chart in which the cinema can be in one of a number of states:
- Idle (cinema is not currently being used)
- Filling (cinema is open and is filling with patrons)
- InSession (a movie is currently playing)
- Emptying (patrons is open after the movie and patrons are leaving)
- Soiled (cinema is empty after a movie session but is yet to have been cleaned)
- Cleaning (cleaners are doing their thing)
Suppose I now want to record and output statistics on the time and count of states that each cinema is in along the lines of:
Cinema 1 States:
+-----------+-------------+--------------+--------------+
| State | Occurrences | Average Time | % Total Time |
+-----------+-------------+--------------+--------------+
| Idle | 25 | 60 | 20% |
+-----------+-------------+--------------+--------------+
| Filling | 50 | 20 | 10% |
+-----------+-------------+--------------+--------------+
| InSession | 50 | 90 | 40% |
+-----------+-------------+--------------+--------------+
| Etc. | ... | ... | ... |
+-----------+-------------+--------------+--------------+
Please share the techniques that you use to achieve this in AnyLogic.