Displaying 20 results from an estimated 30000 matches similar to: "Package for multi-dimensional terminal value ODE solver"
2010 Sep 16
1
More accurate ODE solver?
Dear All,
I was using rk4 and lsoda to solve a ODE system. However, both of them gave
bad accurate solutions, especially compared with Matlab solver ODE45. For
example, ODE45 gave solutions that can go to a stable level (about 1.6) when
time goes to infinity, however, the solutions from lsoda are decreasing to
very very small (about 1e-130) numbers.
Does R have more accurate ODE solvers as
2012 Jul 03
1
Wrapper function for multivariate arrays for ode
I am trying to to write a wrapper function for the ode solver (under
the package desolve) to enable it to take multivariate arrays. I know
how to do it for 1 dimension arrays but my code breaks down when I try
to do it for 2 dimensional arrays. Here is my code
diffwrap<-function(t,y,mu)vdpol(t=t,A[1:3,1:4]<-y[1:12],B[1:12]<-y[13:24],mu=mu)
vdpol<-function(t,A,B,mu)
{
list(c(mu,
2013 May 02
2
ODE solver
I am trying to use the package ode and periodically it will come up with
this error message
Warning..Internal T (=R1) and H (=R2) are
such that in the machine, T + H = T on the next step
(H = step size). Solver will continue anyway.
And then the program just take very long to run. Is there anyway to get the
program to terminate when this warning is issued instead of continuing to
run ?
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
2012 Jul 18
1
Defining a variable outside of optim or differential equation solver.
This is applicable to either using optim or the differential equation
solver or any similar solver
Suppose I want to use the differential equation solver and this is my code
d<-y[2]
vdpol<-function(t,y)
{
list(c(1,
d,
3,
4
)
}
stiff<-ode(y=rep(0,4),times=c(0,1),func=dvdpol,parms=1)
The thing is I want d to be composed of one of state variables in the
2010 Dec 23
0
epidemiology ode likelihood, hierarchical model
Hi all,
I study epidemiology of soilborne disease.
I have this ode model
dS/dt = - (rp(t) X + rs(t) I) * S
with X=1 ; rp(t) = ap exp( - bp*t) ;
rs(t) = as exp (-0.5 ( ln (t/ds) / bs)? )
The data I have are not directly the infected individuals (which is a
hidden state) but the Diseases ones (individuals who show aerial
symptoms). I have studied with experiments the relationship between
the
2010 Oct 24
1
Optimize parameters of ODE Problem which is solved numeric
Hi,
I have a data-matrix:
> PID
sato hrs fim health
214 3 4.376430 6.582958 5
193 6 4.361825 3.138525 6
8441 6 4.205771 3.835886 7
7525 6 4.284489 3.245139 6
6806 7 4.168926 2.821833 7
5682 7 1.788707 1.212653 7
5225 6 1.651463 1.436980 7
4845 6 1.692710 1.267359 4
4552 5 1.686448 1.220539 6
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 <-
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){
2011 Jan 25
1
deSolve: Problem solving ODE including modulo-operator
I have a problem integrating the 'standard map' (
http://en.wikipedia.org/wiki/Standard_map
http://en.wikipedia.org/wiki/Standard_map ) with deSolve:
By using the modulo-operator '%%' with 2*pi in the ODEs (standardmap1), the
resulting values of P and Theta, should not be greater than 2pi. Because
this was not the case, i was thinking that the function 'ode' has some
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
2018 Apr 12
1
ODE
Hello All,
I'm struggling to solve this ODE using R,
vdpol <- function (h, v, t) (
list(c (
-0.1*v/(pi*(2*10*h-h^2)),
(v = (-0.1*v/(pi*(2*10*h-h^2))^2) + 2*9.81*h))
))
library(deSolve)
yini <- (c(h = 20, v=0))
nonstiff <- ode(y = yini, func = vdpol,
times= seq(0, 30, by =
2016 Apr 26
0
vectors of equations in ode / desolve
Hello,
I have a syntactic problem with ode. How do I specify vectors of
equations in ordinary differential equation systems. (i.e. in my case I
want to simulate an a priory undefined number of species that have
different parameters but the same behaviour)
I demonstrate this using the Lotka Volterra example. The code below does
not work and I have not a good idea how to specify this right.
##
2011 Nov 07
2
How to do a target value search analogous to Excel Solver
Hi all,
i'm trying to find a solver possibility analogous to the Excel Solver in R.
Since i just started with R, I have only little knowledge. Can someone help
me by solving the problem?
I have the following 'starting position':
z = rnorm(1,0,1)
y <- function(x,z){2*x - 1 + z}
I am looking for a certain "x" in such a way that the result of the function
'y'
2011 Dec 22
2
Indexing multi-dimensional table
I want to take slices of a multi-dimensional table (or array) without
knowing the number of dimensions in advance.
As a test I tried using (in this example a 3d table):
do.call(`[`, list(tbl, x,NULL,NULL)]
where I built the list on the fly. It works great as long as I only want the
first dimension however when I try a different dimension, say with
list(tbl,NULL,x,NULL), I get
2018 Apr 18
0
Event-triggered change in value with a time-delay
> On Apr 18, 2018, at 1:04 AM, Hannah Meredith <hrmeredith12 at gmail.com> wrote:
>
> Hello,
>
> I am solving a set of ODEs using deSolve and have run into a problem I
> would appreciate some advice on. One of the parameters (m) in the ODEs
> changes between two states when one of the variables (D) crosses a
> threshold (D_T) for the first time in either direction.
2018 Apr 18
2
Event-triggered change in value with a time-delay
Hello,
I am solving a set of ODEs using deSolve and have run into a problem I
would appreciate some advice on. One of the parameters (m) in the ODEs
changes between two states when one of the variables (D) crosses a
threshold (D_T) for the first time in either direction. Additionally, when
the variable crosses the threshold (either by increasing or decreasing),
there is a time delay (delay)
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
2006 Aug 02
2
multi dimensional array
how to implement multi dimensional array in ruby
in ruby multi dimension array look like tree structure
plz help me & explain with code
have a pleasant day
thx
narayana
--
Posted via http://www.ruby-forum.com/.
2012 Jul 13
1
integrating multi-dimensional dat along one dimension
I just want to integrate a 3D data set along one dimension to obtain a
2D data set. Something like:
(given array "d" with dim nx,ny,nz ...)
data_int<-array(dim=c(nx,ny))
for (n in 1:ny) {
for (m in 1:nx) {
data_int[m,n]<-sum(d[m,n,])
}
}
The thing is, given R's facility with integers, it seems that I should
be able to obtain data_int without the