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

feature: Option to Convert Quadratic Value Curves to PWL for Plexos Parser. Fix Reserve Units. #45

Merged
merged 29 commits into from
Sep 27, 2024

Conversation

ktehranchi
Copy link
Collaborator

@ktehranchi ktehranchi commented Sep 19, 2024

In cases where quadratic value curves have time-varying fuel costs associated with them, PSI wont be able to model Market Bid Cost with time-varying quadratic value curves. Here I implement the feature to convert quadratic value curves to PWL.

Usage: feature_flag quad2pwl = number of tranches to fit

Other Changes:

  • Updated exporter to export the value curves using the same logic used to export the PiecewiseStepData
  • Updated construct_reserves() to match other device construction fields... fixes potential error in old implementation which used pivot instead of parse_property_data() function
  • Changes Generator rating to be the max of the max_active_power rating since many generators in plexos allow >1 p.u. output.

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 22.07792% with 60 lines in your changes missing coverage. Please review.

Project coverage is 60.86%. Comparing base (d1a61f0) to head (ff1c145).

Files with missing lines Patch % Lines
src/r2x/parser/plexos.py 2.08% 47 Missing ⚠️
src/r2x/parser/parser_helpers.py 31.25% 11 Missing ⚠️
src/r2x/api.py 75.00% 1 Missing ⚠️
src/r2x/exporter/sienna.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #45      +/-   ##
==========================================
- Coverage   61.41%   60.86%   -0.56%     
==========================================
  Files          29       29              
  Lines        2978     3020      +42     
==========================================
+ Hits         1829     1838       +9     
- Misses       1149     1182      +33     

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

@ktehranchi ktehranchi requested a review from pesap September 19, 2024 19:02
@ktehranchi ktehranchi changed the title feature: Option to Convert Quadratic Value Curves to PWL for Plexos Parser feature: Option to Convert Quadratic Value Curves to PWL for Plexos Parser. Fix Reserve Units. Sep 20, 2024
ktehranchi and others added 26 commits September 25, 2024 17:00
There was an edge case where the date_from / date_to filter used a date
in the middle of a study year. I resolved this filtering by filtering
the property by the year listed in date_from date_to instead.

I also added a note and ticket for future work to ensure partial year
properties are added to `max_active_power`
- Cleans up code for field filtering, making more use of the helper
function field_filter.
- Adds new helper function for preparing ext data
- Fixes bug with timestamp sorting in one type of csv file
@ktehranchi ktehranchi merged commit 5b5c360 into main Sep 27, 2024
8 checks passed
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.

3 participants