I'm getting this error on the attached code and breaking my head but can't figure it out. Any help is much appreciated. Thanks, Vince
CODE: library(deSolve) Res_DAE=function(t, y, dy, pars) { with(as.list(c(y, dy, pars)), { res1 = -dS -dES-k2*ES res2 = -dP + k2*ES eq1 = Eo-E -ES eq2 = So-S -ES -P return(list(c(res1, res2, eq1, eq2))) }) } pars <- c(Eo=0.02, So=0.02, k2=250, E=0.01); pars yini <- c(S=0.01, ES = 0.01, P=0.0, E=0.01); yini times <- seq(0, 0.01, by = 0.0001); times dyini = c(dS=0.0, dES=0.0, dP=0.0) ## Tabular output check of matrix output DAE <- daspk(y = yini, dy = dyini, times = times, res = Res_DAE, parms = pars, atol = 1e-10, rtol = 1e-10) ERROR: daspk-- warning.. At T(=R1) and stepsize H (=R2) the nonlinear solver f nonlinear solver failed to converge repeatedly of with abs (H) = H repeatedly of with abs (H) = HMIN preconditioner had repeated failur 0.0000000000000D+00 0.5960464477539D-14 Warning messages: 1: In daspk(y = yini, dy = dyini, times = times, res = Res_DAE, parms = pars, : repeated convergence test failures on a step - inaccurate Jacobian or preconditioner? 2: In daspk(y = yini, dy = dyini, times = times, res = Res_DAE, parms = pars, : Returning early. Results are accurate, as far as they go -- View this message in context: http://r.789695.n4.nabble.com/deSolve-Function-daspk-on-DAE-system-Error-tp3864298p3864298.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.