Skip to content
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

feat: Multiple updates to the Plexos parser #47

Merged
merged 33 commits into from
Oct 29, 2024
Merged

feat: Multiple updates to the Plexos parser #47

merged 33 commits into from
Oct 29, 2024

Conversation

ktehranchi
Copy link
Collaborator

@ktehranchi ktehranchi commented Sep 27, 2024

The feature to convert quadratic to PWL (quad2pwl) will now have outputs that enforce monotonically increasing PWL functions. cvxpy dependency added.

List of changes:

  • New feature_flag Quad2PWL feature that enforce monotonically increasing PWL for

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 57.22284% with 382 lines in your changes missing coverage. Please review.

Project coverage is 72.09%. Comparing base (a07253e) to head (1a7aff2).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/r2x/parser/plexos.py 42.95% 251 Missing ⚠️
src/r2x/parser/plexos_utils.py 59.89% 73 Missing ⚠️
src/r2x/parser/parser_helpers.py 62.50% 27 Missing ⚠️
src/r2x/parser/polars_helpers.py 75.86% 14 Missing ⚠️
src/r2x/exporter/plexos.py 66.66% 5 Missing ⚠️
src/r2x/exporter/handler.py 78.57% 3 Missing ⚠️
src/r2x/exporter/sienna.py 91.42% 3 Missing ⚠️
src/r2x/parser/handler.py 81.25% 3 Missing ⚠️
src/r2x/models/costs.py 87.50% 1 Missing ⚠️
src/r2x/parser/reeds.py 90.90% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
+ Coverage   62.18%   72.09%   +9.90%     
==========================================
  Files          29       31       +2     
  Lines        3115     3472     +357     
==========================================
+ Hits         1937     2503     +566     
+ Misses       1178      969     -209     

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

self.device_match_string = self.config.defaults["device_name_inference_map"] or {}
self.generator_models = self.config.defaults["generator_models"] or {}
self.year = self.config.solve_year
assert isinstance(self.year, int)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@pesap Is there a reason you added this here? It causes crash since we look for study year at line 181. The if statement if not self.year can never be true since we are asserting it is an instance of int here.

@pesap pesap changed the title Updates Quad2PWL feature to enforce monotonically increasing PWL feat: Multiple updates to the Plexos parser Oct 18, 2024
@pesap pesap merged commit bf284f2 into main Oct 29, 2024
8 checks passed
@pesap pesap deleted the kt/pwl_fix branch October 29, 2024 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment