Total Complexity | 2 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # %%[func_lcoh_start] |
||
2 | def LCOH(invest_cost, operation_cost, heat_produced, revenue=0, i=0.05, n=20): |
||
3 | pvf = ((1 + i) ** n - 1) / ((1 + i) ** n * i) |
||
4 | |||
5 | return (invest_cost + pvf * (operation_cost - revenue)) / ( |
||
6 | pvf * heat_produced |
||
7 | ) |
||
8 | |||
9 | |||
10 | # %%[func_lcoh_end] |
||
11 | |||
12 | |||
13 | # %%[func_epc_start] |
||
14 | def epc(invest_cost, i=0.05, n=20): |
||
15 | af = (i * (1 + i) ** n) / ((1 + i) ** n - 1) |
||
16 | |||
17 | return invest_cost * af |
||
18 | |||
21 |