Fix PETSc scaling and unscaling
dallan-keylogic opened this issue · 0 comments
dallan-keylogic commented
Presently, PETSc ignores the active
attribute of scaling suffixes and scales/unscales the corresponding blocks anyway. It needs to be fixed to take this attribute into account and probably modified to look for scaling suffixes in more places than it looks now (either the component's parent block or the overall model) using Pyomo's suffix locator:
from pyomo.core.base.suffix import SuffixFinder
suffix_finder = SuffixFinder('scaling_factor', 1.0)
suffix_finder.find(component)