SortComponents

(enum from pyomo.core.base.enums)

enum pyomo.core.base.enums.SortComponents(value)[source]

Bases: Flag

This class is a convenient wrapper for specifying various sort ordering. We pass these objects to the “sort” argument to various accessors / iterators to control how much work we perform sorting the resultant list. The idea is that “sort=SortComponents.deterministic” is more descriptive than “sort=True”.

Enum Members

UNSORTED = 0

ORDERED_INDICES = 2

SORTED_INDICES = 4

ALPHABETICAL = 8

unsorted = 0

indices = 4

declOrder = 0

declarationOrder = 0

alphaOrder = 8

alphabeticalOrder = 8

alphabetical = 8

deterministic = 2

sortBoth = 12

alphabetizeComponentAndIndex = 12

Methods

default()

sorter([sort_by_names, sort_by_keys])

sort_names(flag)

sort_indices(flag)

Member Documentation

UNSORTED = 0
ORDERED_INDICES = 2
SORTED_INDICES = 4
ALPHABETICAL = 8
unsorted = 0
indices = 4
declOrder = 0
declarationOrder = 0
alphaOrder = 8
alphabeticalOrder = 8
alphabetical = 8
deterministic = 2
sortBoth = 12
alphabetizeComponentAndIndex = 12
static default()[source]
static sort_indices(flag)[source]
static sort_names(flag)[source]
static sorter(sort_by_names=False, sort_by_keys=False)[source]