similar to: More accurate ODE solver?

Displaying 20 results from an estimated 900 matches similar to: "More accurate ODE solver?"

2008 Apr 09
3
LSODA not accurate when RK4 is; what's going on?
I'm solving the differential equation dy/dx = xy-1 with y(0) = sqrt(pi/2). This can be used in computing the tail of the normal distribution. (The actual solution is y(x) = exp(x^2/2) * Integral_x_inf {exp(-t^2/2) dt} = Integral_0_inf {exp (-xt - t^2/2) dt}. For large x, y ~ 1/x, starting around x~2.) I'm testing both lsoda and rk4 from the package odesolve. rk4 is accurate using step
2010 Apr 06
1
estimating the starting value within a ODE using nls and lsoda
All- I am interested in estimating a parameter that is the starting value for an ODE model. That is, in the typical combined fitting procedure using nls and lsoda (alternatively rk4), I first defined the ODE model: minmod <- function(t, y, parms) { G <- y[1] X <- y[2] with(as.list(parms),{ I_t <- approx(time, I.input, t)$y dG <- -1*(p1 + X)*G +p1*G_b dX <-
2004 Jun 10
2
odesolve: lsoda vs rk4
I'm trying to use odesolve for integrating various series of coupled 1st order differential equations (derived from a system of enzymatic catalysis and copied below, apologies for the excessively long set of parameters). The thing that confuses me is that, whilst I can run the function rk4: out <- rk4(y=y,times=times,func=func, parms=parms) and the results look not unreasonable:
2004 Jan 22
4
Fitting compartmental model with nls and lsoda?
Dear Colleagues, Our group is also working on implementing the use of R for pharmacokinetic compartmental analysis. Perhaps I have missed something, but > fit <- nls(noisy ~ lsoda(xstart, time, one.compartment.model, c(K1=0.5, k2=0.5)), + data=C1.lsoda, + start=list(K1=0.3, k2=0.7), + trace=T + ) Error in eval(as.name(varName), data) : Object
2010 Sep 20
1
ERROR: Object not found
Dear All, I am trying to use ode solver "rk4" to solve an ODE system, however, it keeps saying: Error in eval(expr, envir, enclos) : object "dIN" not found. The sample codes are enclosed as follows, please help me. Thank you very much! rm(list=ls()) library(odesolve) # The ODE system ode <- function(t,x,p){ with(as.list(c(x,p)),{
2010 Sep 20
1
Ask for help with Error: Object not found
Dear All, I am trying to use ode solver "rk4" to solve an ODE system, however, it keeps saying: Error in eval(expr, envir, enclos) : object "dIN" not found. The sample codes are enclosed as follows, please help me. Thank you very much! rm(list=ls()) library(odesolve) # The ODE system ode <- function(t,x,p){ with(as.list(c(x,p)),{
2004 Oct 04
3
Beginners problem
Hi, I'm new to R and have a problem with a little test program (see below). Why doesn't <<- in function rk4 assign the new value to y so that it is seen in rktest. I thought that <<- does exactly this. But it seems that I didn't get it right. I would be very appreciative for an explanation of that behaviour of <<-. I know how to write the whole thing so that it
2009 Jun 12
2
External signal in ODE written in C (using deSolve and approx1?)
Dear list The deSolve package allows you to specify the model code in C or Fortran. Thanks to the excellent vignette this works fine. However I have not yet managed to use forcing functions in C code. In pure R code this works very well with approxfun() specified outside the model: ############################################### #Model lvml <- function(t, x, parms) {
2011 Apr 28
1
DLSODA error
Dear R-users, I'm running an MLE procedure where some ODEs are solved for each iteration in the maximization process. I use mle2 for the Maximum likelihood and deSolve for the ODEs. The problem is that somewhere along the way the ODE solver crashes and I get the following error message: DLSODA- Warning..Internal T (=R1) and H (=R2) are such that in the machine, T + H = T on the next
2012 Jan 30
2
ode() tries to allocate an absurd amount of memory
Hi there R-helpers: I'm having problems with the function ode() found in the package deSolve. It seems that when my state variables are too numerous (>33000 elements), the function throws the following error: Error in vode(y, times, func, parms, ...) : cannot allocate memory block of size 137438953456.0 Gb In addition: Warning message: In vode(y, times, func, parms, ...) : NAs
2009 May 13
2
ode first step
Hi all, I try to assess the parameters (K1,K2) of a model that describes the adsorption of a molecule onto on adsorbent. equation: dq/dt = K1*C*(qm-q)-K2*q I know the value of 'qm' and I experimentally measure the variables 'q', 'C', and the time 't'. t C q 1 0 144.05047 0.0000000 2 565 99.71492 0.1105625 3 988 74.99426
2005 Nov 06
1
Problem defining a system of odes as a C library with lsoda
I have been trying to make use of the odesolve library on my university's Linux grid - currently R version 2.0.1 is installed and the system runs 64-bit Scientific Linux based on Redhat. I cannot seem to get lsoda working when I define the model as a shared C library. For example, the following snippet uses the mymod.c example bundled with the package: ### START rm(list=ls())
2003 May 29
0
ODE solvers in R (was:The Wrong Choice: Locked in by license restrict...
Dear Colleague: I am glad to hear from you. I was going to contact you and ask if you have notes on the steps involved on how you implemented LSODA. I will gladly take the project on. In addition to dassl, I want to implement ODESSA also. In other words, my project is a "suite" of ode solvers for R. The application of these solvers will be to the study of the distribution of
2009 May 26
2
using lsoda() and nls() together
Thanks to Dieter Menne and Spencer Graves I started to get my way through lsoda() Now I need to use it in with nls() to assess parameters I have a go with a basic example dy/dt = K1*conc I try to assess the value of K1 from a simulated data set with a K1 close to 2. Here is (I think) the best code that I've done so far even though it crashes when I call nls()
2013 Apr 10
0
Problem with ode
Hi, I am trying to run a 1D nutrient-phytoplankton-zooplankton model in R using the package 'deSolve'. The code is shown below: DEPTH = seq(2.5, 147.5, 5) NPZ = function(t, state, params){ with(as.list(params), { P <- state[1:NB] Z <- state[(NB + 1): (2*NB)] N <- state[(2*NB + 1): (3*NB)] F.I = function(z, hr){ I0 = function(hr){
2005 Oct 25
2
solving ODE's in matrix form with lsoda()
Hello there, Suppose you want to solve the following system of ODE's (a simple Lotka-Volterra predator prey model) dP/dt = beta*P*V - mu*P dV/dt = r*V - beta*P*V where P and V are the numbers of predators and prey. Now, this is easy to do, but suppose you have a system of equations like this, dP1/dt = beta1*P1*V1 - mu1*P1 dP2/dt = beta2*P2*V2 - mu2*P2 dV1/dt = r1*V1 - beta1*P1*V1
2001 May 11
1
lsoda
I am running R 1.2.3 with ESS5.1.18 with Windows 98. I am trying to use lsoda in the odesolve apckage and am having problems. Question: The return value of the function of the system of ode's has to be a list that includes first, the ode's and second, "a vector (possibly with a `names' attribute) of global values that are required at each point in `times'." I
2005 Jul 27
4
odesolve/lsoda differences on Windows and Mac
Hi - I am getting different results when I run the numerical integrator function lsoda (odesolve package) on a Mac and a PC. I am trying to simulating a system of 10 ODE's with two exogenous pulsed inputs to the system, and have had reasonably good success with many model parameter sets. Under some parameter sets, however, the simulations fail on the Mac (see error message below). The
2004 Jun 08
1
Differential Equations
Hello! I would like to know if R can solve Differential Equations... I don't think so because, in my point, I see R like a Statistical System, not a Math System. Am I wrong? Thank you very much. M??rcio de Medeiros Ribeiro Graduando em Ci??ncia da Computa????o Departamento de Tecnologia da Informa????o - TCI Universidade Federal de Alagoas - UFAL Macei?? - Alagoas - Brasil Projeto CoCADa
2004 Feb 05
1
Installing odesolve under MacOSX
Installing odesolve in Raqua 1.8.0 or 1.8.1 under MacOSX gives the following message: Warning message: Installation of package odesolve had non-zero exit status in: install.packages(ui.pkgs, CRAN = getOption(where), lib = .libPaths()[1]) Moreover, in the source of odesolve is no makefile. Does anyone know how to get a proper installation? Maartje