Closed brtietz closed 7 months ago
For consistency, we should update the other occurrences of "if (dscr!=0)" :
That seems worth some discussion. If the debt fraction limits box is unchecked, I was under the impression we allowed negative DSCRs. Similarly, if a debt percent is specified, a negative DSCR is a valid outcome of this calculation. I'll add to the SAM team meeting agenda to discuss.
Also, (maybe a separate issue) we should update cmod_communitysolar to have the same max debt fraction checking and to have the dscr>0 check
I had filed https://github.com/NREL/SAM/issues/1708 for that, thanks for the reminder on community solar. I had that tagged for the fall release, but happy to discuss which portions are patchable versus requiring a release.
Decision at 2/27 SAM meeting:
Links to related issues now closed:
@cpaulgilman Thanks, I added debt percent < 0 check to the check functions from https://github.com/NREL/ssc/pull/903/files. This is ready for a second review.
Change != to > for debt fraction sizing code. Ensures that projects with negative EBITDA get zero debt, even in IRR target mode. Additionally, ensure minimum debt fraction is non-zero to ensure the relevant code always runs. If users want zero debt, they can specify it in debt percent mode.
My opinion is that if users want negative DSCR or other strange behavior, they can uncheck this box, but happy to discuss.
Test file available in the issue. Fixes: https://github.com/NREL/SAM/issues/1353