selectTaskList {openMpp} | R Documentation |
Select list of modeling tasks for the model
selectTaskList(dbCon, defRs)
dbCon |
database connection |
defRs |
model definition: database rows describing model input parameters and output tables |
This call return list of tasks for specified model.
List of database rows:
taskLst |
task_lst rows: task id and name |
taskTxt |
task_txt rows: language, description, notes |
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
getTaskIdByName
getTaskFirstRunId
getTaskLastRunId
selectTask
selectTaskRun
selectTaskRunList
# # connect to database # theDb <- dbConnect(RSQLite::SQLite(), "modelOne.sqlite", synchronous = "full") invisible(dbGetQuery(theDb, "PRAGMA busy_timeout = 86400")) # recommended # get definition for "modelOne" model # # use model name only to identify the model # if there are multiple versions of the model in database # then first one is selected: where model id = min(model_id) for "modelOne" # defRs <- getModel(theDb, "modelOne") taskId <- getTaskIdByName(theDb, defRs, "taskOne") if (taskId <= 0L) stop("task: ", "taskOne", " not found for model: ", defRs$modelDic$model_name, " ", defRs$modelDic$model_digest) # select task name, description and input list taskRs <- selectTaskList(theDb, taskId) # select list of all tasks for the model taskLstRs <- selectTaskList(theDb, defRs) dbDisconnect(theDb)