question

Tee Hiett avatar image
0 Likes"
Tee Hiett asked Matthew Gillespie answered

Questions on using a List on patient arrivals

OpenClose Glass Doors 20_1 A.fsm

@cliff.king I have changed my approach to patient arrivals to use a list for a more realistic arrival process and to learn how to use lists .

After checking in, The patient walks to the Wait for Elevator spot.

The patient selects the first elevator spot where the Elevator number is greater than 0 and the Priority equals 0. I think this is working as desired.

Next I want the patient to acquire the Elevator door for the elevator just selected (where the Owner of the elevator is the patient and use the elevator's number for the Case selection to select the corresponding elevator door). I do not have the syntax for this step.

The patient would then walk through the door to the elevator, take the elevator to the exit floor and release the elevator. When this happens, the patient starts towards the elevator door and, when he gets close, the door opens. The patient then jumps down below the Waiting Line and walks back to and through the elevator doors.

The patient remains inside the elevator for the time to take the elevator downstairs. Then the patient is removed and the owner of the elevator should be zero and the priority of the elevator should be zero but this isn't happening. The patient is removed but the value for the owner and the priority are not set to zero. Which means that the elevator is not available for the next patient.

Thanks, Tee

FlexSim 20.2.1
healthcarelistsflexsim 20.2.1arrivalspatient track
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
0 Likes"
Matthew Gillespie answered

Since you're using the Acquire Location functionality you don't need to write a custom SQL query. When you choose the Elevators group in the Location field it writes the WHERE Elevators AND Priority = 0 part for you. I updated the Location Elevator resource like this:

I also created center port connections between the elevator and its corresponding door. Then in the Walk to Doors activity I send the patient to the correct door by using that center object connection:

patient.Locations[1].as(Object).centerObjects[1]

The reason the elevator locations aren't being released correctly is that the location isn't actually released until the person inside exits. However, in this model you are removing (really just deleting) the patient while they are still inside the elevator and so they never really exit the location. I updated your model by adding a Move Object activity that moves the patient out of the location and into the model space before removing the patient.

openclose-glass-doors-20-1-a_1.fsm


5 |100000

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

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.