Fix Cash Flow Send to Excel with Equations#1044
Conversation
Remove debt size limit option inputs in UI except for single owner
brtietz
left a comment
There was a problem hiding this comment.
Great work completing a massive undertaking. I left a few comments on the code. I had issues with Excel export for CashLoan:
@sjanzou and @mjprilliman I focused on testing detailed pv, detailed pv-battery, and PVWatts. If you can test other technologies that would be really helpful.
* Remove redundant check for Host Developer to display cf_utility_bill * Fix missing parentheses from is_fom_fin(). * Fix logic in set_annual_values to not export cf_ppa_price for BTM models.
|
@brtietz Thanks Brian! I fixed the issues you found. |
sjanzou
left a comment
There was a problem hiding this comment.
Great work!
A few details
- Should we put the DSCR limit in the other debt models? e.g. LPF
- should the results be DSCR (Excel) or minimum DSCR (SAM)?
- Should the results table in SAM for the Merchant Plant include the (minimum) DSCR?
- (Change requested) Some of the host developer values are not very close:
Fix Host Developer ppa_revenue, ppa_price Change label in Excel to "Minimum debt service coverage ratio" (add "Minimum"). Fix Excel working capital reserve funding and check all other workbooks.
|
Thanks @sjanzou.
Not yet. We added this to Single Owner in SAM 2021.12.02 for a special request. I would like to see if we get any feedback on it before making it available to the other models because for projects with high revenue to cost ratio, users may think the debt size is based on CAFDS when it really isn't. I did add the calculation to the spreadsheets for all models, so if we do decide to add it, it should only require a change to SSC and the SAM UI.
I made label change to the spreadsheets -- they should all now be "Minimum debt service coverage ratio" to be consistent with "Minimum DSCR" in SAM metrics table.
The metrics table shows either debt fraction or minimum DSCR conditionally based on the input mode for all PPA models with debt and Merchant Plant. I think that behavior is fine. If we want to change it, I would do it as a separate issue.
Oops! Thanks. I fixed |
|
@mjprilliman It looks like "Developer operating cash post recovery" is missing from the Excel workbook, and might be causing that discrepancy. I also see LCOS-related outputs aren't being exported correctly from SAM. I'll address those issues. |
Fix partnership flip tax investor operating cash distributions double-counting pre/post flip. Fix LCOS send annual values for all FOM configs with battery.
|
@mjprilliman I fixed the partnership flip issue: There was a long standing mistake in the partner returns equations in Excel. Spreadsheet results for both partnership flip with and without debt should be much closer to SAM now. I also fixed LCOS export to Excel so you should see LCOS calculations on cash flow tab in Excel for all FOM configurations with battery. |
sjanzou
left a comment
There was a problem hiding this comment.
Looks good with a few notes:
- Fuel cell SO - IRR in Excel does not match - that is the IRR function in Excel
- ETES Single Owner - the NPV between SAM and Excel differs by a factor of 3
- Confirming that there is no LCOS for the ETES/SO configuration:
- Standalone battery merchant plant - do we want to do anything about the debt percentage? (Note, they match between Excel and SAM so maybe another issue?)
|
Thanks @sjanzou for the additional review.
Oops, this is an issue with the SO spreadsheet for all technologies. I fixed that error in the IRR formula: It needs to be updated by hand anytime a row is added or removed above the IRR calculation rows on the cash flow sheet.
This is because of the DSCR input option with the maximum debt fraction. The input in SAM is set to 60%, but SAM calculates the debt size for an equivalent debt fraction of 59.08%. The spreadsheet DSCR calculation uses 60%. If you set the maximum debt fraction input in Excel to SAM's output value of 59.08, then the NPV in SAM and Excel is much closer. NPV is very sensitive to debt size in this case.
The LCOS is not implemented in SSC for ETES, so it doesn't get exported to Excel. The spreadsheets are ready for that implementation: When we update the ETES model in SSC to generate the LCOS cash flow outputs
This is because of the Standalone Battery / Merchant Plant default configuration. It has no revenue, so the debt sizing calculations break down and none of the metrics make sense. This should be addressed as part of a review of defaults before we release Patch 2. |










Goes with NatLabRockies/ssc#818
Fixes #952
Applies fixes completed for Single Owner in PR #936 to other FOM financial models.
Abbreviations:
UI changes
Hide DSCR debt with size limit for all financial models except SO.
Show PBI available for debt service option on Financial Cash Incentives form for CS, MP, TPO. (Was only available for SO and LPF.)
New FOM Fixes for This PR
SLB: Add salvage value to investor federal tax basis calculation.
LPF: Remove receivables reserve from debt calculation to match SSC.
TPO: Receivables reserve funding fix for final year
MP: Rename named rages for revenue source to SSC variable names
Notes:
Sculpted debt with size limit is only available for single owner now, but all spreadsheets support it in case we enable it for other financial models in the future.
Capacity and curtailment payment only available for SO, CS now, but all spreadsheets support it for future. Revenue for MP is unique.
Spreadsheet calculation for sculpted debt with size limit is different from SAM: Spreadsheet hits debt fraction limit exactly, SAM approximates it.
TPO does not include debt metrics in metrics table, so skipping those.
CS only available with PVWatts, but doing fuel cell and battery energy outputs here in preparation for enabling CS for other techs in the future.
Replace Excel range names with SSC variable names
These range names were useful when we did more calculations of annual values in Excel. Now that we are exporting the annual results from SAM, there is no need for the Excel named range to be different than the SSC variable name for these variables:
Also, for Residential/Commercial, change annual energy and savings range names to SSC variable names.
FOM Fixes From PR #936
Transfer initial fixes in SO to other financial models.