[Bug]: Incorrect DiscountRateIdv
and DiscountRate
assignments in CapitalIvestment
calcualtion
#228
Labels
bug
Something isn't working
The Issue
In the results processing we correctly assign
DiscountRateIdv
the value ofDiscountRate
if noDiscountRateIdv
is given; see below.otoole/src/otoole/results/result_package.py
Lines 295 to 342 in efe0e17
However, as flagged by @robertodawid in this comment, if a
DiscountRateIdv
is given, theDiscountRate
value passed into both the capital recovery factor and PV Annuity calculation will be theDiscountRateIdv
value. This is incorrect. CRF should use theDiscountRateIdv
but the PV Annuity should still use theDiscountRate
value.Expected Behavior
No response
Steps To Reproduce
No response
Log output
No response
Operating System
Linux
What version of otoole are you running?
1.1.2
Possible Solution
Add in a variable called
discount_rate_idv
, which is what the conditional assigns. Pass this in the CRF calculation, and just thediscount_rate
into the PVA calculation.Not sure if this will cause issues with the change in index levels, but we have a comment here that seems to address this already.
Anything else?
No response
The text was updated successfully, but these errors were encountered: