0
$\begingroup$

I want to simulate an outpatient clinic that does not have walk-in. based on a scheduling model, I have already calculated arrival times and examination times and whether the patient will be a show or a no-show: enter image description here

We have a decipline or priority rule. let me show it by an example:

Suppose at 9:30AM patient4 (which is the 4th booked patient) arrives. patient4 is scheduled for 10:15AM. according to our decipline, patient 4 can enter the queue to get visited only if patient3 which is booked for 9:50AM is either already in the queue or started the visit or has finished it. so if patient3 gonna be a no-show then patient4 have to wait till 9:50AM and then can enter the queue.

We want to simulate the patients based on this decipline and read the data from the dataset that we already have.

How can I do this simulation in R? what other solution/tools do you suggest?

$\endgroup$
  • $\begingroup$ What exactly are you trying to achieve? What's the objective / point of this? $\endgroup$ – user2974951 Dec 19 '18 at 7:06
  • 1
    $\begingroup$ Check out the simmer package. I think this is possible but you’ll need to write custom functions for the arrival and seizing actions. Simmer will allow you to provide for instance exact arrival times or a distribution it can select from randomly. In this case you would need a function that has the scheduled time with some random variations and feed those as the arrivals into the simulation. The part about waiting to enter the queue until 9:50 is not something I’ve done in an equivalent manner. $\endgroup$ – Chris Umphlett Dec 19 '18 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.