The compile_model
is used to compile the C file or MCSim's model file
to generate the executable file in numerical analysis.
compile_model(mName, application = "mcsim", use_model_file = TRUE,
version = NULL)
a string giving the name of the model or C file (without extension).
a character to assign the specific methods (mcsim
or R
)
that will be applied to the numerical analysis (default is mcsim
).
a logical value to operate the compiler to use model or C file,
the default is set to TRUE
to assign the MCSim's model file in compiling.
a character to assign the version of MCSim that had been installed. The version must be assigned for Windows user.
The default application
is set to 'mcsim'
to generate the executable file to solve differential equations by MCSim.
If application = 'R'
,
the function will compile and create dynamic-link libraries (.dll) on Windows and
shared objects (.so) on Unix-likes systems (e.g., Linux and MacOS).
Generally, the solving function through MCSim can provide faster speed than exporting C in R.
Therefore, this function set use_model_file = TRUE
and application = 'mcsim'
as a default setting
and suggest to use MCSim to solve the differential equation.
To compile MCSim in Windows, be sure to install Rtools or MinGW first.
For Windows user, to compile MCSim's model file,
the version
of MCSim should provide to conduct model compiling.