metrumresearchgroup / mrgsolve

Simulate from ODE-based population PK/PD and QSP models in R
https://mrgsolve.org
GNU General Public License v2.0
131 stars 36 forks source link

Add replace() function to evtools #1203

Closed kylebaron closed 4 months ago

kylebaron commented 5 months ago

Summary

To date, the evtools plugin has been able to quickly create and give doses given as bolus() or infuse().

This PR implements an equivalent function to replace() the amount in a specific compartment with a new amount. This is accomplished via evid 8 (already-existing functionality).

The basic setup is similar to bolus() and infuse(): we provide two overloaded replace() functions, one that gets the self object first (this will create and "send" the dose in one function call) and another replace() function that will create the object and return it to the user for further config.