From ee8c8a53903de1a0f480060900b706022af091b6 Mon Sep 17 00:00:00 2001
From: Johannes Ranke <jranke@uni-bremen.de>
Date: Mon, 17 Apr 2023 21:53:49 +0200
Subject: Post release changes to the docs

The cyantraniliprole and dmta pathway vignettes were not working any
more with the latest changes in deSolve and mkin. All docs need a
rebuild.
---
 vignettes/prebuilt/2022_dmta_pathway.rmd | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

(limited to 'vignettes/prebuilt/2022_dmta_pathway.rmd')

diff --git a/vignettes/prebuilt/2022_dmta_pathway.rmd b/vignettes/prebuilt/2022_dmta_pathway.rmd
index ff2b527c..f787daf2 100644
--- a/vignettes/prebuilt/2022_dmta_pathway.rmd
+++ b/vignettes/prebuilt/2022_dmta_pathway.rmd
@@ -45,10 +45,17 @@ library(knitr)
 library(saemix)
 library(parallel)
 n_cores <- detectCores()
-if (Sys.info()["sysname"] == "Windows") {
-  cl <- makePSOCKcluster(n_cores)
-} else {
-  cl <- makeForkCluster(n_cores)
+
+# We need to start a new cluster after defining a compiled model that is
+# saved as a DLL to the user directory, therefore we define a function
+# This is used again after defining the pathway model
+start_cluster <- function(n_cores) {
+  if (Sys.info()["sysname"] == "Windows") {
+    ret <- makePSOCKcluster(n_cores)
+  } else {
+    ret <- makeForkCluster(n_cores)
+  }
+  return(ret)
 }
 ```
 
@@ -163,6 +170,8 @@ m_hs_path_1 <- mkinmod(
   unload = TRUE, overwrite = TRUE,
   quiet = TRUE
 )
+cl <- start_cluster(n_cores)
+
 deg_mods_1 <- list(
   sfo_path_1 = m_sfo_path_1,
   fomc_path_1 = m_fomc_path_1,
@@ -332,6 +341,10 @@ plot(saem_sforb_path_1_tc_reduced)
 Plots of the remaining fits and listings for all successful fits are shown in
 the Appendix.
 
+```{r}
+stopCluster(cl)
+```
+
 
 # Conclusions
 
-- 
cgit v1.2.1


From 9ae42bd20bc2543a94cf1581ba9820c2f9e3afbd Mon Sep 17 00:00:00 2001
From: Johannes Ranke <jranke@uni-bremen.de>
Date: Thu, 20 Apr 2023 19:53:28 +0200
Subject: Fix and rebuild documentation, see NEWS

I had to fix the two pathway vignettes, as they did not work with
the released version any more. So they and the multistart vignette
which got some small fixes as well were rebuilt.

Complete rebuild of the online docs with the released version. The
documentation of the 'hierarchial_kinetics' format had to be fixed
as well.
---
 vignettes/prebuilt/2022_dmta_pathway.rmd | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'vignettes/prebuilt/2022_dmta_pathway.rmd')

diff --git a/vignettes/prebuilt/2022_dmta_pathway.rmd b/vignettes/prebuilt/2022_dmta_pathway.rmd
index f787daf2..1e1a0719 100644
--- a/vignettes/prebuilt/2022_dmta_pathway.rmd
+++ b/vignettes/prebuilt/2022_dmta_pathway.rmd
@@ -1,7 +1,7 @@
 ---
 title: "Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P"
 author: Johannes Ranke
-date: Last change on 8 January 2023, last compiled on `r format(Sys.time(), "%e %B %Y")`
+date: Last change on 20 April 2023, last compiled on `r format(Sys.time(), "%e %B %Y")`
 geometry: margin=2cm
 bibliography: references.bib
 toc: true
@@ -423,7 +423,6 @@ tex_listing(saem_sforb_path_1_tc_reduced, caption)
 ## Session info
 
 ```{r, echo = FALSE}
-parallel::stopCluster(cl)
 sessionInfo()
 ```
 
-- 
cgit v1.2.1

