{"id":23288094,"url":"https://github.com/pythonhealthdatascience/rap_des","last_synced_at":"2026-04-27T22:31:55.941Z","repository":{"id":266697698,"uuid":"899059438","full_name":"pythonhealthdatascience/rap_des","owner":"pythonhealthdatascience","description":"Documentation supporting template reproducible analytical pipelines (RAP) for simple python and R discrete-event simulation (DES) models.","archived":false,"fork":false,"pushed_at":"2024-12-10T16:56:40.000Z","size":63494,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T19:49:19.474Z","etag":null,"topics":["discrete-event-simulation","healthcare","healthcare-analysis","python","r","reproducible-analysis","reproducible-analytical-pipeline","reproducible-analytical-pipelines","reproducible-research","reproducible-science","simmer","simpy","simulation","simulation-framework","simulation-model","simulation-modeling","simulation-modelling","template"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pythonhealthdatascience.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-05T14:48:26.000Z","updated_at":"2024-12-10T16:56:45.000Z","dependencies_parsed_at":"2024-12-05T16:33:55.060Z","dependency_job_id":"54014218-bd2a-46d8-8aa5-b86dc9a49893","html_url":"https://github.com/pythonhealthdatascience/rap_des","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"7a5182f6c4523320d6ddc856760971e2853fec83"},"previous_names":["pythonhealthdatascience/rap_template_python_des","pythonhealthdatascience/rap_des"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pythonhealthdatascience/rap_des","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonhealthdatascience%2Frap_des","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonhealthdatascience%2Frap_des/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonhealthdatascience%2Frap_des/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonhealthdatascience%2Frap_des/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pythonhealthdatascience","download_url":"https://codeload.github.com/pythonhealthdatascience/rap_des/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonhealthdatascience%2Frap_des/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32358509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discrete-event-simulation","healthcare","healthcare-analysis","python","r","reproducible-analysis","reproducible-analytical-pipeline","reproducible-analytical-pipelines","reproducible-research","reproducible-science","simmer","simpy","simulation","simulation-framework","simulation-model","simulation-modeling","simulation-modelling","template"],"created_at":"2024-12-20T03:13:45.652Z","updated_at":"2026-04-27T22:31:50.919Z","avatar_url":"https://github.com/pythonhealthdatascience.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Reproducible Discrete-Event Simulation (DES)\n\n![licence](https://img.shields.io/badge/Licence-MIT-green.svg?labelColor=gray)\n\nSimple templates and example of implementations of DES models in **Python and R**, within a **reproducible analytical pipeline (RAP)**\n\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003e ⚠️ **Work in progress**\n\n\u003cbr\u003e\n\n## 📌  Introduction\n\nTBC. Notes:\n\n* Link to template repositoryes\n* Link to STARS.\n* Link to relevant publication.\n\n\u003cbr\u003e\n\n## 🧐 What are we modelling?\n\nA **simulation** is a computer model that mimics a real-world system. It allows us to test different scenarios and see how the system behaves. One of the most common simulation types in healthcare is **discrete-event simulation (DES)**.\n\nIn DES models, time progresses only when **specific events** happen (e.g., a patient arriving or finishing treatment). Unlike a continuous system where time flows smoothly, DES jumps forward in steps between events. For example, when people (or tasks) arrive, wait for service, get served, and then leave.\n\n![Simple DES Animation](videos/simple_des.gif)\n*Simple model animation created using web app developed by Sammi Rosser (2024) available at https://github.com/hsma-programme/Teaching_DES_Concepts_Streamlit and shared under an MIT Licence.*\n\nOne simple example of a DES model is the **M/M/s queueing model**, which is implemented in this template. In a DES model, we use well-known **statistical distributions** to describe the behaviour of real-world processes. In an M/M/s model we use:\n\n* **Poisson distribution** to model patient arrivals - and so, equivalently, use an **exponential distribution** to model the inter-arrival times (time from one arrival to the next)\n* **Exponential distribution** to model server times.\n\nThese can be referred to as Markovian assumptions (hence \"M/M\"), and \"s\" refers to the number of parallel servers available.\n\nFor this M/M/s model, you only need three inputs:\n\n1. **Average arrival rate**: How often people typically arrive (e.g. patient arriving to clinic).\n2. **Average service duration**: How long it takes to serve one person (e.g. doctor consultation time).\n3. **Number of servers**: How many service points are available (e.g. number of doctors).\n\nThis model could be applied to a range of contexts, including:\n\n| Queue | Server/Resource |\n| - | - |\n| Patients in a waiting room | Doctor's consultation\n| Patients waiting for an ICU bed | Available ICU beds |\n| Prescriptions waiting to be processed | Pharmacists preparing and dispensing medications |\n\nFor further information on M/M/s models, see:\n\n* Ganesh, A. (2012). Simple queueing models. University of Bristol. https://people.maths.bris.ac.uk/~maajg/teaching/iqn/queues.pdf.\n* Green, L. (2011). Queueing theory and modeling. In *Handbook of Healthcare Delivery Systems*. Taylor \u0026 Francis. https://business.columbia.edu/faculty/research/queueing-theory-and-modeling.\n\n\u003cbr\u003e\n\n## 📖 Viewing this book\n\nTBC. Notes on:\n\n* View it online\n* View it locally\n\n```\n# Clone project\ngit clone https://github.com/pythonhealthdatascience/rap_des\ncd rap_des\n\n# Create conda environment\nconda env create --file environment.yaml\n```\n\n\u003cbr\u003e\n\n## 📝 Citation\n\n| Contributor | ORCID | GitHub |\n| --- | --- | --- |\n| Amy Heather | [![ORCID: Heather](https://img.shields.io/badge/ORCID-0000--0002--6596--3479-brightgreen)](https://orcid.org/0000-0002-6596-3479) | https://github.com/amyheather |\n\n\u003cbr\u003e\n\n## 📜 Licence\n\nThis template is licensed under the MIT License.\n\n```\nMIT License\n\nCopyright (c) 2024 STARS Project Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n\u003cbr\u003e\n\n## 💰 Funding\n\nThis project was developed as part of the project STARS: Sharing Tools and Artefacts for Reproducible Simulations. It is supported by the Medical Research Council [grant number [MR/Z503915/1](https://gtr.ukri.org/projects?ref=MR%2FZ503915%2F1)].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythonhealthdatascience%2Frap_des","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythonhealthdatascience%2Frap_des","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythonhealthdatascience%2Frap_des/lists"}