Emergency Doctor

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
LuckyLuke
Posts: 4
Joined: Thursday 18 April, 2013 - 19:39

Emergency Doctor

Post by LuckyLuke »

I am currently modeling an emergency doctor example in ED. The systems conists of two different queues at the beginning (one for priority patients and one for normal patients). The treatment time (Cycletime of the server) of the doctor is calculated by driving distances from a given table and a average treatment time.

This task was rather easy, but the difficult part is the simulation of the return trip to the headquarter. This should be modeled as follows:

"If no further patient needs a treatment (empty queue), the vehicle returns to its headquarter,
located in the first district. If an emergency call is received during the return trip, it will be
immediately communicated by radio."

Now the question is if there's a possibilty to model the return journey to the headquarter in the same server used for the treatment? And how the return journey can be interrupted by a new patient (tokens from the queues)?

Thanks for your help!
Attachments
EmergencyCall.mod
(21.28 KiB) Downloaded 300 times
BartC
Posts: 47
Joined: Monday 05 November, 2012 - 17:05

Re: Emergency Doctor

Post by BartC »

Hi LuckyLuke,

Before I start trying to find a substantive answer to your question: Is it really necessary to model this behavior in the same server? Or are you also OK with other solutions?

Best regards,

Bart
LuckyLuke
Posts: 4
Joined: Thursday 18 April, 2013 - 19:39

Re: Emergency Doctor

Post by LuckyLuke »

Hi BartC,

I thought it would be easier to model it in the same server, but i'm also fine with more.

Thanks in advance!
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Emergency Doctor

Post by marlies »

Hi LuckyLuke,

Bart and I discussed the problem and suggest the following solution:

- Add the doctor as a product to your model.
- Model the steps with different servers: for travelling and for serving the patients.

See attached for an example. You will find the solution in the lower part of the model. The idea is:
- The servers ServeHighPrioPatient and ServeNormalPrioPatient have a batch strategy (see the tab batch) of 2 combined with a roundrobin input strategy. This makes sure that the process time starts when both the patient and the doctor arrived.
- After servertime the doctor is sendto travelto high prio when there is any high prio patient waiting, otherwise he will go to normal prio.
- In the entrytrigger of the ServerHighPrioPatient you will find a check: if the doctor is in the server TravelToNormal, he will be called back and moves directly into the server TravelToHigh. The only thing I didn't build in is the travelling time, which will depend on the time the doctor already spent in TravelToNormal. You can arrange that by using some labels for the traveltime.

Hopefully the idea is clear from this explanation and the model. If not, feel free to ask again.

Regards, Marlies
Attachments
20130507_EmergencyCall2.mod
(53.11 KiB) Downloaded 276 times
LuckyLuke
Posts: 4
Joined: Thursday 18 April, 2013 - 19:39

Re: Emergency Doctor

Post by LuckyLuke »

Hi Marlies,

thanks! your solution helped a lot!
everything is working right now as i want it to! :)

a small followup question:
in my solution only the way back to the headquarter should be interrupted, not if the doctor is allready on his way to a patient.
if there is enough time, the doctor returns and stays in the headquarter untill a call (either high or normal) arrives. what is an elegant way to model the "stay at the headquarter"? right now it is a server with a very high cycletime.

Thanks,
Lukas
Attachments
EmergencyCall.mod
(65.21 KiB) Downloaded 273 times
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Emergency Doctor

Post by marlies »

Hi Lukas,

Instead of using a server with a very high cycletime, you could also use a queue and open/close the output when necessary using the command CloseOutput and OpenOutput. When the output is closed the product will stay in the queue, even when the next step is available. When the output gets opened, the product will move immediately.

Regards, Marlies
LuckyLuke
Posts: 4
Joined: Thursday 18 April, 2013 - 19:39

Re: Emergency Doctor

Post by LuckyLuke »

thanks yery much!
you helped me a lot!

cheers lukas
Post Reply