Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(A different) Model with est = "rxSolve" crashes R #670

Closed
billdenney opened this issue Apr 6, 2024 · 3 comments · Fixed by #671
Closed

(A different) Model with est = "rxSolve" crashes R #670

billdenney opened this issue Apr 6, 2024 · 3 comments · Fixed by #671

Comments

@billdenney
Copy link
Contributor

The same model and data as in nlmixr2/rxode2et#39 is crashing again. The model is the same and the data are the same, but it is a different issue based on the fact that nlmixr2/rxode2et#40 fixed the specific issue we isolated.

Here is the back trace:

Thread 1 "R" received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737304419392) at ./nptl/pthread_kill.c:44
44      ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737304419392) at ./nptl/pthread_kill.c:44
nlmixr2/nlmixr2#1  __pthread_kill_internal (signo=6, threadid=140737304419392) at ./nptl/pthread_kill.c:78
nlmixr2/nlmixr2#2  __GI___pthread_kill (threadid=140737304419392, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
nlmixr2/nlmixr2#3  0x00007ffff7970476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
nlmixr2/nlmixr2#4  0x00007ffff79567f3 in __GI_abort () at ./stdlib/abort.c:79
nlmixr2/nlmixr2#5  0x00007ffff79ceeca in __malloc_assert (
    assertion=assertion@entry=0x7ffff7b0c988 "(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)", file=file@entry=0x7ffff7b0768c "malloc.c", line=line@entry=2617,
    function=function@entry=0x7ffff7b0d1f8 <__PRETTY_FUNCTION__.8> "sysmalloc") at ./malloc/malloc.c:307
nlmixr2/nlmixr2#6  0x00007ffff79d1937 in sysmalloc (nb=nb@entry=91008, av=av@entry=0x7ffff7b48c80 <main_arena>) at ./malloc/malloc.c:2617
nlmixr2/nlmixr2#7  0x00007ffff79d28dd in _int_malloc (av=av@entry=0x7ffff7b48c80 <main_arena>, bytes=bytes@entry=90992) at ./malloc/malloc.c:4407
nlmixr2/nlmixr2#8  0x00007ffff79d3139 in __GI___libc_malloc (bytes=90992) at ./malloc/malloc.c:3329
nlmixr2/nlmixr2#9  0x00007ffff7cec585 in Rf_allocVector3 () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#10 0x00007fffee55af77 in Rcpp::Vector<13, Rcpp::PreserveStorage>::Vector (this=0x7ffffffd2050, size=<optimized out>)
    at /home/bill/R/x86_64-pc-linux-gnu-library/4.3/Rcpp/include/Rcpp/vector/Vector.h:129
nlmixr2/nlmixr2est#151 0x00007fffee5293d7 in etSort (curEt=...) at et.cpp:506
nlmixr2/nlmixr2#12 0x00007fffee539bf9 in etImportEventTable (inData=..., warnings=<optimized out>) at et.cpp:1503
nlmixr2/nlmixr2#13 0x00007fffee554c37 in et_ (input=..., et__=...) at et.cpp:2306
nlmixr2/nlmixr2#14 0x00007fffee50fc8d in _rxode2et_et_ (inputSEXP=0x55555ed14e30, et__SEXP=<optimized out>) at RcppExports.cpp:46
nlmixr2/nlmixr2#15 0x00007ffff7c522ca in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#16 0x00007ffff7c95273 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#17 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#18 0x00007ffff7cabd86 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#19 0x00007ffff7cacbb5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2est#176 0x00007ffff7ca9e2c in Rf_eval () from /usr/lib/R/lib/libR.so
#21 0x00007ffff7c397b9 in R_UnwindProtect () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#22 0x00007fffee2fdfcf in Rcpp::unwindProtect (callback=0x7fffee2fd0a0 <Rcpp::internal::Rcpp_protected_eval(void*)>, data=0x7ffffffd5c60)
    at /home/bill/R/x86_64-pc-linux-gnu-library/4.3/Rcpp/include/Rcpp/unwindProtect.h:74
nlmixr2/nlmixr2#23 0x00007fffee4204a6 in Rcpp::Rcpp_fast_eval (env=0x5555555a8888, expr=0x5555590f0a08)
    at /home/bill/R/x86_64-pc-linux-gnu-library/4.3/Rcpp/include/Rcpp/api/meat/Rcpp_eval.h:63
nlmixr2/nlmixr2#24 Rcpp::Function_Impl<Rcpp::PreserveStorage>::invoke (env=<optimized out>, args_=<optimized out>, this=<optimized out>)
    at /home/bill/R/x86_64-pc-linux-gnu-library/4.3/Rcpp/include/Rcpp/Function.h:118
nlmixr2/nlmixr2#25 Rcpp::Function_Impl<Rcpp::PreserveStorage>::operator()<SEXPREC*, SEXPREC*> (t2=<synthetic pointer>: <optimized out>, t2=<synthetic pointer>: <optimized out>,
    t1=<synthetic pointer>: <optimized out>, this=0x7ffffffd5c50)
    at /home/bill/R/x86_64-pc-linux-gnu-library/4.3/Rcpp/include/Rcpp/generated/Function__operator.h:40
#26 _rxode2_et_ (x1=<optimized out>, x2=<optimized out>) at utilcpp.cpp:66
#27 0x00007fffee3ac9fb in et_ (input=..., et__=...) at /home/bill/R/x86_64-pc-linux-gnu-library/4.3/Rcpp/include/Rcpp/storage/PreserveStorage.h:75
#28 0x00007fffee3b6a42 in getEtRxsolve (e=...) at rxData.cpp:2252
#29 0x00007fffee3d1efe in updateSolveEnvPost (e=...) at rxData.cpp:2473
nlmixr2/nlmixr2#30 0x00007fffee3d4303 in rxSolveGet_rxSolve (obj=..., sarg="ui", exact=..., lst=...) at rxData.cpp:5570
nlmixr2/rxode2#223 0x00007fffee3d679c in rxSolveGet (obj=..., arg=..., exact=...) at rxData.cpp:5783
nlmixr2/nlmixr2#32 0x00007fffee2f78f6 in _rxode2_rxSolveGet_try (objSEXP=0x55555d08c4c0, argSEXP=<optimized out>, exactSEXP=<optimized out>) at RcppExports.cpp:859
nlmixr2/nlmixr2#33 0x00007fffee2f7a1b in _rxode2_rxSolveGet (objSEXP=0x55555d08c4c0, argSEXP=0x55555ed32b78, exactSEXP=0x55555a23acb8) at RcppExports.cpp:867
#34 0x00007ffff7c522ae in ?? () from /usr/lib/R/lib/libR.so
#35 0x00007ffff7c95273 in ?? () from /usr/lib/R/lib/libR.so
#36 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#37 0x00007ffff7cabd86 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#38 0x00007ffff7cacbb5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
#39 0x00007ffff7cf22c1 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#40 0x00007ffff7cf2721 in ?? () from /usr/lib/R/lib/libR.so
#41 0x00007ffff7c8794a in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#42 0x00007ffff7c8d2d5 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#43 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#44 0x00007ffff7caa6a4 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#45 0x00007ffff7caa988 in ?? () from /usr/lib/R/lib/libR.so
#46 0x00007ffff7c95d42 in ?? () from /usr/lib/R/lib/libR.so
#47 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
#48 0x00007ffff7caa6a4 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2est#208 0x00007ffff7caa988 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2plot#14 0x00007ffff7c95d42 in ?? () from /usr/lib/R/lib/libR.so
#51 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
#52 0x00007ffff7caa6a4 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#53 0x00007ffff7caa988 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#54 0x00007ffff7c95d42 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#55 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#56 0x00007ffff7caa6a4 in ?? () from /usr/lib/R/lib/libR.so
#57 0x00007ffff7caa988 in ?? () from /usr/lib/R/lib/libR.so
#58 0x00007ffff7c95d42 in ?? () from /usr/lib/R/lib/libR.so
#59 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/rxode2#327 0x00007ffff7caa6a4 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#61 0x00007ffff7caa988 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#62 0x00007ffff7c95d42 in ?? () from /usr/lib/R/lib/libR.so
--Type <RET> for more, q to quit, c to continue without paging--c
nlmixr2/nlmixr2#63 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#64 0x00007ffff7cabd86 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#65 0x00007ffff7cacbb5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#66 0x00007ffff7c9acfd in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#67 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#68 0x00007ffff7cabd86 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#69 0x00007ffff7cacbb5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
#70 0x00007ffff7c9acfd in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#71 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
#72 0x00007ffff7cabd86 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#73 0x00007ffff7cacbb5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
#74 0x00007ffff7c9acfd in ?? () from /usr/lib/R/lib/libR.so
#75 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#76 0x00007ffff7cabd86 in ?? () from /usr/lib/R/lib/libR.so
#77 0x00007ffff7cacbb5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
#78 0x00007ffff7c9acfd in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2est#289 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#80 0x00007ffff7cabd86 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#81 0x00007ffff7cacbb5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
#82 0x00007ffff7c9acfd in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#83 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#84 0x00007ffff7cabd86 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#85 0x00007ffff7cacbb5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#86 0x00007ffff7c9acfd in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#87 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#88 0x00007ffff7cabd86 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#89 0x00007ffff7cacbb5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2extra#40 0x00007ffff7c9acfd in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#91 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#92 0x00007ffff7cabd86 in ?? () from /usr/lib/R/lib/libR.so
#93 0x00007ffff7cacbb5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#94 0x00007ffff7cf22c1 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#95 0x00007ffff7cf2721 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#96 0x00007ffff7cf2aa2 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#97 0x00007ffff7c8f068 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#98 0x00007ffff7ca9d00 in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#99 0x00007ffff7cabd86 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#100 0x00007ffff7cacbb5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#101 0x00007ffff7ca9e2c in Rf_eval () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#102 0x00007ffff7cae892 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#103 0x00007ffff7caa100 in Rf_eval () from /usr/lib/R/lib/libR.so
#104 0x00007ffff7cdfd0a in Rf_ReplIteration () from /usr/lib/R/lib/libR.so
#105 0x00007ffff7ce00a0 in ?? () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2plot#28 0x00007ffff7ce0160 in run_Rmainloop () from /usr/lib/R/lib/libR.so
nlmixr2/nlmixr2#107 0x000055555555509f in main ()
nlmixr2/nlmixr2#108 0x00007ffff7957d90 in __libc_start_call_main (main=main@entry=0x555555555080 <main>, argc=argc@entry=3, argv=argv@entry=0x7fffffffe3b8) at ../sysdeps/nptl/libc_start_call_main.h:58
nlmixr2/nlmixr2#109 0x00007ffff7957e40 in __libc_start_main_impl (main=0x555555555080 <main>, argc=3, argv=0x7fffffffe3b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe3a8) at ../csu/libc-start.c:392
nlmixr2/nlmixr2#110 0x00005555555550d5 in _start ()

I'm working to create a reprex.

@billdenney
Copy link
Contributor Author

While trying to make a minimal reprex (in ID segment 1/4 for my reference), I got the following message that looks like it could relate to a different issue:

Error in (function (x1, x2)  :
  attempt to set index 5660/5660 in SET_STRING_ELT

That did not crash R.

@billdenney
Copy link
Contributor Author

Here is the reprex:

library(nlmixr2)

model <-
  function() {
    ini({
      lfdose_max <- -0.1
      lfdose_50 <- 1
      lktr <- 0.1
      lka <- -1
      lcl <- 1.1
      lvc <- 1.1
      lvp <- 1.1
      lq <- 1.1
      cl_covar <- -1
      propSd <- 0.1
      addSd <- 1
      iiv_fdose_max ~ 0
      iiv_ktr ~ 0
      iiv_ka ~ 0.1
      iiv_cl ~ 0.1
      iiv_vc ~ 0.1
    })
    
    model({
      fdose_max <- exp(lfdose_max + iiv_fdose_max)
      fdose_50 <- exp(lfdose_50)
      fdose <- 1 + fdose_max * DOSE/(fdose_50 + DOSE)
      fdepot <- fdose
      ktr <- exp(lktr + iiv_ktr)
      ka <- exp(lka + iiv_ka)
      cl <- exp(lcl + COVAR * cl_covar + iiv_cl)
      vc <- exp(lvc + iiv_vc)
      vp <- exp(lvp)
      q <- exp(lq)
      kel <- cl/vc
      k12 <- q/vc
      k21 <- q/vp
      d/dt(depot) <- -ktr * depot
      d/dt(transit) <- -ka * transit + ktr * fdepot * depot
      d/dt(central) <- ka * transit - kel * central - k12 *
        central + k21 * peripheral1
      d/dt(peripheral1) <- k12 * central - k21 * peripheral1
      cc <- 1000 * central/vc
      cc ~ prop(propSd) + add(addSd)
    })
  }

d_mod_anon <-
structure(list(ID = c("A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
"A131", "A131", "A131", "A131", "A132", "A132", "A132", "A132",
"A132", "A132", "A132", "A132", "A132", "A132", "A132", "A132",
"A132", "A132", "A132", "A132", "A132", "A132", "A132", "A132",
"A132", "A132", "A132", "A132", "A132", "A132", "A132", "A132",
"A132", "A132", "A132", "A132", "A132", "A132", "A132", "A132",
"A132", "A132", "A132", "A132", "A133", "A133", "A133", "A133",
"A133", "A133", "A133", "A133", "A133", "A133", "A133", "A133",
"A133", "A133", "A133", "A133", "A133", "A133", "A133", "A133",
"A133", "A133", "A133", "A133", "A133", "A133", "A133", "A133",
"A133", "A133", "A133", "A133", "A133", "A133", "A133", "A133",
"A133", "A133", "A133", "A134", "A134", "A134", "A134", "A134",
"A134", "A134", "A134", "A134", "A134", "A134", "A135", "A135",
"A135", "A135", "A135", "A135", "A135", "A135", "A135", "A135",
"A135", "A135", "A135", "A135", "A135", "A135", "A135", "A135",
"A135", "A135", "A135", "A135", "A135", "A135", "A135", "A135",
"A135", "A135", "A135", "A135", "A135"), TIME = c(0, 0, 1.3,
1.883333333, 2.766666667, 4.85, 6.883333333, 7.816666667, 23.81666667,
47.81666667, 71.81666667, 95.81666667, 166.2, 166.2, 190.2, 214.2,
238.2, 262.2, 332.3333333, 332.3333333, 332.95, 333.5333333,
334.5333333, 336.5333333, 338.5333333, 339.45, 355.45, 379.45,
403.45, 427.45, 504.3166667, 504.3166667, 528.3166667, 552.3166667,
576.3166667, 672.3166667, 696.3166667, 720.3166667, 744.3166667,
840.3166667, 864.3166667, 888.3166667, 909.5333333, 909.5333333,
910.3666667, 910.8166667, 911.7, 913.45, 915.4, 917, 1009.783333,
1009.783333, 1012.3, 1034.3, 1058.3, 1082.3, 1178.3, 1202.3,
1226.3, 1250.3, 2016.1, 2016.1, 2040.1, 2064.1, 2088.1, 2184.1,
2208.1, 2232.1, 2256.1, 2352.1, 2376.1, 2400.1, 2424.1, 2522.1,
2522.1, 2522.45, 2544.45, 2568.45, 2592.45, 2688.45, 2712.45,
2736.45, 2760.45, 2856.45, 2880.45, 2904.45, 2928.45, 3025.8,
3025.8, 3028.266667, 3050.266667, 3074.266667, 3098.266667, 3194.266667,
3218.266667, 3242.266667, 3266.266667, 0, 0, 0.85, 24.35, 48.35,
72.35, 96.35, 336.35, 360.35, 384.35, 408.35, 432.35, 500.7,
500.7, 503.0166667, 525.0166667, 549.0166667, 573.0166667, 597.0166667,
666.1333333, 666.1333333, 666.9833333, 667.4833333, 668.4833333,
669.9833333, 672.0333333, 673.7, 689.7, 713.7, 737.7, 761.7,
833.7, 881.7, 905.7, 1001.7, 1025.7, 1049.7, 1082.816667, 1082.816667,
1085.7, 0, 0, 1.616666667, 2.033333333, 2.866666667, 4.866666667,
6.283333333, 24.28333333, 170.2833333, 170.2833333, 194.2833333,
218.2833333, 242.2833333, 261.6833333, 333.1666667, 357.1666667,
381.1666667, 405.1666667, 429.1666667, 505.35, 505.35, 508.3333333,
530.3333333, 554.3333333, 578.3333333, 595.4, 595.4, 596.9333333,
666.9333333, 690.9333333, 714.9333333, 738.9333333, NA, NA, NA,
NA, NA, NA, NA, 0, 0, 1.133333333, 1.716666667, 2.633333333,
4.416666667, 6.216666667, 24.21666667, 48.21666667, 72.21666667,
96.21666667, 0, 0, 0.9666666667, 1.466666667, 2.266666667, 4.35,
6.016666667, 24.01666667, 48.01666667, 168.0166667, 192.0166667,
216.0166667, 240.0166667, 264.0166667, 336.0166667, 360.0166667,
384.0166667, 408.0166667, 432.0166667, 503.3, 503.3, 505.9, 527.9,
551.9, 575.9, 599.9, 1175.566667, 1175.566667, 1178, 1200, 1224
), CMT = c("central", "depot", "central", "central", "central",
"central", "central", "central", "depot", "depot", "depot", "depot",
"central", "depot", "depot", "depot", "depot", "depot", "central",
"depot", "central", "central", "central", "central", "central",
"central", "depot", "depot", "depot", "depot", "central", "depot",
"depot", "depot", "depot", "depot", "depot", "depot", "depot",
"depot", "depot", "depot", "central", "depot", "central", "central",
"central", "central", "central", "central", "central", "depot",
"central", "depot", "depot", "depot", "depot", "depot", "depot",
"depot", "central", "depot", "depot", "depot", "depot", "depot",
"depot", "depot", "depot", "depot", "depot", "depot", "depot",
"central", "depot", "central", "depot", "depot", "depot", "depot",
"depot", "depot", "depot", "depot", "depot", "depot", "depot",
"central", "depot", "central", "depot", "depot", "depot", "depot",
"depot", "depot", "depot", "central", "depot", "central", "depot",
"depot", "depot", "depot", "depot", "depot", "depot", "depot",
"depot", "central", "depot", "central", "depot", "depot", "depot",
"depot", "central", "depot", "central", "central", "central",
"central", "central", "central", "depot", "depot", "depot", "depot",
"depot", "depot", "depot", "depot", "depot", "depot", "central",
"depot", "central", "central", "depot", "central", "central",
"central", "central", "central", "depot", "central", "depot",
"depot", "depot", "depot", "depot", "depot", "depot", "depot",
"depot", "depot", "central", "depot", "central", "depot", "depot",
"depot", "central", "depot", "central", "depot", "depot", "depot",
"depot", "central", "central", "central", "central", "central",
"central", "central", "central", "depot", "central", "central",
"central", "central", "central", "depot", "depot", "depot", "depot",
"central", "depot", "central", "central", "central", "central",
"central", "depot", "depot", "depot", "depot", "depot", "depot",
"depot", "depot", "depot", "depot", "depot", "depot", "central",
"depot", "central", "depot", "depot", "depot", "depot", "central",
"depot", "central", "depot", "depot"), AMT = c(NA, 400, NA, NA,
NA, NA, NA, NA, 400, 400, 400, 400, NA, 400, 400, 400, 400, 400,
NA, 400, NA, NA, NA, NA, NA, NA, 400, 400, 400, 400, NA, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, NA, 400, NA,
NA, NA, NA, NA, NA, NA, 400, NA, 400, 400, 400, 400, 400, 400,
400, NA, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, NA, 400, NA, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, NA, 400, NA, 400, 400, 400, 400, 400, 400, 400, NA,
500, NA, 500, 500, 500, 500, 450, 450, 450, 450, 450, NA, 450,
NA, 450, 450, 450, 450, NA, 450, NA, NA, NA, NA, NA, NA, 450,
450, 450, 450, 450, 450, 450, 450, 450, 450, NA, 450, NA, NA,
350, NA, NA, NA, NA, NA, 350, NA, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, NA, 300, NA, 300, 300, 300, NA, 300, NA,
300, 300, 300, 300, NA, NA, NA, NA, NA, NA, NA, NA, 350, NA,
NA, NA, NA, NA, 350, 350, 350, 350, NA, 400, NA, NA, NA, NA,
NA, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
NA, 400, NA, 400, 400, 400, 400, NA, 400, NA, 400, 400), DOSE = c(0,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 0, 500, 500, 500, 500, 500, 500, 450,
450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
450, 450, 450, 450, 450, 450, 0, 350, 350, 350, 350, 350, 350,
350, 350, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 0, 350, 350, 350, 350, 350, 350,
350, 350, 350, 350, 0, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
400, 400, 400, 400, 400, 400, 400, 400, 400), EVID = c(0, 1,
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0,
0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1,
1, 0, 1, 0, 1, 1), COVAR = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), row.names = c(NA,
-218L), class = c("tbl_df", "tbl", "data.frame"))

d_sim_crash <- nlmixr(object = model, data = d_mod_anon, est = "rxSolve")

@billdenney billdenney changed the title (A different) Model with est = "rxSolve" crashes R; with est = "focei" works fine (A different) Model with est = "rxSolve" crashes R Apr 6, 2024
@mattfidler mattfidler transferred this issue from nlmixr2/nlmixr2 Apr 7, 2024
@mattfidler mattfidler linked a pull request Apr 7, 2024 that will close this issue
@mattfidler
Copy link
Contributor

You will need to update rxode2et, rxode2 and reinstall nlmixr2est even if it is the same sha5 hash (may crash without rebuilding).

library(nlmixr2)
#> Loading required package: nlmixr2data

model <-
  function() {
    ini({
      lfdose_max <- -0.1
      lfdose_50 <- 1
      lktr <- 0.1
      lka <- -1
      lcl <- 1.1
      lvc <- 1.1
      lvp <- 1.1
      lq <- 1.1
      cl_covar <- -1
      propSd <- 0.1
      addSd <- 1
      iiv_fdose_max ~ 0
      iiv_ktr ~ 0
      iiv_ka ~ 0.1
      iiv_cl ~ 0.1
      iiv_vc ~ 0.1
    })
    
    model({
      fdose_max <- exp(lfdose_max + iiv_fdose_max)
      fdose_50 <- exp(lfdose_50)
      fdose <- 1 + fdose_max * DOSE/(fdose_50 + DOSE)
      fdepot <- fdose
      ktr <- exp(lktr + iiv_ktr)
      ka <- exp(lka + iiv_ka)
      cl <- exp(lcl + COVAR * cl_covar + iiv_cl)
      vc <- exp(lvc + iiv_vc)
      vp <- exp(lvp)
      q <- exp(lq)
      kel <- cl/vc
      k12 <- q/vc
      k21 <- q/vp
      d/dt(depot) <- -ktr * depot
      d/dt(transit) <- -ka * transit + ktr * fdepot * depot
      d/dt(central) <- ka * transit - kel * central - k12 *
        central + k21 * peripheral1
      d/dt(peripheral1) <- k12 * central - k21 * peripheral1
      cc <- 1000 * central/vc
      cc ~ prop(propSd) + add(addSd)
    })
  }

d_mod_anon <-
  structure(list(ID = c("A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A131", "A131", "A131", "A131",
                        "A131", "A131", "A131", "A131", "A132", "A132", "A132", "A132",
                        "A132", "A132", "A132", "A132", "A132", "A132", "A132", "A132",
                        "A132", "A132", "A132", "A132", "A132", "A132", "A132", "A132",
                        "A132", "A132", "A132", "A132", "A132", "A132", "A132", "A132",
                        "A132", "A132", "A132", "A132", "A132", "A132", "A132", "A132",
                        "A132", "A132", "A132", "A132", "A133", "A133", "A133", "A133",
                        "A133", "A133", "A133", "A133", "A133", "A133", "A133", "A133",
                        "A133", "A133", "A133", "A133", "A133", "A133", "A133", "A133",
                        "A133", "A133", "A133", "A133", "A133", "A133", "A133", "A133",
                        "A133", "A133", "A133", "A133", "A133", "A133", "A133", "A133",
                        "A133", "A133", "A133", "A134", "A134", "A134", "A134", "A134",
                        "A134", "A134", "A134", "A134", "A134", "A134", "A135", "A135",
                        "A135", "A135", "A135", "A135", "A135", "A135", "A135", "A135",
                        "A135", "A135", "A135", "A135", "A135", "A135", "A135", "A135",
                        "A135", "A135", "A135", "A135", "A135", "A135", "A135", "A135",
                        "A135", "A135", "A135", "A135", "A135"), TIME = c(0, 0, 1.3,
                                                                          1.883333333, 2.766666667, 4.85, 6.883333333, 7.816666667, 23.81666667,
                                                                          47.81666667, 71.81666667, 95.81666667, 166.2, 166.2, 190.2, 214.2,
                                                                          238.2, 262.2, 332.3333333, 332.3333333, 332.95, 333.5333333,
                                                                          334.5333333, 336.5333333, 338.5333333, 339.45, 355.45, 379.45,
                                                                          403.45, 427.45, 504.3166667, 504.3166667, 528.3166667, 552.3166667,
                                                                          576.3166667, 672.3166667, 696.3166667, 720.3166667, 744.3166667,
                                                                          840.3166667, 864.3166667, 888.3166667, 909.5333333, 909.5333333,
                                                                          910.3666667, 910.8166667, 911.7, 913.45, 915.4, 917, 1009.783333,
                                                                          1009.783333, 1012.3, 1034.3, 1058.3, 1082.3, 1178.3, 1202.3,
                                                                          1226.3, 1250.3, 2016.1, 2016.1, 2040.1, 2064.1, 2088.1, 2184.1,
                                                                          2208.1, 2232.1, 2256.1, 2352.1, 2376.1, 2400.1, 2424.1, 2522.1,
                                                                          2522.1, 2522.45, 2544.45, 2568.45, 2592.45, 2688.45, 2712.45,
                                                                          2736.45, 2760.45, 2856.45, 2880.45, 2904.45, 2928.45, 3025.8,
                                                                          3025.8, 3028.266667, 3050.266667, 3074.266667, 3098.266667, 3194.266667,
                                                                          3218.266667, 3242.266667, 3266.266667, 0, 0, 0.85, 24.35, 48.35,
                                                                          72.35, 96.35, 336.35, 360.35, 384.35, 408.35, 432.35, 500.7,
                                                                          500.7, 503.0166667, 525.0166667, 549.0166667, 573.0166667, 597.0166667,
                                                                          666.1333333, 666.1333333, 666.9833333, 667.4833333, 668.4833333,
                                                                          669.9833333, 672.0333333, 673.7, 689.7, 713.7, 737.7, 761.7,
                                                                          833.7, 881.7, 905.7, 1001.7, 1025.7, 1049.7, 1082.816667, 1082.816667,
                                                                          1085.7, 0, 0, 1.616666667, 2.033333333, 2.866666667, 4.866666667,
                                                                          6.283333333, 24.28333333, 170.2833333, 170.2833333, 194.2833333,
                                                                          218.2833333, 242.2833333, 261.6833333, 333.1666667, 357.1666667,
                                                                          381.1666667, 405.1666667, 429.1666667, 505.35, 505.35, 508.3333333,
                                                                          530.3333333, 554.3333333, 578.3333333, 595.4, 595.4, 596.9333333,
                                                                          666.9333333, 690.9333333, 714.9333333, 738.9333333, NA, NA, NA,
                                                                          NA, NA, NA, NA, 0, 0, 1.133333333, 1.716666667, 2.633333333,
                                                                          4.416666667, 6.216666667, 24.21666667, 48.21666667, 72.21666667,
                                                                          96.21666667, 0, 0, 0.9666666667, 1.466666667, 2.266666667, 4.35,
                                                                          6.016666667, 24.01666667, 48.01666667, 168.0166667, 192.0166667,
                                                                          216.0166667, 240.0166667, 264.0166667, 336.0166667, 360.0166667,
                                                                          384.0166667, 408.0166667, 432.0166667, 503.3, 503.3, 505.9, 527.9,
                                                                          551.9, 575.9, 599.9, 1175.566667, 1175.566667, 1178, 1200, 1224
                                                                          ), CMT = c("central", "depot", "central", "central", "central",
                                                                                     "central", "central", "central", "depot", "depot", "depot", "depot",
                                                                                     "central", "depot", "depot", "depot", "depot", "depot", "central",
                                                                                     "depot", "central", "central", "central", "central", "central",
                                                                                     "central", "depot", "depot", "depot", "depot", "central", "depot",
                                                                                     "depot", "depot", "depot", "depot", "depot", "depot", "depot",
                                                                                     "depot", "depot", "depot", "central", "depot", "central", "central",
                                                                                     "central", "central", "central", "central", "central", "depot",
                                                                                     "central", "depot", "depot", "depot", "depot", "depot", "depot",
                                                                                     "depot", "central", "depot", "depot", "depot", "depot", "depot",
                                                                                     "depot", "depot", "depot", "depot", "depot", "depot", "depot",
                                                                                     "central", "depot", "central", "depot", "depot", "depot", "depot",
                                                                                     "depot", "depot", "depot", "depot", "depot", "depot", "depot",
                                                                                     "central", "depot", "central", "depot", "depot", "depot", "depot",
                                                                                     "depot", "depot", "depot", "central", "depot", "central", "depot",
                                                                                     "depot", "depot", "depot", "depot", "depot", "depot", "depot",
                                                                                     "depot", "central", "depot", "central", "depot", "depot", "depot",
                                                                                     "depot", "central", "depot", "central", "central", "central",
                                                                                     "central", "central", "central", "depot", "depot", "depot", "depot",
                                                                                     "depot", "depot", "depot", "depot", "depot", "depot", "central",
                                                                                     "depot", "central", "central", "depot", "central", "central",
                                                                                     "central", "central", "central", "depot", "central", "depot",
                                                                                     "depot", "depot", "depot", "depot", "depot", "depot", "depot",
                                                                                     "depot", "depot", "central", "depot", "central", "depot", "depot",
                                                                                     "depot", "central", "depot", "central", "depot", "depot", "depot",
                                                                                     "depot", "central", "central", "central", "central", "central",
                                                                                     "central", "central", "central", "depot", "central", "central",
                                                                                     "central", "central", "central", "depot", "depot", "depot", "depot",
                                                                                     "central", "depot", "central", "central", "central", "central",
                                                                                     "central", "depot", "depot", "depot", "depot", "depot", "depot",
                                                                                     "depot", "depot", "depot", "depot", "depot", "depot", "central",
                                                                                     "depot", "central", "depot", "depot", "depot", "depot", "central",
                                                                                     "depot", "central", "depot", "depot"), AMT = c(NA, 400, NA, NA,
                                                                                                                                    NA, NA, NA, NA, 400, 400, 400, 400, NA, 400, 400, 400, 400, 400,
                                                                                                                                    NA, 400, NA, NA, NA, NA, NA, NA, 400, 400, 400, 400, NA, 400,
                                                                                                                                    400, 400, 400, 400, 400, 400, 400, 400, 400, 400, NA, 400, NA,
                                                                                                                                    NA, NA, NA, NA, NA, NA, 400, NA, 400, 400, 400, 400, 400, 400,
                                                                                                                                    400, NA, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                    400, NA, 400, NA, 400, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                    400, 400, NA, 400, NA, 400, 400, 400, 400, 400, 400, 400, NA,
                                                                                                                                    500, NA, 500, 500, 500, 500, 450, 450, 450, 450, 450, NA, 450,
                                                                                                                                    NA, 450, 450, 450, 450, NA, 450, NA, NA, NA, NA, NA, NA, 450,
                                                                                                                                    450, 450, 450, 450, 450, 450, 450, 450, 450, NA, 450, NA, NA,
                                                                                                                                    350, NA, NA, NA, NA, NA, 350, NA, 300, 300, 300, 300, 300, 300,
                                                                                                                                    300, 300, 300, 300, NA, 300, NA, 300, 300, 300, NA, 300, NA,
                                                                                                                                    300, 300, 300, 300, NA, NA, NA, NA, NA, NA, NA, NA, 350, NA,
                                                                                                                                    NA, NA, NA, NA, 350, 350, 350, 350, NA, 400, NA, NA, NA, NA,
                                                                                                                                    NA, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                    NA, 400, NA, 400, 400, 400, 400, NA, 400, NA, 400, 400), DOSE = c(0,
                                                                                                                                                                                                      400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                                                                                      400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                                                                                      400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                                                                                      400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                                                                                      400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                                                                                      400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                                                                                      400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                                                                                      400, 400, 400, 400, 400, 0, 500, 500, 500, 500, 500, 500, 450,
                                                                                                                                                                                                      450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
                                                                                                                                                                                                      450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
                                                                                                                                                                                                      450, 450, 450, 450, 450, 450, 0, 350, 350, 350, 350, 350, 350,
                                                                                                                                                                                                      350, 350, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
                                                                                                                                                                                                      300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
                                                                                                                                                                                                      300, 300, 300, 300, 300, 300, 0, 350, 350, 350, 350, 350, 350,
                                                                                                                                                                                                      350, 350, 350, 350, 0, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                                                                                      400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
                                                                                                                                                                                                      400, 400, 400, 400, 400, 400, 400, 400, 400), EVID = c(0, 1,
                                                                                                                                                                                                                                                             0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0,
                                                                                                                                                                                                                                                             0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
                                                                                                                                                                                                                                                             0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,
                                                                                                                                                                                                                                                             1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
                                                                                                                                                                                                                                                             1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,
                                                                                                                                                                                                                                                             1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
                                                                                                                                                                                                                                                             1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
                                                                                                                                                                                                                                                             1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0,
                                                                                                                                                                                                                                                             0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0,
                                                                                                                                                                                                                                                             0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1,
                                                                                                                                                                                                                                                             1, 0, 1, 0, 1, 1), COVAR = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
                                                                                                                                                                                                                                                                                          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
                                                                                                                                                                                                                                                                                          1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
                                                                                                                                                                                                                                                                                          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                                                                                                                                                                                                                                                                          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                                                                                                                                                                                                                                                                          0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                                                                                                                                                                                                                                                                          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                                                                                                                                                                                                                                                                          1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                                                                                                                                                                                                                                                                          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                                                                                                                                                                                                                                                                          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                                                                                                                                                                                                                                                                                          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), row.names = c(NA,
                                                                                                                                                                                                                                                                                                                                                                -218L), class = c("tbl_df", "tbl", "data.frame"))

d_sim_crash <- nlmixr(object = model, data = d_mod_anon, est = "rxSolve")
#> ℹ the following etas are removed from the model since their initial estimates are zero: iiv_fdose_max, iiv_ktr
#> using C compiler: ‘gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
#> In file included from /usr/share/R/include/R.h:71,
#>                  from /home/matt/R/x86_64-pc-linux-gnu-library/4.3/rxode2parse/include/rxode2parse.h:33,
#>                  from /home/matt/R/x86_64-pc-linux-gnu-library/4.3/rxode2/include/rxode2.h:9,
#>                  from /home/matt/R/x86_64-pc-linux-gnu-library/4.3/rxode2parse/include/rxode2_model_shared.h:3,
#>                  from rx_de1f0e8c5dc3409a82cc4c3524a54eaf_.c:117:
#> /usr/share/R/include/R_ext/Complex.h:80:6: warning: ISO C99 doesn’t support unnamed structs/unions [-Wpedantic]
#>    80 |     };
#>       |      ^
#> Warning: while importing the dataset, some times are NA and ignored
print(d_sim_crash)
#> ── Solved rxode2 object ──
#> ── Parameters ($params): ──
#> # A tibble: 5 × 15
#>   id    lfdose_max lfdose_50  lktr   lka   lcl   lvc   lvp    lq cl_covar propSd
#>   <fct>      <dbl>     <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>    <dbl>  <dbl>
#> 1 A131        -0.1         1   0.1    -1   1.1   1.1   1.1   1.1       -1    0.1
#> 2 A132        -0.1         1   0.1    -1   1.1   1.1   1.1   1.1       -1    0.1
#> 3 A133        -0.1         1   0.1    -1   1.1   1.1   1.1   1.1       -1    0.1
#> 4 A134        -0.1         1   0.1    -1   1.1   1.1   1.1   1.1       -1    0.1
#> 5 A135        -0.1         1   0.1    -1   1.1   1.1   1.1   1.1       -1    0.1
#> # ℹ 4 more variables: addSd <dbl>, iiv_ka <dbl>, iiv_cl <dbl>, iiv_vc <dbl>
#> ── Initial Conditions ($inits): ──
#>       depot     transit     central peripheral1 
#>           0           0           0           0 
#> ── First part of data (object): ──
#> # A tibble: 70 × 24
#>   id     time fdose_max fdose_50 fdose fdepot   ktr    ka    cl    vc    vp
#>   <fct> <dbl>     <dbl>    <dbl> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 A131   0        0.905     2.72  1      1     1.11 0.283 0.989  3.31  3.00
#> 2 A131   1.3      0.905     2.72  1.90   1.90  1.11 0.283 0.989  3.31  3.00
#> 3 A131   1.88     0.905     2.72  1.90   1.90  1.11 0.283 0.989  3.31  3.00
#> 4 A131   2.77     0.905     2.72  1.90   1.90  1.11 0.283 0.989  3.31  3.00
#> 5 A131   4.85     0.905     2.72  1.90   1.90  1.11 0.283 0.989  3.31  3.00
#> 6 A131   6.88     0.905     2.72  1.90   1.90  1.11 0.283 0.989  3.31  3.00
#> # ℹ 64 more rows
#> # ℹ 13 more variables: q <dbl>, kel <dbl>, k12 <dbl>, k21 <dbl>, cc <dbl>,
#> #   ipredSim <dbl>, sim <dbl>, depot <dbl>, transit <dbl>, central <dbl>,
#> #   peripheral1 <dbl>, DOSE <dbl>, COVAR <dbl>

Created on 2024-04-07 with reprex v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants