OOP for simpy

1,001 views
Skip to first unread message

Mohammad Shoaib

unread,
Sep 23, 2018, 1:37:12 PM9/23/18
to python-simpy
Dear All

Greetings !

I have just started to learn python and my work will involve simulation of healthcare delivery using simpy. 
I'm having trouble understanding OOP with simpy. Please suggest some useful material for referring to or reading.

Thanks 
 

Michael Allen

unread,
Sep 23, 2018, 3:01:31 PM9/23/18
to Mohammad Shoaib, python-simpy
Have you checked out the SimPy training examples?

Additionally I have a simple SimOy hospital bed model which I wrote with and without OOP for comparison.

Without OOP: 

With OOP:

And then adding a limited resource (beds):

And, as you are into healthcare delivery, here is an emergency department model as well (using OOP). It has limited resources (doctors) and has different levels of patient urgency/priority:


Michael

--
You received this message because you are subscribed to the Google Groups "python-simpy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-simpy...@googlegroups.com.
To post to this group, send email to python...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-simpy/a88feaa9-ceed-445b-a60e-3e992ab93326%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruud van der Ham

unread,
Sep 23, 2018, 4:30:39 PM9/23/18
to python-simpy
I suggest having a look at yet another discrete event simulation package in Python, called salabim.
This relatively new package uses a different (similar to SimPy2) API, which is more targetted to the modeller and it is arguably easier to learn and understand.
On top of that salabim supports simulation specific queuing methods, monitoring (to get statistical information) and maybe most important: out-of-the-box realtime animation, including video production! Animation makes it possible for the developper to really see what the model does, and it is a super tool to show the working to stake holders.

Salabim has been used in healthcare applications as well as many other fields.

Please have a look at www.salabim.org.

Ruud van der Ham
core developer salabim

is...@oakland.edu

unread,
Sep 24, 2018, 10:39:33 AM9/24/18
to python-simpy
I've done a few blog posts on building simple healthcare patient flow simulation models with SimPy. One is non-OO and the other is OO.



Hope these might help.
Mark
Reply all
Reply to author
Forward
0 new messages