nlmixr2 / rxode2parse

1 stars 0 forks source link

Ss lag #42

Closed mattfidler closed 1 year ago

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 59.81% and project coverage change: +0.45% :tada:

Comparison is base (9916bf6) 50.52% compared to head (b4a4445) 50.98%.

:exclamation: Current head b4a4445 differs from pull request most recent head df91c52. Consider uploading reports for the commit df91c52 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #42 +/- ## ========================================== + Coverage 50.52% 50.98% +0.45% ========================================== Files 57 57 Lines 11896 12091 +195 ========================================== + Hits 6011 6165 +154 - Misses 5885 5926 +41 ``` | [Files Changed](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2) | Coverage Δ | | |---|---|---| | [inst/include/rxode2parseGetTime.h](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2#diff-aW5zdC9pbmNsdWRlL3J4b2RlMnBhcnNlR2V0VGltZS5o) | `0.00% <0.00%> (ø)` | | | [inst/include/rxode2parseHandleEvid.h](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2#diff-aW5zdC9pbmNsdWRlL3J4b2RlMnBhcnNlSGFuZGxlRXZpZC5o) | `0.00% <0.00%> (ø)` | | | [inst/include/rxode2parseStruct.h](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2#diff-aW5zdC9pbmNsdWRlL3J4b2RlMnBhcnNlU3RydWN0Lmg=) | `100.00% <ø> (ø)` | | | [src/codegen.h](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2#diff-c3JjL2NvZGVnZW4uaA==) | `55.82% <ø> (ø)` | | | [src/fast\_factor.cpp](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2#diff-c3JjL2Zhc3RfZmFjdG9yLmNwcA==) | `62.88% <ø> (ø)` | | | [src/lincmt.c](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2#diff-c3JjL2xpbmNtdC5j) | `22.44% <0.00%> (ø)` | | | [src/lincmtB.cpp](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2#diff-c3JjL2xpbmNtdEIuY3Bw) | `0.00% <0.00%> (ø)` | | | [src/parseVars.h](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2#diff-c3JjL3BhcnNlVmFycy5o) | `86.11% <0.00%> (-0.81%)` | :arrow_down: | | [src/tran.h](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2#diff-c3JjL3RyYW4uaA==) | `98.59% <ø> (ø)` | | | [src/codegen.c](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2#diff-c3JjL2NvZGVnZW4uYw==) | `69.78% <77.77%> (+0.26%)` | :arrow_up: | | ... and [5 more](https://app.codecov.io/gh/nlmixr2/rxode2parse/pull/42?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nlmixr2) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mattfidler commented 1 year ago

For steady state infusions greater than ii

In rxode2 the number of dosing events is pre-declared. This dosing can be a bolus or 2 (or more) doses for infusions, one to turn on and one to turn off.

With the steady state infusions greater than ii, the rate will be reduced only once during the ii, so if it resets this can be handled in the etTrans(). This constrains the bioavailability so that another active infusion will not be observed at steady state, but with dose skipping, it could possibly be reduced so that the number of active infusions is less than n. In that case the dose would be observed as if it was evid=2

Another possibility is to add doses in anticipation of a bioavailability being able push the duration so there are n2 additional active infusions during stead state.

If bioavailability will not affect the duration of infusion many of these complications will be dropped.

mattfidler commented 1 year ago

Another option is to allow a separate ix per thread, initialize it to the max number of obs+dose per patient + certain number and then allow it to grow. This allows doses to be added. This way we could support an arbitrary number of additional infusion events.

Like the other items in rxode2 as a first pass it can only be initialized or changed before ODE solving occurs.

During the ODE solving these extra times will need a dummy state vector to solve out time of specified compartment values.

While doing the calc_lhs step the new time-points should simply be skipped.

mattfidler commented 1 year ago

Also need extra dosing information to add information to that is:

mattfidler commented 1 year ago

This seems to break the alag solve in rxode2. Probably need to restart.