Steven Kennedy | 8 Feb 22:07
Picon
Gravatar

Fwd: Hospital patient flow questions

I always forget to reply-all.

---------- Forwarded message ----------
From: Steven Kennedy <stevenkennedy2263 <at> gmail.com>
Date: Thu, Feb 9, 2012 at 8:00 AM
Subject: Re: [Simpy-users] Hospital patient flow questions
To: "cong k. (kc1g08)" <kc1g08 <at> soton.ac.uk>

Hi Cong,

For question 1:
Your classes that inherit from SimPy.Simulation.Process need to have
at least one function with a "yield" statement. Check your code - I
suspect this is where the error is coming from.

For question 2:
There are probably plenty of ways to do it, but I would model it this way:
1. Your patients are objects with attributes that define what will
happen to them when they go through the hospital processes
2. You will have several Stores that hold the Patient objects (eg.
waiting room, x-ray waiting line, etc)
3. Your generators simply create Patient objects at different rates,
with different attributes (e.g a patient arriving by ambulance may
have a higher likelihood of needing an x-ray). Once the Patient object
is created, they will be put into the WaitingRoom store.
4. Your Triage process has a single PEM which defines what happens to
the patient (ie. what Store they will be placed into next). This
should be based on attributes of the Patient object (eg. if
patient.broken_arm==True: yield put,self,XRayWaitLine,[patient]).
5. You then have other hospital processes (eg. X-Ray) that take
(Continue reading)


Gmane