Skip to content

Bug: Results drift in docs example notebooks #460

@RHammond2

Description

@RHammond2

Nonreplicable Results in Documentation Build

While working on #75, I was converting the Jupyter notebooks in the documentation to executable markdown files, I found that there was an uncaught behavioral change resulting in nonmatching results when it was fixed. Replacing the "finance_subgroup_default.LCOH" in lcoh = h2i_model.model.get_val("finance_subgroup_default.LCOH", units="USD/kg")[0] with "finance_subgroup_hydrogen.LCOH_produced_profast_model" allows the notebook to run without failure, but also changes the outputs signficantly . Specifically, in the results processing, I found the output figure in https://github.com/NREL/H2Integrate/blob/main/docs/user_guide/how_to_set_up_an_analysis.ipynb produces a horizontal line of scatter points, indicating no change in results as the inputs are varied.

How to reproduce

  1. Checkout my branch: https://github.com/RHammond2/H2Integrate/blob/docs/convert-notebooks/
  2. Create an environment with the develop dependency add-ons
  3. Build the docs sh docs/build_book.sh
  4. Open the locally built documentation home page that is presented at the end of the documentation build, and navigate to: <your-file-path>/H2Integrate/docs/_build/html/user_guide/how_to_set_up_an_analysis.html

Relevant output

The actual hydrogen produced differs in the section Modifying and rerunning the analysis: 56631148.67 kg/year vs. 51724448.11 kg/year. The resulting plots are shown below.

Original:

Image

Updated:

Image

System Information

  • OS: macOS 12.4
  • Python version: 3.13.3
  • H2Integrate version: 0.5.1, branched off 8f40f29 (latest commit to develop)
    • Installed from source using an editable installation with developer tools: pip install -e .[all]
    • Commit hash: 4ba397b

Relevant library versions

Package Version
hopp 3.4.0
numpy 2.4.1
Pyomo 6.9.5
scipy 1.17.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions