Open adowling2 opened 2 years ago
Two separate issues for minimal working examples in PR #2124 :
(1) get_dfds_dcds() has the same (wrong) behavior for sens.py in IDAES and Pyomo. It is missing a non-zero entry.
(2) get_dsdp() gives different results for sens.py in IDAES and Pyomo. The IDAES version is correct, but the Pyomo version has the code clarity enhancement you have made in the past few months.
@adowling2 @jialuw96 I looked at this last year and was unable to reproduce the issue. Is this still a problem? The code I ran is attached.
@jialuw96 Can you provide an update on this here?
Summary
For the following simple example:
The
k_aug
interface inpyomo/contrib/sensitivity_toolbox/sens.py
does not give the correct sensitivity values (which can be calculated analytically).The
k_aug
interface in/idaes/apps/uncertainty_propagation/sens.py
does give the correct answer.Moreover,
sens.py
in Pyomo has been updated in the past few months including improved comments and some code refactorization. There is a larger need to merge these two versions ofsens.py
(and the IDAES toolbox should use the version in Pyomo).Steps to reproduce the issue
The code for the example is here: https://github.com/IDAES/idaes-pse/blob/main/idaes/apps/uncertainty_propagation/examples/simple_opt_problem.py
A new
.py
file to show the inconsistency will be added to the corresponding PR for this issue.Error Message
No error message, but calculated values do not match the analytic solution.
Information on your system
Pyomo version: Python version: Operating system: How Pyomo was installed (PyPI, conda, source): Solver (if applicable):
Additional information