local_suffix_generator

(function from pyomo.core.kernel.suffix)

pyomo.core.kernel.suffix.local_suffix_generator(blk, datatype=<object object>, active=True, descend_into=True)[source]

Generates an efficient traversal of all suffixes that have been declared local data storage.

Parameters:
  • blk – A block object.

  • datatype – Restricts the suffixes included in the returned generator to those matching the provided suffix datatype.

  • active (True/None) – Controls whether or not to filter the iteration to include only the active part of the storage tree. The default is True. Setting this keyword to None causes the active status of objects to be ignored.

  • descend_into (bool, function) – Indicates whether or not to descend into a heterogeneous container. Default is True, which is equivalent to lambda x: True, meaning all heterogeneous containers will be descended into.

Returns:

iterator of suffixes