(class from pyomo.core.kernel.sos)
pyomo.core.kernel.sos
Bases: ICategorizedObject
ICategorizedObject
The interface for Special Ordered Sets.
Methods
__init__()
__init__
activate()
activate
Activate this object.
clone()
clone
Returns a copy of this object with the parent pointer set to None.
None
deactivate()
deactivate
Deactivate this object.
getname([fully_qualified, name_buffer, ...])
getname
Dynamically generates a name for this object.
items()
items
Iterator over the sos variables and weights as tuples
Attributes
active
The active status of this object.
ctype
The object's category type.
level
The sos level (e.g., 1,2,...)
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
variables
The sos variables
weights
Member Documentation
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.
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.
The object’s category type.
The sos level (e.g., 1,2,…)
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