Repository navigation
Remove supply curve cost clipping - #248
Merged
Merged
Conversation
bsergi
marked this pull request as ready for review
October 6, 2026 20:10
patrickbrown4
self-requested a review
October 6, 2026 23:41
Collaborator
|
After our discussion earlier today, I've reviewed this PR's changes to 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
approved these changes
Oct 7, 2026
Comment on lines
+15
to
+18
| try: | ||
| neg_vals = sum(df[cc] < 0) | ||
| except: | ||
| breakpoint() |
Contributor
There was a problem hiding this comment.
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) |
Contributor
Author
There was a problem hiding this comment.
Thanks for catching--that was the plan but I was debugging a column name that broke here and forget to revert.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove clipping of
supply_curve_cost_per_mwvalues.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_mwafter removing the clipping. A few regions with costs above 1e7 now also show increased costs.Additional changes
Updated
write_site_parameters.pyto work with new reV columns and added checks for negative cost parameters for those that shouldn't be negativeKnown incompatibilities
write_site_parameters.pybreaks on a unrelated issue (seems thetransmission_distance_cost_500kVdc_ba.csvfile 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:
Checklist for author
Details to double-check
d_objective.gms, they are included inobjective_function_params.yamlfor completeness checkinghourlize/resource.pywas rerun to regenerate the existing/prescribed VRE capacity dataGeneral information to guide review
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