-
Notifications
You must be signed in to change notification settings - Fork 142
Claude/track tax credits separately #876
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
base: develop
Are you sure you want to change the base?
Claude/track tax credits separately #876
Conversation
Merge commit for Patch Release v0.4.4
Patch Release v0.4.5
This commit adds functionality to separately track investment tax credits (ITC) and production tax credits (PTC) in GenX, making them visible and reportable rather than embedded in cost parameters. Changes: 1. Added new input parameters: - Investment_Tax_Credit_fraction: ITC as a fraction (e.g., 0.30 for 30%) - Production_Tax_Credit_per_MWh: PTC in $/MWh 2. Model updates: - Added accessor functions in resources.jl - Modified investment_discharge.jl to track ITC separately in objective - Modified discharge.jl to track PTC separately in objective - Updated scaling logic in load_resources_data.jl 3. Output updates: - Enhanced write_net_revenue.jl to report tax credit values - Tax credits now appear as separate line items in NetRevenue.csv 4. Example data: - Updated 1_three_zones example with realistic tax credit values - Solar PV: 30% ITC - Onshore wind: $26/MWh PTC Tax credits are implemented as benefits that reduce costs in the objective function, making it easy to track their total value and impact on investment decisions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for investment tax credits (ITC) and production tax credits (PTC) to the GenX energy system model. These tax incentives reduce the effective costs of renewable and other qualifying generation technologies.
- Added ITC and PTC as new resource attributes that can be specified in input data files
- Integrated tax credits into the optimization model's objective function to correctly account for cost reductions
- Updated net revenue calculations to reflect tax credit benefits
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/model/resources/resources.jl | Adds accessor functions for ITC fraction and PTC per MWh attributes |
| src/model/core/discharge/investment_discharge.jl | Calculates ITC benefits for new capacity investments and subtracts from objective function |
| src/model/core/discharge/discharge.jl | Calculates PTC benefits based on generation and subtracts from objective function |
| src/load_inputs/load_resources_data.jl | Adds PTC to the list of cost parameters that need scaling |
| src/write_outputs/write_net_revenue.jl | Outputs ITC and PTC values and adjusts total cost calculation |
| example_systems/1_three_zones/resources/Vre.csv | Adds ITC and PTC columns with example values for VRE resources |
| example_systems/1_three_zones/resources/Thermal.csv | Adds ITC and PTC columns (zero values) for thermal resources |
| example_systems/1_three_zones/resources/Storage.csv | Adds ITC and PTC columns (zero values) for storage resources |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Add production tax credit to the dataframe | ||
| dfNetRevenue.Production_Tax_Credit = vec(sum(value.(EP[:eProductionTaxCredit]).data, dims = 2)) | ||
| if setup["ParameterScale"] == 1 | ||
| dfNetRevenue.Production_Tax_Credit *= ModelScalingFactor^2 # converting Million US$ to US$ |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent scaling factor for PTC. The ITC at line 92 uses ModelScalingFactor (10^3) because it's calculated from cost per MW/MWh multiplied by capacity (MW/MWh units), resulting in $ units that scale by 10^3. However, PTC is calculated from omega[t] * production_tax_credit_per_mwh * vP[y,t] where omega has GWh units when scaled (requiring 10^3), production_tax_credit_per_mwh has
| dfNetRevenue.Production_Tax_Credit *= ModelScalingFactor^2 # converting Million US$ to US$ | |
| dfNetRevenue.Production_Tax_Credit *= ModelScalingFactor^3 # converting Million US$ to US$ |
Description
This PR attempts to create capability for separately tracking ITC and PTC tax credits
What type of PR is this? (check all applicable)
Related Tickets & Documents
Addresses issue #874
Checklist
How this can be tested
Post-approval checklist for GenX core developers
After the PR is approved