Skip to content

Conversation

@OceanNuclear
Copy link
Contributor

Description

Patches away the RuntimeWarning caused by sqrt(p_plant_electric_net_mw/1200), where p_plant_electric_net_mw may cross over to negative values briefly during the optimization process (but is expected to always converge on a positive value).

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made. (N/A)
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly. (N/A)
  • I have added documentation for my change, if appropriate. (N/A)

@OceanNuclear OceanNuclear requested a review from a team as a code owner January 26, 2026 14:54
@OceanNuclear
Copy link
Contributor Author

Closes #4024

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.60%. Comparing base (ac78fdb) to head (4422c12).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4065   +/-   ##
=======================================
  Coverage   46.60%   46.60%           
=======================================
  Files         122      122           
  Lines       28711    28711           
=======================================
  Hits        13381    13381           
  Misses      15330    15330           

☔ 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.

@timothy-nunn timothy-nunn linked an issue Jan 28, 2026 that may be closed by this pull request
@timothy-nunn timothy-nunn self-assigned this Jan 28, 2026
@timothy-nunn
Copy link
Collaborator

@j-a-foster could you please provide a review here as you are Mr Cost Model. Does this change make sense and could it have any negative downstream impacts?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Divide by zero warnings in costs.py

4 participants