Set or add parameter values to an existing Parameter Values building block.
Source:R/utilities-building-block.R
setParameterValuesInBB.RdThis function allows adding or modifying parameter value entries. Only constant
values are allowed. Values are expected in the provided units and will be
converted to base units internally.
Usage
setParameterValuesInBB(
parameterValuesBuildingBlock,
quantityPaths,
quantityValues,
units,
dimensions = NULL
)Arguments
- parameterValuesBuildingBlock
A
BuildingBlockobject of typeParameter Values. The entries will be added to or set in this building block.- quantityPaths
A list of full paths of the quantities (usually parameters). Should contain all path elements and the parameter name, separated by
|.- quantityValues
A list of values for the quantities in the provided
units. The length of this list should be equal to the length ofquantityPaths.- units
A single unit string or a list of unit strings for the quantity values. If a single string is provided, it will be used for all quantities.
- dimensions
A single dimension or a list of dimensions (string names) of parameter values. Supported dimensions are listed in
ospDimensions. IfNULL(default), dimensions are derived from the providedunitsusinggetDimensionForUnit().
Examples
sim <- loadSimulation(system.file(
"extdata",
"simple.pkml",
package = "ospsuite"
))
module <- sim$configuration$modules[[1]]
pvBB <- module$getParameterValuesBBs()[[1]]
setParameterValuesInBB(
pvBB,
quantityPaths = "Organism|Organ|Parameter",
quantityValues = 1.33,
units = "ml/min/kg"
)