[Rcpp-devel] Can you help me with this?
Arnab_ Chattopadhyay
arnabchatterjee891 at gmail.com
Thu Mar 17 05:11:49 CET 2022
I do research in the field of mathematical ecology and use R for numerical
computations and simulations. Now to deal with my new research problem, I
have to first reproduce a numerical simulation from a published paper (
https://royalsocietypublishing.org/doi/pdf/10.1098/rstb.2015.0281). I`m
having trouble doing this. I am telling the process briefly:
The simulation starts with a system of 2 odes, which I have to integrate
for 10000 time steps and need the steady state. After that, the number of
variables in the system of ode may increase to 3 (depending on some
conditions) and again I have to integrate it for 10000 time steps. After
that, the number of variables may be 4 and so on. Each step of increasing
the number of variables is called the mutation steps in the language of
ecology.
Now I have to do 50000 mutation steps (each step contains ode integration
for 10000 time points) to get a complete data set.
I call the functions from C++ (using Rcpp), then integrate it using the RK4
method of numerical integration of ode but it is taking a huge amount of
time (near about 50-60 hrs) to complete the process.
Can one suggest to me what I should do to reduce the time of the simulation
process.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20220317/2c8bde8d/attachment.html>
More information about the Rcpp-devel
mailing list