[R] Difficulty coding time-forced functions in deSolve
Thomas Petzoldt
thpe at simecol.de
Wed Apr 2 08:47:32 CEST 2014
On 4/2/2014 5:51 AM, Aimee Kopolow wrote:
> Any pointers as to how I can code a function that relies on solutions
> from previous time steps?
Such a system would be called a delay differential equation (DDE). It
can be solved with the dede function, see ?dede for details.
However if you want to model something like this:
> Explicitly:
> I want to introduce vaccination 7 days after the proportion of I2/N2
> reaches 0.01.
Than this is called "root finding", that can be combined with events,
see example "EVENTS triggered by a root function" in ?events.
More can be found in the papers listed at:
http://desolve.r-forge.r-project.org
... or you may consider to ask the R-sig-dynamic models mailing list:
https://stat.ethz.ch/mailman/listinfo/r-sig-dynamic-models
Hope it helps
Thomas Petzoldt
Dr. Thomas Petzoldt
Technische Universitaet Dresden
Faculty of Environmental Sciences
Institute of Hydrobiology
01062 Dresden, Germany
http://tu-dresden.de/Members/thomas.petzoldt
More information about the R-help
mailing list