|
6 | 6 |
|
7 | 7 | # Towards Sharing Tools and Artifacts for **Reproducible** Simulation **(v1.5)**: a JuypterLite template for `simpy` models |
8 | 8 |
|
9 | | -## Overview |
| 9 | +## 1. Overview |
10 | 10 |
|
11 | 11 | The materials and methods in this repository support work towards developing the S.T.A.R.S healthcare framework version 1.5 (**S**haring **T**ools and **A**rtifacts for **R**eproducible **S**imulations in healthcare). The code and written materials here are a work in progress to demonstrate the application of S.T.A.R.S' version to sharing a `simpy` discrete-event simuilation model and associated research artifacts. |
12 | 12 |
|
13 | 13 | The model will run on a users browser without the need to install any components. This is achieved using Web Assembly technology i.e. [JupterLite](https://github.com/jupyterlite/jupyterlite) and [xeus-python](https://github.com/jupyter-xeus/xeus-python). A model notebook is downloaded to the users local machine and all dependencies are pre-installed via conda-forge. The model then lives in the browsers cache. The user can make changes to the model or create new files and these are persisted (until the browser cache is cleared). |
14 | 14 |
|
15 | | -### Use case |
| 15 | +### 1.1. Use case |
16 | 16 |
|
17 | 17 | * A researcher wishes to share a runnable version of a simulation model with their publication (e.g. written in `simpy`). The code allows others to replicate the simulation results, tables and charts in a paper and allows others to reuse the model. |
18 | 18 | * The researcher wants the model to be immediately usable. Users should not need to install python, `simpy` or any dependencies. |
19 | 19 | * The researcher either wants to reduce load on online open science compute infrastructure (e.g. mybinder.org) or does not want to rely on it. |
20 | 20 | * Users may want to use a version of their own data due to governance, ethics or other reasons cannot upload this to a remote instance of the model. |
21 | 21 | * Loading the model is as simple as clicking a URL. |
22 | 22 |
|
23 | | -### Credits ✨ |
| 23 | +### 1.2. Credits ✨ |
24 | 24 |
|
25 | | -We would like to thank the [JupterLite](https://github.com/jupyterlite/jupyterlite) and [xeus-python](https://github.com/jupyter-xeus/xeus-python) developers for making this work possible. This discrete-event simulation focussed repository was based on the learning materials and template provided by [Jupyterlite xeus-python demo](https://github.com/jupyterlite/xeus-python-demo) and [tutorial given at PyData 2023](https://www.youtube.com/watch?v=WXRslU9D3bo) by Jeremy Tuloup. |
| 25 | +> We would like to thank the [JupterLite](https://github.com/jupyterlite/jupyterlite) and [xeus-python](https://github.com/jupyter-xeus/xeus-python) developers for making this work possible. This discrete-event simulation focussed repository was based on the learning materials and template provided by [Jupyterlite xeus-python demo](https://github.com/jupyterlite/xeus-python-demo) and [tutorial given at PyData 2023](https://www.youtube.com/watch?v=WXRslU9D3bo) by Jeremy Tuloup. |
| 26 | +
|
| 27 | +## 2. The example model included |
| 28 | + |
| 29 | +The `simpy` model is adapted from [Monks and Harper (2023)](https://github.com/pythonhealthdatascience/stars-simpy-example-docs) |
| 30 | + |
| 31 | +> Monks, T., & Harper, A. (2023). Towards Sharing Tools and Artifacts for Reusable Simulation: example enhanced documentation for a simpy model. (v1.1.0). Zenodo. https://doi.org/10.5281/zenodo.10054063 |
| 32 | +
|
| 33 | +Full documentation of this model is available in our [JupyterBook](https://pythonhealthdatascience.github.io/stars-simpy-example-docs) |
| 34 | + |
| 35 | +In summary, we adapt a textbook example from Nelson (2013): a terminating discrete-event simulation model of a U.S based treatment centren summary the model. The example is based on exercise 13 from Nelson (2013) page 170. |
| 36 | + |
| 37 | +> *Nelson. B.L. (2013). [Foundations and methods of stochastic simulation](https://www.amazon.co.uk/Foundations-Methods-Stochastic-Simulation-International/dp/1461461596/ref=sr_1_1?dchild=1&keywords=foundations+and+methods+of+stochastic+simulation&qid=1617050801&sr=8-1). Springer.* |
26 | 38 |
|
27 | 39 | ## ✨ Try it in your browser ✨ |
28 | 40 |
|
29 | | -https://jupyterlite.github.io/xeus-python-demo/notebooks/?path=demo.ipynb |
| 41 | +https://pythonhealthdatascience.github.io/stars-simpy-jupterlite/notebooks/?path=01_urgent_care_model.ipynb |
30 | 42 |
|
31 | 43 | ## ≠ How does it compare to the Pyodide kernel? |
32 | 44 |
|
|
0 commit comments