Skip to content

Commit 8907d48

Browse files
committed
refactor(analysis): convert to polars and re-run, some small diff in calculation outputs
1 parent 760bc62 commit 8907d48

12 files changed

+491
-872
lines changed

notebooks/analysis.ipynb

Lines changed: 438 additions & 832 deletions
Large diffs are not rendered by default.

outputs/example_overall.csv

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
arrivals,mean_q_time_nurse,mean_time_with_nurse,mean_nurse_utilisation
2-
10776.741935483871,0.499036905566402,9.978456743390534,0.49767035119563796
3-
115.80327218806197,0.06739346957542013,0.11513823236530764,0.007524465631261531
4-
10734.264952313013,0.47431678135150124,9.936223698796068,0.4949103549196282
5-
10819.21891865473,0.5237570297813028,10.020689787985,0.5004303474716477
1+
metric,arrivals,mean_q_time_nurse,mean_time_with_nurse,mean_nurse_utilisation
2+
mean,10776.741935483871,0.499036905566402,9.978456743390534,0.49767035119563796
3+
std_dev,115.80327218806197,0.06739346957542013,0.11513823236530736,0.007524465631261531
4+
lower_95_ci,10734.264952313013,0.47431678135150124,9.936223698796068,0.4949103549196282
5+
upper_95_ci,10819.21891865473,0.5237570297813028,10.020689787985,0.5004303474716477

outputs/example_trial.csv

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
run_number,scenario,arrivals,mean_q_time_nurse,mean_time_with_nurse,mean_nurse_utilisation
22
0,0,10972,0.504541081338615,9.84226781662332,0.4996386466177992
3-
1,0,10784,0.514150649003393,10.060480983450425,0.5019905433327594
4-
2,0,10854,0.5232349226016817,9.925024519746302,0.4981297032213408
5-
3,0,10831,0.4791488631810612,9.9370571543943,0.49822049332297624
6-
4,0,10720,0.46145745726579823,10.015904147971671,0.4968703372055205
3+
1,0,10784,0.514150649003393,10.060480983450427,0.5019905433327594
4+
2,0,10854,0.5232349226016817,9.925024519746303,0.4981297032213408
5+
3,0,10831,0.4791488631810612,9.937057154394301,0.49822049332297624
6+
4,0,10720,0.46145745726579823,10.01590414797167,0.4968703372055205
77
5,0,10772,0.3882646868128185,9.884995942861282,0.492904233058074
88
6,0,10831,0.4669381081669874,10.041799654744745,0.503356251584998
9-
7,0,10781,0.625888360901447,10.086979128063648,0.5034489381047406
9+
7,0,10781,0.625888360901447,10.086979128063646,0.5034489381047406
1010
8,0,10772,0.4684971326393017,10.202270228377186,0.508790994907774
11-
9,0,10705,0.5634349862001105,10.09260227901333,0.49997178325917613
12-
10,0,10927,0.562585969190057,10.083553615426284,0.5098373896503802
13-
11,0,10688,0.39781182403365434,9.893334037740962,0.4895233535105571
11+
9,0,10705,0.5634349862001105,10.092602279013327,0.49997178325917613
12+
10,0,10927,0.562585969190057,10.083553615426283,0.5098373896503802
13+
11,0,10688,0.39781182403365434,9.893334037740964,0.4895233535105571
1414
12,0,11092,0.44530362984867583,9.810905063859671,0.5034276977164731
15-
13,0,10640,0.4397605749351992,9.933879963761742,0.48925457544062534
15+
13,0,10640,0.4397605749351992,9.93387996376174,0.48925457544062534
1616
14,0,10904,0.6107822771635987,10.167683587926042,0.513130373051619
1717
15,0,10849,0.47670998312351787,9.975581276412813,0.5009629889699926
18-
16,0,10719,0.428336230071242,9.809804967118032,0.4866947365248423
18+
16,0,10719,0.428336230071242,9.809804967118033,0.4866947365248423
1919
17,0,10713,0.505574486075843,9.989154604862323,0.4954087210793937
20-
18,0,10568,0.3615821082986753,9.800182515281657,0.4793715775153063
21-
19,0,10707,0.4191589720392036,9.9193906381964,0.4915291568180775
20+
18,0,10568,0.3615821082986753,9.800182515281655,0.4793715775153063
21+
19,0,10707,0.4191589720392036,9.919390638196402,0.4915291568180775
2222
20,0,10845,0.6120142008002236,9.813774247048583,0.49261944375555833
2323
21,0,10726,0.5173212645251098,9.858186468091487,0.48940978932654106
2424
22,0,10618,0.5316566599495316,9.969891296475984,0.4892835610032433
2525
23,0,10914,0.5270546197660896,9.925291785145637,0.5013818263178943
26-
24,0,10660,0.5029697553047842,9.96454608027881,0.49160360886911897
26+
24,0,10660,0.5029697553047842,9.964546080278812,0.49160360886911897
2727
25,0,10685,0.6270646900660448,10.236338445072258,0.5060501169430693
2828
26,0,10806,0.5061794260886525,10.039653295082593,0.5022615440123254
29-
27,0,10748,0.4925537687951073,10.050997027592315,0.4999546777219452
29+
27,0,10748,0.4925537687951073,10.050997027592317,0.4999546777219452
3030
28,0,10589,0.4577189216542841,10.044180668559221,0.4923573694687436
31-
29,0,10863,0.5422405738480466,10.034383892923174,0.5046064549261675
31+
29,0,10863,0.5422405738480466,10.03438389292317,0.5046064549261675
3232
30,0,10796,0.5102078888697092,9.922063713004379,0.49578999982774674

outputs/scenario_nurse_util.png

-488 Bytes
Loading

outputs/scenario_nurse_util.tex

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
\begin{tabular}{lllll}
1+
\begin{table}[!t]
2+
3+
4+
\fontsize{12.0pt}{14.4pt}\selectfont
5+
6+
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}rllll}
27
\toprule
3-
Number of nurses & 5 & 6 & 7 & 8 \\
4-
Patient inter-arrival time & & & & \\
5-
\midrule
8+
patient\_inter & 5 nurses & 6 nurses & 7 nurses & 8 nurses \\
9+
\midrule\addlinespace[2.5pt]
610
3 & 0.66 (0.66, 0.67) & 0.55 (0.55, 0.56) & 0.47 (0.47, 0.48) & 0.41 (0.41, 0.42) \\
7-
4 & 0.50 (0.49, 0.50) & 0.41 (0.41, 0.42) & 0.36 (0.35, 0.36) & 0.31 (0.31, 0.31) \\
8-
5 & 0.40 (0.40, 0.40) & 0.33 (0.33, 0.34) & 0.29 (0.28, 0.29) & 0.25 (0.25, 0.25) \\
11+
4 & 0.5 (0.5, 0.5) & 0.41 (0.41, 0.42) & 0.36 (0.35, 0.36) & 0.31 (0.31, 0.31) \\
12+
5 & 0.4 (0.4, 0.4) & 0.33 (0.33, 0.33) & 0.29 (0.28, 0.29) & 0.25 (0.25, 0.25) \\
913
6 & 0.33 (0.33, 0.33) & 0.28 (0.28, 0.28) & 0.24 (0.24, 0.24) & 0.21 (0.21, 0.21) \\
10-
7 & 0.29 (0.28, 0.29) & 0.24 (0.24, 0.24) & 0.20 (0.20, 0.21) & 0.18 (0.18, 0.18) \\
14+
7 & 0.29 (0.28, 0.29) & 0.24 (0.24, 0.24) & 0.2 (0.2, 0.21) & 0.18 (0.18, 0.18) \\
1115
\bottomrule
12-
\end{tabular}
16+
\end{tabular*}
17+
18+
\end{table}

outputs/scenario_nurse_wait.png

-3 Bytes
Loading

outputs/sensitivity_consult_time.png

673 Bytes
Loading

outputs/sensitivity_consult_time.tex

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
\begin{tabular}{lrl}
1+
\begin{table}[!t]
2+
3+
4+
\fontsize{12.0pt}{14.4pt}\selectfont
5+
6+
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}rl}
27
\toprule
3-
& Mean nurse consultation time & Mean wait time for nurse (95 percent confidence interval) \\
4-
\midrule
5-
0 & 8 & 0.15 (0.14, 0.16) \\
6-
1 & 9 & 0.28 (0.27, 0.30) \\
7-
2 & 10 & 0.50 (0.47, 0.52) \\
8-
3 & 11 & 0.84 (0.80, 0.88) \\
9-
4 & 12 & 1.36 (1.29, 1.42) \\
10-
5 & 13 & 2.15 (2.05, 2.24) \\
11-
6 & 14 & 3.37 (3.22, 3.52) \\
12-
7 & 15 & 5.30 (5.06, 5.54) \\
8+
Mean nurse consultation time & Mean wait time for nurse (95 percent confidence interval) \\
9+
\midrule\addlinespace[2.5pt]
10+
8 & 0.15 (0.14, 0.16) \\
11+
9 & 0.28 (0.27, 0.3) \\
12+
10 & 0.5 (0.48, 0.52) \\
13+
11 & 0.84 (0.8, 0.88) \\
14+
12 & 1.36 (1.3, 1.42) \\
15+
13 & 2.15 (2.06, 2.24) \\
16+
14 & 3.37 (3.23, 3.51) \\
17+
15 & 5.3 (5.07, 5.53) \\
1318
\bottomrule
14-
\end{tabular}
19+
\end{tabular*}
20+
21+
\end{table}

outputs/spread_arrivals.png

-2.88 KB
Loading

outputs/spread_nurse_time.png

-3.81 KB
Loading

outputs/spread_nurse_util.png

-3.62 KB
Loading

outputs/spread_nurse_wait.png

-3.46 KB
Loading

0 commit comments

Comments
 (0)