xsimlab.foreign

xsimlab.foreign(other_process_cls, var_name, intent='in')

Create a reference to a variable that is defined in another process class.

Parameters
  • other_process_cls (class) – Class in which the variable is defined.

  • var_name (str) – Name of the corresponding variable declared in other_process_cls.

  • intent ({'in', 'out'}, optional) – Defines whether the foreign 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.

See also

variable()

Notes

Unlike for variable(), intent='inout' is not supported here (i.e., the process may not update the value of a foreign variable) as it would result in ambiguous process ordering in a model.