search for: yd1

Displaying 6 results from an estimated 6 matches for "yd1".

Did you mean: d1
2004 Jun 10
0
lsoda with arbitrary zero thresholds (with psuedo-solution)
...example again I once again highlight the code > that I have changed to put in place arbitrary thresholds: > parms <- c(k1=0.04, k2=1e4, k3=3e7) > my.atol <- c(1e-6, 1e-10, 1e-6) > times <- seq(0,1000) > lsexamp <- function(t, y, p) > { > if(y[1] < .4) yd1 <- -y[1] ### These if, else statements are new > else yd1 <- -p["k1"] * y[1] + p["k2"] * y[2]*y[3] > if(y[3] < .4) yd3 <- -y[3] ### These if,else statements are new > else yd3 <- p["k3"] * y[2]^2 > list(c(yd1,-yd1-yd3,yd...
2006 Nov 29
2
How to solve differential equations with a delay (time lag)?
...;lsoda" function "odesolve" package. However, I am not sure how to specify the delay term using the syntax allowed by odesolve. Here is an example of the kind of problem that I am trying to solve: > library(odesolve) yprime <- function(t, y, p) { # this function yd1 <- p["k1"] *(t <= p["T"]) - p["k2"] * y[2] yd2 <- p["k3"] * y[1](t - p["delay"]) - p["k4"] * y[2] # this is not syntactically valid, but it is what I would like to do list(c(yd1,yd2)) } times <- seq(0,30,by=0.1) y0 &lt...
2008 Sep 16
0
FW: odesolve dynload example
...hdiff <- function(t, y, p) { const=p["const"] kay =p["kay"] psii=p["psii"] m1=p["m1"] m2=p["m2"] M=p["M"] N=p["N"] T=p["T"] bexp<-as.brob((const*(psii-m1*y[1]-m2*M/N))/T) yd1<-as.numeric((kay*exp(bexp))/(kay*t*exp(bexp)+1)- (kay^2*t*exp(2*bexp))/(kay*t*exp(bexp)+1)^2) list(c(yd1)) } Now I guess this could be done with gmp. Now I use this stuff in the function that odesolve's lsoda refers to, and I have found that my approach using pure R code...
2008 Sep 16
0
lsoda( linking to GMP for big numbers from C code)
...hdiff <- function(t, y, p) { const=p["const"] kay =p["kay"] psii=p["psii"] m1=p["m1"] m2=p["m2"] M=p["M"] N=p["N"] T=p["T"] bexp<-as.brob((const*(psii-m1*y[1]-m2*M/N))/T) yd1<-as.numeric((kay*exp(bexp))/(kay*t*exp(bexp)+1)- (kay^2*t*exp(2*bexp))/(kay*t*exp(bexp)+1)^2) list(c(yd1)) } Now I guess this could be done with gmp. Now I use this stuff in the function that odesolve's lsoda refers to, and I have found that my approach using pure R code...
2004 Jun 14
1
olesolve: stepsize
...*p["kg"]*(p["hgo0"]/p["vg"])/(p["k21"] + p["k01"] + p["kl"] - p["k21"]*p["k12"]/(p["k12"] + p["k02"]))/(p["ki"]*p["vi"])) # G1(t)-y(1); G2(t)-y(2);I(t)-y(3); X(t)-y(4) yd1 <- (abs(t) + p["hgo0"] - (p["kl"] + p["fx"]*y[4])*y[1]*p["vg"] + p["k12"]*y[2])/p["vg"] - (p["k21"] + p["k01"])*y[1] yd2 <- p["k21"]*y[1]*p["vg"] - (p["k12"] + p["k02"...
2009 Jul 23
1
[PATCH server] changes required for fedora rawhide inclusion.
...&^zSs#emU(Lwg z821q!JDze<Pte8}^bgUKt6<%uqxlE~aes<|exrW^p0D-qW3^0+wJ|dmoyYV~!8xCO z2C*$<Hu-aiZxQ<fH7#IE8HT8AVVPgD4C6ue6;qtBs9&T1xvAPWOmQ at U70zPY*>_^R zY1+3eQ{TqE$GDLA0kgT4{RkD!P1k;6iUHcsLQx)O<UGrAJivYt>V at t02WY{4(GHwv znf!isfhjI=4ZxJgnX-o|&#~xWKfpvj&l-4!evEyD1$301U<x$k6Q+E|lnacF;t=oz zos8xXC|t}j9D?2x8~Ip{WdlER97p?OMLJsdcv0j at CW=r|WV9%XDklEVEK|8MlPgPj zw3!uLwWAYwhPINg;mQV%suV)p?m|l1QsMI$R3TT9RH~>IWH42<=LxxtD)b~FQ&dXy zmk3Ft3j2|e8BkTeQ6)K4aXg}u?Sv}EV=CDSvh!(`tU=oKoJ#g1?S5G$k0PD&hDx47 zI`tiuJcBR|TjrHiN&i$O&mo!dvr0}N%sj7>NgUf at...