Skip to content

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

Merged
brtietz merged 3 commits into
patchfrom
SAM_1353
Mar 1, 2024
Merged

Update debt fraction limits code to only lend when projects have a possitive ebitda.#1136
brtietz merged 3 commits into
patchfrom
SAM_1353

Conversation

@brtietz

@brtietz brtietz commented Feb 23, 2024

Copy link
Copy Markdown
Collaborator

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

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

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

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

brtietz commented Feb 26, 2024

Copy link
Copy Markdown
Collaborator Author

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 NatLabRockies/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

brtietz commented Feb 27, 2024

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
Collaborator

@brtietz brtietz requested a review from sjanzou February 29, 2024 21:30
@brtietz

brtietz commented Feb 29, 2024

Copy link
Copy Markdown
Collaborator Author

@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
@brtietz brtietz deleted the SAM_1353 branch December 13, 2024 19:21
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