stars-simpy-example-docs
STARS Project: Example `simpy` model documentation using JupyterBook, GitHub Pages, and STRESS
https://github.com/pythonhealthdatascience/stars-simpy-example-docs
Science Score: 77.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 8 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
2 of 4 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.6%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
STARS Project: Example `simpy` model documentation using JupyterBook, GitHub Pages, and STRESS
Basic Info
- Host: GitHub
- Owner: pythonhealthdatascience
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Homepage: https://pythonhealthdatascience.github.io/stars-simpy-example-docs/
- Size: 5.4 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 2
- Releases: 3
Topics
Metadata Files
README.md
Towards Sharing Tools and Artifacts for Reusable Simulation: example enhanced documentation for a simpy model.
Overview
The materials and methods in this repository support work towards developing the S.T.A.R.S healthcare framework (Sharing Tools and Artifacts for Reusable Simulations in healthcare). The code and written materials here demonstrate the application of S.T.A.R.S' version 1 to sharing a simpy discrete-event simuilation model and associated research artifacts.
- All artifacts in this repository are linked to study researchers via ORCIDs;
- Model code is made available under a MIT license;
- Python dependencies are managed through
conda;` - The python code itself can be viewed and executed in Jupyter notebooks via Binder;
- The model is documented and explained in a Jupyter book website served up by GitHub pages;
- The materials are deposited and made citatable using Zenodo;
- The models are sharable with other researchers and the NHS without the need to install software.
Author ORCIDs
Citation
Monks, T., & Harper, A. (2024). Towards Sharing Tools and Artifacts for Reusable Simulation: example enhanced documentation for a
simpymodel. (v1.1.2). Zenodo. https://doi.org/10.5281/zenodo.11102373
bibtex
@software{stars_example_docs,
author = {Monks, Thomas and
Harper, Alison},
title = {{Towards Sharing Tools and Artifacts for Reusable
Simulation: example enhanced documentation for a
`simpy` model.}},
month = may,
year = 2024,
publisher = {Zenodo},
version = {v1.1.2},
doi = {10.5281/zenodo.11102373},
url = {https://doi.org/10.5281/zenodo.11102373}
}
Funding
This code is part of independent research supported by the National Institute for Health Research Applied Research Collaboration South West Peninsula. The views expressed in this publication are those of the author(s) and not necessarily those of the National Institute for Health Research or the Department of Health and Social Care.
Case study model
This example is based on exercise 13 from Nelson (2013) page 170. Please also credit this work is you use our materials.
Nelson. B.L. (2013). Foundations and methods of stochastic simulation. Springer.
We adapt a textbook example from Nelson (2013): a terminating discrete-event simulation model of a U.S based treatment centre. In the model, patients arrive to the health centre between 6am and 12am following a non-stationary Poisson process. On arrival, all patients sign-in and are triaged into two classes: trauma and non-trauma. Trauma patients include impact injuries, broken bones, strains or cuts etc. Non-trauma include acute sickness, pain, and general feelings of being unwell etc. Trauma patients must first be stabilised in a trauma room. These patients then undergo treatment in a cubicle before being discharged. Non-trauma patients go through registration and examination activities. A proportion of non-trauma patients require treatment in a cubicle before being discharged. The model predicts waiting time and resource utilisation statistics for the treatment centre. The model allows managers to ask question about the physical design and layout of the treatment centre, the order in which patients are seen, the diagnostic equipment needed by patients, and the speed of treatments. For example: “what if we converted a doctors examination room into a room where nurses assess the urgency of the patients needs.”; or “what if the number of patients we treat in the afternoon doubled”
Online Notebooks via Binder
The python code for the model has been setup to run online in Jupyter notebooks via binder
Binder is a free service. If it has not been used in a while Binder will need to re-containerise the code repository, and push to binderhub. This will take several minutes. After that the online environment will be quick to load.
Online documentation produced by Jupyter-book
- The documentation can be access at https://pythonhealthdatascience.github.io/stars-simpy-example-docs
How to create the website locally
Alternatively you may wish to create the website on your local machine.
Downloading the code
Either clone the repository using git or click on the green "code" button and select "Download Zip".
bash
git clone https://github.com/pythonhealthdatascience/stars-simpy-example-docs
Installing dependencies
All dependencies can be found in binder/environment.yml and are pulled from conda-forge. To run the code locally, we recommend install mini-conda; navigating your terminal (or cmd prompt) to the directory containing the repo and issuing the following command:
bash
conda env create -f binder/environment.yml
To activate the environment issue the following command:
bash
conda activate stars_docs
Building the book
In the directory (folder) containing the code (i.e. where _toc.yml and _config.yml are located), issue the following command via the terminal (or cmd prompt/powershell on windows)
bash
jb build .
The configuration of the book has been setup to re-run all of the notebooks. It may take a few minutes to execute on your local machine.
When the build is complete Jupyter book will display a hyper-link to the book that has been built on your machine. Click on the link (or copy paste into a browser) to run it.
Owner
- Name: pythonhealthdatascience
- Login: pythonhealthdatascience
- Kind: organization
- Repositories: 1
- Profile: https://github.com/pythonhealthdatascience
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: >-
Towards Sharing Tools and Artifacts for Reusable
Simulation: example enhanced documentation for a `simpy`
model.
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Thomas
family-names: Monks
affiliation: University of Exeter
orcid: 'https://orcid.org/0000-0003-2631-4481'
- given-names: Alison
family-names: Harper
affiliation: University of Exeter
orcid: 'https://orcid.org/0000-0001-5274-5037'
repository-code: >-
https://github.com/pythonhealthdatascience/stars-simpy-example-docs
url: >-
https://pythonhealthdatascience.github.io/stars-simpy-example-docs
keywords:
- Discrete-event simulation
- Open Science
- Reproducibility
- Documentation
- Model reuse
license: MIT
GitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| TomMonks | t****s@g****m | 107 |
| amyheather | a****2@e****k | 13 |
| Thomas Monks | t****m@p****n | 1 |
| AliHarp | a****r@e****k | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 3
- Total pull requests: 10
- Average time to close issues: 2 months
- Average time to close pull requests: about 17 hours
- Total issue authors: 2
- Total pull request authors: 3
- Average comments per issue: 0.67
- Average comments per pull request: 0.3
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Issue authors: 2
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 1.0
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- TomMonks (2)
- amyheather (1)
Pull Request Authors
- TomMonks (12)
- AliHarp (2)
- amyheather (2)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- continuumio/miniconda3 latest build
- matplotlib >=3.3.4
- numpy >=1.19.2
- pandas >=1.2.3
- scipy >=1.6.1
- simpy >=4.0.1
- joblib 0.15.1.*
- jupyterlab 3.0.9.*
- matplotlib 3.3.4.*
- numpy 1.19.2.*
- pandas 1.2.3.*
- pip 21.0.1.*
- python 3.8.12.*
- scipy 1.6.1.*
- simpy 4.0.1.*
- joblib 0.15.1.*
- jupyterlab 3.0.9.*
- matplotlib 3.3.4.*
- numpy 1.19.2.*
- pandas 1.2.3.*
- pip 21.0.1.*
- python 3.8.8.*
- scipy 1.6.1.*
- simpy 4.0.1.*