Skip to content

Remove supply curve cost clipping - #248

Merged
bsergi merged 8 commits into
mainfrom
bs/clipfix
Oct 8, 2026
Merged

bsergi merged 8 commits into
mainfrom
bs/clipfix

Conversation

@bsergi

@bsergi bsergi commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Remove clipping of supply_curve_cost_per_mw values.

Technical details

For wind and solar, the supply curve costs represent site-specific cost adjustments to the ATB cost assumptions. Although most of these adjustments are positive (e.g., spur line, network reinforcement), a few, such as the cost of land, can be negative, indicating the cost of that site is lower than the assumption for that cost component included in the ATB.

The model currently sums all adjustments, aggregates to the class/bin/region, and then clips negative values to zero and large values above 1e7. This resulted in a few regions having negative cost adjustment clipped to zero, which overestimates the costs in those regions.

Here are the regions with changes to supply_curve_cost_per_mw after removing the clipping. A few regions with costs above 1e7 now also show increased costs.

*i r rscbin main_value new_value change
upv_1 NY_NYC bin5 $10,000,000 $10,249,958 $249,958
upv_2 NY_NYC bin2 $10,000,000 $10,212,167 $212,167
upv_4 CA_LA bin31 $10,000,000 $10,224,170 $224,170
upv_2 SC bin1 $0 -$23,740 -$23,740
upv_2 SC bin2 $0 -$13,342 -$13,342
upv_2 SC bin3 $0 -$8,231 -$8,231
upv_2 SC bin4 $0 -$1,143 -$1,143
upv_3 SC bin1 $0 -$32,741 -$32,741
upv_3 SC bin2 $0 -$18,660 -$18,660
upv_3 SC bin3 $0 -$9,049 -$9,049
upv_3 SC bin4 $0 -$2,032 -$2,032
upv_3 AR_MISO bin1 $0 -$6,012 -$6,012
upv_3 LA bin1 $0 -$5,503 -$5,503

Additional changes

Updated write_site_parameters.py to work with new reV columns and added checks for negative cost parameters for those that shouldn't be negative

Known incompatibilities

write_site_parameters.py breaks on a unrelated issue (seems the transmission_distance_cost_500kVdc_ba.csv file has moved)

Relevant sources or documentation

Validation, testing, and comparison report(s)

Compare report for US defaults: results-main,no_clip.pptx

Removing the clipping results in some additional solar/storage in early years but the amount is small:

image

Checklist for author

Details to double-check

  • Charge code provided to reviewers
  • Included comparison reports for appropriate test cases
  • Documentation updated if necessary
  • If input data added/modified:
    • Dollar year recorded and converted to 2004$ for GAMS
    • Timeseries are in Central Time
    • Units are specified
    • Preprocessing steps have been documented and committed to ReEDS_Input_Processing
    • New large data files handled with .h5 instead of .csv
    • If new parameters are added to d_objective.gms, they are included in objective_function_params.yaml for completeness checking
    • If spatially resolved inputs are modified, the following visualizations for each file are included in the PR description (time-averaged if the inputs are time-resolved):
      • Map of absolute values before
      • Map of absolute values after
      • Map of differences: (after - before) or (after / before)
    • If entries are added/removed/changed in the EIA-NEMS unit database:
      • Changes have been committed to ReEDS_Input_Processing
      • hourlize/resource.py was rerun to regenerate the existing/prescribed VRE capacity data
  • Code formatting standardized
  • Reusable functions used where possible instead of copy/pasted code

General information to guide review

  • Zero impact on results of default case
  • No large data file(s) added/modified
  • No substantive impact on runtime for full-US reference case
  • No substantive impact on folder size for full-US reference case
  • No change to process flow (runreeds.py, reeds/core/solve/solve.py)
  • No change to code organization
  • No change to package requirements (environment.yml or Project.toml)

Did you use LLM tools (chatbot or copilot) in the preparation of this PR? If so, describe how

I used copilot to pull out and summarize the supply curve bins that had costs changed after removing the clipping.

Tag points of contact here if you would like additional review of the relevant parts of the model

@bsergi
bsergi marked this pull request as ready for review October 6, 2026 20:10
@patrickbrown4
patrickbrown4 self-requested a review October 6, 2026 23:41
@jvcarag

jvcarag commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

After our discussion earlier today, I've reviewed this PR's changes to writesupplycurves.py and determined that they would not affect the new clipping procedures for PSH that would be introduced by PR #184, as PSH supply curves would use new clipping code separate from the lines of code this PR aims to remove.

Since I am still waiting on some final code review, I can wait to merge PR #184 until this PR is merged to avoid code conflict.

@patrickbrown4 patrickbrown4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

Comment thread hourlize/write_site_parameters.py Outdated
Comment on lines +15 to +18
try:
neg_vals = sum(df[cc] < 0)
except:
breakpoint()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For production I would just throw the error (otherwise on the hpc I think it will hang)

Suggested change
try:
neg_vals = sum(df[cc] < 0)
except:
breakpoint()
neg_vals = sum(df[cc] < 0)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching--that was the plan but I was debugging a column name that broke here and forget to revert.

Comment thread hourlize/write_site_parameters.py Outdated
@bsergi
bsergi merged commit 99af2c3 into main Oct 8, 2026
16 of 18 checks passed
@bsergi
bsergi deleted the bs/clipfix branch October 8, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants