mrc-ide / odin

ᚩ A DSL for describing and solving differential equations in R
https://mrc-ide.github.io/odin
Other
104 stars 13 forks source link

modify SIR model by 'odin::odin' #305

Open CMSscu opened 1 year ago

CMSscu commented 1 year ago

Maybe a silly question. I can make sure that I have the most recent versions of everything: dust 0.14.10 odin.dust 0.3.7 mcstate 0.9.17 odin 1.5.6 However, I'm still running into some problems using the "odin::odin" statement in the R software. I have installed R package "pkgbuild", but I still get an error when I run the following code (figure 1). And, I have followed the instructions to download the additional tools as shown in figure 2. Unfortunately, the code still doesn't work (as in figure 3). Is it because my computer lacks a C++ environment configuration? I would appreciate your guidance on how to make modifications. gen <- odin::odin({ ylag <- delay(y, tau) initial(y) <- 0.5 deriv(y) <- 0.2 * ylag * 1 / (1 + ylag^10) - 0.1 * y tau <- user(10) output(ylag) <- ylag }) The error is: Error: Could not find tools necessary to compile a package Callpkgbuild::check_build_tools(debug = TRUE)to diagnose the problem. figure 1 figure 2 figure 3

richfitz commented 1 year ago

This is an issue with your computer, or internet connection. Please see the errors you have copied for hints as to the solution; unfortunately none of them come from odin, so there is no guidance I can give here.