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
9 changes: 6 additions & 3 deletions idaes/core/util/model_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2172,7 +2172,7 @@ def display_underdetermined_variables_and_constraints(
"singular values."
)

stream.write(f"{TAB}Smallest Singular Value {e}:\n\n")
stream.write(f"{TAB}Smallest Singular Value {e} ({self.s[e-1]:.3e}):\n\n")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this change---I was going to make it myself at some point.

stream.write(f"{2 * TAB}Variables:\n\n")
for v in np.where(abs(self.v[:, e - 1]) > tol)[0]:
stream.write(f"{3 * TAB}{self._var_list[v].name}\n")
Expand Down Expand Up @@ -2745,10 +2745,13 @@ def _solve_ids_milp(self, cons: Constraint, tee: bool = False):
# We found an irreducible degenerate set
return self._get_ids()
else:
raise ValueError(
# We did not find an irreducible degenerate set
_log.info(
f"Solver did not return an optimal termination condition for "
f"IDS MILP with constraint {cons.name}."
f"constraint {cons.name}. This probably indicates the constraint"
" is not a major component of an IDS."
)
return None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return None works just like return. Since this statement is at the end of the function, no return statement is needed at all. You don't need to actually change anything here (unless Pylint says to), but I thought I'd point it out.


def find_irreducible_degenerate_sets(self, tee=False):
"""
Expand Down
Loading