Hi, I want to develop a PK model based on some PK data. The PK data seems to display 2 peaks when one initial dose is given. I would like to give one dose. A fraction of this dose (fr) is absorbed following the linear relationship - ka*Drug the other fraction (1-fr) is absorbed following a linear absorption (ka1*Drug) with a Tlag (it maybe a zero order). The fraction fr is unknown so it must be estimate. Does anyone have can provide any suggestion to implement this in symbiology or provide a link where I can look? Thank you very much in advance, Ferran PK model: absorption This reminds me of bioavailability, and you can find an example of how we model that here. That example uses initial assignment rules to split the drug between an elimination reaction and an absorption reaciton. However, I don't think you can directly use that approach here because of your desire to introduce a lag. I have some ideas on how to incorporate lag. It sounds like you only have a single dose (at time 0). In that case, I think the easiest way to set this problem up would be to replace your single dose with two parameterized doses, one for each type of absorption. The use of parameterized dosing is how you can incorporate the unknown fraction in a way that you can then estimate. I'll attach a sample project (created in R2022a) that contains the model and a program to estimate the parameters. But here's a summary of how I implemented the model: Create a parameter amount to hold the total dose amount. Create a parameter fr for the fraction you need to estimate. Create a species, an amount parameter, a rule, and a dose object for each of the two absorption types. The rule for each absorption type is an initial assigment to determine the amount of drug applied to that dose (for example, amountA = amount*fr). Configure each dose's target to the appropriate species, and each dose amount to the appropriate parameter. Also configure the lag parameter for the dose that has a lag. I generated synthetic data and then set up a program to fit it. Please note that working on this led me to discover a bug that affects sensitivity analysis and as a result can also affect fitting. I'll provide more info below.* But my project works around this bug by setting the model's compartment to be non-constant. Once I did that, I was able to estimate the parameters that I used to generate the synthetic data. (Those parameters are saved on a variant on the model.) I think it's also possible to model this situation using events. But that's sufficiently complicated that I'm not going to bother explaining that approach until I'm sure you need it. -Arthur *Here's more info on the bug. I discovered that SimBiology incorrectly calculates local sensitivities for this model. It calcualtes that the model is not sensitive to parameter fr. By default, these sensitivites are used during fitting, and so the fit does not try to vary parameter fr. When performing fitting from the command line, I can explicitly say not to use these sensitivities during fitting. But that option is not currently exposed in the Analyzer app. So to work around this bug in the app, I needed to update the model to make it incompatible with sensitivity analysis. The easiest way I could think of to do that was to set the compartment volume's Constant property to false, since non-constant cmopartments are not yet supported with sensitivity analysis. I will enter this bug in our database and make sure we fix it in the future. I also just learned that one of my colleagues already implemented an example model using the events approach that I alluded to. Just in case you find that useful, I'm attaching it to this comment. This was based on the model described here. pk absorption