createCompModel: Create compilable c-code of a model

Description Usage Arguments Value Note

View source: R/createC.R

Description

Writes a c file that can be compiled for faster solution with the ode solver. The file created is formatted to be used with the dynamic elastic net. A hidden input is added to every component of the state vector.

Usage

1
createCompModel(modelFunc, parameters, bden, nnStates)

Arguments

modelFunc

a R-function that can be solved with deSolve. External input of the system should be declared with 'u'. To ensure that the function is working use the most general state-space representation.

parameters

a vector describing the parameters of the system. If names are missing the function tries to extract the declared parameters from the model function.

bden

a boolean that indicates if the c-file is used for the mcmc algorithm, default value is 'FALSE'

nnStates

a bit vector indicating the states that should be non negative

Value

None

Note

On the usage of compiled code in conjunction with deSolve take a look into the vignette 'R Package deSolve, Writing Code in Compiled Languages' of the package.


Newmi1988/seeds documentation built on Aug. 7, 2021, 8:22 p.m.