xsimlab.global_ref¶
-
xsimlab.
global_ref
(name, intent='in')¶ Create a reference to a variable that is defined somewhere else in a model with a unique, global name.
Unlike
foreign()
, the original variable is not known until the model is created (implicit reference). This may be a good alternative if explicit references are tricky and if standard names exist.- Parameters
name (str) – The global name of the variable. Must refer to a unique variable model-wise.
intent ({'in', 'out'}, optional) – Defines whether the variable is an input (i.e., the process needs the variable’s value for its computation) or an output (i.e., the process computes a value for the variable). Default: input. Intent ‘inout’ is not supported here.
See also