idaholab / TEAL

TEAL is a financial performance calculator plugin for the RAVEN code, framework, resolving around the computation of Net Present Value and associated financial metrics.
Apache License 2.0
9 stars 21 forks source link

[DEFECT] Amortization Cashflows Not Included in NPV Search #73

Closed GabrielSoto-INL closed 1 year ago

GabrielSoto-INL commented 1 year ago

Defect Description

This is for a very specific configuration: If conducting an NPV search where the mult_target is a one-time cashflow (e.g., CAPEX) and it includes depreciation, the two depreciation cashflows that are generated should be included as multiplier targets but are currently not. This is needs to happen because the two depreciation cashflows are dependent on the original mult_target cashflow as a driver.

What did you see instead?

When stepping through the npvSearch method in TEAL/src/main.py via debugger, only the one-time cashflow is included in the multiplied terms when selected as a mult_target. (This was done through a HERON inner.xml script).

Do you have a suggested fix for the development team?

When calling _createDepreciation the two cashflows should have a mult_target entry in the initParams that match the original cashflow's mult_target value.

Describe how to Reproduce Steps to reproduce the behavior:

Screenshots and Input Files Please attach the input file(s) that generate this error. The simpler the input, the faster we can find the issue.

Platform (please complete the following information):


For Change Control Board: Issue Review

This review should occur before any development is performed as a response to this issue.


For Change Control Board: Issue Closure

This review should occur when the issue is imminently going to be closed.

PaulTalbot-INL commented 1 year ago

Do you have access to posting on the discussion board about this change? While it is a niche case, it may have led to some errors in previous NPV search calculations.

Approved to close via #74.