Schedule Model with Queing

whitneybrook

New Member
Joined
Nov 16, 2015
Messages
2
I am trying to build a scheduling model for a clinic. Right now I am focused on building the basic model (random variation elements will be added later). Eventually, I am hoping that I can show wait times for patients and resource utilization patterns based upon different scheduling templates.

The first sheet is a list of appointments and the time each patient will spend during different phases of the appointment. I am hoping to make certain columns (e.g. C & E below) dependent upon resource availability. So if a patient arrives at 8:05 am, they will start check-in right away, but if all registrars are busy, the patient will wait for the next available registrar. I used an if function below to show my logic, I'm not assuming that an if function will work.

This tab is called "Appointments":

ABCDE
1PatientsArrival TimeCheck-In StartCheck-In FinishRooming Time
2Patient 18:00 am8:00 am8:05 am8:05 am
3Patient 28:05 am=if(Registrar Available, Arrival Time, Next Available Time)=C3+Times$B$2=if(Nurse available, Check-in finish time, Next available time)

<tbody>
</tbody>

In order to determine whether or not a resource is available, I have created a table that counts how much of each resource is currently used (by minute).

This tab is called "Resource Table":

ABCD
1TimeRegistrarsNursesExam Rooms
28:01 am100
38:02 am=countifs(appointments!C:C,"<="&A3,appointments!D:D,">="&A3similar to B3, but for nurse timepointssimilar to B3, but for room timepoints

<tbody>
</tbody>


Each resource has a separate capacity restraint. I imagine I will put those in another table, but for now, I think it may be good enough to assume that limits will be hard coded with the Registrar constraint = 5; Nurses = 4, Exam Rooms = 8.

Ideally, C3 of Appointments will return 8:05 am if there are 4 or fewer registrars available when Patient 2 arrives (this creates a circular reference problem because Resource Table B3 counts Appointments C:C). If there are 5 registrars in use, a time will be returned when the number of registrars drops. I don't know how to accomplish that last step.

I suspect if I know how to get Excel to look for the next available time slot, then I can probably fiddle to get rid of the circular reference problem, but an integrated solution that considers both problems is probably best.

I have no VBA skills (other than I once "borrowed" a script and it worked).
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi Whitney,

what about this to start you off:
https://www.dropbox.com/s/melwn4nhdifplxm/waiting_rooms_planning.xlsx?dl=0

What I did:
-create a series of patients coming in
-for times: Excel sees a time as a decimal number, so 12:00 = 0,5 and 18:00 = 0,75. The nasty bit about that is the rounding, if you keep adding 1 minute (= +1/(24*60) ), then minor rounding differences will pop up, causing formulas not to work as expected. So I "translate" the times to a rounded whole number, 12:00 is then 720, 06:00 is 360 etc.
-the patients come in in intervals of a couple of minutes, see B60 for a formula that can be dragged up and down, having a patient entering every 2-5 minutes.
-the same goes for the check-in time in minutes (column F), which depends on the variables in RESOURCES, using two named cells
-first calculation step is in column D to check how many Registrars are busy
-next is column E, that tells the time when somebody can go and see a registrar. The LARGE function is key there. Another named range was used for the number of registrars.

The nurse block is essentially the same as the registry block.

Hope that gets you started,

Koen
 
Upvote 0
Thanks! And here I was trying to teach myself Visual Basic in the hopes that I would stumble on a potential solution. That's still on the To Do list, but this is a much easier approach. Thanks for putting so much effort into this.
 
Upvote 0
Hi Whitney,
if you run into VBA issues, please give me a poke, I'd be happy to help this model a step further :).
Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,215,221
Messages
6,123,701
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top