Suffixes
- class pyomo.core.kernel.suffix.ISuffix(*args, **kwds)[source]
Bases:
ComponentMap,ICategorizedObjectThe interface for suffixes.
- property datatype
The suffix datatype
- property direction
The suffix direction
- pyomo.core.kernel.suffix.export_suffix_generator(blk, datatype=<object object>, active=True, descend_into=True)[source]
Generates an efficient traversal of all suffixes that have been declared for exporting data.
- 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 isTrue. Setting this keyword toNonecauses 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
- pyomo.core.kernel.suffix.import_suffix_generator(blk, datatype=<object object>, active=True, descend_into=True)[source]
Generates an efficient traversal of all suffixes that have been declared for importing data.
- 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 isTrue. Setting this keyword toNonecauses 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
- 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 isTrue. Setting this keyword toNonecauses 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
- class pyomo.core.kernel.suffix.suffix(*args, **kwds)[source]
Bases:
ISuffixA container for storing extraneous model data that can be imported to or exported from a solver.
- clear_all_values()[source]
DEPRECATED.
Deprecated since version 5.3: suffix.clear_all_values is replaced with suffix.clear
- clear_value(component)[source]
DEPRECATED.
Deprecated since version 5.3: suffix.clear_value will be removed in the future. Use ‘del suffix[key]’ instead.
- property datatype
Return the suffix datatype.
- property direction
Return the suffix direction.
- get_datatype()[source]
DEPRECATED.
Deprecated since version 5.3: suffix.get_datatype is replaced with the property suffix.datatype
- get_direction()[source]
DEPRECATED.
Deprecated since version 5.3: suffix.get_direction is replaced with the property suffix.direction
- set_all_values(value)[source]
DEPRECATED.
Deprecated since version 5.3: suffix.set_all_values will be removed in the future.
- class pyomo.core.kernel.suffix.suffix_dict(*args, **kwds)
Bases:
DictContainerA dict-style container for objects with category type ISuffix
- pyomo.core.kernel.suffix.suffix_generator(blk, datatype=<object object>, active=True, descend_into=True)[source]
Generates an efficient traversal of all suffixes that have been declared.
- 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 isTrue. Setting this keyword toNonecauses 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