https://store-images.s-microsoft.com/image/apps.50349.2f82289c-570f-44b1-bf91-4ef6f54b24e5.b0463e2f-8347-4be5-969d-1c8f3e8a35e6.91aa0cec-030f-424c-8fb4-bd275724ebce

Optimizing hospital bed utilization with Bonsai and SimPy

Neal Analytics

Optimizing hospital bed utilization with Bonsai and SimPy

Neal Analytics

Optimizing Hospital Bed Utilization with Bonsai and SimPy

Optimizing beds allocation is a traditional but challenging queue management problem that hospitals have worked on for decades.


Neal Analytics offers an open-source solution for this problem using AI agents by leveraging Project Bonsai, the Microsoft Autonomous Systems toolchain. Project Bonsai is an Azure end-to-end deep reinforcement learning platform that enables data scientists and developers to design, train and deploy a simulation-trained AI agent, aka Bonsai "brain."


This open-source and ready-to-use solution contains:

  • A customizable SimPy-based discrete events simulation that simulates random patient arrivals
  • The Project Bonsai "inkling" training curriculum script to train a brain using this simulation
  • All the documentation to support any customization needs at the simulation or training curriculum level


Although the solution was implemented with the problem of optimizing hospital bed allocations, the concepts it is built on can easily be applied to other use cases. With appropriate customization (by the customer or with the help of Neal Analytics), it can be adapted to similar queuing use cases such as quick serve restaurant queue management.


This simulation was built leveraging the work of Michael Allen's "learning hospital"


The getting started instruction will direct you to the Neal Analytics GitHub repository readme containing all the needed instructions.

"Get in now" will redirect you to a ready-to-use Project Bonsai workspace to start testing the solution.

https://store-images.s-microsoft.com/image/apps.53927.2f82289c-570f-44b1-bf91-4ef6f54b24e5.b0463e2f-8347-4be5-969d-1c8f3e8a35e6.7283c0c7-5929-406c-a08b-c76783ba292e
https://store-images.s-microsoft.com/image/apps.53927.2f82289c-570f-44b1-bf91-4ef6f54b24e5.b0463e2f-8347-4be5-969d-1c8f3e8a35e6.7283c0c7-5929-406c-a08b-c76783ba292e