-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fill out evtools function set for dosing #1227
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kyleam
approved these changes
Sep 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed summary.
All of the tests compare doses set up via the data set (or event object) and doses that are issued from inside the model.
These tests look great.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
These functions provide new functionality to (1) gives doses at steady state and (2) give additional doses. We also provide the user some of the "missing" api for working with these event objects in C++.
Note: working on this feature, I discovered behavior in #1229 that will need to be addressed in another work stream; it's a known issue now and will need some reimagining of how this in-model dosing is done.
All of the tests compare doses set up via the data set (or event object) and doses that are issued from inside the model. For each combination, there is a test for when the parent event is done "now" and another test when the parent dose is done "later".
New data members in
evdata
:ss
ii
addl
All of these items naturally initialize to
0
. There is no new central functionality needed to handle these items; they just get passed into existing machinery.New functions:
ss()
- advance the system to steady state prior to diving the doseii()
- specify the dose intervaladdl()
- give additional dosesamt()
- set / reset the dose amountrate()
- set / reset the infusion ratecmt()
- set / reset the dose compartmentExisting functions:
bolus()
- bolus doseinfuse()
- start an infusionreset()
- reset the system or reset and dosereplace()
- replace the amount in a compartment (evid 8)retime()
- sets the time attribute and forcesnow
tofalse
now()
- make an event happen "now"The goal is to have a fairly complete set of functions to deal with these objects.
Example
Sensitivity analysis on dose, ii and addl
Simulation at steady-state
Created on 2024-09-03 with reprex v2.1.1