Inflation implementation in TEA object#245
Conversation
…ble_depreciation function The previous functions to build the inflation factors were deteletd. The inflation is now considered to go from the first year of the project (either construction or operation if no contruction is assumed) to the end year. This decision was made to scalate CAPEX following plant design and economics for chemical engineers book by Peters, Timmerhaus and West
… even solving nominal IRR
…biosteam into tea-inflation
…flation; minor stylistic chages
|
@IsaacLeis, this is a great contribution. I made a pull request with minor modifications to your branch. Once you accept those changes your side, I will merge this pull. |
|
@yoelcortes I have accepted and merged your modifications. Thank you very much for the review and for improving the implementation. I really appreciate it! |
There was a problem hiding this comment.
Thanks, @IsaacLeis!
I also just realized that that there is a small discrepancy with the year start date for inflation vs the discount rate. In the discount rate, the start year (i.e., year 0) is the last construction year. For a two year construction period, this would mean the first cashflow is year -1 and the discount factor is (1 + discount_rate)^-1. This is actually how NREL does their analyses. In the inflation rate, the first cashflow year is always 0.
To address this issue, I will add an optional parameter start_year to the TEA object that dictates year 0 for both inflation and discount factor calculations and harmonize assumptions. The default value will be the last year of construction (for backwards compatibility). Your test will not be impacted by the change since it has only one construction year.
EDIT: I added the new parameter in c19e226.
Thanks,
ed810f9
into
BioSTEAMDevelopmentGroup:master
This PR adds optional inflation handling to the TEA object. It allows selected cashflows to be escalated over time and enables inflation-aware cashflow-based metrics.
Considerations
The implementation follows these conventions:
IRRis provided as a real internal rate of return. Ifinflation_rateis provided, it is internally converted to a nominal discount rate for NPV calculations using:inflation_rateis an annual constant inflation rate applied to CAPEX, OPEX, sales, replacement costs and working capital.Inflation is applied considering the first construction year as the base-year.
Depreciation is calculated from the inflated CAPEX basis. This means depreciation is based on historical nominal capital expenditure and is not escalated year-by-year with inflation.
finance_interestis interpreted as a nominal financing interest rate when inflation is considered.When
inflation_rate, the original behavior is preserved: cashflows are treated as base-year values and discounted directly withIRR.Implementation details
A new optional argument was added to
TEA.__init__:When
inflation_rate = Nonewhich is the default option, all inflation factors are equal to 1.0. Therfore, original cashflow behavior is preserved. In constract, wheninflation_rateis provided/changed, or whenconstruction_scheduleor/anddurationare modified,inflation_factorsare recalculated and updated.The inflation factors are applied to the main cashflow components before calculating taxes, financing and NPV. Specifically, inflation is applied to:
Only a global inflation rate is currently considered. Future work could extend this implementation to support different inflation rates for individual cashflow categories, such as FOC, VOC, sales, equipment costs, replacement costs, and working capital. This was not implemented here because the current biorefinery models I use, consider a single global inflation rate. In addition, the reference used for this implementation, Plant Design and Economics for Chemical Engineers by Peters, Timmerhaus and West, recommended global inflation rates such as consumer price index.
Metrics based on cashflow analysis are calculated using nominal values when inflation is active. Other metrics, such as
production_costs,net_earningsandinstalled_equipment_cost, are kept as base-year values. This is intentional because accounting for the time value of money is only meaningful when a time-dependent cashflow analysis is being performed.Tests
Backward compatibility is checked through the existing
test_tea, which does not include inflation because the default value ofinflation_rateisNone.A new test,
test_tea_with_inflation, was added to verify the inflation implementation using the same model structure astest_tea. This test checks that:IRRandinflation_rate.get_cashflow_table()and NPV remain consistent.solve_price()works with inflation and returns a price that results in approximately zero NPV.