Economics Core¶
core
¶
nrgise.economics.core.calculate_fixed_maintenance_cost_for_one_year
¶
calculate_fixed_maintenance_cost_for_one_year(
initial_invest: float,
maintenance_cost_factor: float = DEFAULT_MAINTENANCE_COST_FACTOR,
) -> float
Calculates the fixed maintenance cost for one year. Note that the variable maintenance costs are omitted here. If a storage is being cycled more than once a day, variable maintenance costs should be additionally taken into account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_invest
|
float
|
How many € does the storage hardware cost initially. Note that this does not include EPC costs. |
required |
maintenance_cost_factor
|
float
|
Factor of the initial storage hardware invest which is considered yearly maintenance cost. |
DEFAULT_MAINTENANCE_COST_FACTOR
|
Returns: Maintenance cost for one year in €.
nrgise.economics.core.calculate_lcoe
¶
calculate_lcoe(
annual_energy_produced: ndarray,
discount_rate: float,
system_invest: float,
discounted_maintenance_costs: float,
discounted_replacement_costs: float,
discounted_residual_value: float,
) -> float
Calculates the levelized cost of electricity of a system. It is done using this formula: https://www.ise.fraunhofer.de/en/publications/studies/cost-of-electricity.html
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
annual_energy_produced
|
ndarray
|
Array containing sum of energy produced in kWh per year. |
required |
discount_rate
|
float
|
Yearly discount rate used. |
required |
system_invest
|
float
|
The invest for the whole system for which LCOE should be calculated. |
required |
discounted_maintenance_costs
|
float
|
Sum of discounted maintenance costs for the whole system over the investment horizon. |
required |
discounted_replacement_costs
|
float
|
Sum of discounted replacement costs for the whole system over the investment horizon. |
required |
discounted_residual_value
|
float
|
Discounted residual value of the whole system at the end of the investment horizon. |
required |
Returns: LCOE in €
nrgise.economics.core.calculate_lcos
¶
calculate_lcos(
annual_energy_discharged: ndarray,
annual_charging_cost: ndarray,
discount_rate: float,
storage_invest: float,
discounted_maintenance_costs: float,
discounted_replacement_costs: float,
discounted_residual_value: float,
) -> float
Calculates the levelized cost of storage. It is done using this formula: https://www.sciencedirect.com/science/article/pii/S254243511830583X#bib20
It can be interpreted like: How much does discharging of one kWh cost in the storage setup at hand.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
annual_energy_discharged
|
ndarray
|
Array containing sum of energy discharged in kWh per year. |
required |
annual_charging_cost
|
ndarray
|
Array containing cost to charge the storage per year. |
required |
discount_rate
|
float
|
Yearly discount rate used. |
required |
storage_invest
|
float
|
The invest for the whole system for which LCOE should be calculated. |
required |
discounted_maintenance_costs
|
float
|
Sum of discounted maintenance costs for the whole system over the investment horizon. |
required |
discounted_replacement_costs
|
float
|
Sum of discounted replacement costs for the whole system over the investment horizon. |
required |
discounted_residual_value
|
float
|
Discounted residual value of the whole system at the end of the investment horizon. |
required |
Returns: LCOS in €
nrgise.economics.core.calculate_maintenance_costs
¶
calculate_maintenance_costs(
initial_invest: float,
maintenance_cost_factor: float = DEFAULT_MAINTENANCE_COST_FACTOR,
investment_horizon_years: int = DEFAULT_INVESTMENT_HORIZON,
) -> np.ndarray
Calculates maintenance costs for each year in the investment horizon. See
calculate_fixed_maintenance_cost_for_one_year()
for a description of the parameters.
Returns:
| Type | Description |
|---|---|
ndarray
|
Maintenance cost in € for each year in the investment horizon. |
nrgise.economics.core.calculate_npv
¶
calculate_npv(
initial_invest: float,
discounted_cash_flow_per_year: ndarray,
discounted_maintenance_cost_per_year: ndarray,
discounted_replacement_cost_per_year: ndarray,
discounted_residual_value: float = 0,
) -> float
Calculate the net present value (NPV) of an investment.
NPV is computed as discounted cash inflows minus discounted costs, including the initial investment, maintenance, and replacement costs, plus any discounted residual value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_invest
|
float
|
Initial investment cost. |
required |
discounted_cash_flow_per_year
|
ndarray
|
Discounted yearly cash inflows. |
required |
discounted_maintenance_cost_per_year
|
ndarray
|
Discounted yearly maintenance costs. |
required |
discounted_replacement_cost_per_year
|
ndarray
|
Discounted yearly replacement costs. |
required |
discounted_residual_value
|
float
|
Discounted residual value at the end of the investment horizon. |
0
|
Returns:
| Type | Description |
|---|---|
float
|
Net present value of the investment. |
nrgise.economics.core.calculate_static_amortisation
¶
calculate_static_amortisation(
initial_invest: float, annual_income: float
) -> float
This calculation is static meaning that it calculates the amortisation time without considering a discount rate. The annual_income needs to be positive to give meaningful values.
nrgise.economics.core.calculate_storage_discounted_residual_value
¶
calculate_storage_discounted_residual_value(
initial_storage_hardware_invest: float,
soh_end_of_investment_horizon: float,
investment_horizon: float,
discount_rate: float = DEFAULT_DISCOUNT_RATE,
) -> float
Calculates the monetary value of the storage after the end of the simulation. Or in other words: How much € is the storage worth after the end of the calculation period?
Note that the estimation of the residual value of a storage is very uncertain. This calculation can be considered optimistic as it "just" reduces the value of the storage based on the soh and the discounting of money. Another common approach is to just assume a residual storage value of 0.
nrgise.economics.core.calculate_storage_replacement_costs_calendric_only
¶
calculate_storage_replacement_costs_calendric_only(
initial_storage_hardware_invest: float,
storage_lifetime_in_years: float,
replacement_cost_factor: float = DEFAULT_STORAGE_REPLACEMENT_COST_FACTOR,
investment_horizon: int = DEFAULT_INVESTMENT_HORIZON,
) -> np.ndarray
Estimate storage replacement costs assuming calendar aging only.
Replacements are scheduled solely based on the storage lifetime in years and do not account for cycling dependent degradation. For more realistic aging behavior, use an aging model and simulate over multiple years.
This function is useful when the simulation covers only a single year but storage replacement costs should still be approximated over the investment horizon.
Returns:
| Type | Description |
|---|---|
ndarray
|
Replacement costs in € for each year in the investment horizon. Replacement is taking place where cost != 0€. |
nrgise.economics.core.discount_yearly
¶
discount_yearly(
yearly_values_to_discount: Iterable[float],
discount_rate: float = DEFAULT_DISCOUNT_RATE,
) -> np.ndarray
Discount yearly values to their present value.
Each value is discounted as if it occurs at the end of the corresponding year, starting with year 1.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
yearly_values_to_discount
|
Iterable[float]
|
Sequence of yearly values to discount. |
required |
discount_rate
|
float
|
Annual discount rate. |
DEFAULT_DISCOUNT_RATE
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Array of discounted yearly values. |