diff --git a/_bookdown_files/rxode2-manual_files/figure-html/unnamed-chunk-178-1.png b/_bookdown_files/rxode2-manual_files/figure-html/unnamed-chunk-178-1.png index 3b75589..130184f 100644 Binary files a/_bookdown_files/rxode2-manual_files/figure-html/unnamed-chunk-178-1.png and b/_bookdown_files/rxode2-manual_files/figure-html/unnamed-chunk-178-1.png differ diff --git a/_bookdown_files/rxode2-manual_files/figure-html/unnamed-chunk-180-1.png b/_bookdown_files/rxode2-manual_files/figure-html/unnamed-chunk-180-1.png index 38f67fd..f0b384f 100644 Binary files a/_bookdown_files/rxode2-manual_files/figure-html/unnamed-chunk-180-1.png and b/_bookdown_files/rxode2-manual_files/figure-html/unnamed-chunk-180-1.png differ diff --git a/docs/advanced-miscellaneous-topics.html b/docs/advanced-miscellaneous-topics.html index b5a20ba..4628476 100644 --- a/docs/advanced-miscellaneous-topics.html +++ b/docs/advanced-miscellaneous-topics.html @@ -1200,11 +1200,11 @@
microbenchmark(runFor(), runSapply(), runSingleThread(),run2Thread())
bench <-print(bench)
#> Unit: milliseconds
-#> expr min lq mean median uq max
-#> runFor() 226.15820 230.7579 243.22972 237.99745 242.83007 526.66555
-#> runSapply() 227.60148 233.3769 239.82478 241.06274 242.72300 295.61188
-#> runSingleThread() 21.67092 23.0014 23.46411 23.47942 23.87948 30.52206
-#> run2Thread() 12.84359 13.6482 13.99618 14.09172 14.27220 16.54704
+#> expr min lq mean median uq max
+#> runFor() 221.52904 224.53362 230.50298 226.55532 229.52575 499.55070
+#> runSapply() 220.90154 225.60848 231.40003 226.88348 229.59026 492.54267
+#> runSingleThread() 21.00395 21.68517 22.64487 22.29470 22.66506 33.93919
+#> run2Thread() 12.62902 13.03897 13.54841 13.41709 13.56646 24.87075
#> neval
#> 100
#> 100
@@ -1228,22 +1228,22 @@ 13.4.1.5 Compare the times betwee
print(bench)
#> Unit: milliseconds
#> expr min lq mean median uq max neval
-#> runThread(1) 21.217093 22.603772 27.77254 23.976837 28.87527 70.02361 100
-#> runThread(2) 12.647233 14.029550 16.82615 14.708023 17.75534 33.80651 100
-#> runThread(3) 9.892849 10.957928 14.73565 11.726385 15.54481 30.18948 100
-#> runThread(4) 8.390000 9.344577 12.71494 9.855669 14.46360 36.42976 100
-#> runThread(5) 7.743284 8.525385 12.01956 10.095110 13.32747 33.56991 100
-#> runThread(6) 7.237351 8.058066 11.45158 8.898332 11.16910 41.71598 100
-#> runThread(7) 7.147392 7.801658 12.64134 9.426020 15.24159 43.21039 100
-#> runThread(8) 6.721420 7.542280 11.73857 9.032715 12.25422 31.74301 100
-#> runThread(9) 8.169215 9.164979 14.30070 9.960441 14.85892 39.81410 100
-#> runThread(10) 7.834896 9.214598 16.42769 11.906840 20.09549 39.07519 100
-#> runThread(11) 7.910969 8.837327 15.26403 9.976056 16.47040 43.97615 100
-#> runThread(12) 8.095937 8.524579 14.64636 9.975169 15.94399 34.84128 100
-#> runThread(13) 7.713107 8.582307 15.86284 12.621961 19.97018 34.43492 100
-#> runThread(14) 7.541924 8.420599 16.65419 11.219531 26.18666 39.54343 100
-#> runThread(15) 7.896863 8.376005 15.42602 11.019405 20.21669 43.64940 100
-#> runThread(16) 7.593061 9.427874 18.12144 14.903820 29.99918 37.54062 100
+#> runThread(1) 20.478632 21.238959 27.76242 23.806887 32.67021 61.74166 100
+#> runThread(2) 12.382024 13.296515 18.63013 15.698400 21.20031 48.97627 100
+#> runThread(3) 9.758075 10.551780 14.68611 12.750122 15.72262 27.19474 100
+#> runThread(4) 8.302496 9.188338 12.29240 10.429770 13.91077 25.11170 100
+#> runThread(5) 7.570208 8.403296 11.98074 10.073218 13.40568 33.56223 100
+#> runThread(6) 7.197837 8.040814 10.37280 8.962774 11.86176 21.34960 100
+#> runThread(7) 7.019912 8.176984 13.29175 10.411661 17.10394 33.58193 100
+#> runThread(8) 6.814645 8.462036 15.66626 11.357105 20.79003 37.21024 100
+#> runThread(9) 7.897544 9.981732 17.75131 13.465383 22.35634 44.87879 100
+#> runThread(10) 7.875182 9.151114 16.99347 12.023134 20.34318 39.12266 100
+#> runThread(11) 7.824056 8.911672 15.19120 12.085762 19.58844 40.93842 100
+#> runThread(12) 7.750037 8.936590 16.06225 11.450040 19.73431 45.88040 100
+#> runThread(13) 7.784521 9.299858 16.33838 13.143767 19.42095 38.70954 100
+#> runThread(14) 7.225379 9.376242 17.94548 13.285951 31.00986 38.27920 100
+#> runThread(15) 7.386251 8.896935 16.68194 11.767271 28.35965 33.54668 100
+#> runThread(16) 7.597419 9.869726 19.29197 18.183483 30.53563 35.07168 100
autoplot(bench)
There can be a suite spot in speed vs number or cores. The system type @@ -1329,7 +1329,7 @@
By applying some of the new parallel solving concepts you can simply run the same simulation both with less code and faster:
rxode2({
@@ -1368,7 +1368,7 @@ rx <-13.4.2 A real life example res <- rxSolve(rx, ev, omega=omega, returnType="data.table")
Sys.time()
endParallel <-print(endParallel - startParallel)
-#> Time difference of 0.1143248 secs
You can see a striking time difference between the two methods; A few things to keep in mind:
If you look at the summary, you can see where rxode2 assigned the compartment number(s)
summary(pbpk)
#> rxode2 2.0.13.9000 model named rx_0d8d3c8f765b9ace54057fc27aa07891 model (✔ ready).
-#> DLL: /tmp/RtmpOvvReS/rxode2/rx_0d8d3c8f765b9ace54057fc27aa07891__.rxd/rx_0d8d3c8f765b9ace54057fc27aa07891_.so
+#> DLL: /tmp/RtmpC1rwH4/rxode2/rx_0d8d3c8f765b9ace54057fc27aa07891__.rxd/rx_0d8d3c8f765b9ace54057fc27aa07891_.so
#> NULL
#>
#> Calculated Variables:
diff --git a/rxode2-manual.log b/rxode2-manual.log
index 1ee04ad..886d7dc 100644
--- a/rxode2-manual.log
+++ b/rxode2-manual.log
@@ -1,4 +1,4 @@
-This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=pdflatex 2023.7.4) 5 JUL 2023 18:15
+This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=pdflatex 2023.7.4) 5 JUL 2023 18:24
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@@ -2160,7 +2160,7 @@ Overfull \hbox (95.99872pt too wide) in paragraph at lines 1326--1326
Overfull \hbox (242.99829pt too wide) in paragraph at lines 1326--1326
-[]\T1/lmtt/m/n/10 #> DLL: /tmp/RtmpVVOFLL/rxode2/rx_0d8d3c8f765b9ace54057fc27aa
+[]\T1/lmtt/m/n/10 #> DLL: /tmp/RtmpIJS9aW/rxode2/rx_0d8d3c8f765b9ace54057fc27aa
07891__.rxd/rx_0d8d3c8f765b9ace54057fc27aa07891_.so[]
[]
@@ -12897,7 +12897,7 @@ b>
-Output written on rxode2-manual.pdf (243 pages, 1805349 bytes).
+Output written on rxode2-manual.pdf (243 pages, 1808100 bytes).
PDF statistics:
2826 PDF objects out of 2984 (max. 8388607)
2322 compressed objects within 24 object streams