Skip to content

Commit

Permalink
Tolerances in SVD output
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Lee committed Oct 3, 2023
1 parent 9d27ff3 commit fedc3a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion idaes/core/util/model_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,10 @@ def display_rank_of_equality_constraints(self, stream=stdout):
counter += 1

stream.write("=" * MAX_STR_LENGTH + "\n\n")
stream.write(f"Number of Singular Values less than tolerance is {counter}\n\n")
stream.write(
f"Number of Singular Values less than "
f"{self.config.singular_value_tolerance:.1E} is {counter}\n\n"
)
stream.write("=" * MAX_STR_LENGTH + "\n")

def display_underdetermined_variables_and_constraints(
Expand Down
4 changes: 2 additions & 2 deletions idaes/core/util/tests/test_model_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ def test_display_rank_of_equality_constraints(self, dummy_problem):

expected = """====================================================================================
Number of Singular Values less than tolerance is 0
Number of Singular Values less than 1.0E-6 is 0
====================================================================================
"""
Expand All @@ -1398,7 +1398,7 @@ def test_display_rank_of_equality_constraints(self, dummy_problem):

expected = """====================================================================================
Number of Singular Values less than tolerance is 1
Number of Singular Values less than 1.0E+00 is 1
====================================================================================
"""
Expand Down

0 comments on commit fedc3a3

Please sign in to comment.