You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/OnlineDocs/explanation/analysis/doe/doe.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ Pyomo.DoE
3
3
4
4
**Pyomo.DoE** (Pyomo Design of Experiments) is a Python library for model-based design of experiments using science-based models.
5
5
6
-
Pyomo.DoE was developed by **Jialu Wang** and **Alexander W. Dowling** at the University of Notre Dame as part of the `Carbon Capture Simulation for Industry Impact (CCSI2) <https://www.acceleratecarboncapture.org/>`_.
6
+
Pyomo.DoE was developed by **Jialu Wang** and **Alexander W. Dowling** at the University of Notre Dame as part of the `Carbon Capture Simulation for Industry Impact (CCSI2) <https://github.com/CCSI-Toolset/>`_.
7
7
project, funded through the U.S. Department Of Energy Office of Fossil Energy.
Copy file name to clipboardExpand all lines: doc/OnlineDocs/explanation/analysis/sensitivity_toolbox.rst
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,18 @@ And finally we call sIPOPT or k_aug:
67
67
>>> m_sipopt = sensitivity_calculation('sipopt', m, [m.eta1, m.eta2], [m.perturbed_eta1, m.perturbed_eta2], tee=False)
68
68
>>> m_kaug_dsdp = sensitivity_calculation('k_aug', m, [m.eta1, m.eta2], [m.perturbed_eta1, m.perturbed_eta2], tee=False)
69
69
70
+
.. testcode:: python
71
+
:skipif: not sipopt_available or not k_aug_available or not dot_sens_available
72
+
:hide:
73
+
74
+
# The x3 result can come back -0.000 depending on the platform or
75
+
# solver version; map it so that tests don't fail.
76
+
for _m in (m, m_sipopt, m_kaug_dsdp):
77
+
if f'{_m.x3():.3f}' == '-0.000':
78
+
_m.x3 = 0.
79
+
if f'{m_sipopt.sens_sol_state_1[m_sipopt.x3]:.3f}' == '-0.000':
80
+
m_sipopt.sens_sol_state_1[m_sipopt.x3] = 0.
81
+
70
82
The first argument specifies the method, either 'sipopt' or 'k_aug'. The second argument is the Pyomo model. The third argument is a list of the original parameters. The fourth argument is a list of the perturbed parameters. It's important that these two lists are the same length and in the same order.
71
83
72
84
First, we can inspect the initial point:
@@ -138,7 +150,7 @@ Note that k_aug does not save the solution with the original parameter values. F
138
150
x2 = 0.667
139
151
140
152
>>> print("x3 = %0.3f"% x3)
141
-
x3 = -0.000
153
+
x3 = 0.000
142
154
143
155
# *k_aug*
144
156
# New parameter values:
@@ -162,7 +174,7 @@ Note that k_aug does not save the solution with the original parameter values. F
0 commit comments