similar to: How to apply a system of ordinary differential equations to a cell grid?

Displaying 20 results from an estimated 1000 matches similar to: "How to apply a system of ordinary differential equations to a cell grid?"

2017 Jul 17
0
How to apply a system of ordinary differential equations to a cell grid?
It seems that the method `iteration` in the function `ode` can be useful in my case: > Method "iteration" is special in that here the function func should > return the new value of the state variables rather than the rate of > change. This can be used for individual based models, for difference > equations, or in those cases where the integration is performed within >
2017 Jun 21
0
How to apply a system of ordinary differential equations to a cell grid?
> On Jun 21, 2017, at 12:48 PM, Marine Regis <marine.regis at hotmail.fr> wrote: > > Hello, > > I am developing an agent-based model to simulate the spread of infectious diseases in heterogeneous landscapes composed of habitat polygons (or clumps of connected cells). To simplify the model, I consider a habitat grid (or raster) containing the polygon ID of each cell. In
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
2008 Nov 21
1
lsoda warning "too much accuracy requested"
Dear list - Does anyone have any ideas / comments about why I am receiving the following warning when I run lsoda: 1: lsoda-- at t (=r1), too much accuracy requested in: lsoda(start, times, model, parms) 2: for precision of machine.. see tolsf (=r2) in: lsoda(start, times, model, parms) I have tried changing both rtol and atol but without success. I saw the thread in the
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 Aug 16
1
deSolve, extracting variable values from inside ode function
I'm just getting to grips with using ode function and have used the examples and vignettes to produce a small model of a one-pool, michaelis-menten, enzyme kinetic reaction. The rate of flux of substrate into pool A is constant (fluxoa) however the rate of flux out of pool A is controlled by the HMM equation (v = Vmax/ ( 1 + (Km / Concentration A )) ). This function works fine and
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
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.
2011 Aug 12
1
deSolve output
Hi, I've solved a simple differential equation describing the degradation of amino acid carbon (THAA-C) using deSolve. Code is a follows: # Input of model parameters, a and b describes form of curve, i is apparent initial age of Org. C. parameters <- c(a = a, b = b, i=i) # Initial value of the model, G state = c(G = G) #specifies the function degradation as a function of
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 Feb 10
4
A Hodgkin Huxley Model
Hi All It has been suggested to me that the folks in this list might be able to help me out of my misery. As part of my learning curve to building a rather detailed model of a small neurone complex I am implementing some existing models in R. For the moment I want to implement the Izhikevich model as described in his 2003 paper. The equations are as follows: v' = 0.04v^2 + 5v + 140 - u - I
2013 Mar 02
3
if value is in vector, perform this function
Hi, I'm trying to set up R to run a simulation of two populations in which every 3.5 days, the initial value of one of the populations is reset to 1.5. I'm simulation an experiment we did in which we fed Daphnia populations twice a week with algae, so I want the initial value of the algal population to reset to 1.5 twice a week to simulate that feeding. I've use for loops and if/else
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
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) {
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
2012 Apr 25
1
Using apply() with a function involving ode()
Hello, I am trying to get the output from the numerical simulation of a system of ordinary differential equations for a range of values for three parameters. I am using the ode() function (deSolve package) to run the numerical simulation and apply() to run the simulation function for each set of parameter values. I am having trouble getting the apply() function to work. Here is an
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
2011 Mar 15
1
precompiled ode with spline input
I tried to use lsode with precompiled C code instead of an R function defining the derivatives. No problem so far. However, now I need to implement an ODE that contains spline functions, i.e. the derivatives at given time points depend on the value of a spline function at this time point. What is an efficient way to implement this in precompiled C code? -- Daniel Kaschek <daniel.kaschek at
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 ?
2010 Jul 16
1
Creating symbolic expressions in R
Hello, I'm trying to do some differential equation modeling in R using the package 'deSolve.' Briefly, I'm trying to use the law of mass action (the details of which aren't really important) to structure a vector of rate equation which will be passed into an ODE function and solved with associated functions from 'deSolve.' Roughly what this entails is scanning