diff --git a/vignettes/examples/sir.cpp b/vignettes/examples/sir.cpp index 9337276f..53987bb8 100644 --- a/vignettes/examples/sir.cpp +++ b/vignettes/examples/sir.cpp @@ -3,11 +3,11 @@ // [[dust2::class(sir)]] // [[dust2::time_type(discrete)]] // [[dust2::has_compare()]] -// [[dust2::parameter(I0)]] -// [[dust2::parameter(N)]] -// [[dust2::parameter(beta)]] -// [[dust2::parameter(gamma)]] -// [[dust2::parameter(exp_noise)]] +// [[dust2::parameter(I0, constant = FALSE)]] +// [[dust2::parameter(N, constant = TRUE)]] +// [[dust2::parameter(beta, constant = FALSE)]] +// [[dust2::parameter(gamma, constant = FALSE)]] +// [[dust2::parameter(exp_noise, constant = TRUE)]] class sir { public: sir() = delete; diff --git a/vignettes/examples/sirode.cpp b/vignettes/examples/sirode.cpp index 8a7ce6c0..2a97ca91 100644 --- a/vignettes/examples/sirode.cpp +++ b/vignettes/examples/sirode.cpp @@ -3,10 +3,10 @@ // [[dust2::class(sirode)]] // [[dust2::time_type(continuous)]] // [[dust2::has_compare()]] -// [[dust2::parameter(I0)]] -// [[dust2::parameter(N)]] -// [[dust2::parameter(beta)]] -// [[dust2::parameter(gamma)]] +// [[dust2::parameter(I0, constant = FALSE)]] +// [[dust2::parameter(N, constant = TRUE)]] +// [[dust2::parameter(beta, constant = FALSE)]] +// [[dust2::parameter(gamma, constant = FALSE)]] class sirode { public: sirode() = delete; diff --git a/vignettes/writing.Rmd b/vignettes/writing.Rmd index 2702f152..eef7d737 100644 --- a/vignettes/writing.Rmd +++ b/vignettes/writing.Rmd @@ -69,7 +69,7 @@ If we had wanted a continuous time system of ODEs we would have instead written: and then later some of the rest of the code would be different; we will discuss this later. -The remaining annotations tell `dust2` about the parameters. It does not actually need to know about them, but this will be information that eventually we will surface in R so that you know what you can initialise the system with. +The remaining annotations tell `dust2` about the parameters. We use these to help communicate with the users of the system the inputs that generator accepts. These are really *documentation* rather than controlling how parameters are processed in the `build_shared` and `update_shared` methods described below, and it is up to you to keep them in sync. If you prefer, these could go directly above the code that handles each parameter. This information is surfaced to R via the `print` and `coef` methods of the generator and system objects. ```{r, echo = FALSE, results = "asis"} i <- grep("dust2::parameter", annotations)