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

New Feature: Ability to keep certain CashFlows out of the NPV calculation #349

Merged
merged 5 commits into from
Mar 28, 2024

Conversation

dylanjm
Copy link
Collaborator

@dylanjm dylanjm commented Mar 26, 2024


Pull Request Description

What issue does this change request address?

Closes #339

What are the significant changes in functionality due to this change request?

This new feature allows users to specify npv_exempt=True in CashFlow definitions to allow the CashFlow to be used in the dispatch optimization, but will not use the cash flow in the NPV calculation. This is considered an advanced user feature and should be used with caution.

Also, I have removed all mention of mult_target in HERON's input files. It is a deprecated feature and since most people start new HERON analyses using pre-built input files, this should reduce the amount of people including it in their input files, making it easier to eventually remove all together.


For Change Control Board: Change Request Review

The following review must be completed by an authorized member of the Change Control Board.

  • 1. Review all computer code.
  • 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
  • 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
  • 4. Automated Tests should pass.
  • 5. If significant functionality is added, there must be tests added to check this. Tests should cover all possible options. Multiple short tests are preferred over one large tes.
  • 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change. The requirements and the requirements test shall be in sync.
  • 7. The merge request must reference an issue. If the issue is closed, the issue close checklist shall be done.
  • 8. If an analytic test is changed/added, the the analytic documentation must be updated/added.
  • 9. If any test used as a basis for documentation examples have been changed, the associated documentation must be reviewed and assured the text matches the example.

@dylanjm dylanjm requested a review from PaulTalbot-INL March 26, 2024 20:41
Copy link
Collaborator

@PaulTalbot-INL PaulTalbot-INL left a comment

Choose a reason for hiding this comment

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

Just one comment to consider.

<author>dylanjm</author>
<created>2024-03-26</created>
<description>
Tests NPV exempt Cashflows
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add some commentary here on what the NPV would be if the exempt wasn't working, and what it is with it working? This will help regolds in the future.

@PaulTalbot-INL
Copy link
Collaborator

Do the exempt cashflows still show up in the debug run cashflow breakdowns? I assume not, right?

@dylanjm
Copy link
Collaborator Author

dylanjm commented Mar 27, 2024

Do the exempt cashflows still show up in the debug run cashflow breakdowns? I assume not, right?

@PaulTalbot-INL just tested it out and am getting an error when trying to generate the cashflow plot. Will take a look at it.

@dylanjm
Copy link
Collaborator Author

dylanjm commented Mar 27, 2024

@PaulTalbot-INL figured out the error caused in debug mode by this new feature. I went ahead and added some checks in template_driver.py to avoid adding npv-exempt cashflows to the variable groups in the outer and inner XMLs.

@PaulTalbot-INL
Copy link
Collaborator

Changes are good, clear to merge once tests pass.

@PaulTalbot-INL PaulTalbot-INL merged commit 07556f6 into idaholab:devel Mar 28, 2024
4 checks passed
@dylanjm dylanjm deleted the npv-exempt branch March 29, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Allow certain cash flows to be used in dispatch but excluded from NPV calculation
2 participants