Skip to content

[Pyomo.DoE] update documentation#3812

Open
smondal13 wants to merge 30 commits intoPyomo:mainfrom
smondal13:doe-update-documentation
Open

[Pyomo.DoE] update documentation#3812
smondal13 wants to merge 30 commits intoPyomo:mainfrom
smondal13:doe-update-documentation

Conversation

@smondal13
Copy link
Contributor

Fixes # .

Summary/Motivation:

Pyomo.DoE documentation was old and needed an update.

Changes proposed in this PR:

  • Update the Pyomo.DoE documentation with the latest enhancements.

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.

@mrmundt
Copy link
Contributor

mrmundt commented Jan 9, 2026

@smondal13 - We have standardized to "Parmest" or "parmest", not "ParmEst". It's the source of the typo checker yelling at you.

@smondal13
Copy link
Contributor Author

Thank you @mrmundt

@smondal13
Copy link
Contributor Author

smondal13 commented Jan 9, 2026

@adowling2 @blnicho This PR is ready for review

Note: Merge PR #3803 before this one. The documentation in this PR contains updated information from that PR

:end-before: End sensitivity analysis

An example output of the code above, a design exploration for the initial concentration and temperature as experimental design variables with 9 values, produces the four figures summarized below:
.. code-block:: python
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you embedding the example instead of using .. literalinclude::? As implemented, this example is no longer being tested (which is a problem).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied and pasted the code from the example to skip the booleans that we have in the original example. However, I agree that testing this is important. So, I have added .. literalinclude:: and removed the copy-pasted code.

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.41%. Comparing base (168e961) to head (55af60a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3812      +/-   ##
==========================================
- Coverage   89.41%   89.41%   -0.01%     
==========================================
  Files         909      909              
  Lines      105579   105579              
==========================================
- Hits        94408    94407       -1     
- Misses      11171    11172       +1     
Flag Coverage Δ
builders 29.10% <ø> (-0.01%) ⬇️
default 86.04% <ø> (?)
expensive 35.76% <ø> (?)
linux 86.73% <ø> (-2.46%) ⬇️
linux_other 86.73% <ø> (-0.01%) ⬇️
osx 82.88% <ø> (ø)
win 84.98% <ø> (ø)
win_other 84.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@blnicho blnicho self-requested a review January 13, 2026 19:47
@smondal13 smondal13 changed the title Pyomo.Doe: update documentation [Pyomo.DoE] update documentation Jan 29, 2026
@sscini sscini moved this to Ready for final review in ParmEst & Pyomo.DoE Development Feb 6, 2026
Copy link
Member

@adowling2 adowling2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the list of contributors.

Should we also add the figures that explain the experiment abstraction? Or should we instead link to our workshop material? https://dowlinglab.github.io/pyomo-doe/Readme.html

**Pyomo.DoE** (Pyomo Design of Experiments) is a Python library for model-based design of experiments using science-based models.

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/>`_.
Pyomo.DoE was developed by **Jialu Wang** and **Alexander W. Dowling** at the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's expand this text to say "Pyomo.DoE was originally created by ... as part of the ... Significant improvements and extensions were contributed by (list people) with funding from (list and link to PrOMMiS) and the University of Notre Dame.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, adding a link to the workshop material is more valuable since it has more content and is more detailed. If we are adding link, should we add it at the end, saying that more details about it can be found there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adowling2 I have updated the list of contributors based on the ACC workshop page. Let me know if I need to correct anything.

@blnicho blnicho moved this from Todo to Review In Progress in Pyomo 6.10 Feb 10, 2026
Copy link
Member

@blnicho blnicho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm about halfway through my review but here are some initial comments.

Comment on lines 130 to 134
- :math:`\text{trace}({\mathbf{M}}^{-1})`
- Dimensions of the enclosing box of the confidence ellipse
* - Pseudo A-optimality
- :math:`\text{trace}({\mathbf{M}})`
- Dimensions of the enclosing box of the inverse of the confidence ellipse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these descriptions swapped by mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, these changes were intentional. This goes back to #3803 . We have added a new mathematical definition where we call the trace of FIM pseudo A-optimality or pseudo-trace, and the trace of the inverse of FIM as the trace

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That part I follow. I'm asking about the "Geometrical Meaning" column. It doesn't look like the term "confidence ellipse" is ever defined or related back to M in the docs so I wanted to make sure those were still correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was never defined. I have added clarification and added a note to clarify what is meant by confidence ellipse.

@smondal13 smondal13 requested a review from adowling2 February 10, 2026 20:00
Copy link
Member

@blnicho blnicho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started refactoring the text describing the example to follow the structure of the Parmest Quick Start Guide but I noticed that the design space heatmaps look off so I think this still needs some substantial work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is does the top row of this plot (T=300) look strange? The optimality criteria is positive there but negative everywhere else? The previous plots from this example didn't have this artifact.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That top row at T=300K represents the worst design in the space. Because we are minimizing the A-optimality criteria, the maximum positive value is highly unfavorable. Physically, this makes perfect sense: the example uses the Arrhenius equation, so at a low temperature like 300K, the reaction rate drops significantly, yielding very little information for the design.

Regarding the difference from older plots: since this is strictly a documentation PR, I haven't modified any underlying model parameters. I simply generated this updated plot using the current state of the codebase. The previous plots in the docs were likely generated using an older version of the model before recent updates to the main branch. I see that the .png file in doe.rst was last changed 1year ago, but the doe/examples/result.json which is used in the example script was changed 7 months ago, and there was a change in control_points. So my understanding is that this or something else was not captured in the stable documentation. Finally, the 'sudden' visual jump at 300K is just a discretization artifact; the transition would look much smoother if we plotted this over a finer temperature grid rather than the current coarse steps.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 'sudden' visual jump at 300K is just a discretization artifact; the transition would look much smoother if we plotted this over a finer temperature grid rather than the current coarse steps.

Could you run a quick test to confirm this? Could you include both 300K and 305K in the heatmap and paste the figure here?

Copy link
Contributor Author

@smondal13 smondal13 Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plotting function uses np.linspace, so to make the computation quick, I have used the range of temperature from 300K to 350K and used 6 points. I think it will help with the idea that the jump in value is actually not a jump, but a gradual change.

example_reactor_compute_FIM_A_opt example_reactor_compute_FIM_D_opt example_reactor_compute_FIM_E_opt example_reactor_compute_FIM_ME_opt example_reactor_compute_FIM_pseudo_A_opt

Copy link
Contributor Author

@smondal13 smondal13 Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have also added points from 300K -> 305K; this will make it clearer.

example_reactor_compute_FIM_A_opt example_reactor_compute_FIM_D_opt example_reactor_compute_FIM_E_opt example_reactor_compute_FIM_ME_opt example_reactor_compute_FIM_pseudo_A_opt

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here about the top row. Something seems off in these results.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here about the top row. Something seems off in these results.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here about the top row. Something seems off in these results.

@blnicho blnicho removed this from Pyomo 6.10 Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready for final review

Development

Successfully merging this pull request may close these issues.

6 participants

Comments