It's been a while, but I think I have gotten through this sort of situation by splitting the integration into intervals, i.e., you run from t=0 to t=20 witn initial condition c(100,0), yielding a value c(y1,y2), then you run from 20 to 40 with initial condition c(y1+100, y2), etc.
-pd
On 08 Feb 2017, at 11:10 , Fanny Gallais <gallais.fanny at gmail.com> wrote:
Hi,
I'm working on a system of 2 differential equations. My initial condition
(t=0) is c(100,0) and i'm using lsoda function (from package deSolve) to
solve it.
My system reprensents the evoution of drug concentration in two
compartments throug time. Problem is I would like to model a repeated drug
administration. That is to say, not only 100 at t=0 but also at t=20,40,...
I can't find a solution to do so. I tried adding "100" to the first
differential equation at the times of interest but it doesn't work. Do you
have any idea?
Thank you
F.G.
[[alternative HTML version deleted]]