Skip to content
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

Update debt fraction limits code to only lend when projects have a possitive ebitda. #1136

Merged
merged 3 commits into from Mar 1, 2024

Conversation

brtietz
Copy link
Collaborator

@brtietz brtietz commented Feb 23, 2024

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: NREL/SAM#1353

…sitive ebitda. If users want a negative DSCR, they can uncheck this box
Copy link
Collaborator

@sjanzou sjanzou left a comment

Choose a reason for hiding this comment

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

For consistency, we should update the other occurrences of "if (dscr!=0)" :
image

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
image

@brtietz
Copy link
Collaborator Author

brtietz commented Feb 26, 2024

For consistency, we should update the other occurrences of "if (dscr!=0)" : image

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 image

I had filed NREL/SAM#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.

@brtietz brtietz self-assigned this Feb 27, 2024
@brtietz
Copy link
Collaborator Author

brtietz commented Feb 27, 2024

Decision at 2/27 SAM meeting:

  • Negative minimum DSCRs should be allowed for the debt % option
  • If the maximum debt fraction box is unchecked, give a warning to the user if the debt percent goes negative.
  • Create an issue (or see if another issue exists) to revisit the negative debt percent behavior.

@cpaulgilman
Copy link
Collaborator

@brtietz brtietz requested a review from sjanzou February 29, 2024 21:30
@brtietz
Copy link
Collaborator Author

brtietz commented Feb 29, 2024

@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.

@brtietz brtietz merged commit 3db7604 into patch Mar 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maximum debt fraction box is buggy with IRR target mode
3 participants