question

Lou Keller avatar image
0 Likes"
Lou Keller asked Matthew Gillespie commented

Record delay in starting location maintenance

In a certain model, the analyst would like to record the time a patient leaves his/her exam room by writing the time to the exam room's (ExamRoom1) label titled, "PatDepartTime." According to the User's manual, the analyst should use a statement, to wit, setlabelnum(object, "PatDepartTime," time());. Then, when the cleaning crew arrives, the analyst would like to subtract the current model time from the PatDepartTime for that location, and then record that value in a global variable (CleaningDelay) for eventual display and analysis. In short, the analyst would like to keep a running record of the time it takes cleaning crews to arrive. What are the correct statements need to execute this requirement?

FlexSim HC 5.1.0
healthcarestatisticsmaintenanceglobal variable
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

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Matthew Gillespie commented

In this example model I'm using two triggers on the locations: the On Exit and On Start Maintenance triggers. In the On Exit trigger I set the PatDepartTime label on the location to be the current time. In the On Start Maintenance trigger I read this label and add the difference between it and the current time to the CleaningDelay global variable.


cleaningdelay.fsm (80.8 KiB)
· 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.

Lou Keller avatar image Lou Keller commented ·

Perfect! Thanks as usual!

0 Likes 0 ·