[R-sig-dyn-mod] System with an event leading to a discontinuity in the ODE equations: fear of non convergence and

Thomas Petzoldt Thomas.Petzoldt at TU-Dresden.de
Fri Jan 8 08:14:28 CET 2010

Sorry, I meant, of course:

  # sets vaccination to 0 (not rate nu !!!)
  eventfun <- function(t, Omega, parameters) {
      return(list(c(S, E, I, D, V=0))

  # or alternatively:
  eventfun <- function(t, Omega, parameters) {
    return(list(c((Omega[1:4], V=0)))

i.e. the states (e.g. V) not the derivatives (dV)


More information about the R-sig-dynamic-models mailing list