aboutsummaryrefslogtreecommitdiff
path: root/custom_lsoda_call.patch
blob: d91a22c7d7b2e74dd9f7338b3b26f19acbc00c87 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
diff --git a/DESCRIPTION b/DESCRIPTION
index de0fab8..a006a44 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
 Package: mkin
 Type: Package
 Title: Kinetic Evaluation of Chemical Degradation Data
-Version: 1.2.0
-Date: 2022-11-16
+Version: 1.3.0
+Date: 2022-11-15
 Authors@R: c(
   person("Johannes", "Ranke", role = c("aut", "cre", "cph"),
     email = "johannes.ranke@jrwb.de",
@@ -22,8 +22,8 @@ Description: Calculation routines based on the FOCUS Kinetics Report (2006,
   Ranke et al. (2021) <doi:10.3390/environments8080071>.  Please note that no
   warranty is implied for correctness of results or fitness for a particular
   purpose.
-Depends: R (>= 2.15.1),
-Imports: stats, graphics, methods, parallel, deSolve, R6, inline (>= 0.3.19),
+Depends: R (>= 2.15.1), deSolve
+Imports: stats, graphics, methods, parallel, R6, inline (>= 0.3.19),
   numDeriv, lmtest, pkgbuild, nlme (>= 3.1-151), saemix (>= 3.1), rlang, vctrs
 Suggests: knitr, rbenchmark, tikzDevice, testthat, rmarkdown, covr, vdiffr,
   benchmarkme, tibble, stats4, readxl
diff --git a/NAMESPACE b/NAMESPACE
index 107ffc5..4a41acc 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -147,7 +147,6 @@ export(status)
 export(tex_listing)
 export(transform_odeparms)
 export(which.best)
-import(deSolve)
 import(graphics)
 import(nlme)
 importFrom(R6,R6Class)
diff --git a/NEWS.md b/NEWS.md
index 22d5071..846c7c5 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,11 +1,5 @@
 # mkin 1.2.0 (unreleased)
 
-- 'R/saem.R': 'logLik', 'update' and 'anova' methods for 'saem.mmkin' objects.
-
-- 'R/saem.R': Automatic estimation of start parameters for random effects for the case of mkin transformations, nicely improving convergence and reducing problems with iterative ODE solutions.
-
-- 'R/status.R': New generic to show status information for fit array objects with methods for 'mmkin', 'mhmkin' and 'multistart' objects.
-
 - 'R/mhmkin.R': New method for performing multiple hierarchical mkin fits in one function call, optionally in parallel.
 
 - 'R/mhmkin.R': 'anova.mhmkin' for conveniently comparing the resulting fits.
@@ -14,6 +8,12 @@
 
 - 'R/multistart.R': New method for testing multiple start parameters for hierarchical model fits, with function 'llhist' and new generic 'parplot' for diagnostics, and new generics 'which.best' and 'best' for extracting the fit with the highest likelihood
 
+- 'R/saem.R': 'logLik', 'update' and 'anova' methods for 'saem.mmkin' objects.
+
+- 'R/saem.R': Automatic estimation of start parameters for random effects for the case of mkin transformations, nicely improving convergence and reducing problems with iterative ODE solutions.
+
+- 'R/status.R': New generic to show status information for fit array objects with methods for 'mmkin', 'mhmkin' and 'multistart' objects.
+
 - 'R/summary.mmkin.R': Summary method for mmkin objects.
 
 - 'R/saem.R': Implement and test saemix transformations for FOMC and HS. Also, error out if saemix transformations are requested but not supported.
diff --git a/R/mkinfit.R b/R/mkinfit.R
index 693778f..0d9246d 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -500,6 +500,15 @@ mkinfit <- function(mkinmod, observed,
     }
   }
 
+  # Get native symbol before iterations info for speed
+  call_lsoda <- getNativeSymbolInfo("call_lsoda", PACKAGE = "deSolve")
+  if (solution_type == "deSolve" & use_compiled[1] != FALSE) {
+    mkinmod$diffs_address <- getNativeSymbolInfo("diffs",
+      PACKAGE = mkinmod$dll_info[["name"]])$address
+    mkinmod$initpar_address <- getNativeSymbolInfo("initpar",
+      PACKAGE = mkinmod$dll_info[["name"]])$address
+  }
+
   # Get the error model and the algorithm for fitting
   err_mod <- match.arg(error_model)
   error_model_algorithm = match.arg(error_model_algorithm)
@@ -610,7 +619,8 @@ mkinfit <- function(mkinmod, observed,
                          solution_type = solution_type,
                          use_compiled = use_compiled,
                          method.ode = method.ode,
-                         atol = atol, rtol = rtol, ...)
+                         atol = atol, rtol = rtol,
+                         call_lsoda = call_lsoda, ...)
 
       observed_index <- cbind(as.character(observed$time), as.character(observed$name))
       observed$predicted <- out[observed_index]
@@ -892,7 +902,10 @@ mkinfit <- function(mkinmod, observed,
   fit$calls <- calls
   fit$time <- fit_time
 
-  # We also need the model and a model name for summary and plotting
+  # We also need the model and a model name for summary and plotting,
+  # but without address info that will become invalid
+  mkinmod$diffs_address <- NULL
+  mkinmod$initpar_address <- NULL
   fit$mkinmod <- mkinmod
   fit$mkinmod$name <- mkinmod_name
   fit$obs_vars <- obs_vars
diff --git a/R/mkinmod.R b/R/mkinmod.R
index d8740ae..b1fb57c 100644
--- a/R/mkinmod.R
+++ b/R/mkinmod.R
@@ -45,7 +45,9 @@
 #' @param dll_dir Directory where an DLL object, if generated internally by
 #'   [inline::cfunction()], should be saved.  The DLL will only be stored in a
 #'   permanent location for use in future sessions, if 'dll_dir' and 'name'
-#'   are specified.
+#'   are specified. This is helpful if fit objects are cached e.g. by knitr,
+#'   as the cache remains functional across sessions if the DLL is stored in
+#'   a user defined location.
 #' @param unload If a DLL from the target location in 'dll_dir' is already
 #'   loaded, should that be unloaded first?
 #' @param overwrite If a file exists at the target DLL location in 'dll_dir',
diff --git a/R/mkinpredict.R b/R/mkinpredict.R
index 0dc9cf5..11a3b35 100644
--- a/R/mkinpredict.R
+++ b/R/mkinpredict.R
@@ -19,26 +19,24 @@
 #' @param solution_type The method that should be used for producing the
 #' predictions. This should generally be "analytical" if there is only one
 #' observed variable, and usually "deSolve" in the case of several observed
-#' variables. The third possibility "eigen" is faster but not applicable to
-#' some models e.g.  using FOMC for the parent compound.
+#' variables. The third possibility "eigen" is fast in comparison to uncompiled
+#' ODE models, but not applicable to some models, e.g. using FOMC for the
+#' parent compound.
 #' @param method.ode The solution method passed via [mkinpredict] to [ode]] in
-#' case the solution type is "deSolve". The default "lsoda" is performant, but
-#' sometimes fails to converge.
+#' case the solution type is "deSolve" and we are not using compiled code.
 #' @param use_compiled If set to \code{FALSE}, no compiled version of the
 #' [mkinmod] model is used, even if is present.
-#' @param atol Absolute error tolerance, passed to [ode]. Default is 1e-8,
-#' lower than in [lsoda].
-#' @param rtol Absolute error tolerance, passed to [ode]. Default is 1e-10,
-#' much lower than in [lsoda].
-#' @param maxsteps Maximum number of steps, passed to [ode].
+#' @param atol Absolute error tolerance, passed to the ode solver.
+#' @param rtol Absolute error tolerance, passed to the ode solver.
+#' @param maxsteps Maximum number of steps, passed to the ode solver.
 #' @param map_output Boolean to specify if the output should list values for
 #'   the observed variables (default) or for all state variables (if set to
 #'   FALSE). Setting this to FALSE has no effect for analytical solutions,
 #'   as these always return mapped output.
 #' @param na_stop Should it be an error if [ode] returns NaN values
+#' @param call_lsoda The address of the compiled function "call_lsoda"
 #' @param \dots Further arguments passed to the ode solver in case such a
 #'   solver is used.
-#' @import deSolve
 #' @return A matrix with the numeric solution in wide format
 #' @author Johannes Ranke
 #' @examples
@@ -116,9 +114,10 @@ mkinpredict.mkinmod <- function(x,
   outtimes = seq(0, 120, by = 0.1),
   solution_type = "deSolve",
   use_compiled = "auto",
-  method.ode = "lsoda", atol = 1e-8, rtol = 1e-10, maxsteps = 20000,
+  method.ode = "lsoda", atol = 1e-8, rtol = 1e-10, maxsteps = 20000L,
   map_output = TRUE,
   na_stop = TRUE,
+  call_lsoda = NULL,
   ...)
 {
 
@@ -173,20 +172,80 @@ mkinpredict.mkinmod <- function(x,
   if (solution_type == "deSolve") {
     if (!is.null(x$cf) & use_compiled[1] != FALSE) {
 
-      out <- deSolve::ode(
-        y = odeini,
-        times = outtimes,
-        func = "diffs",
-        initfunc = "initpar",
-        dllname = if (is.null(x$dll_info)) inline::getDynLib(x$cf)[["name"]]
-          else x$dll_info[["name"]],
-        parms = odeparms[x$parms], # Order matters when using compiled models
-        method = method.ode,
-        atol = atol,
-        rtol = rtol,
-        maxsteps = maxsteps,
-        ...
+#       out <- deSolve::ode(
+#         y = odeini,
+#         times = outtimes,
+#         func = "diffs",
+#         initfunc = "initpar",
+#         dllname = x$dll_info[["name"]],
+#         parms = odeparms[x$parms], # Order matters when using compiled models
+#         method = method.ode,
+#         atol = atol,
+#         rtol = rtol,
+#         maxsteps = maxsteps,
+#         ...
+#       )
+#
+      # Prepare call to "call_lsoda"
+      # Simplified code from deSolve::lsoda() adapted to our use case
+      if (is.null(call_lsoda)) {
+        call_lsoda <- getNativeSymbolInfo("call_lsoda", PACKAGE = "deSolve")
+      }
+      if (is.null(x$diffs_address)) {
+        x$diffs_address <- getNativeSymbolInfo("diffs",
+          PACKAGE = x$dll_info[["name"]])$address
+        x$initpar_address <- getNativeSymbolInfo("initpar",
+          PACKAGE = x$dll_info[["name"]])$address
+      }
+      rwork <- vector("double", 20)
+      rwork[] <- 0.
+      rwork[6] <- max(abs(diff(outtimes)))
+
+      iwork <- vector("integer", 20)
+      iwork[] <- 0
+      iwork[6] <- maxsteps
+
+      n <- length(odeini)
+      lmat <- n^2 + 2     # from deSolve::lsoda(), for Jacobian type full, internal (2)
+      # hard-coded default values of lsoda():
+      maxordn <- 12L
+      maxords <- 5L
+      lrn <- 20 + n * (maxordn + 1) + 3 * n  # length in case non-stiff method
+      lrs <- 20 + n * (maxords + 1) + 3 * n + lmat        # length in case stiff method
+      lrw <- max(lrn, lrs)                       # actual length: max of both
+      liw <- 20 + n
+
+      on.exit(.C("unlock_solver", PACKAGE = "deSolve"))
+
+      out_raw <- .Call(call_lsoda,
+        as.double(odeini),   # y
+        as.double(outtimes), # times
+        x$diffs_address,     # derivfunc
+        as.double(odeparms[x$parms]), # parms
+        rtol, atol,
+        NULL, NULL, # rho, tcrit
+        NULL, # jacfunc
+        x$initpar_address, # initfunc
+        NULL, # eventfunc
+        0L,   # verbose
+        1L,   # iTask
+        as.double(rwork), # rWork
+        as.integer(iwork), # iWork
+        2L,     # jT full Jacobian calculated internally
+        0L,    # nOut
+        as.integer(lrw), # lRw
+        as.integer(liw), # lIw
+        1L, # Solver
+        NULL, # rootfunc
+        0L, as.double(0), 0L, # nRoot, Rpar, Ipar
+        0L, # Type
+        list(fmat = 0L, tmat = 0L, imat = 0L, ModelForc = NULL), # flist
+        list(), # elist
+        list(islag = 0L) # elag
       )
+
+      out <- t(out_raw)
+      colnames(out) <- c("time", mod_vars)
     } else {
       mkindiff <- function(t, state, parms) {
 
diff --git a/R/nlme.mmkin.R b/R/nlme.mmkin.R
index 09cb84b..e193e5e 100644
--- a/R/nlme.mmkin.R
+++ b/R/nlme.mmkin.R
@@ -186,10 +186,24 @@ nlme.mmkin <- function(model, data = "auto",
     thisCall[["control"]] <- control
   }
 
+  # Provide the address of call_lsoda to the fitting function
+  call_lsoda <- getNativeSymbolInfo("call_lsoda", PACKAGE = "deSolve")
+  if (model[[1]]$solution_type == "deSolve" & !is.null(model[[1]]$mkinmod$cf)) {
+    # The mkinmod stored in the first fit will be used by nlme
+    model[[1]]$mkinmod$diffs_address <- getNativeSymbolInfo("diffs",
+      PACKAGE = model[[1]]$mkinmod$dll_info[["name"]])$address
+    model[[1]]$mkinmod$initpar_address <- getNativeSymbolInfo("initpar",
+      PACKAGE = model[[1]]$mkinmod$dll_info[["name"]])$address
+  }
+
   fit_time <- system.time(val <- do.call("nlme.formula", thisCall))
   val$time <- fit_time
 
   val$mkinmod <- model[[1]]$mkinmod
+  # Don't return addresses that will become invalid
+  val$mkinmod$diffs_address <- NULL
+  val$mkinmod$initpar_address <- NULL
+
   val$data <- thisCall[["data"]]
   val$mmkin <- model
   if (is.list(start)) val$mean_dp_start <- start$fixed
diff --git a/R/read_spreadsheet.R b/R/read_spreadsheet.R
index 7ad09c3..a20af6d 100644
--- a/R/read_spreadsheet.R
+++ b/R/read_spreadsheet.R
@@ -37,7 +37,7 @@
 #' and moisture normalisation factors in the sheet 'Datasets'?
 #' @export
 read_spreadsheet <- function(path, valid_datasets = "all",
-  parent_only = FALSE, normalize = TRUE)
+  parent_only = TRUE, normalize = TRUE)
 {
   if (!requireNamespace("readxl", quietly = TRUE))
     stop("Please install the readxl package to use this function")
diff --git a/R/saem.R b/R/saem.R
index 696ea0e..5b8021d 100644
--- a/R/saem.R
+++ b/R/saem.R
@@ -120,12 +120,12 @@ utils::globalVariables(c("predicted", "std"))
 #' summary(f_saem_dfop_sfo, data = TRUE)
 #'
 #' # The following takes about 6 minutes
-#' #f_saem_dfop_sfo_deSolve <- saem(f_mmkin["DFOP-SFO", ], solution_type = "deSolve",
-#' #  control = list(nbiter.saemix = c(200, 80), nbdisplay = 10))
+#' f_saem_dfop_sfo_deSolve <- saem(f_mmkin["DFOP-SFO", ], solution_type = "deSolve",
+#'   nbiter.saemix = c(200, 80))
 #'
-#' #saemix::compare.saemix(list(
-#' #  f_saem_dfop_sfo$so,
-#' #  f_saem_dfop_sfo_deSolve$so))
+#' #anova(
+#' #  f_saem_dfop_sfo,
+#' #  f_saem_dfop_sfo_deSolve))
 #'
 #' # If the model supports it, we can also use eigenvalue based solutions, which
 #' # take a similar amount of time
@@ -580,6 +580,15 @@ saemix_model <- function(object, solution_type = "auto",
     transform_rates <- object[[1]]$transform_rates
     transform_fractions <- object[[1]]$transform_fractions
 
+    # Get native symbol info for speed
+    call_lsoda <- getNativeSymbolInfo("call_lsoda", PACKAGE = "deSolve")
+    if (solution_type == "deSolve" & !is.null(mkin_model$cf)) {
+      mkin_model$diffs_address <- getNativeSymbolInfo("diffs",
+        PACKAGE = mkin_model$dll_info[["name"]])$address
+      mkin_model$initpar_address <- getNativeSymbolInfo("initpar",
+        PACKAGE = mkin_model$dll_info[["name"]])$address
+    }
+
     # Define the model function
     model_function <- function(psi, id, xidep) {
 
@@ -613,7 +622,8 @@ saemix_model <- function(object, solution_type = "auto",
             odeparms = odeparms, odeini = odeini,
             solution_type = solution_type,
             outtimes = sort(unique(i_time)),
-            na_stop = FALSE
+            na_stop = FALSE,
+            call_lsoda = call_lsoda
           )
 
           out_index <- cbind(as.character(i_time), as.character(i_name))
diff --git a/docs/dev/articles/mkin.html b/docs/dev/articles/mkin.html
index 27e532a..6bfb63b 100644
--- a/docs/dev/articles/mkin.html
+++ b/docs/dev/articles/mkin.html
@@ -34,7 +34,7 @@
       </button>
       <span class="navbar-brand">
         <a class="navbar-link" href="../index.html">mkin</a>
-        <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.0</span>
+        <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.1.0</span>
       </span>
     </div>
 
@@ -44,7 +44,7 @@
   <a href="../reference/index.html">Functions and data</a>
 </li>
 <li class="dropdown">
-  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
+  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
     Articles
      
     <span class="caret"></span>
@@ -60,17 +60,11 @@
       <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
     </li>
     <li>
-      <a href="../articles/web_only/dimethenamid_2018.html">Example evaluations of dimethenamid data from 2018 with nonlinear mixed-effects models</a>
-    </li>
-    <li>
-      <a href="../articles/web_only/multistart.html">Short demo of the multistart method</a>
+      <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
     </li>
     <li>
       <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
     </li>
-    <li>
-      <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
-    </li>
     <li>
       <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
     </li>
@@ -78,10 +72,7 @@
       <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
     </li>
     <li>
-      <a href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a>
-    </li>
-    <li>
-      <a href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a>
+      <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
     </li>
   </ul>
 </li>
@@ -112,7 +103,7 @@
       <h1 data-toc-skip>Introduction to mkin</h1>
                         <h4 data-toc-skip class="author">Johannes Ranke</h4>
             
-            <h4 data-toc-skip class="date">Last change 15 February 2021 (rebuilt 2022-11-16)</h4>
+            <h4 data-toc-skip class="date">Last change 15 February 2021 (rebuilt 2022-02-28)</h4>
       
       <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/vignettes/mkin.rmd" class="external-link"><code>vignettes/mkin.rmd</code></a></small>
       <div class="hidden name"><code>mkin.rmd</code></div>
@@ -127,34 +118,34 @@
 </h2>
 <p>In the regulatory evaluation of chemical substances like plant protection products (pesticides), biocides and other chemicals, degradation data play an important role. For the evaluation of pesticide degradation experiments, detailed guidance has been developed, based on nonlinear optimisation. The <code>R</code> add-on package <code>mkin</code> implements fitting some of the models recommended in this guidance from within R and calculates some statistical measures for data series within one or more compartments, for parent and metabolites.</p>
 <div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
-<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="st"><a href="https://pkgdown.jrwb.de/mkin/">"mkin"</a></span>, quietly <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
-<span><span class="co"># Define the kinetic model</span></span>
-<span><span class="va">m_SFO_SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mkinmod.html">mkinmod</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fu"><a href="../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M1"</span><span class="op">)</span>,</span>
-<span>                         M1 <span class="op">=</span> <span class="fu"><a href="../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M2"</span><span class="op">)</span>,</span>
-<span>                         M2 <span class="op">=</span> <span class="fu"><a href="../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span>
-<span>                         use_of_ff <span class="op">=</span> <span class="st">"max"</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
-<span></span>
-<span></span>
-<span><span class="co"># Produce model predictions using some arbitrary parameters</span></span>
-<span><span class="va">sampling_times</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">1</span>, <span class="fl">3</span>, <span class="fl">7</span>, <span class="fl">14</span>, <span class="fl">28</span>, <span class="fl">60</span>, <span class="fl">90</span>, <span class="fl">120</span><span class="op">)</span></span>
-<span><span class="va">d_SFO_SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">m_SFO_SFO_SFO</span>,</span>
-<span>  <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k_parent <span class="op">=</span> <span class="fl">0.03</span>,</span>
-<span>    f_parent_to_M1 <span class="op">=</span> <span class="fl">0.5</span>, k_M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">2</span><span class="op">)</span><span class="op">/</span><span class="fl">100</span>,</span>
-<span>    f_M1_to_M2 <span class="op">=</span> <span class="fl">0.9</span>, k_M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">2</span><span class="op">)</span><span class="op">/</span><span class="fl">50</span><span class="op">)</span>,</span>
-<span>  <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fl">100</span>, M1 <span class="op">=</span> <span class="fl">0</span>, M2 <span class="op">=</span> <span class="fl">0</span><span class="op">)</span>,</span>
-<span>  <span class="va">sampling_times</span><span class="op">)</span></span>
-<span></span>
-<span><span class="co"># Generate a dataset by adding normally distributed errors with</span></span>
-<span><span class="co"># standard deviation 3, for two replicates at each sampling time</span></span>
-<span><span class="va">d_SFO_SFO_SFO_err</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/add_err.html">add_err</a></span><span class="op">(</span><span class="va">d_SFO_SFO_SFO</span>, reps <span class="op">=</span> <span class="fl">2</span>,</span>
-<span>                             sdfunc <span class="op">=</span> <span class="kw">function</span><span class="op">(</span><span class="va">x</span><span class="op">)</span> <span class="fl">3</span>,</span>
-<span>                             n <span class="op">=</span> <span class="fl">1</span>, seed <span class="op">=</span> <span class="fl">123456789</span> <span class="op">)</span></span>
-<span></span>
-<span><span class="co"># Fit the model to the dataset</span></span>
-<span><span class="va">f_SFO_SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_SFO_SFO_SFO</span>, <span class="va">d_SFO_SFO_SFO_err</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
-<span></span>
-<span><span class="co"># Plot the results separately for parent and metabolites</span></span>
-<span><span class="fu"><a href="../reference/plot.mkinfit.html">plot_sep</a></span><span class="op">(</span><span class="va">f_SFO_SFO_SFO</span>, lpos <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"topright"</span>, <span class="st">"bottomright"</span>, <span class="st">"bottomright"</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
+<code class="sourceCode R"><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="st"><a href="https://pkgdown.jrwb.de/mkin/">"mkin"</a></span>, quietly <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>
+<span class="co"># Define the kinetic model</span>
+<span class="va">m_SFO_SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mkinmod.html">mkinmod</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fu"><a href="../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M1"</span><span class="op">)</span>,
+                         M1 <span class="op">=</span> <span class="fu"><a href="../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M2"</span><span class="op">)</span>,
+                         M2 <span class="op">=</span> <span class="fu"><a href="../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,
+                         use_of_ff <span class="op">=</span> <span class="st">"max"</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>
+
+
+<span class="co"># Produce model predictions using some arbitrary parameters</span>
+<span class="va">sampling_times</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">1</span>, <span class="fl">3</span>, <span class="fl">7</span>, <span class="fl">14</span>, <span class="fl">28</span>, <span class="fl">60</span>, <span class="fl">90</span>, <span class="fl">120</span><span class="op">)</span>
+<span class="va">d_SFO_SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">m_SFO_SFO_SFO</span>,
+  <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k_parent <span class="op">=</span> <span class="fl">0.03</span>,
+    f_parent_to_M1 <span class="op">=</span> <span class="fl">0.5</span>, k_M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">2</span><span class="op">)</span><span class="op">/</span><span class="fl">100</span>,
+    f_M1_to_M2 <span class="op">=</span> <span class="fl">0.9</span>, k_M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">2</span><span class="op">)</span><span class="op">/</span><span class="fl">50</span><span class="op">)</span>,
+  <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fl">100</span>, M1 <span class="op">=</span> <span class="fl">0</span>, M2 <span class="op">=</span> <span class="fl">0</span><span class="op">)</span>,
+  <span class="va">sampling_times</span><span class="op">)</span>
+
+<span class="co"># Generate a dataset by adding normally distributed errors with</span>
+<span class="co"># standard deviation 3, for two replicates at each sampling time</span>
+<span class="va">d_SFO_SFO_SFO_err</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/add_err.html">add_err</a></span><span class="op">(</span><span class="va">d_SFO_SFO_SFO</span>, reps <span class="op">=</span> <span class="fl">2</span>,
+                             sdfunc <span class="op">=</span> <span class="kw">function</span><span class="op">(</span><span class="va">x</span><span class="op">)</span> <span class="fl">3</span>,
+                             n <span class="op">=</span> <span class="fl">1</span>, seed <span class="op">=</span> <span class="fl">123456789</span> <span class="op">)</span>
+
+<span class="co"># Fit the model to the dataset</span>
+<span class="va">f_SFO_SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_SFO_SFO_SFO</span>, <span class="va">d_SFO_SFO_SFO_err</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>
+
+<span class="co"># Plot the results separately for parent and metabolites</span>
+<span class="fu"><a href="../reference/plot.mkinfit.html">plot_sep</a></span><span class="op">(</span><span class="va">f_SFO_SFO_SFO</span>, lpos <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"topright"</span>, <span class="st">"bottomright"</span>, <span class="st">"bottomright"</span><span class="op">)</span><span class="op">)</span></code></pre></div>
 <p><img src="mkin_files/figure-html/unnamed-chunk-2-1.png" width="768"></p>
 </div>
 <div class="section level2">
@@ -233,10 +224,10 @@
 <p>Ranke, J. 2021. <em>‘mkin‘: Kinetic Evaluation of Chemical Degradation Data</em>. <a href="https://CRAN.R-project.org/package=mkin" class="external-link">https://CRAN.R-project.org/package=mkin</a>.</p>
 </div>
 <div id="ref-ranke2012">
-<p>Ranke, J., and R. Lehmann. 2012. “Parameter Reliability in Kinetic Evaluation of Environmental Metabolism Data - Assessment and the Influence of Model Specification.” In <em>SETAC World 20-24 May</em>. Berlin. <a href="https://jrwb.de/posters/Poster_SETAC_2012_Kinetic_parameter_uncertainty_model_parameterization_Lehmann_Ranke.pdf" class="external-link">https://jrwb.de/posters/Poster_SETAC_2012_Kinetic_parameter_uncertainty_model_parameterization_Lehmann_Ranke.pdf</a>.</p>
+<p>Ranke, J., and R. Lehmann. 2012. “Parameter Reliability in Kinetic Evaluation of Environmental Metabolism Data - Assessment and the Influence of Model Specification.” In <em>SETAC World 20-24 May</em>. Berlin.</p>
 </div>
 <div id="ref-ranke2015">
-<p>———. 2015. “To T-Test or Not to T-Test, That Is the Question.” In <em>XV Symposium on Pesticide Chemistry 2-4 September 2015</em>. Piacenza. <a href="https://jrwb.de/posters/piacenza_2015.pdf" class="external-link">https://jrwb.de/posters/piacenza_2015.pdf</a>.</p>
+<p>———. 2015. “To T-Test or Not to T-Test, That Is the Question.” In <em>XV Symposium on Pesticide Chemistry 2-4 September 2015</em>. Piacenza. <a href="http://chem.uft.uni-bremen.de/ranke/posters/piacenza_2015.pdf" class="external-link">http://chem.uft.uni-bremen.de/ranke/posters/piacenza_2015.pdf</a>.</p>
 </div>
 <div id="ref-ranke2019">
 <p>Ranke, Johannes, and Stefan Meinecke. 2019. “Error Models for the Kinetic Evaluation of Chemical Degradation Data.” <em>Environments</em> 6 (12). <a href="https://doi.org/10.3390/environments6120124" class="external-link">https://doi.org/10.3390/environments6120124</a>.</p>
@@ -271,7 +262,7 @@
 
 <div class="pkgdown">
   <p></p>
-<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.6.</p>
+<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
 </div>
 
       </footer>
diff --git a/docs/dev/articles/web_only/saem_benchmarks.html b/docs/dev/articles/web_only/saem_benchmarks.html
index afff038..e54bc38 100644
--- a/docs/dev/articles/web_only/saem_benchmarks.html
+++ b/docs/dev/articles/web_only/saem_benchmarks.html
@@ -112,7 +112,7 @@
       <h1 data-toc-skip>Benchmark timings for saem.mmkin</h1>
                         <h4 data-toc-skip class="author">Johannes Ranke</h4>
             
-            <h4 data-toc-skip class="date">Last change 14 November 2022 (rebuilt 2022-11-16)</h4>
+            <h4 data-toc-skip class="date">Last change 14 November 2022 (rebuilt 2022-11-15)</h4>
       
       <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/vignettes/web_only/saem_benchmarks.rmd" class="external-link"><code>vignettes/web_only/saem_benchmarks.rmd</code></a></small>
       <div class="hidden name"><code>saem_benchmarks.rmd</code></div>
@@ -309,10 +309,10 @@
 <td align="left">Linux</td>
 <td align="left">1.2.0</td>
 <td align="left">3.2</td>
-<td align="right">2.156</td>
-<td align="right">4.647</td>
-<td align="right">4.296</td>
-<td align="right">4.951</td>
+<td align="right">2.11</td>
+<td align="right">4.632</td>
+<td align="right">4.264</td>
+<td align="right">4.93</td>
 </tr></tbody>
 </table>
 <p>Two-component error fits for SFO, DFOP, SFORB and HS.</p>
@@ -332,10 +332,10 @@
 <td align="left">Linux</td>
 <td align="left">1.2.0</td>
 <td align="left">3.2</td>
-<td align="right">5.645</td>
-<td align="right">7.415</td>
-<td align="right">7.848</td>
-<td align="right">7.967</td>
+<td align="right">5.602</td>
+<td align="right">7.373</td>
+<td align="right">7.815</td>
+<td align="right">7.831</td>
 </tr></tbody>
 </table>
 </div>
@@ -357,8 +357,8 @@
 <td align="left">Linux</td>
 <td align="left">1.2.0</td>
 <td align="left">3.2</td>
-<td align="right">24.182</td>
-<td align="right">783.932</td>
+<td align="right">24.014</td>
+<td align="right">749.699</td>
 </tr></tbody>
 </table>
 </div>
@@ -379,7 +379,7 @@
 <td align="left">Linux</td>
 <td align="left">1.2.0</td>
 <td align="left">3.2</td>
-<td align="right">1322.5</td>
+<td align="right">1249.834</td>
 </tr></tbody>
 </table>
 </div>
diff --git a/docs/dev/news/index.html b/docs/dev/news/index.html
index 3353922..8448ebc 100644
--- a/docs/dev/news/index.html
+++ b/docs/dev/news/index.html
@@ -89,13 +89,13 @@
 
     <div class="section level2">
 <h2 class="page-header" data-toc-text="1.2.0" id="mkin-120-unreleased">mkin 1.2.0 (unreleased)<a class="anchor" aria-label="anchor" href="#mkin-120-unreleased"></a></h2>
-<ul><li><p>‘R/saem.R’: ‘logLik’, ‘update’ and ‘anova’ methods for ‘saem.mmkin’ objects.</p></li>
-<li><p>‘R/saem.R’: Automatic estimation of start parameters for random effects for the case of mkin transformations, nicely improving convergence and reducing problems with iterative ODE solutions.</p></li>
-<li><p>‘R/status.R’: New generic to show status information for fit array objects with methods for ‘mmkin’, ‘mhmkin’ and ‘multistart’ objects.</p></li>
-<li><p>‘R/mhmkin.R’: New method for performing multiple hierarchical mkin fits in one function call, optionally in parallel.</p></li>
+<ul><li><p>‘R/mhmkin.R’: New method for performing multiple hierarchical mkin fits in one function call, optionally in parallel.</p></li>
 <li><p>‘R/mhmkin.R’: ‘anova.mhmkin’ for conveniently comparing the resulting fits.</p></li>
 <li><p>‘R/illparms.R’: New generic to show ill-defined parameters with methods for ‘mkinfit’, ‘mmkin’, ‘saem.mmkin’ and ‘mhmkin’ objects.</p></li>
 <li><p>‘R/multistart.R’: New method for testing multiple start parameters for hierarchical model fits, with function ‘llhist’ and new generic ‘parplot’ for diagnostics, and new generics ‘which.best’ and ‘best’ for extracting the fit with the highest likelihood</p></li>
+<li><p>‘R/saem.R’: ‘logLik’, ‘update’ and ‘anova’ methods for ‘saem.mmkin’ objects.</p></li>
+<li><p>‘R/saem.R’: Automatic estimation of start parameters for random effects for the case of mkin transformations, nicely improving convergence and reducing problems with iterative ODE solutions.</p></li>
+<li><p>‘R/status.R’: New generic to show status information for fit array objects with methods for ‘mmkin’, ‘mhmkin’ and ‘multistart’ objects.</p></li>
 <li><p>‘R/summary.mmkin.R’: Summary method for mmkin objects.</p></li>
 <li><p>‘R/saem.R’: Implement and test saemix transformations for FOMC and HS. Also, error out if saemix transformations are requested but not supported.</p></li>
 <li><p>‘R/read_spreadsheet.R’: Conveniently read in data from a spreadsheet file.</p></li>
diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml
index 44bd60f..e0c11a8 100644
--- a/docs/dev/pkgdown.yml
+++ b/docs/dev/pkgdown.yml
@@ -13,7 +13,7 @@ articles:
   dimethenamid_2018: web_only/dimethenamid_2018.html
   multistart: web_only/multistart.html
   saem_benchmarks: web_only/saem_benchmarks.html
-last_built: 2022-11-16T14:17Z
+last_built: 2022-11-14T23:45Z
 urls:
   reference: https://pkgdown.jrwb.de/mkin/reference
   article: https://pkgdown.jrwb.de/mkin/articles
diff --git a/docs/dev/reference/mkinmod.html b/docs/dev/reference/mkinmod.html
index d0e192e..5d362f7 100644
--- a/docs/dev/reference/mkinmod.html
+++ b/docs/dev/reference/mkinmod.html
@@ -21,7 +21,7 @@ components."><meta name="robots" content="noindex"><!-- mathjax --><script src="
       </button>
       <span class="navbar-brand">
         <a class="navbar-link" href="../index.html">mkin</a>
-        <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.0</span>
+        <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.1.0</span>
       </span>
     </div>
 
@@ -30,7 +30,7 @@ components."><meta name="robots" content="noindex"><!-- mathjax --><script src="
   <a href="../reference/index.html">Functions and data</a>
 </li>
 <li class="dropdown">
-  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
+  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
     Articles
      
     <span class="caret"></span>
@@ -45,17 +45,11 @@ components."><meta name="robots" content="noindex"><!-- mathjax --><script src="
       <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
     </li>
     <li>
-      <a href="../articles/web_only/dimethenamid_2018.html">Example evaluations of dimethenamid data from 2018 with nonlinear mixed-effects models</a>
-    </li>
-    <li>
-      <a href="../articles/web_only/multistart.html">Short demo of the multistart method</a>
+      <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
     </li>
     <li>
       <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
     </li>
-    <li>
-      <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
-    </li>
     <li>
       <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
     </li>
@@ -63,10 +57,7 @@ components."><meta name="robots" content="noindex"><!-- mathjax --><script src="
       <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
     </li>
     <li>
-      <a href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a>
-    </li>
-    <li>
-      <a href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a>
+      <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
     </li>
   </ul></li>
 <li>
@@ -101,22 +92,22 @@ components.</p>
     </div>
 
     <div id="ref-usage">
-    <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mkinmod</span><span class="op">(</span></span>
-<span>  <span class="va">...</span>,</span>
-<span>  use_of_ff <span class="op">=</span> <span class="st">"max"</span>,</span>
-<span>  name <span class="op">=</span> <span class="cn">NULL</span>,</span>
-<span>  speclist <span class="op">=</span> <span class="cn">NULL</span>,</span>
-<span>  quiet <span class="op">=</span> <span class="cn">FALSE</span>,</span>
-<span>  verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span>
-<span>  dll_dir <span class="op">=</span> <span class="cn">NULL</span>,</span>
-<span>  unload <span class="op">=</span> <span class="cn">FALSE</span>,</span>
-<span>  overwrite <span class="op">=</span> <span class="cn">FALSE</span></span>
-<span><span class="op">)</span></span>
-<span></span>
-<span><span class="co"># S3 method for mkinmod</span></span>
-<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span>
-<span></span>
-<span><span class="fu">mkinsub</span><span class="op">(</span><span class="va">submodel</span>, to <span class="op">=</span> <span class="cn">NULL</span>, sink <span class="op">=</span> <span class="cn">TRUE</span>, full_name <span class="op">=</span> <span class="cn">NA</span><span class="op">)</span></span></code></pre></div>
+    <div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">mkinmod</span><span class="op">(</span>
+  <span class="va">...</span>,
+  use_of_ff <span class="op">=</span> <span class="st">"max"</span>,
+  name <span class="op">=</span> <span class="cn">NULL</span>,
+  speclist <span class="op">=</span> <span class="cn">NULL</span>,
+  quiet <span class="op">=</span> <span class="cn">FALSE</span>,
+  verbose <span class="op">=</span> <span class="cn">FALSE</span>,
+  dll_dir <span class="op">=</span> <span class="cn">NULL</span>,
+  unload <span class="op">=</span> <span class="cn">FALSE</span>,
+  overwrite <span class="op">=</span> <span class="cn">FALSE</span>
+<span class="op">)</span>
+
+<span class="co"># S3 method for mkinmod</span>
+<span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span>
+
+<span class="fu">mkinsub</span><span class="op">(</span><span class="va">submodel</span>, to <span class="op">=</span> <span class="cn">NULL</span>, sink <span class="op">=</span> <span class="cn">TRUE</span>, full_name <span class="op">=</span> <span class="cn">NA</span><span class="op">)</span></code></pre></div>
     </div>
 
     <div id="arguments">
@@ -136,108 +127,72 @@ If the argument <code>use_of_ff</code> is set to "min"
 additional <code>mkinsub()</code> argument can be <code>sink = FALSE</code>, effectively
 fixing the flux to sink to zero.
 In print.mkinmod, this argument is currently not used.</p></dd>
-
-
 <dt>use_of_ff</dt>
 <dd><p>Specification of the use of formation fractions in the
 model equations and, if applicable, the coefficient matrix.  If "max",
 formation fractions are always used (default).  If "min", a minimum use of
 formation fractions is made, i.e. each first-order pathway to a metabolite
 has its own rate constant.</p></dd>
-
-
 <dt>name</dt>
 <dd><p>A name for the model. Should be a valid R object name.</p></dd>
-
-
 <dt>speclist</dt>
 <dd><p>The specification of the observed variables and their
 submodel types and pathways can be given as a single list using this
 argument. Default is NULL.</p></dd>
-
-
 <dt>quiet</dt>
 <dd><p>Should messages be suppressed?</p></dd>
-
-
 <dt>verbose</dt>
 <dd><p>If <code>TRUE</code>, passed to <code><a href="https://rdrr.io/pkg/inline/man/cfunction.html" class="external-link">inline::cfunction()</a></code> if
 applicable to give detailed information about the C function being built.</p></dd>
-
-
 <dt>dll_dir</dt>
 <dd><p>Directory where an DLL object, if generated internally by
 <code><a href="https://rdrr.io/pkg/inline/man/cfunction.html" class="external-link">inline::cfunction()</a></code>, should be saved.  The DLL will only be stored in a
 permanent location for use in future sessions, if 'dll_dir' and 'name'
 are specified.</p></dd>
-
-
 <dt>unload</dt>
 <dd><p>If a DLL from the target location in 'dll_dir' is already
 loaded, should that be unloaded first?</p></dd>
-
-
 <dt>overwrite</dt>
 <dd><p>If a file exists at the target DLL location in 'dll_dir',
 should this be overwritten?</p></dd>
-
-
 <dt>x</dt>
 <dd><p>An <code>mkinmod</code> object.</p></dd>
-
-
 <dt>submodel</dt>
 <dd><p>Character vector of length one to specify the submodel type.
 See <code>mkinmod</code> for the list of allowed submodel names.</p></dd>
-
-
 <dt>to</dt>
 <dd><p>Vector of the names of the state variable to which a
 transformation shall be included in the model.</p></dd>
-
-
 <dt>sink</dt>
 <dd><p>Should a pathway to sink be included in the model in addition to
 the pathways to other state variables?</p></dd>
-
-
 <dt>full_name</dt>
 <dd><p>An optional name to be used e.g. for plotting fits
 performed with the model.  You can use non-ASCII characters here, but then
 your R code will not be portable, <em>i.e.</em> may produce unintended plot
 results on other operating systems or system configurations.</p></dd>
-
 </dl></div>
     <div id="value">
     <h2>Value</h2>
-    
-
-<p>A list of class <code>mkinmod</code> for use with <code><a href="mkinfit.html">mkinfit()</a></code>,
+    <p>A list of class <code>mkinmod</code> for use with <code><a href="mkinfit.html">mkinfit()</a></code>,
 containing, among others,</p>
 <dl><dt>diffs</dt>
 <dd><p>A vector of string representations of differential equations, one for
 each modelling variable.</p></dd>
-
 <dt>map</dt>
 <dd><p>A list containing named character vectors for each observed variable,
 specifying the modelling variables by which it is represented.</p></dd>
-
 <dt>use_of_ff</dt>
 <dd><p>The content of <code>use_of_ff</code> is passed on in this list component.</p></dd>
-
 <dt>deg_func</dt>
 <dd><p>If generated, a function containing the solution of the degradation
 model.</p></dd>
-
 <dt>coefmat</dt>
 <dd><p>The coefficient matrix, if the system of differential equations can be
 represented by one.</p></dd>
-
 <dt>cf</dt>
 <dd><p>If generated, a compiled function calculating the derivatives as
 returned by cfunction.</p></dd>
-
-
 </dl><p>A list for use with <code>mkinmod</code>.</p>
     </div>
     <div id="details">
@@ -275,16 +230,16 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media</p>
 
     <div id="ref-examples">
     <h2>Examples</h2>
-    <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span>
-<span class="r-in"><span><span class="co"># Specify the SFO model (this is not needed any more, as we can now mkinfit("SFO", ...)</span></span></span>
-<span class="r-in"><span><span class="va">SFO</span> <span class="op">&lt;-</span> <span class="fu">mkinmod</span><span class="op">(</span>parent <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span>
-<span class="r-in"><span></span></span>
-<span class="r-in"><span><span class="co"># One parent compound, one metabolite, both single first order</span></span></span>
-<span class="r-in"><span><span class="va">SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu">mkinmod</span><span class="op">(</span></span></span>
-<span class="r-in"><span>  parent <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"m1"</span><span class="op">)</span>,</span></span>
-<span class="r-in"><span>  m1 <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span>
+    <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"></span>
+<span class="r-in"><span class="co"># Specify the SFO model (this is not needed any more, as we can now mkinfit("SFO", ...)</span></span>
+<span class="r-in"><span class="va">SFO</span> <span class="op">&lt;-</span> <span class="fu">mkinmod</span><span class="op">(</span>parent <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span>
+<span class="r-in"></span>
+<span class="r-in"><span class="co"># One parent compound, one metabolite, both single first order</span></span>
+<span class="r-in"><span class="va">SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu">mkinmod</span><span class="op">(</span></span>
+<span class="r-in">  parent <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"m1"</span><span class="op">)</span>,</span>
+<span class="r-in">  m1 <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span>
 <span class="r-msg co"><span class="r-pr">#&gt;</span> Temporary DLL for differentials generated and loaded</span>
-<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">SFO_SFO</span><span class="op">)</span></span></span>
+<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">SFO_SFO</span><span class="op">)</span></span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> &lt;mkinmod&gt; model generated with</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> Use of formation fractions $use_of_ff: max </span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> Specification $spec:</span>
@@ -297,32 +252,30 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media</p>
 <span class="r-out co"><span class="r-pr">#&gt;</span> Differential equations:</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> d_parent/dt = - k_parent * parent</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1</span>
-<span class="r-in"><span></span></span>
-<span class="r-in"><span><span class="co"># \dontrun{</span></span></span>
-<span class="r-in"><span> <span class="va">fit_sfo_sfo</span> <span class="op">&lt;-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">SFO_SFO</span>, <span class="va">FOCUS_2006_D</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span>, solution_type <span class="op">=</span> <span class="st">"deSolve"</span><span class="op">)</span></span></span>
-<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span>
-<span class="r-in"><span></span></span>
-<span class="r-in"><span> <span class="co"># Now supplying compound names used for plotting, and write to user defined location</span></span></span>
-<span class="r-in"><span> <span class="co"># We need to choose a path outside the session tempdir because this gets removed</span></span></span>
-<span class="r-in"><span> <span class="va">DLL_dir</span> <span class="op">&lt;-</span> <span class="st">"~/.local/share/mkin"</span></span></span>
-<span class="r-in"><span> <span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/files2.html" class="external-link">dir.exists</a></span><span class="op">(</span><span class="va">DLL_dir</span><span class="op">)</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/base/files2.html" class="external-link">dir.create</a></span><span class="op">(</span><span class="va">DLL_dir</span><span class="op">)</span></span></span>
-<span class="r-in"><span> <span class="va">SFO_SFO.2</span> <span class="op">&lt;-</span> <span class="fu">mkinmod</span><span class="op">(</span></span></span>
-<span class="r-in"><span>   parent <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"m1"</span>, full_name <span class="op">=</span> <span class="st">"Test compound"</span><span class="op">)</span>,</span></span>
-<span class="r-in"><span>   m1 <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span>, full_name <span class="op">=</span> <span class="st">"Metabolite M1"</span><span class="op">)</span>,</span></span>
-<span class="r-in"><span>   name <span class="op">=</span> <span class="st">"SFO_SFO"</span>, dll_dir <span class="op">=</span> <span class="va">DLL_dir</span>, unload <span class="op">=</span> <span class="cn">TRUE</span>, overwrite <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
-<span class="r-msg co"><span class="r-pr">#&gt;</span> Copied DLL from /tmp/Rtmpp1dECS/file32009e039f7a.so to /home/jranke/.local/share/mkin/SFO_SFO.so</span>
-<span class="r-in"><span><span class="co"># Now we can save the model and restore it in a new session</span></span></span>
-<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">saveRDS</a></span><span class="op">(</span><span class="va">SFO_SFO.2</span>, file <span class="op">=</span> <span class="st">"~/SFO_SFO.rds"</span><span class="op">)</span></span></span>
-<span class="r-in"><span><span class="co"># Terminate the R session here if you would like to check, and then do</span></span></span>
-<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://pkgdown.jrwb.de/mkin/">mkin</a></span><span class="op">)</span></span></span>
-<span class="r-in"><span><span class="va">SFO_SFO.3</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">readRDS</a></span><span class="op">(</span><span class="st">"~/SFO_SFO.rds"</span><span class="op">)</span></span></span>
-<span class="r-in"><span><span class="va">fit_sfo_sfo</span> <span class="op">&lt;-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">SFO_SFO.3</span>, <span class="va">FOCUS_2006_D</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span>, solution_type <span class="op">=</span> <span class="st">"deSolve"</span><span class="op">)</span></span></span>
-<span class="r-wrn co"><span class="r-pr">#&gt;</span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span>
-<span class="r-in"><span></span></span>
-<span class="r-in"><span><span class="co"># Show details of creating the C function</span></span></span>
-<span class="r-in"><span><span class="va">SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu">mkinmod</span><span class="op">(</span></span></span>
-<span class="r-in"><span>  parent <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"m1"</span><span class="op">)</span>,</span></span>
-<span class="r-in"><span>  m1 <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, verbose <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
+<span class="r-in"></span>
+<span class="r-in"><span class="co"># \dontrun{</span></span>
+<span class="r-in"> <span class="va">fit_sfo_sfo</span> <span class="op">&lt;-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">SFO_SFO</span>, <span class="va">FOCUS_2006_D</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span>, solution_type <span class="op">=</span> <span class="st">"deSolve"</span><span class="op">)</span></span>
+<span class="r-in"></span>
+<span class="r-in"> <span class="co"># Now supplying compound names used for plotting, and write to user defined location</span></span>
+<span class="r-in"> <span class="co"># We need to choose a path outside the session tempdir because this gets removed</span></span>
+<span class="r-in"> <span class="va">DLL_dir</span> <span class="op">&lt;-</span> <span class="st">"~/.local/share/mkin"</span></span>
+<span class="r-in"> <span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/files2.html" class="external-link">dir.exists</a></span><span class="op">(</span><span class="va">DLL_dir</span><span class="op">)</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/base/files2.html" class="external-link">dir.create</a></span><span class="op">(</span><span class="va">DLL_dir</span><span class="op">)</span></span>
+<span class="r-in"> <span class="va">SFO_SFO.2</span> <span class="op">&lt;-</span> <span class="fu">mkinmod</span><span class="op">(</span></span>
+<span class="r-in">   parent <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"m1"</span>, full_name <span class="op">=</span> <span class="st">"Test compound"</span><span class="op">)</span>,</span>
+<span class="r-in">   m1 <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span>, full_name <span class="op">=</span> <span class="st">"Metabolite M1"</span><span class="op">)</span>,</span>
+<span class="r-in">   name <span class="op">=</span> <span class="st">"SFO_SFO"</span>, dll_dir <span class="op">=</span> <span class="va">DLL_dir</span>, unload <span class="op">=</span> <span class="cn">TRUE</span>, overwrite <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
+<span class="r-msg co"><span class="r-pr">#&gt;</span> Copied DLL from /tmp/Rtmp6NiOcv/fileb89c01ace19ec.so to /home/jranke/.local/share/mkin/SFO_SFO.so</span>
+<span class="r-in"><span class="co"># Now we can save the model and restore it in a new session</span></span>
+<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">saveRDS</a></span><span class="op">(</span><span class="va">SFO_SFO.2</span>, file <span class="op">=</span> <span class="st">"~/SFO_SFO.rds"</span><span class="op">)</span></span>
+<span class="r-in"><span class="co"># Terminate the R session here if you would like to check, and then do</span></span>
+<span class="r-in"><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://pkgdown.jrwb.de/mkin/">mkin</a></span><span class="op">)</span></span>
+<span class="r-in"><span class="va">SFO_SFO.3</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">readRDS</a></span><span class="op">(</span><span class="st">"~/SFO_SFO.rds"</span><span class="op">)</span></span>
+<span class="r-in"><span class="va">fit_sfo_sfo</span> <span class="op">&lt;-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">SFO_SFO.3</span>, <span class="va">FOCUS_2006_D</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span>, solution_type <span class="op">=</span> <span class="st">"deSolve"</span><span class="op">)</span></span>
+<span class="r-in"></span>
+<span class="r-in"><span class="co"># Show details of creating the C function</span></span>
+<span class="r-in"><span class="va">SFO_SFO</span> <span class="op">&lt;-</span> <span class="fu">mkinmod</span><span class="op">(</span></span>
+<span class="r-in">  parent <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"m1"</span><span class="op">)</span>,</span>
+<span class="r-in">  m1 <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, verbose <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> Program source:</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span>   1: #include &lt;R.h&gt;</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span>   2: </span>
@@ -344,10 +297,10 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media</p>
 <span class="r-out co"><span class="r-pr">#&gt;</span>  18: f[1] = + f_parent_to_m1 * k_parent * y[0] - k_m1 * y[1];</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span>  19: }</span>
 <span class="r-msg co"><span class="r-pr">#&gt;</span> Temporary DLL for differentials generated and loaded</span>
-<span class="r-in"><span></span></span>
-<span class="r-in"><span><span class="co"># The symbolic solution which is available in this case is not</span></span></span>
-<span class="r-in"><span><span class="co"># made for human reading but for speed of computation</span></span></span>
-<span class="r-in"><span><span class="va">SFO_SFO</span><span class="op">$</span><span class="va">deg_func</span></span></span>
+<span class="r-in"></span>
+<span class="r-in"><span class="co"># The symbolic solution which is available in this case is not</span></span>
+<span class="r-in"><span class="co"># made for human reading but for speed of computation</span></span>
+<span class="r-in"><span class="va">SFO_SFO</span><span class="op">$</span><span class="va">deg_func</span></span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> function (observed, odeini, odeparms) </span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> {</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span>     predicted &lt;- numeric(0)</span>
@@ -363,21 +316,21 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media</p>
 <span class="r-out co"><span class="r-pr">#&gt;</span>     })</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span>     return(predicted)</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> }</span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;environment: 0x55555d516c10&gt;</span>
-<span class="r-in"><span></span></span>
-<span class="r-in"><span><span class="co"># If we have several parallel metabolites</span></span></span>
-<span class="r-in"><span><span class="co"># (compare tests/testthat/test_synthetic_data_for_UBA_2014.R)</span></span></span>
-<span class="r-in"><span><span class="va">m_synth_DFOP_par</span> <span class="op">&lt;-</span> <span class="fu">mkinmod</span><span class="op">(</span></span></span>
-<span class="r-in"><span> parent <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span><span class="op">)</span>,</span></span>
-<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span>
-<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span>
-<span class="r-in"><span> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
-<span class="r-in"><span></span></span>
-<span class="r-in"><span><span class="va">fit_DFOP_par_c</span> <span class="op">&lt;-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_synth_DFOP_par</span>,</span></span>
-<span class="r-in"><span>  <span class="va">synthetic_data_for_UBA_2014</span><span class="op">[[</span><span class="fl">12</span><span class="op">]</span><span class="op">]</span><span class="op">$</span><span class="va">data</span>,</span></span>
-<span class="r-in"><span>  quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span>
-<span class="r-in"><span><span class="co"># }</span></span></span>
-<span class="r-in"><span></span></span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;environment: 0x55555cd83c70&gt;</span>
+<span class="r-in"></span>
+<span class="r-in"><span class="co"># If we have several parallel metabolites</span></span>
+<span class="r-in"><span class="co"># (compare tests/testthat/test_synthetic_data_for_UBA_2014.R)</span></span>
+<span class="r-in"><span class="va">m_synth_DFOP_par</span> <span class="op">&lt;-</span> <span class="fu">mkinmod</span><span class="op">(</span></span>
+<span class="r-in"> parent <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span><span class="op">)</span>,</span>
+<span class="r-in"> M1 <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span>
+<span class="r-in"> M2 <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span>
+<span class="r-in"> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
+<span class="r-in"></span>
+<span class="r-in"><span class="va">fit_DFOP_par_c</span> <span class="op">&lt;-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_synth_DFOP_par</span>,</span>
+<span class="r-in">  <span class="va">synthetic_data_for_UBA_2014</span><span class="op">[[</span><span class="fl">12</span><span class="op">]</span><span class="op">]</span><span class="op">$</span><span class="va">data</span>,</span>
+<span class="r-in">  quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
+<span class="r-in"><span class="co"># }</span></span>
+<span class="r-in"></span>
 </code></pre></div>
     </div>
   </div>
@@ -392,7 +345,7 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media</p>
 </div>
 
 <div class="pkgdown">
-  <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.6.</p>
+  <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.2.</p>
 </div>
 
       </footer></div>
diff --git a/docs/dev/reference/mkinpredict.html b/docs/dev/reference/mkinpredict.html
index 0e645b5..3793091 100644
--- a/docs/dev/reference/mkinpredict.html
+++ b/docs/dev/reference/mkinpredict.html
@@ -377,7 +377,7 @@ as these always return mapped output.</p></dd>
 <span class="r-out co"><span class="r-pr">#&gt;</span> 2 deSolve_compiled      1.0   0.005</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> 1            eigen      4.2   0.021</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> 4       analytical      4.2   0.021</span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> 3          deSolve     41.0   0.205</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> 3          deSolve     40.8   0.204</span>
 <span class="r-in"><span></span></span>
 <span class="r-in"><span><span class="co"># \dontrun{</span></span></span>
 <span class="r-in"><span>  <span class="co"># Predict from a fitted model</span></span></span>
diff --git a/docs/dev/reference/read_spreadsheet.html b/docs/dev/reference/read_spreadsheet.html
index efba012..7082876 100644
--- a/docs/dev/reference/read_spreadsheet.html
+++ b/docs/dev/reference/read_spreadsheet.html
@@ -64,10 +64,7 @@ factors can be given in columns named 'Temperature' and 'Moisture'."><meta name=
       <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
     </li>
     <li>
-      <a href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a>
-    </li>
-    <li>
-      <a href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a>
+      <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
     </li>
   </ul></li>
 <li>
@@ -106,7 +103,7 @@ factors can be given in columns named 'Temperature' and 'Moisture'.</p>
     <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">read_spreadsheet</span><span class="op">(</span></span>
 <span>  <span class="va">path</span>,</span>
 <span>  valid_datasets <span class="op">=</span> <span class="st">"all"</span>,</span>
-<span>  parent_only <span class="op">=</span> <span class="cn">FALSE</span>,</span>
+<span>  parent_only <span class="op">=</span> <span class="cn">TRUE</span>,</span>
 <span>  normalize <span class="op">=</span> <span class="cn">TRUE</span></span>
 <span><span class="op">)</span></span></code></pre></div>
     </div>
diff --git a/docs/dev/reference/saem.html b/docs/dev/reference/saem.html
index d2e930e..73382cb 100644
--- a/docs/dev/reference/saem.html
+++ b/docs/dev/reference/saem.html
@@ -432,8 +432,8 @@ using <a href="mmkin.html">mmkin</a>.</p>
 <span class="r-out co"><span class="r-pr">#&gt;</span> saemix version used for fitting:      3.2 </span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> mkin version used for pre-fitting:  1.2.0 </span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> R version used for fitting:         4.2.2 </span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> Date of fit:     Wed Nov 16 10:49:43 2022 </span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> Date of summary: Wed Nov 16 10:49:43 2022 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Date of fit:     Tue Nov 15 00:45:58 2022 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Date of summary: Tue Nov 15 00:45:58 2022 </span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> </span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> Equations:</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span>
@@ -448,7 +448,7 @@ using <a href="mmkin.html">mmkin</a>.</p>
 <span class="r-out co"><span class="r-pr">#&gt;</span> </span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> Model predictions using solution type analytical </span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> </span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> Fitted in 8.935 s</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Fitted in 9.189 s</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> Using 300, 100 iterations and 10 chains</span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> </span>
 <span class="r-out co"><span class="r-pr">#&gt;</span> Variance model: Constant variance </span>
diff --git a/log/build.log b/log/build.log
index a56a64d..245bd20 100644
--- a/log/build.log
+++ b/log/build.log
@@ -5,4 +5,5 @@
 * creating vignettes ... OK
 * checking for LF line-endings in source and make files and shell scripts
 * checking for empty or unneeded directories
-* building ‘mkin_1.2.0.tar.gz’
+* building ‘mkin_1.3.0.tar.gz’
+
diff --git a/log/check.log b/log/check.log
index 7aa4610..e7d4d32 100644
--- a/log/check.log
+++ b/log/check.log
@@ -5,7 +5,7 @@
 * using options ‘--no-tests --as-cran’
 * checking for file ‘mkin/DESCRIPTION’ ... OK
 * checking extension type ... Package
-* this is package ‘mkin’ version ‘1.2.0’
+* this is package ‘mkin’ version ‘1.3.0’
 * package encoding: UTF-8
 * checking CRAN incoming feasibility ... Note_to_CRAN_maintainers
 Maintainer: ‘Johannes Ranke <johannes.ranke@jrwb.de>’
@@ -37,11 +37,18 @@ Maintainer: ‘Johannes Ranke <johannes.ranke@jrwb.de>’
 * checking whether the namespace can be unloaded cleanly ... OK
 * checking loading without being on the library search path ... OK
 * checking use of S3 registration ... OK
-* checking dependencies in R code ... OK
+* checking dependencies in R code ... NOTE
+Package in Depends field not imported from: ‘deSolve’
+  These packages need to be imported from (in the NAMESPACE file)
+  for when this namespace is loaded but not attached.
 * checking S3 generic/method consistency ... OK
 * checking replacement functions ... OK
-* checking foreign function calls ... OK
-* checking R code for possible problems ... [18s/18s] OK
+* checking foreign function calls ... NOTE
+Foreign function call to a different package:
+  .C("unlock_solver", ..., PACKAGE = "deSolve")
+See chapter ‘System and foreign language interfaces’ in the ‘Writing R
+Extensions’ manual.
+* checking R code for possible problems ... [17s/17s] OK
 * checking Rd files ... OK
 * checking Rd metadata ... OK
 * checking Rd line widths ... OK
@@ -69,5 +76,9 @@ Maintainer: ‘Johannes Ranke <johannes.ranke@jrwb.de>’
 * checking for detritus in the temp directory ... OK
 * DONE
 
-Status: OK
+Status: 2 NOTEs
+See
+  ‘/home/jranke/git/mkin/mkin.Rcheck/00check.log’
+for details.
+
 
diff --git a/log/test.log b/log/test.log
index b305bf5..10c0aa7 100644
--- a/log/test.log
+++ b/log/test.log
@@ -1,57 +1,57 @@
 ℹ Testing mkin
 ✔ | F W S  OK | Context
 ✔ |         5 | AIC calculation
-✔ |         5 | Analytical solutions for coupled models [3.5s]
+✔ |         5 | Analytical solutions for coupled models [2.9s]
 ✔ |         5 | Calculation of Akaike weights
 ✔ |         3 | Export dataset for reading into CAKE
-✔ |        12 | Confidence intervals and p-values [1.1s]
-✔ |     1  12 | Dimethenamid data from 2018 [34.5s]
+✔ |        12 | Confidence intervals and p-values [1.0s]
+✔ |     1  12 | Dimethenamid data from 2018 [29.5s]
 ────────────────────────────────────────────────────────────────────────────────
-Skip ('test_dmta.R:98'): Different backends get consistent results for SFO-SFO3+, dimethenamid data
+Skip ('test_dmta.R:99'): Different backends get consistent results for SFO-SFO3+, dimethenamid data
 Reason: Fitting this ODE model with saemix takes about 15 minutes on my system
 ────────────────────────────────────────────────────────────────────────────────
-✔ |        14 | Error model fitting [5.3s]
+✔ |        14 | Error model fitting [4.9s]
 ✔ |         5 | Time step normalisation
 ✔ |         4 | Calculation of FOCUS chi2 error levels [0.6s]
-✔ |        14 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [0.8s]
-✔ |         4 | Test fitting the decline of metabolites from their maximum [0.4s]
+✔ |        14 | Results for FOCUS D established in expertise for UBA (Ranke 2014) [0.7s]
+✔ |         4 | Test fitting the decline of metabolites from their maximum [0.3s]
 ✔ |         1 | Fitting the logistic model [0.2s]
-✔ |        10 | Batch fitting and diagnosing hierarchical kinetic models [25.6s]
-✔ |     1  12 | Nonlinear mixed-effects models [0.4s]
+✔ |        10 | Batch fitting and diagnosing hierarchical kinetic models [24.7s]
+✔ |     1  12 | Nonlinear mixed-effects models [0.3s]
 ────────────────────────────────────────────────────────────────────────────────
 Skip ('test_mixed.R:74'): saemix results are reproducible for biphasic fits
 Reason: Fitting with saemix takes around 10 minutes when using deSolve
 ────────────────────────────────────────────────────────────────────────────────
 ✔ |         3 | Test dataset classes mkinds and mkindsg
-✔ |        10 | Special cases of mkinfit calls [0.6s]
+✔ |        10 | Special cases of mkinfit calls [0.5s]
 ✔ |         3 | mkinfit features [0.7s]
 ✔ |         8 | mkinmod model generation and printing [0.2s]
-✔ |         3 | Model predictions with mkinpredict [0.3s]
-✔ |         9 | Multistart method for saem.mmkin models [40.2s]
-✔ |        16 | Evaluations according to 2015 NAFTA guidance [2.6s]
-✔ |         9 | Nonlinear mixed-effects models with nlme [9.5s]
-✔ |        16 | Plotting [10.5s]
+✔ |         3 | Model predictions with mkinpredict [0.4s]
+✔ |         7 | Multistart method for saem.mmkin models [36.8s]
+✔ |        16 | Evaluations according to 2015 NAFTA guidance [2.5s]
+✔ |         9 | Nonlinear mixed-effects models with nlme [8.8s]
+✔ |        16 | Plotting [10.0s]
 ✔ |         4 | Residuals extracted from mkinfit models
-✔ |     1  36 | saemix parent models [69.8s]
+✔ |     1  36 | saemix parent models [66.1s]
 ────────────────────────────────────────────────────────────────────────────────
 Skip ('test_saemix_parent.R:143'): We can also use mkin solution methods for saem
 Reason: This still takes almost 2.5 minutes although we do not solve ODEs
 ────────────────────────────────────────────────────────────────────────────────
-✔ |         2 | Complex test case from Schaefer et al. (2007) Piacenza paper [1.6s]
+✔ |         2 | Complex test case from Schaefer et al. (2007) Piacenza paper [1.1s]
 ✔ |        11 | Processing of residue series
-✔ |        10 | Fitting the SFORB model [3.9s]
+✔ |        10 | Fitting the SFORB model [3.4s]
 ✔ |         1 | Summaries of old mkinfit objects
 ✔ |         5 | Summary [0.2s]
-✔ |         4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [2.3s]
-✔ |         9 | Hypothesis tests [8.5s]
-✔ |         4 | Calculation of maximum time weighted average concentrations (TWAs) [2.3s]
+✔ |         4 | Results for synthetic data established in expertise for UBA (Ranke 2014) [1.6s]
+✔ |         9 | Hypothesis tests [6.1s]
+✔ |         4 | Calculation of maximum time weighted average concentrations (TWAs) [2.2s]
 
 ══ Results ═════════════════════════════════════════════════════════════════════
-Duration: 225.9 s
+Duration: 206.2 s
 
 ── Skipped tests  ──────────────────────────────────────────────────────────────
 • Fitting this ODE model with saemix takes about 15 minutes on my system (1)
 • Fitting with saemix takes around 10 minutes when using deSolve (1)
 • This still takes almost 2.5 minutes although we do not solve ODEs (1)
 
-[ FAIL 0 | WARN 0 | SKIP 3 | PASS 269 ]
+[ FAIL 0 | WARN 0 | SKIP 3 | PASS 267 ]
diff --git a/man/mkinmod.Rd b/man/mkinmod.Rd
index 87ce901..612c3c2 100644
--- a/man/mkinmod.Rd
+++ b/man/mkinmod.Rd
@@ -58,7 +58,9 @@ applicable to give detailed information about the C function being built.}
 \item{dll_dir}{Directory where an DLL object, if generated internally by
 \code{\link[inline:cfunction]{inline::cfunction()}}, should be saved.  The DLL will only be stored in a
 permanent location for use in future sessions, if 'dll_dir' and 'name'
-are specified.}
+are specified. This is helpful if fit objects are cached e.g. by knitr,
+as the cache remains functional across sessions if the DLL is stored in
+a user defined location.}
 
 \item{unload}{If a DLL from the target location in 'dll_dir' is already
 loaded, should that be unloaded first?}
diff --git a/man/mkinpredict.Rd b/man/mkinpredict.Rd
index 0797f25..d93c075 100644
--- a/man/mkinpredict.Rd
+++ b/man/mkinpredict.Rd
@@ -18,9 +18,10 @@ mkinpredict(x, odeparms, odeini, outtimes, ...)
   method.ode = "lsoda",
   atol = 1e-08,
   rtol = 1e-10,
-  maxsteps = 20000,
+  maxsteps = 20000L,
   map_output = TRUE,
   na_stop = TRUE,
+  call_lsoda = NULL,
   ...
 )
 
@@ -60,23 +61,21 @@ solver is used.}
 \item{solution_type}{The method that should be used for producing the
 predictions. This should generally be "analytical" if there is only one
 observed variable, and usually "deSolve" in the case of several observed
-variables. The third possibility "eigen" is faster but not applicable to
-some models e.g.  using FOMC for the parent compound.}
+variables. The third possibility "eigen" is fast in comparison to uncompiled
+ODE models, but not applicable to some models, e.g. using FOMC for the
+parent compound.}
 
 \item{use_compiled}{If set to \code{FALSE}, no compiled version of the
 \link{mkinmod} model is used, even if is present.}
 
 \item{method.ode}{The solution method passed via \link{mkinpredict} to \link{ode}] in
-case the solution type is "deSolve". The default "lsoda" is performant, but
-sometimes fails to converge.}
+case the solution type is "deSolve" and we are not using compiled code.}
 
-\item{atol}{Absolute error tolerance, passed to \link{ode}. Default is 1e-8,
-lower than in \link{lsoda}.}
+\item{atol}{Absolute error tolerance, passed to the ode solver.}
 
-\item{rtol}{Absolute error tolerance, passed to \link{ode}. Default is 1e-10,
-much lower than in \link{lsoda}.}
+\item{rtol}{Absolute error tolerance, passed to the ode solver.}
 
-\item{maxsteps}{Maximum number of steps, passed to \link{ode}.}
+\item{maxsteps}{Maximum number of steps, passed to the ode solver.}
 
 \item{map_output}{Boolean to specify if the output should list values for
 the observed variables (default) or for all state variables (if set to
@@ -84,6 +83,8 @@ FALSE). Setting this to FALSE has no effect for analytical solutions,
 as these always return mapped output.}
 
 \item{na_stop}{Should it be an error if \link{ode} returns NaN values}
+
+\item{call_lsoda}{The address of the compiled function "call_lsoda"}
 }
 \value{
 A matrix with the numeric solution in wide format
diff --git a/man/read_spreadsheet.Rd b/man/read_spreadsheet.Rd
index 41c3210..147d09b 100644
--- a/man/read_spreadsheet.Rd
+++ b/man/read_spreadsheet.Rd
@@ -7,7 +7,7 @@
 read_spreadsheet(
   path,
   valid_datasets = "all",
-  parent_only = FALSE,
+  parent_only = TRUE,
   normalize = TRUE
 )
 }
diff --git a/man/saem.Rd b/man/saem.Rd
index 1146335..3a5abad 100644
--- a/man/saem.Rd
+++ b/man/saem.Rd
@@ -206,12 +206,12 @@ plot(f_saem_dfop_sfo)
 summary(f_saem_dfop_sfo, data = TRUE)
 
 # The following takes about 6 minutes
-#f_saem_dfop_sfo_deSolve <- saem(f_mmkin["DFOP-SFO", ], solution_type = "deSolve",
-#  control = list(nbiter.saemix = c(200, 80), nbdisplay = 10))
+f_saem_dfop_sfo_deSolve <- saem(f_mmkin["DFOP-SFO", ], solution_type = "deSolve",
+  nbiter.saemix = c(200, 80))
 
-#saemix::compare.saemix(list(
-#  f_saem_dfop_sfo$so,
-#  f_saem_dfop_sfo_deSolve$so))
+#anova(
+#  f_saem_dfop_sfo,
+#  f_saem_dfop_sfo_deSolve))
 
 # If the model supports it, we can also use eigenvalue based solutions, which
 # take a similar amount of time
diff --git a/tests/testthat/test_dmta.R b/tests/testthat/test_dmta.R
index c44cdac..5cfc61d 100644
--- a/tests/testthat/test_dmta.R
+++ b/tests/testthat/test_dmta.R
@@ -11,13 +11,13 @@ names(dmta_ds) <- sapply(dimethenamid_2018$ds, function(ds) ds$title)
 dmta_ds[["Elliot"]] <- rbind(dmta_ds[["Elliot 1"]], dmta_ds[["Elliot 2"]])
 dmta_ds[["Elliot 1"]] <- dmta_ds[["Elliot 2"]] <- NULL
 
+# mkin
+dmta_dfop <- mmkin("DFOP", dmta_ds, quiet = TRUE, cores = n_cores)
+dmta_dfop_tc <- mmkin("DFOP", dmta_ds, error_model = "tc", quiet = TRUE, cores = n_cores)
+
 test_that("Different backends get consistent results for DFOP tc, dimethenamid data", {
 
   skip_on_cran() # Time constraints
-  # mkin
-  dmta_dfop <- mmkin("DFOP", dmta_ds, quiet = TRUE, cores = n_cores)
-  dmta_dfop_tc <- mmkin("DFOP", dmta_ds, error_model = "tc", quiet = TRUE, cores = n_cores)
-
   # nlme
   expect_warning(
     nlme_dfop_tc <- nlme(dmta_dfop_tc),
@@ -85,7 +85,8 @@ sfo_sfo3p <- mkinmod(
 )
 
 dmta_sfo_sfo3p_tc <- mmkin(list("SFO-SFO3+" = sfo_sfo3p),
-  dmta_ds, error_model = "tc", quiet = TRUE, cores = n_cores)
+  dmta_ds, error_model = "tc", quiet = TRUE,
+  cores = n_cores)
 
 test_that("Different backends get consistent results for SFO-SFO3+, dimethenamid data", {
 
diff --git a/tests/testthat/test_multistart.R b/tests/testthat/test_multistart.R
index 98d3fb6..c1a10d1 100644
--- a/tests/testthat/test_multistart.R
+++ b/tests/testthat/test_multistart.R
@@ -1,7 +1,6 @@
 context("Multistart method for saem.mmkin models")
 
 test_that("multistart works for saem.mmkin models", {
-  skip_on_cran() # Save CRAN time
   set.seed(123456)
   saem_sfo_s_multi <- multistart(sfo_saem_1_reduced, n = 8, cores = n_cores,
     no_random_effect = "parent_0")
@@ -10,13 +9,9 @@ test_that("multistart works for saem.mmkin models", {
     best(saem_sfo_s_multi),
     test = TRUE
   )
-  # On winbuilder, sfo_saem_1 gives an AIC of 1310.8, while we get 1311.7
-  # locally on Linux and Windows. The other, well-determined fits
-  # both give 1309.7
-  expect_equal(round(anova_sfo, 1)["sfo_saem_1_reduced", "AIC"], 1309.7)
-  expect_equal(round(anova_sfo, 1)["best(saem_sfo_s_multi)", "AIC"], 1309.7)
-  expect_true(anova_sfo[3, "Pr(>Chisq)"] > 0.2) # Local: 1, CRAN: 0.4
+  expect_true(anova_sfo[3, "Pr(>Chisq)"] > 0.5)
 
+  skip_on_cran() # Save CRAN time
   set.seed(123456)
   saem_biphasic_m_multi <- multistart(saem_biphasic_m, n = 8,
     cores = n_cores)
diff --git a/tests/testthat/test_nafta.R b/tests/testthat/test_nafta.R
index b89ea34..8eb052c 100644
--- a/tests/testthat/test_nafta.R
+++ b/tests/testthat/test_nafta.R
@@ -4,7 +4,6 @@ test_that("Data for more than one compound are rejected",
   expect_error(nafta(FOCUS_2006_D, cores = 1)))
 
 test_that("Test data from Appendix B are correctly evaluated", {
-  skip_on_cran()
   expect_message(res <- nafta(NAFTA_SOP_Appendix_B, "aerobic aquatic", cores = 1))
 
   # From Figure D.1
@@ -26,7 +25,6 @@ test_that("Test data from Appendix B are correctly evaluated", {
 })
 
 test_that("Test data from Appendix D are correctly evaluated", {
-  skip_on_cran()
   # We are not interested in the warnings about non-normal residuals here
   suppressWarnings(
   res <- nafta(NAFTA_SOP_Appendix_D, "MRID 555555", 
diff --git a/vignettes/mkin.html b/vignettes/mkin.html
index 0d5ed6f..38c44a0 100644
--- a/vignettes/mkin.html
+++ b/vignettes/mkin.html
@@ -1599,7 +1599,7 @@ div.tocify {
 
 <h1 class="title toc-ignore">Introduction to mkin</h1>
 <h4 class="author">Johannes Ranke</h4>
-<h4 class="date">Last change 15 February 2021 (rebuilt 2022-07-12)</h4>
+<h4 class="date">Last change 15 February 2021 (rebuilt 2022-11-15)</h4>
 
 </div>
 
diff --git a/vignettes/web_only/benchmarks.html b/vignettes/web_only/benchmarks.html
index 5f81f39..5376c1f 100644
--- a/vignettes/web_only/benchmarks.html
+++ b/vignettes/web_only/benchmarks.html
@@ -1599,7 +1599,7 @@ div.tocify {
 
 <h1 class="title toc-ignore">Benchmark timings for mkin</h1>
 <h4 class="author">Johannes Ranke</h4>
-<h4 class="date">Last change 14 July 2022 (rebuilt 2022-07-14)</h4>
+<h4 class="date">Last change 14 July 2022 (rebuilt 2022-11-15)</h4>
 
 </div>
 
@@ -1635,7 +1635,7 @@ FOMC_SFO &lt;- mkinmod(
   parent = mkinsub(&quot;FOMC&quot;, &quot;m1&quot;),
   m1 = mkinsub(&quot;SFO&quot;))
 DFOP_SFO &lt;- mkinmod(
-  parent = mkinsub(&quot;FOMC&quot;, &quot;m1&quot;),
+  parent = mkinsub(&quot;FOMC&quot;, &quot;m1&quot;), # erroneously used FOMC twice, not fixed for consistency
   m1 = mkinsub(&quot;SFO&quot;))
 t3 &lt;- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D)))[[&quot;elapsed&quot;]]
 t4 &lt;- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D),
@@ -1816,6 +1816,30 @@ t11 &lt;- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c),
 <td align="right">1.770</td>
 <td align="right">3.377</td>
 </tr>
+<tr class="odd">
+<td align="left">Linux</td>
+<td align="left">Ryzen 7 1700</td>
+<td align="left">4.2.1</td>
+<td align="left">1.1.2</td>
+<td align="right">1.957</td>
+<td align="right">3.633</td>
+</tr>
+<tr class="even">
+<td align="left">Linux</td>
+<td align="left">Ryzen 7 1700</td>
+<td align="left">4.2.2</td>
+<td align="left">1.2.0</td>
+<td align="right">2.129</td>
+<td align="right">3.784</td>
+</tr>
+<tr class="odd">
+<td align="left">Linux</td>
+<td align="left">Ryzen 7 1700</td>
+<td align="left">4.2.2</td>
+<td align="left">1.3.0</td>
+<td align="right">2.046</td>
+<td align="right">3.693</td>
+</tr>
 </tbody>
 </table>
 </div>
@@ -1979,6 +2003,33 @@ t11 &lt;- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c),
 <td align="right">5.758</td>
 <td align="right">2.558</td>
 </tr>
+<tr class="odd">
+<td align="left">Linux</td>
+<td align="left">Ryzen 7 1700</td>
+<td align="left">4.2.1</td>
+<td align="left">1.1.2</td>
+<td align="right">1.503</td>
+<td align="right">6.147</td>
+<td align="right">2.803</td>
+</tr>
+<tr class="even">
+<td align="left">Linux</td>
+<td align="left">Ryzen 7 1700</td>
+<td align="left">4.2.2</td>
+<td align="left">1.2.0</td>
+<td align="right">1.559</td>
+<td align="right">6.097</td>
+<td align="right">2.841</td>
+</tr>
+<tr class="odd">
+<td align="left">Linux</td>
+<td align="left">Ryzen 7 1700</td>
+<td align="left">4.2.2</td>
+<td align="left">1.3.0</td>
+<td align="right">1.230</td>
+<td align="right">4.333</td>
+<td align="right">2.187</td>
+</tr>
 </tbody>
 </table>
 </div>
@@ -2193,6 +2244,42 @@ t11 &lt;- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c),
 <td align="right">1.744</td>
 <td align="right">2.566</td>
 </tr>
+<tr class="odd">
+<td align="left">Linux</td>
+<td align="left">Ryzen 7 1700</td>
+<td align="left">4.2.1</td>
+<td align="left">1.1.2</td>
+<td align="right">0.861</td>
+<td align="right">1.295</td>
+<td align="right">1.507</td>
+<td align="right">3.102</td>
+<td align="right">1.961</td>
+<td align="right">2.852</td>
+</tr>
+<tr class="even">
+<td align="left">Linux</td>
+<td align="left">Ryzen 7 1700</td>
+<td align="left">4.2.2</td>
+<td align="left">1.2.0</td>
+<td align="right">0.911</td>
+<td align="right">1.328</td>
+<td align="right">1.519</td>
+<td align="right">2.986</td>
+<td align="right">1.957</td>
+<td align="right">2.769</td>
+</tr>
+<tr class="odd">
+<td align="left">Linux</td>
+<td align="left">Ryzen 7 1700</td>
+<td align="left">4.2.2</td>
+<td align="left">1.3.0</td>
+<td align="right">0.693</td>
+<td align="right">0.996</td>
+<td align="right">1.121</td>
+<td align="right">2.174</td>
+<td align="right">1.427</td>
+<td align="right">2.026</td>
+</tr>
 </tbody>
 </table>
 </div>
diff --git a/vignettes/web_only/mkin_benchmarks.rda b/vignettes/web_only/mkin_benchmarks.rda
index 2d3deb2..c07def6 100644
Binary files a/vignettes/web_only/mkin_benchmarks.rda and b/vignettes/web_only/mkin_benchmarks.rda differ
diff --git a/vignettes/web_only/saem_benchmarks.html b/vignettes/web_only/saem_benchmarks.html
index 4875bb1..714dc1f 100644
--- a/vignettes/web_only/saem_benchmarks.html
+++ b/vignettes/web_only/saem_benchmarks.html
@@ -1599,7 +1599,7 @@ div.tocify {
 
 <h1 class="title toc-ignore">Benchmark timings for saem.mmkin</h1>
 <h4 class="author">Johannes Ranke</h4>
-<h4 class="date">Last change 14 November 2022 (rebuilt 2022-11-14)</h4>
+<h4 class="date">Last change 14 November 2022 (rebuilt 2022-11-15)</h4>
 
 </div>
 
@@ -1781,10 +1781,20 @@ t11 &lt;- system.time(sforb_sfo3_plus_const &lt;- saem(three_met_sep_tc[&quot;SF
 <td align="left">Linux</td>
 <td align="left">1.2.0</td>
 <td align="left">3.2</td>
-<td align="right">2.996</td>
-<td align="right">5.207</td>
-<td align="right">5.317</td>
-<td align="right">5.171</td>
+<td align="right">2.110</td>
+<td align="right">4.632</td>
+<td align="right">4.264</td>
+<td align="right">4.930</td>
+</tr>
+<tr class="even">
+<td align="left">Ryzen 7 1700</td>
+<td align="left">Linux</td>
+<td align="left">1.3.0</td>
+<td align="left">3.2</td>
+<td align="right">2.394</td>
+<td align="right">4.748</td>
+<td align="right">4.883</td>
+<td align="right">4.937</td>
 </tr>
 </tbody>
 </table>
@@ -1808,10 +1818,20 @@ t11 &lt;- system.time(sforb_sfo3_plus_const &lt;- saem(three_met_sep_tc[&quot;SF
 <td align="left">Linux</td>
 <td align="left">1.2.0</td>
 <td align="left">3.2</td>
-<td align="right">5.671</td>
-<td align="right">7.696</td>
-<td align="right">8.166</td>
-<td align="right">8.168</td>
+<td align="right">5.602</td>
+<td align="right">7.373</td>
+<td align="right">7.815</td>
+<td align="right">7.831</td>
+</tr>
+<tr class="even">
+<td align="left">Ryzen 7 1700</td>
+<td align="left">Linux</td>
+<td align="left">1.3.0</td>
+<td align="left">3.2</td>
+<td align="right">5.622</td>
+<td align="right">7.445</td>
+<td align="right">8.297</td>
+<td align="right">7.740</td>
 </tr>
 </tbody>
 </table>
@@ -1836,8 +1856,16 @@ t11 &lt;- system.time(sforb_sfo3_plus_const &lt;- saem(three_met_sep_tc[&quot;SF
 <td align="left">Linux</td>
 <td align="left">1.2.0</td>
 <td align="left">3.2</td>
-<td align="right">24.883</td>
-<td align="right">818.157</td>
+<td align="right">24.014</td>
+<td align="right">749.699</td>
+</tr>
+<tr class="even">
+<td align="left">Ryzen 7 1700</td>
+<td align="left">Linux</td>
+<td align="left">1.3.0</td>
+<td align="left">3.2</td>
+<td align="right">24.480</td>
+<td align="right">519.087</td>
 </tr>
 </tbody>
 </table>
@@ -1861,7 +1889,14 @@ t11 &lt;- system.time(sforb_sfo3_plus_const &lt;- saem(three_met_sep_tc[&quot;SF
 <td align="left">Linux</td>
 <td align="left">1.2.0</td>
 <td align="left">3.2</td>
-<td align="right">1355.036</td>
+<td align="right">1249.834</td>
+</tr>
+<tr class="even">
+<td align="left">Ryzen 7 1700</td>
+<td align="left">Linux</td>
+<td align="left">1.3.0</td>
+<td align="left">3.2</td>
+<td align="right">944.471</td>
 </tr>
 </tbody>
 </table>
diff --git a/vignettes/web_only/saem_benchmarks.rda b/vignettes/web_only/saem_benchmarks.rda
index 55fabf1..992b58c 100644
Binary files a/vignettes/web_only/saem_benchmarks.rda and b/vignettes/web_only/saem_benchmarks.rda differ

Contact - Imprint