search for: desolve

Displaying 20 results from an estimated 79 matches for "desolve".

Did you mean: resolve
2009 Feb 02
1
Getting 'LinkingTo' to find the right library
I am experimenting with exporting pointers to some of the functions in deSolve so that other packages may import them, using the 'R_RegisterCCallable' mechanism. I have added a header file and some other C code in inst/include of the deSolve source package that need to be accessible to other packages. I have a site-library set up in Rprofile.site where all installed...
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 internal problems with the '%%' or integrating period...
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: ####################################...
2013 Feb 21
1
using and event in deSolve
Hi All Having been pointed the use of events and roots in deSolve, I was able to implement the Izchikevich model of spiking neurons. However, I'm not too sure of defining the event. The deSolve documentation says: An event is triggered when the ball hits the ground (height = 0) Then velocity (y2) is reversed and reduced by 10 percent. The root function, y[1]...
2010 Jun 07
1
Desolve package: How to pass thousand of parameters to C compiled code?
Hi, I have used DeSolve package for my ODE problem regarding infectious disease transmission and currently am trying to pass lots (roughly a thousand) of model parameters to the C compiled model (I have to use C compiled code instead of R code purely because of the speed). I can't go define it one by one as it gonna...
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 time (t), inital state (s...
2011 Aug 16
1
deSolve, extracting variable values from inside ode function
...pool CA <- QA/vola ## output of substrate from pool A fluxao <- vmax / (1 + (mmk/CA)) ## rate of change of quantity of substrate ## in pool A dA <- fluxoa - fluxao ## return the rate of change list(dA) }) } times <- seq(0, 100, by = 5) library(deSolve) out1 <- ode(y = state, times = times, func = MM, parms = parameters) head(out1) -- Dr. Jim Maas University of East Anglia
2012 Feb 03
1
Logistic population growth and deSolve
Hello, I am new to R and I am having problems trying to model logistic population growth with the deSolve package. I would like to run the model for four populations with the same initial population and carrying capacity but with different growth rates and put the results into a data frame. When I run the following lines of code I get unexpected results from "output" but the format is more or...
2011 Oct 03
0
deSolve - Function daspk on DAE system - Error (Vince)
Vince, When that happens, one possible reason is that your DAE is of index > 1, which cannot be solved by daspk. The solver radau, also from deSolve can handle DAEs up to index 3, but you need to rewrite the problem in the form M*y' = f(x,y), where M is a mass matrix. If you do that for your problem, and solve it with radau, then radau complains that the "matrix is repeatedly singular", the problem is too stiff, and it stops jus...
2013 Apr 21
1
lsoda question from deSolve package
Dear List, Wonder if you have some thoughts on the following question using lsoda in desolve: I have the following data and function: require(deSolve) times <- c(0:24) tin  <- 0.5 D <- 400 V    <- 26.3 k <-0.056 k12  <- 0.197118 k21  <- 0.022665 yini <- c(dy1 = 0,dy2 = 0)  events <- data.frame(var = "dy1",time = c(10,15),value = c(200,100),method = &quo...
2013 Jun 18
1
deSolve question
Dear All wonder if you could provide some insights on the following: currently I have this code which produces the expected results: require(deSolve) pars <- list(k = 0.08,v=15) intimes <- c(0,0.5,12) input <- c(800,0,0) forc <- approxfun(intimes, input, method="constant", rule=2) derivs <- function(t, state, pars) { inp <- forc(t) dy1 <- - pars$k * state[1] + inp/pars$v return(list(c(dy1))) } model <...
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...
2009 Jun 29
0
new version of package deSolve on CRAN
Dear R users, an improved version of package deSolve (version 1.3) is now available on CRAN. deSolve, the successor of R package odesolve, is a package to solve initial value problems (IVP) of: - ordinary differential equations (ODE), - differential algebraic equations (DAE) and - partial differential equations (PDE). The implementation includes st...
2009 Jun 29
0
new version of package deSolve on CRAN
Dear R users, an improved version of package deSolve (version 1.3) is now available on CRAN. deSolve, the successor of R package odesolve, is a package to solve initial value problems (IVP) of: - ordinary differential equations (ODE), - differential algebraic equations (DAE) and - partial differential equations (PDE). The implementation includes st...
2011 Oct 02
0
deSolve - Function daspk on DAE system - Error
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...
2018 May 31
0
Help in dynamic simulation using deSolve
Hi R help, I wanted to simulate two pool model (A&B) using deSolve package for time 0 to 12 by 1.? Initial values of the state variables are A=5, B=3. The fluxes are as follows1) Flux into A= 5 units per unit time?2) Flux from A to B= 0.33) Flux out of A=0.1?4) Flux from B to A=0.35) Flux out of B=0.3 Here is the R code I compiled to estimate the size of A and B a...
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 introd...
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. Additionally, when > the variable crosses the threshold (...
2010 Nov 28
3
non-linear fourth-order differential equations
I need to solve a system of non-linear fourth-order differential equations. Is there a command which solves this system? Thanks in advance.
2017 Nov 29
1
DeSolve Package and Moving Average
Dear all, I am using the DeSolve Package to simulate a system dynamics model. At the problematic point in the model, I basically want to decide how many products shall be produced to be sold. In order to determine the amount a basic forecasting model of using the average of the last 12 time periods shall be used. My code looks lik...