question

Tee Hiett avatar image
0 Likes"
Tee Hiett asked Tee Hiett commented

getting the contents of a specific Chair in waiting room.

COVID-19 Vaccinations.fsm

In this model, when a patient arrives and gets instructions, I want to see if Seat_10 in Row_1 is vacant. If it is, I want the patient to acquire the next available seat in row_1 and walked there. If Row_1 is not available, I want to check each of the subsequent rows and send the patient to the next row that has an available seat.

How do I get the current contents of Seat_10 in a row of seats?

Thanks


FlexSim 20.1.3
flexsim 20.1.3healthcarewaiting room
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
0 Likes"
Matthew Gillespie answered Tee Hiett commented

If I understand correctly what you want, this is how I would do it. First, I put a label called Used on each chair in the model and set its value to 0. Then, I added a Used label field to the Locations list.

I put each of the three row groups into a parent group called Rows and then I have the patients acquire any seat from the Rows group. After a patient acquires a seat I set the Used label on that seat to 1. Then to make sure patients don't acquire a seat that has been used, I added a Filter By condition to the Seat resource that says, Used != 1.

Finally, after a patient walks to the ExitSpot I check to see if the whole row is now empty by calling getcensus() on the row group that chair is a member of. If the row is empty then I reset the Used label on each chair in the row back to 0 so that the chairs can be acquired again.

covid-19-vaccinations-1_UsedChairs.fsm


· 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.

Tee Hiett avatar image Tee Hiett commented ·

Thanks, @Matthew Gillespie Impressive work.

Tee

0 Likes 0 ·
Cliff King avatar image
2 Likes"
Cliff King answered Tee Hiett commented

Make it easy on yourself, just organize the chairs within the row objects and the row objects within a group to get the order of selection the way you want. The chair order isn't obvious in the 3D view, but if you dive into the Tree view, you can manage the chair order within a Row object. Make sure you exit "Edit" mode on the Row objects prior to running the model and before trying to add the three rows to a group.


1607718529183.png (685.0 KiB)
· 3
5 |100000

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

Tee Hiett avatar image Tee Hiett commented ·

Thanks, @Cliff King for the prompt and informative reply to my question. That helps me understand the overall process.

Now if you'll just give me the syntax for the command to check the contents of Seat_10 for in the row, I would appreciate it.

Have a great weekend

0 Likes 0 ·
Cliff King avatar image Cliff King ♦ Tee Hiett commented ·

OK @Tee Hiett, but don't say I didn't warn you! ;-)

Object focus = Model.find("/Row_1>visual/drawsurrogate/Seat_10");
return getstat(focus, "Content", STAT_CURRENT);


0 Likes 0 ·
Tee Hiett avatar image Tee Hiett Cliff King ♦ commented ·

@Cliff King @Matthew Gillespie

Cliff, I'm not sure what your warning meant, but I think it had to do with multi-location objects, so I changed to chairs being individual objects and grouped together by rows.

This is an auditorium that is being used as a holding room for patients after they get their Covid 19 vaccinations. They need to wait for 15 minutes to see if there is any allergic reactions before they leave.

Patients fill up row 1 and, after a patient has been in the system for 15 minutes, that patient will go to the exit spot for that particular row, become invisible (so as to not free up a chair on that row) and wait there until the patient for chair Row_1_8 leaves. When the last patient leaves the chair, all of the chairs on that row will be released and all patients removed.

Right now, I'm looking at 2 problems. The first is getting a patient to go to the next row if the first chair in the current row is occupied. This should occur in the first decision box in the Patient Flow.

The 2nd problem I'm anticipating because it hasn't happened yet. But would occur when the 9th and 10th patients arrive, they should go to row 2. Subsequent patients should continue going to row 2 unless row 1 gets cleared out then they should start filling up row 1.When that occurs, I need to figure out how to clear row 2 when all the patients on that row have finished waiting.

Thanks for the help.

COVID-19 Vaccinations_1.fsm

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.