Skip to content

Support ITC as array in Send-to-Excel with Equations#1343

Merged
sjanzou merged 4 commits into
patchfrom
itc-fixes
Feb 7, 2023
Merged

Support ITC as array in Send-to-Excel with Equations#1343
sjanzou merged 4 commits into
patchfrom
itc-fixes

Conversation

@cpaulgilman

Copy link
Copy Markdown
Collaborator

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #1259

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This change modifies variables in existing compute modules. Please see Checking for PySAM Incompatible API Changes.

Checklist:

If you have added a new compute module in a SSC pull request related to this one, be sure to check the Process Requirements.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

General

  • Save all spreadsheets with cell A1 selected on all sheets, and make sure they open with Inputs sheet selected.

Cashflow Script

Modifications are in set_incentives() function of cashflows.lk script.

Convert single value arrays to array over analysis period

  • Write val_sched() function to properly handle ITC arrays with single or multiple values for sending to Excel.

Show ITC as percent and fixed amounts along iwth totals

  1. Modify cf_incentives() function.
  • Single Owner
  • Sale Leaseback
  • Partnership Flip
  • Merchant Plant
  • Host Developer
  • Community Solar
  • Residential / Commercial

Remove message and automatic summing of ITC when all fins are done

Use temporary is_sum_itc so things will work with all financial models while this is in progress.

  1. When spreadsheets are updated for all financial models, remove message at top of set_incentives() function. Until then, check for financial model to display message.
  • Single Owner
  • Sale Leaseback
  • Partnership Flip
  • Merchant Plant
  • Host Developer
  • Community Solar
  • Residential / Commercial

Reinstate Depreciation and ITC basis calculation table

  1. Remove commented out call to depreciation_tables().
  • Single Owner
  • Sale Leaseback
  • Partnership Flip
  • Merchant Plant
  • Host Developer
  • Community Solar

Not applicable for Residential / Commercial.

Inputs Sheet

Convert to annual values

  1. Add 7 rows to annual values section, and name Year 1 cells as appropriate:
Row Label Variable
Federal ITC as fixed amount itc_fed_amount
State ITC as fixed amount itc_sta_amount
Federal ITC as percentage (%) itc_fed_percent
Federal ITC as percentage maximum amount itc_fed_percent_maxvalue
State ITC as percentage (%) itc_sta_percent
State ITC as percentage maximum amount itc_sta_percent_maxvalue
  1. Set cell type for percentage maximum amount rows to "Scientific"
  • Single Owner
  • Sale Leaseback
  • Partnership Flip
  • Merchant Plant
  • Host Developer
  • Community Solar
  • Residential / Commercial

Calculate totals for depreciation reduction calculations

  1. In "Tax Credits" section, set amount, percentage, and maximum to sums of annual values.

  2. Add note:

For ITC allocated to multiple years, see "ANNUAL VALUES" below: Values here are shown as sums of annual values for reference.

  • Single Owner
  • Sale Leaseback
  • Partnership Flip
  • Merchant Plant
  • Host Developer
  • Community Solar
  • Residential / Commercial

Cash Flow Sheet for Residential / Commercial

  1. Add new ITC section

  2. ITC calculations as for FOM models, plus move ITC basis calculation into ITC section.

  3. Modify depreciation basis to use ITC basis from ITC section.

  4. Change "Federal ITC amount" and "State ITC amount" labels to "Federal ITC" and "State ITC", and set cells to refer to values above.

  5. Extend State and Federal tax liability formula from Year 1 to all years.

Cash Flow Sheet for FOM models

ITC Calculation under Incentive Amounts

Do ITC calcs in "Incentive Amounts" section above PTC, IBI, and PBI calcs now that they are more complicated.

  1. In "Incentive Amounts" section, add 14 rows: ITC as fixed amount, ITC percentage, and ITC percentage maximum with values copied from Inputs sheet Annual Values section, plus rows for State and Federal ITC totals.

  2. Calculate ITC percentage amount based on ITC percentage and ITC Qualifying Costs in Depreciation Basis table.

  3. Format percentage maximum as scientific to accommodate default value of 1e38.

  4. Calculate totals for federal and state ITC.

Note that State ITC does not appear to reduce state income tax, consistent with source code and DHF workbook.

  • Single Owner
  • Sale Leaseback
  • Partnership Flip
  • Merchant Plant
  • Host Developer
  • Community Solar

Project Returns

  1. Set Federal and State ITC rows equal to ITC calculation rows under "Incentive Amounts" and extend to all years.

  2. Extend total to all years.

  3. Check that State ITC under "Federal Income Taxes" refers to row above in project returns section.

  • Single Owner
  • Sale Leaseback
  • Partnership Flip
  • Merchant Plant
  • Host Developer
  • Community Solar

Federal and State Depreciation and ITC Tables

  1. Change section label to "Depreciation and ITC Basis Calculations"

  2. Change "Amount" column label to "ITC Amount" under "ITC as Fixed Amount" for both state and federal tables.

  3. In State and Federal tables, for ITC as % and ITC as Fixed, change ITC Amount total to sums of annual amounts from ITC calculation section under "Incentive Amounts". There should be no references to named ranges in depreciation table.

  • Single Owner
  • Sale Leaseback
  • Partnership Flip
  • Merchant Plant
  • Host Developer
  • Community Solar

Documentation checks/revisions

  • ITC basis depends on depreciation allocations. See "ITC Qualifying Costs" in Deprecation and ITC table on Cash Flow sheet.

  • On Incentives page, if you specify a single value for the ITC amount as amount or percentage, that value applies to year 1. If you specify a maximum as a single value and the amount for multiple years, the maximum applies to all years.

@cpaulgilman cpaulgilman added this to the 2022.11.21 Patch 1 milestone Feb 3, 2023
@cpaulgilman cpaulgilman self-assigned this Feb 3, 2023

@sjanzou sjanzou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The State depreciation table value for the "ITC as Fixed Amount" is showing the percentage calculation in the Sale Leaseback spreadsheet with equations instead of the fixed amount:
image

Case and Spreadsheet and details in Word document in zip file
SAM_1343.zip

@cpaulgilman

Copy link
Copy Markdown
Collaborator Author

@sjanzou Good find! I fixed the spreadsheet calculation for the state ITC as fixed amount for sale leaseback, and checked the calculation for the other financial models.

@sjanzou sjanzou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good and matches with SAM.

@sjanzou sjanzou merged commit df26527 into patch Feb 7, 2023
@cpaulgilman cpaulgilman added the added to release notes PR and/or issue has been added to release notes for a public release label Feb 21, 2023
@cpaulgilman cpaulgilman deleted the itc-fixes branch October 3, 2023 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added to release notes PR and/or issue has been added to release notes for a public release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Cash Flow Send-to-Excel for ITC as array

2 participants