Skip to content

Commit ddd037c

Browse files
authored
Merge pull request #61 from pythonhealthdatascience/dev
Dev
2 parents 4b5ab1c + e149afc commit ddd037c

File tree

8 files changed

+68
-408
lines changed

8 files changed

+68
-408
lines changed

CITATION.cff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
cff-version: 1.2.0
55
title: >-
6-
Python DES RAP Template
6+
Simple M/M/s queuing model: Python DES RAP
77
message: >-
88
If you use this software, please cite it using the
99
metadata from this file.
@@ -22,8 +22,8 @@ authors:
2222
repository-code: >-
2323
https://github.com/pythonhealthdatascience/pydesrap_mms
2424
abstract: >-
25-
A template for creating discrete-event simulation (DES) models in Python
26-
within a reproducible analytical pipeline (RAP).
25+
Reproducible analytical pipeline (RAP) for python discrete-event simulation
26+
(DES) implementing a simple M/M/s queueing model.
2727
license: MIT
2828
version: '1.2.0'
2929
date-released: '2025-03-26'

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ experiment.run_reps()
8181
bash run_notebooks.sh
8282
```
8383

84+
To run one notebook from the command line (with the same settings - clearing the meta data etc):
85+
86+
```{.bash}
87+
bash run_notebooks.sh notebooks/notebook_name.ipynb
88+
```
89+
8490
**Run tests:**
8591

8692
```{.r}
@@ -221,9 +227,9 @@ Run times from our analyses (on Intel Core i7-12700H, 32GB RAM, Ubuntu 24.04.1):
221227

222228
If you use this repository, please cite either the GitHub repository or Zenodo:
223229

224-
> Heather, A. Monks, T. (2025). Python DES RAP Template. GitHub. https://github.com/pythonhealthdatascience/pydesrap_mms.
230+
> Heather, A. Monks, T. (2025). Simple M/M/s queuing model: Python DES RAP. GitHub. https://github.com/pythonhealthdatascience/pydesrap_mms.
225231
>
226-
> Heather, A. Monks, T. (2025). Python DES RAP Template. Zenodo. https://doi.org/10.5281/zenodo.14622466
232+
> Heather, A. Monks, T. (2025). Simple M/M/s queuing model: Python DES RAP. Zenodo. https://doi.org/10.5281/zenodo.14622466
227233
228234
**Contributors:**
229235

notebooks/choosing_replications.ipynb

Lines changed: 41 additions & 392 deletions
Large diffs are not rendered by default.
6 Bytes
Loading

run_notebooks.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,26 @@
33
# Get the conda environment's jupyter path
44
CONDA_JUPYTER=$(dirname "$(which python)")/jupyter
55

6-
# Loop through all notebooks in the specified directory
7-
for nb in notebooks/*.ipynb; do
6+
run_notebook() {
7+
local nb="$1"
88
echo "🏃 Running notebook: $nb"
9-
10-
# Execute and update the notebook in-place
11-
# With some processing to remove metadata created by nbconvert
129
if "${CONDA_JUPYTER}" nbconvert --to notebook --inplace --execute \
1310
--ClearMetadataPreprocessor.enabled=True \
1411
--ClearMetadataPreprocessor.clear_notebook_metadata=False \
1512
--ClearMetadataPreprocessor.preserve_cell_metadata_mask="kernelspec" \
16-
"$nb"; then
13+
"$nb"
14+
then
1715
echo "✅ Successfully processed: $nb"
1816
else
1917
echo "❌ Error processing: $nb"
2018
fi
21-
2219
echo "-------------------------"
23-
done
20+
}
21+
22+
if [[ -n "$1" ]]; then
23+
run_notebook "$1"
24+
else
25+
for nb in notebooks/*.ipynb; do
26+
run_notebook "$nb"
27+
done
28+
fi

simulation/confidence_interval_method.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def confidence_interval_method(
2626
metrics,
2727
param=Param(),
2828
alpha=0.05,
29-
desired_precision=0.05,
29+
desired_precision=0.1,
3030
min_rep=3,
3131
verbose=False
3232
):

simulation/confidence_interval_method_simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def confidence_interval_method_simple(
1717
replications,
1818
metrics,
1919
param=Param(),
20-
desired_precision=0.05,
20+
desired_precision=0.1,
2121
min_rep=3,
2222
verbose=False
2323
):

simulation/replicationsalgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class ReplicationsAlgorithm:
5454
def __init__(
5555
self,
5656
alpha=0.05,
57-
half_width_precision=0.05,
57+
half_width_precision=0.1,
5858
initial_replications=3,
5959
look_ahead=5,
6060
replication_budget=1000

0 commit comments

Comments
 (0)