Skip to content

Conversation

@sambuddhac
Copy link
Collaborator

Description

This PR attempts to create capability for separately tracking ITC and PTC tax credits

What type of PR is this? (check all applicable)

  • Feature
  • Bug Fix
  • Documentation Update
  • Code Refactor
  • Performance Improvements

Related Tickets & Documents

Addresses issue #874

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and .md files under /docs/src have been updated if necessary.
  • The latest changes on the target branch have been incorporated, so that any conflicts are taken care of before merging. This can be accomplished either by merging in the target branch (e.g. 'git merge develop') or by rebasing on top of the target branch (e.g. 'git rebase develop'). Please do not hesitate to reach out to the GenX development team if you need help with this.
  • Code has been tested to ensure all functionality works as intended.
  • CHANGELOG.md has been updated (if this is a 'notable' change).
  • I consent to the release of this PR's code under the GNU General Public license.

How this can be tested

Post-approval checklist for GenX core developers

After the PR is approved

  • Check that the latest changes on the target branch are incorporated, either via merge or rebase
  • Remember to squash and merge if incorporating into develop

lbonaldo and others added 3 commits February 4, 2025 23:13
Merge commit for Patch Release v0.4.4
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>
Copy link

Copilot AI left a 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$
Copy link

Copilot AI Oct 30, 2025

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 $M/GWh units (requiring 10^3), and vP has GW units (requiring 10^3), giving a total scaling of 10^9 = ModelScalingFactor^3, not ModelScalingFactor^2. This should be ModelScalingFactor^3 to correctly convert from Million US$ to US$.

Suggested change
dfNetRevenue.Production_Tax_Credit *= ModelScalingFactor^2 # converting Million US$ to US$
dfNetRevenue.Production_Tax_Credit *= ModelScalingFactor^3 # converting Million US$ to US$

Copilot uses AI. Check for mistakes.
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.

5 participants