getWorksetIdByName {openMpp} | R Documentation |
Return working set id by name
getWorksetIdByName(dbCon, defRs, worksetName)
dbCon |
database connection |
defRs |
model definition: database rows describing model input parameters and output tables |
worksetName |
name of parameters working set |
Return working set id by name. If model have no working set with that name then return is negative. If model has multiple working sets with that name then return min(set id) with such name.
Working set id: positive integer on success or negative if not found.
To run examples you must have modelOne database modelOne.sqlite in current directory
amc1999
OpenM++ documentation: https://github.com/openmpp/openmpp.github.io/wiki
getModel
getDefaultWorksetId
getWorksetRunIds
theDb <- dbConnect(RSQLite::SQLite(), "modelOne.sqlite", synchronous = "full") invisible(dbGetQuery(theDb, "PRAGMA busy_timeout = 86400")) # recommended # get model by name: use such call if you have only one version of the model defRs <- getModel(theDb, "modelOne") # get default working set id by name, it expected to be exist setId <- getWorksetIdByName(theDb, defRs, defRs$modelDic$model_name) # try to find "myData" working set id setId <- getWorksetIdByName(theDb, defRs, "myData") if (setId <= 0L) warning("workset not found: ", "myData") dbDisconnect(theDb)