I want to make an hospital emergency department model

Hi everybody,

I’m super new to Julia and still don’t know how to get started.
I want to make a model that simulates an emergency department in a hospital. More specifically I want to show the patient assignment to free beds. For example: a new patient arrives at the hospital and has to be assigned to a free bed and an agent shall assign the patient to the best bed regarding the illness.

But I still don’t know which packages would be optimal for my project. I’ve looked into some packages and found agents.jl & reinforce.jl to fit best but I didn’t find an example that is similar to my project. Therefore I’m still struggling to get started.

For further understanding:
I want to compare 3 different approaches. The first approach should be a random assignment to a free bed. The second approach should use an intelligent heuristic e.g. if patient x has a specific illness, give him a specific bed and if not give him any other bed. And the third approach should be using Q-learning to optimize the bed-patient assignment problem.

Can anybody help me get started by giving me tips for packages that I should use? Or maybe someone knows of an example that I could look into?

I’m grateful for any help.

Greetings
Floyd

Agents.jl seems like the best candidate to be the basis of your simulation. I’d look at the Agents.jl documentation and start working on a model. Besides Agents.jl, you would need additional packages (or you can write your own source) that can help you “decide what is the best bed”. Agents.jl doesn’t know how to do that on its own, and I also can’t help you as I don’t know what that would mean.

But having an Agent Based Model with patients and free beds seems the most intuitive start. I’d use a three-dimensional grid space: the third dimension would be the floors of your hospital. Agents.jl has advanced capabilities for higher dimensional spaces, which means you could be searching for nearest agents only on the second floor of your hospital. Then, I would also have a model parameter, which would be an array of equal size with the grid, which contains the bed locations and whether they are occupied (in each entry of hte array you would have :empty if there is no bed, :bed if there is a bed, and :occupied if the bed is also occupied). That should be enough to get you started :slight_smile:

You can also make the beds agents themselves, that actually might be even more useful.

2 Likes

Agents.jl pathfinding would also be useful to you, as you could actually put walls, and the patients would find their path to their bed using pathfinding. Then you could define the “best bed” as the one with the least path to it, in a realistic scenario with a hospital with actual walls and rooms.