(class from pyomo.core.kernel.suffix)
pyomo.core.kernel.suffix
Bases: ISuffix
ISuffix
A container for storing extraneous model data that can be imported to or exported from a solver.
Methods
__init__(*args, **kwds)
__init__
activate()
activate
Activate this object.
clear()
clear
clear_all_values()
clear_all_values
DEPRECATED.
clear_value(component)
clear_value
clone()
clone
Returns a copy of this object with the parent pointer set to None.
None
deactivate()
deactivate
Deactivate this object.
export_enabled()
export_enabled
Returns True when this suffix is enabled for export to solvers.
True
get(k[,d])
get
get_datatype()
get_datatype
get_direction()
get_direction
getname([fully_qualified, name_buffer, ...])
getname
Dynamically generates a name for this object.
import_enabled()
import_enabled
Returns True when this suffix is enabled for import from solutions.
items()
items
keys()
keys
pop(k[,d])
pop
If key is not found, d is returned if given, otherwise KeyError is raised.
popitem()
popitem
as a 2-tuple; but raise KeyError if D is empty.
set_all_values(value)
set_all_values
set_datatype(datatype)
set_datatype
set_direction(direction)
set_direction
setdefault(k[,d])
setdefault
update([E, ]**F)
update
If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
values()
values
Attributes
EXPORT
FLOAT
IMPORT
IMPORT_EXPORT
INT
LOCAL
active
The active status of this object.
ctype
The object's category type.
datatype
Return the suffix datatype.
direction
Return the suffix direction.
hasher
local_name
The object's local name within the context of its parent.
name
The object's fully qualified name.
parent
The object's parent (possibly None).
storage_key
The object's storage key within its parent
Member Documentation
Deprecated since version 5.3: suffix.clear_all_values is replaced with suffix.clear
Deprecated since version 5.3: suffix.clear_value will be removed in the future. Use ‘del suffix[key]’ instead.
A clone is almost equivalent to deepcopy except that any categorized objects encountered that are not descendents of this object will reference the same object on the clone.
Deprecated since version 5.3: suffix.get_datatype is replaced with the property suffix.datatype
Deprecated since version 5.3: suffix.get_direction is replaced with the property suffix.direction
fully_qualified (bool) – Generate a full name by iterating through all ancestor containers. Default is False.
False
convert (function) – A function that converts a storage key into a string representation. Default is the built-in function str.
relative_to (object) – When generating a fully qualified name, generate the name relative to this block.
If a parent exists, this method returns a string representing the name of the object in the context of its parent; otherwise (if no parent exists), this method returns None.
Deprecated since version 5.3: suffix.set_all_values will be removed in the future.
Deprecated since version 5.3: suffix.set_datatype is replaced with the property setter suffix.datatype
Deprecated since version 5.3: suffix.set_direction is replaced with the property setter suffix.direction
The object’s category type.
The object’s local name within the context of its parent. Alias for obj.getname(fully_qualified=False).
The object’s fully qualified name. Alias for obj.getname(fully_qualified=True).
The object’s parent (possibly None).
The object’s storage key within its parent