Functions to get the process table of a model.

getProcessTable(
  projectPath,
  modelName = NULL,
  argumentFilePaths = NULL,
  only.valid = TRUE,
  return.processIndex = FALSE,
  return.processFlow = TRUE
)

updateProcessTable(
  processTable,
  projectPath,
  modelName = NULL,
  only.valid = TRUE,
  return.processIndex = FALSE,
  return.processFlow = TRUE
)

scanForModelError(
  projectPath,
  modelName = NULL,
  startProcess = 1,
  endProcess = Inf,
  afterProcessID = NULL,
  beforeProcessID = NULL,
  argumentFilePaths = NULL,
  only.valid = TRUE,
  return.processIndex = FALSE,
  check.only.enabled = TRUE
)

getProcessesSansProcessData(
  projectPath,
  modelName = NULL,
  startProcess = 1,
  endProcess = Inf,
  afterProcessID = NULL,
  beforeProcessID = NULL,
  argumentFilePaths = NULL,
  only.valid = FALSE,
  return.processIndex = FALSE,
  warn = TRUE
)

getProcessAndFunctionNames(
  projectPath,
  modelName = NULL,
  startProcess = 1,
  endProcess = Inf,
  afterProcessID = NULL,
  beforeProcessID = NULL,
  argumentFilePaths = NULL,
  return.processIndex = FALSE,
  warn = TRUE
)

Arguments

projectPath

The path to the StoX project, i.e., the folder of the project with the sub folders "input", "output" and "process". Can possibly be the path to a file inside the project folder.

modelName

The name of the model (possible values are "baseline", "analysis" and "report").

argumentFilePaths

A nested list of paths to argument files of a model, as returned from getArgumentFilePaths. This is used to speed up some functions.

only.valid

Logical: If TRUE subset function arguments (inputs and parameters) to only those to be shown as a consequence of argument hierarchy (e.g., one argument being irrelevant for a specific setting of another).

return.processIndex

Logical: If TRUE include the process indices as a sequence starting from 1 in each model.

return.processFlow

Logical: If TRUE include columns giving the processIDs and processNames of processes used as input to each process (processNames of these are already in) and of the processes that use the output from each process. Also, terminal processes are indicated.

processTable

The process table as returned from getProcessTable. Used in the function updateProcessTable.

startProcess

The process index, name or ID at which to start the model run.

endProcess

The process index, name or ID at which to stop the model run.

afterProcessID

The ID of the process after which to get the process table or to place a process.

beforeProcessID

The ID of the process before which to get the process table.

check.only.enabled

Logical: If TRUE check input errors only for enabled procecsses.

warn

Logical: If TRUE show warnings that are not highly important.

Value

A table of the following columns:

processID

The process ID of the process in the form P001, P002, etc. The process ID exists unchanged throughout the life of the process.

processName

The current name of the process.

modelName

The name of the model, one of baseline, analysis and report.

projectPath

The path to the project folder.

functionName

The function name.

enabled

Logical: Whether the process enabled?

showInMap

Logical: Will the process be shown in the map of the StoX GUI.

fileOutput

Logical: Will the process produce output files.

functionParameters

A list of function parameters that are shown in the GUI.

functionInputs

A list of function inputs that are shown in the GUI.

functionInputs_UseProcessData

A list of function inputs that are shown in the GUI, including those that are hidded by UseProcessData = TRUE.

functionInputsRecursive

A list of function inputs recursively, including function inputs to processes listed as function inputs in functionInputs.

functionOutputDataType

The StoX data type of the function output.

functionInputError

Logical: Does the process contain errors in function inputs? E.g., is there a function input that does not exist?

canShowInMap

Logical: Can the process output be shown in the map?

hasProcessData

Logical: Does the process return process data?

hasBeenRun

Logical: Has the process been run?

functionInputProcessIDs

A list of processIDs of the function inputs. This in only used by the GUI.

usedInProcessIndices

A list of indices of the processes in which the current process is used as function input.This in only used by the GUI.

usedInProcessIDs

A list of IDs of the processes in which the current process is used as function input.This in only used by the GUI.

usedInRecursiveProcessIndices

A list of indices of the processes in which the current process is used as function input, recursively, so that a processes using a process that is using the current process are included.

usedInRecursiveProcessNames

A list of IDs of the processes in which the current process is used as function input, recursively, so that a processes using a process that is using the current process are included.

terminalProcess

Logical: Is the process a terminal process, i.e. is it not used in any later processes (also in later models)?