Skip to content

Pyomo.DoE: Add symbolic differentiation gradient calculation option as an alternative to finite different #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3f32b89
Replaced FiniteDifferenceStep with GradientMethod and extended
adowling2 Jun 4, 2025
c35c2e3
Updated tests. Decided to make _gradient_method provide to discourage…
adowling2 Jun 4, 2025
7528d7f
Updated reactor example to new interface. Improve solution printing. …
adowling2 Jun 4, 2025
b97dbfa
Added comments to plan out changes for symbolic gradients.
adowling2 Jun 4, 2025
6df0470
Updated notes based on conversation with Dan
adowling2 Jun 4, 2025
dcce045
Started to add logic for symbolic gradient
adowling2 Jun 5, 2025
3ac0a52
Symbolic example "runs", but there are no gradient calculations yet
adowling2 Jun 5, 2025
21ab51e
Decided to make the kaug function also support AD
adowling2 Jun 5, 2025
cf24135
Added class for differentiation with PyNumero. Debugging matrix dimen…
adowling2 Jun 6, 2025
f791f2b
Minor changes to examples to run on a machine without HSL installed
adowling2 Jun 6, 2025
fdefe5a
Fixed dimensions issue
adowling2 Jun 6, 2025
dae1c46
Added some debugging lines.
adowling2 Jun 6, 2025
54f6769
More debugging code
adowling2 Jun 6, 2025
49e2ddf
Added some comments about next steps
adowling2 Jun 6, 2025
362fea9
Added comments for next step
adowling2 Jun 7, 2025
222430b
Check in while developing... I think I do not actually need the outpu…
adowling2 Jun 11, 2025
aef38dd
Intermediate check-in before removing debugging lines
adowling2 Jun 11, 2025
0eb3b9b
Symbolic sensitivity analysis runs!
adowling2 Jun 11, 2025
aed858b
Generating results for comparison.
adowling2 Jun 11, 2025
d45c479
Generating results with kaug
adowling2 Jun 11, 2025
8eea498
Debugging with kaug
adowling2 Jun 11, 2025
0d3978b
Added simply polynomial example
adowling2 Jun 11, 2025
9ea42fc
Added scaling for symbolic
adowling2 Jun 11, 2025
9f8df60
Reran the heat map sensitivity analysis
adowling2 Jun 11, 2025
b8ec21c
Left some comments on next steps; enabled logging for simple timing
adowling2 Jun 11, 2025
410e6fc
Work in progress for symbolic version
adowling2 Jun 11, 2025
e3bfcd5
Minor formatting change
adowling2 Jun 12, 2025
ae53caf
Created suffix to track mapping
adowling2 Jun 12, 2025
92c3e47
Updated to use measurement_mapping
adowling2 Jun 12, 2025
7dc978b
It appears to work!
adowling2 Jun 12, 2025
1f0e61f
Need debugging help with ComponentUID
adowling2 Jun 12, 2025
cc8d579
I think it works now
adowling2 Jun 13, 2025
1456f14
Added scaling
adowling2 Jun 13, 2025
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
11 changes: 9 additions & 2 deletions pyomo/contrib/doe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
from .doe import DesignOfExperiments, ObjectiveLib, FiniteDifferenceStep
from .utils import rescale_FIM
from .doe import DesignOfExperiments, ObjectiveLib, GradientMethod
from .utils import rescale_FIM, ExperimentGradients

# Deprecation errors for old Pyomo.DoE interface classes and structures
from pyomo.common.deprecation import deprecated
Expand Down Expand Up @@ -45,3 +45,10 @@ def __init__(self, *args):
class ModelOptionLib:
def __init__(self, *args):
raise RuntimeError(deprecation_message)

@deprecated(
"Use of FiniteDifferenceStep in Pyomo.DoE is no longer supported. Use GradientMethod instead.", version='6.9.4'
)
class FiniteDifferenceStep:
def __init__(self, *args):
raise RuntimeError(deprecation_message)
Loading
Loading