replaceVariable: Replaces a variable with another.

View source: R/solution_modifications.R

replaceVariableR Documentation

Replaces a variable with another.

Description

Notice: there is no check, whether the ids exist. Variables are replaced literarilly when they are the only content of an attribute or element content. In other attributes and element contents ⁠${oldid}⁠ will be replaced by ⁠${newid}⁠

Usage

replaceVariable(sol, oldid, newid)

Arguments

sol

solution object

oldid

id of variable to be replaced

newid

id of the replacing variable

Details

Notice that the id of variables from resources, SimComponents etc. should be prefixed by the enclosing resource's, SimComponent's etc. id.

Value

modified solution object


simplaceUtil documentation built on Aug. 6, 2024, 3:01 p.m.