question

Abel van der Windt avatar image
0 Likes"
Abel van der Windt asked Matthew Gillespie commented

How to change state of patient when performing animation?

I am busy with building a simulation model of a hospital. When I added a state pie for the patients I noticed that if a patient is performing an animation, for example taking place on a seat in the waiting room, this counts as idle time.

Can I change the state of a patient during an animation somewhere?

FlexSim 19.1.1
animationpeople modulestate
· 2
5 |100000

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

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

Are you talking about the second it takes the person to sit down? If so you're not using realistic process times. Most process times and travel times are much longer than the brief moment it takes a person to sit down, so that time should not even really show up in the course of a patient's flow.

0 Likes 0 ·
Abel van der Windt avatar image Abel van der Windt Matthew Gillespie ♦♦ commented ·

Yes, I put in just one patient in the model to see what happens. Then, if you add up the time of all the animations of a patient throughout the hospital I end up with 0.39% idle time on a total time of 4.15 hours that this patient spent in the hospital.

0 Likes 0 ·

1 Answer

·
Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Matthew Gillespie commented

You can customize the Enter and Exit instructions of Location objects. You could add an enter instruction that sets the patients state using code like this:

loc.stats.state("HC States").as(TrackedVariable).value = "InTransit";
· 2
5 |100000

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

Abel van der Windt avatar image Abel van der Windt commented ·

Hi Matthew,

Thanks for the answer. What is the reasoning behind setting the state to Idle instead of keeping it on In Transit for example?

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Abel van der Windt commented ·

The state is set to InTransit when someone does a travel task, but then reverts back to idle because the travel task is over. Then the state isn't set again until the Process activity starts.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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