You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Initial commit for writing temp model fix
* Use winslash in normalizePath to remove need to grep for windows-specific path slashes.
* Define source file on which the hash is determined. The original file is still used for model compilation.
* Fix temp directory bug to ensure source file is hashed before model compilation of copied model file to temp.
* Don't show warning for creating test directory for running tests in same session.
* Run styler
* Hash the original source file into the right location during the init so we always have a baseline on the source model version.
* run styler
* Rebuild package documentation and fix notes following check. 1. Include mention of LICENSE file in DESCTIPTION and 2. add paper directory to .Rbuildignore as non-standard R package directory
* Update man/Model-class.Rd
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update R/MCSim_model.R
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Document package after fixing typo
* Remove unused file.copied variable when copying source file to model file in temp folder
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: R/MCSim_model.R
+27-7Lines changed: 27 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,10 @@ Model <- setRefClass("Model",
33
33
#' @field paths List of character strings that are names of files associated with the model.
34
34
#' @field writeTemp Boolean specifying whether to write model files to a temporary directory. If value is TRUE, model files will be written to a temporary directory; if value is FALSE, model files will be written to the same directory that contains the model specification file.
35
35
#' @field verboseOutput Boolean specifying whether to write translator messages to standard output. If value is TRUE, messages will be written to standard output; if value is FALSE, messages will be written to files in a temporary directory.
36
+
#' @field recompiled Boolean specifying if the model has been recompiled due to change in source file
"Translate (if necessary) the model specification text to C, compile (if necessary) the resulting C file to create a dynamic link library (DLL) file (on Windows) or a shared object (SO) file (on Unix), and then load all essential information about the Model object into memory (for use in the current R session)."
Copy file name to clipboardExpand all lines: R/compileModel.R
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,14 @@
8
8
#' @param c_file Name of a C source code file to be created by compiling the MCSim model specification file.
9
9
#' @param dll_name Name of a DLL or SO file without the extension (".dll" or ".so").
10
10
#' @param dll_file Name of the same DLL or SO file with the appropriate extension (".dll" or ".so").
11
-
#' @param hash_file Name of a file containing a hash key for determining if `model_file` has changed since the previous translation and compilation.
11
+
#' @param source_file Name of the original source file to use for hash calculation. Defaults to \code{model_file} for backward compatibility. When \code{writeTemp=TRUE} in \code{createModel()}, this should be set to the original source file path to ensure hash tracking works correctly when the source file is separate from the compiled model file.
12
+
#' @param hash_file Name of a file containing a hash key for determining if `source_file` has changed since the previous translation and compilation.
12
13
#' @param verbose_output Boolean specifying whether to write translator messages to standard output. If value is TRUE, messages will be written to standard output; if value is FALSE, messages will be written to files in a temporary directory.
13
14
#' @returns No return value. Creates files and saves them in locations specified by function arguments.
0 commit comments