Skip to content

Add core symbolic gradient support to Pyomo.DoE#3928

Draft
snarasi2 wants to merge 52 commits into
Pyomo:mainfrom
snarasi2:clean_symbolic
Draft

Add core symbolic gradient support to Pyomo.DoE#3928
snarasi2 wants to merge 52 commits into
Pyomo:mainfrom
snarasi2:clean_symbolic

Conversation

@snarasi2

@snarasi2 snarasi2 commented May 4, 2026

Copy link
Copy Markdown

Fixes # .

This PR ports the core symbolic-gradient functionality from the historical pyomo-doe-symbolic work into the current pyomo.contrib.doe implementation.

Summary/Motivation:

Rather than merging the old branch directly, this change transplants the symbolic DoE pieces onto current main so that symbolic sensitivities work with the newer DoE implementation already present in Pyomo, including the current objective and GreyBox-oriented code paths.

This PR ports the core symbolic-gradient functionality from adowling2#7 onto current Pyomo main and adapts it to the current pyomo.contrib.doe implementation.

This contribution was prepared with coding assistance from OpenAI Codex. All design decisions, validation, testing, and quality-assurance responsibility remain with Shilpa Narasimhan.

Changes proposed in this PR:

  • Add GradientMethod support to DesignOfExperiments
  • Preserve the existing finite-difference workflow through the new gradient-method interface
  • Add a symbolic / PyNumero gradient path for DoE
  • Add an analytic FIM computation path for non-optimization FIM evaluation
  • Export ExperimentGradients from pyomo.contrib.doe
  • Refactor ExperimentGradients so symbolic and automatic differentiation are set up together
  • Add supporting symbolic-gradient utilities for labeled experiment models
  • Update DoE model construction so symbolic sensitivities can be used in the Jacobian-based DoE machinery
  • Add a guard preventing run_doe() from being called with GradientMethod.kaug
  • Add the polynomial example and polynomial-focused regression coverage
  • Add broader symbolic-versus-automatic gradient consistency tests
  • Add factorial-result dataframe tests
  • Add reactor regression tests against expected solutions
  • Clarify GreyBox cyipopt / MA57-HSL test behavior where relevant

Validation performed locally:

  • Black: python -m black -S -C --check --diff pyomo/contrib/doe → passed
  • Typos: typos --config .github/workflows/typos.toml pyomo/contrib/doe DOE_SYMBOLIC_PR_NOTES.md → passed
  • Focused DoE/GreyBox validation: 134 passed, 0 failed, 0 skipped
  • GreyBox cyipopt tests were run with MA57/HSL available in the local environment
  • The existing K_AUG-dependent DoE test path was validated locally after configuring the required runtime library path

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready for design review

Development

Successfully merging this pull request may close these issues.

7 participants