Skip to content

Commit 3567ead

Browse files
add index check back in
1 parent 7a41512 commit 3567ead

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

idaes/core/scaling/util.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,11 @@ def set_scaling_factor(component, scaling_factor: float, overwrite: bool = False
530530
"per constraint to avoid double scaling."
531531
)
532532

533+
if component.is_indexed():
534+
raise TypeError(
535+
f"Component {component.name} is indexed. Set scaling factors for individual indices instead."
536+
)
537+
533538
# Get suffix and assign scaling factor
534539
sfx = get_component_scaling_suffix(component)
535540

0 commit comments

Comments
 (0)