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

fix: Adding support for quadratic functions using the table data parser #1178

Merged
merged 8 commits into from
Aug 28, 2024

Conversation

pesap
Copy link
Member

@pesap pesap commented Aug 26, 2024

Currently only works for heat rate and not cost curves.

Implementation details:

  • Added new fields for generators to capture quadratic heat rate curve. For simplicity, the names are heat_rate_a0, heat_rate_a1, heat_rate_a2. All of the new fields are null by default. Open to suggestions on the nameing,
  • If any heat_rate_a* column are defined, then we call create_poly_cost for ThermalGen,
  • create_poly_cost will return
    • QuadraticCostCurve if all the coefficients are passed
    • LinearCurve if a1 and a0 is passed,
    • LinearCurve if a1 is passed,.
    • raise an Error if a2 is passed but a1 or a0 is nothing,

Closes #1177

Currently only works for heat rate and not cost curves.

Issue #1177
@pesap pesap requested review from GabrielKS and rodrigomha August 26, 2024 23:23
Copy link

codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.55%. Comparing base (4b2c01b) to head (319f8a9).
Report is 2 commits behind head on main.

Files Patch % Lines
src/parsers/power_system_table_data.jl 95.23% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1178      +/-   ##
==========================================
+ Coverage   84.52%   84.55%   +0.02%     
==========================================
  Files         179      179              
  Lines        8169     8188      +19     
==========================================
+ Hits         6905     6923      +18     
- Misses       1264     1265       +1     
Flag Coverage Δ
unittests 84.55% <95.23%> (+0.02%) ⬆️

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

Files Coverage Δ
src/PowerSystems.jl 100.00% <ø> (ø)
src/parsers/power_system_table_data.jl 82.36% <95.23%> (+0.35%) ⬆️

Copy link
Contributor

@rodrigomha rodrigomha left a comment

Choose a reason for hiding this comment

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

Remove or update the warnings and update briefly the docs

@pesap
Copy link
Member Author

pesap commented Aug 26, 2024

Remove or update the warnings and update briefly the docs

This has been addressed.

src/descriptors/power_system_inputs.json Outdated Show resolved Hide resolved
src/parsers/power_system_table_data.jl Show resolved Hide resolved
src/parsers/power_system_table_data.jl Outdated Show resolved Hide resolved
src/parsers/power_system_table_data.jl Outdated Show resolved Hide resolved
Copy link
Collaborator

@GabrielKS GabrielKS left a comment

Choose a reason for hiding this comment

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

Looks good aside from the typo

test/test_power_system_table_data.jl Outdated Show resolved Hide resolved
Co-authored-by: Gabriel Konar-Steenberg <[email protected]>
@jd-lara jd-lara merged commit deb98f3 into main Aug 28, 2024
11 checks passed
@pesap pesap deleted the ps/quadratic_curves branch August 28, 2024 20:43
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.

Table data parser does not support Quadratic heat rates
4 participants