Skip to content

Commit

Permalink
Updting name of SVDToolbox to JacobianAnalysisToolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Lee committed Dec 6, 2023
1 parent dc8a76b commit 83ad14d
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 52 deletions.
26 changes: 13 additions & 13 deletions idaes_examples/notebooks/docs/diagnostics/degeneracy_hunter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
{
"data": {
"text/plain": [
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'warning', 'Message': 'Ipopt 3.13.2\\\\x3a Maximum Number of Iterations Exceeded.', 'Termination condition': 'maxIterations', 'Id': 400, 'Error rc': 0, 'Time': 0.004778385162353516}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'warning', 'Message': 'Ipopt 3.13.2\\\\x3a Maximum Number of Iterations Exceeded.', 'Termination condition': 'maxIterations', 'Id': 400, 'Error rc': 0, 'Time': 0.005051851272583008}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -488,7 +488,7 @@
"Number of equality constraint Jacobian evaluations = 17\n",
"Number of inequality constraint Jacobian evaluations = 17\n",
"Number of Lagrangian Hessian evaluations = 16\n",
"Total CPU secs in IPOPT (w/o function evaluations) = 0.000\n",
"Total CPU secs in IPOPT (w/o function evaluations) = 0.001\n",
"Total CPU secs in NLP function evaluations = 0.000\n",
"\n",
"EXIT: Optimal Solution Found.\n"
Expand All @@ -497,7 +497,7 @@
{
"data": {
"text/plain": [
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.04887509346008301}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.045278072357177734}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
]
},
"execution_count": 9,
Expand Down Expand Up @@ -548,7 +548,7 @@
"\n",
"One way to check for the presence of degenerate equations is to calculate the rank of the Jacobian matrix of the equality constraints. A singular value near 0 indicates the Jacobian is rank deficient, and for each near-zero singular value there is likely one degenerate constraint.\n",
"\n",
"The Diagnostics Toolbox contains a Singular Value Decomposition (SVD) toolbox which can be used to determine the number of small singular values in the Jacobian for a model as shown below."
"The Diagnostics Toolbox contains a Jacobian Analysis toolbox which can be used to determine the number of small singular values in the Jacobian for a model as shown below."
]
},
{
Expand All @@ -569,7 +569,7 @@
}
],
"source": [
"svd = dt.prepare_svd_toolbox()\n",
"svd = dt.prepare_jacobian_analysis_toolbox()\n",
"svd.display_rank_of_equality_constraints()"
]
},
Expand Down Expand Up @@ -607,15 +607,15 @@
"name": "stdout",
"output_type": "stream",
"text": [
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Searching for Candidate Equations\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Building MILP model.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Solving Candidates MILP model.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Searching for Irreducible Degenerate Sets\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Building MILP model to compute irreducible degenerate set.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Searching for Candidate Equations\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Building MILP model.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Solving Candidates MILP model.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Searching for Irreducible Degenerate Sets\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Building MILP model to compute irreducible degenerate set.\n",
"Solving MILP 1 of 2.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con2.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con2.\n",
"Solving MILP 2 of 2.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con5.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con5.\n",
"====================================================================================\n",
"Irreducible Degenerate Sets\n",
"\n",
Expand Down Expand Up @@ -749,7 +749,7 @@
{
"data": {
"text/plain": [
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 4, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.006506204605102539}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 4, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.006172895431518555}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
]
},
"execution_count": 13,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
{
"data": {
"text/plain": [
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'warning', 'Message': 'Ipopt 3.13.2\\\\x3a Maximum Number of Iterations Exceeded.', 'Termination condition': 'maxIterations', 'Id': 400, 'Error rc': 0, 'Time': 0.004778385162353516}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'warning', 'Message': 'Ipopt 3.13.2\\\\x3a Maximum Number of Iterations Exceeded.', 'Termination condition': 'maxIterations', 'Id': 400, 'Error rc': 0, 'Time': 0.005051851272583008}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -471,7 +471,7 @@
"Number of equality constraint Jacobian evaluations = 17\n",
"Number of inequality constraint Jacobian evaluations = 17\n",
"Number of Lagrangian Hessian evaluations = 16\n",
"Total CPU secs in IPOPT (w/o function evaluations) = 0.000\n",
"Total CPU secs in IPOPT (w/o function evaluations) = 0.001\n",
"Total CPU secs in NLP function evaluations = 0.000\n",
"\n",
"EXIT: Optimal Solution Found.\n"
Expand All @@ -480,7 +480,7 @@
{
"data": {
"text/plain": [
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.04887509346008301}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.045278072357177734}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
]
},
"execution_count": 9,
Expand Down Expand Up @@ -531,7 +531,7 @@
"\n",
"One way to check for the presence of degenerate equations is to calculate the rank of the Jacobian matrix of the equality constraints. A singular value near 0 indicates the Jacobian is rank deficient, and for each near-zero singular value there is likely one degenerate constraint.\n",
"\n",
"The Diagnostics Toolbox contains a Singular Value Decomposition (SVD) toolbox which can be used to determine the number of small singular values in the Jacobian for a model as shown below."
"The Diagnostics Toolbox contains a Jacobian Analysis toolbox which can be used to determine the number of small singular values in the Jacobian for a model as shown below."
]
},
{
Expand All @@ -552,7 +552,7 @@
}
],
"source": [
"svd = dt.prepare_svd_toolbox()\n",
"svd = dt.prepare_jacobian_analysis_toolbox()\n",
"svd.display_rank_of_equality_constraints()"
]
},
Expand Down Expand Up @@ -590,15 +590,15 @@
"name": "stdout",
"output_type": "stream",
"text": [
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Searching for Candidate Equations\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Building MILP model.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Solving Candidates MILP model.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Searching for Irreducible Degenerate Sets\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Building MILP model to compute irreducible degenerate set.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Searching for Candidate Equations\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Building MILP model.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Solving Candidates MILP model.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Searching for Irreducible Degenerate Sets\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Building MILP model to compute irreducible degenerate set.\n",
"Solving MILP 1 of 2.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con2.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con2.\n",
"Solving MILP 2 of 2.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con5.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con5.\n",
"====================================================================================\n",
"Irreducible Degenerate Sets\n",
"\n",
Expand Down Expand Up @@ -732,7 +732,7 @@
{
"data": {
"text/plain": [
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 4, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.006506204605102539}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 4, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.006172895431518555}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
]
},
"execution_count": 13,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
{
"data": {
"text/plain": [
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'warning', 'Message': 'Ipopt 3.13.2\\\\x3a Maximum Number of Iterations Exceeded.', 'Termination condition': 'maxIterations', 'Id': 400, 'Error rc': 0, 'Time': 0.004778385162353516}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'warning', 'Message': 'Ipopt 3.13.2\\\\x3a Maximum Number of Iterations Exceeded.', 'Termination condition': 'maxIterations', 'Id': 400, 'Error rc': 0, 'Time': 0.005051851272583008}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -488,7 +488,7 @@
"Number of equality constraint Jacobian evaluations = 17\n",
"Number of inequality constraint Jacobian evaluations = 17\n",
"Number of Lagrangian Hessian evaluations = 16\n",
"Total CPU secs in IPOPT (w/o function evaluations) = 0.000\n",
"Total CPU secs in IPOPT (w/o function evaluations) = 0.001\n",
"Total CPU secs in NLP function evaluations = 0.000\n",
"\n",
"EXIT: Optimal Solution Found.\n"
Expand All @@ -497,7 +497,7 @@
{
"data": {
"text/plain": [
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.04887509346008301}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 5, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.045278072357177734}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
]
},
"execution_count": 9,
Expand Down Expand Up @@ -548,7 +548,7 @@
"\n",
"One way to check for the presence of degenerate equations is to calculate the rank of the Jacobian matrix of the equality constraints. A singular value near 0 indicates the Jacobian is rank deficient, and for each near-zero singular value there is likely one degenerate constraint.\n",
"\n",
"The Diagnostics Toolbox contains a Singular Value Decomposition (SVD) toolbox which can be used to determine the number of small singular values in the Jacobian for a model as shown below."
"The Diagnostics Toolbox contains a Jacobian Analysis toolbox which can be used to determine the number of small singular values in the Jacobian for a model as shown below."
]
},
{
Expand All @@ -569,7 +569,7 @@
}
],
"source": [
"svd = dt.prepare_svd_toolbox()\n",
"svd = dt.prepare_jacobian_analysis_toolbox()\n",
"svd.display_rank_of_equality_constraints()"
]
},
Expand Down Expand Up @@ -607,15 +607,15 @@
"name": "stdout",
"output_type": "stream",
"text": [
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Searching for Candidate Equations\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Building MILP model.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Solving Candidates MILP model.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Searching for Irreducible Degenerate Sets\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Building MILP model to compute irreducible degenerate set.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Searching for Candidate Equations\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Building MILP model.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Solving Candidates MILP model.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Searching for Irreducible Degenerate Sets\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Building MILP model to compute irreducible degenerate set.\n",
"Solving MILP 1 of 2.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con2.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con2.\n",
"Solving MILP 2 of 2.\n",
"2023-11-17 14:33:20 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con5.\n",
"2023-12-06 14:39:45 [INFO] idaes.core.util.model_diagnostics: Solving IDS MILP for constraint con5.\n",
"====================================================================================\n",
"Irreducible Degenerate Sets\n",
"\n",
Expand Down Expand Up @@ -749,7 +749,7 @@
{
"data": {
"text/plain": [
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 4, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.006506204605102539}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
"{'Problem': [{'Lower bound': -inf, 'Upper bound': inf, 'Number of objectives': 1, 'Number of constraints': 4, 'Number of variables': 3, 'Sense': 'unknown'}], 'Solver': [{'Status': 'ok', 'Message': 'Ipopt 3.13.2\\\\x3a Optimal Solution Found', 'Termination condition': 'optimal', 'Id': 0, 'Error rc': 0, 'Time': 0.006172895431518555}], 'Solution': [OrderedDict([('number of solutions', 0), ('number of solutions displayed', 0)])]}"
]
},
"execution_count": 13,
Expand Down
Loading

0 comments on commit 83ad14d

Please sign in to comment.