Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyomo/core/base/indexed_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ def keys(self, sort=SortComponents.UNSORTED, ordered=NOTSET):
# IndexedComponent): we might as well just sort the sparse
# _data keys instead of iterating over the whole index.
return iter(sorted_robust(self._data))
elif SortComponents.UNSORTED in sort:
return iter(self._data)
else:
#
# Test each element of a sparse _data with an ordered
Expand Down