Skip to content

Commit

Permalink
Merge branch 'develop' into updatefloris-hopp
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjasa authored Oct 16, 2024
2 parents b4dd5e7 + 45a1fb9 commit bca13e2
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions hopp/simulation/technologies/financial/custom_financial_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class Outputs(FinancialData):
om_capacity_expense: float=None
om_fixed_expense: float=None
om_variable_expense: float=None
om_total_expense: float=None
om_total_expense: Sequence=None
levelized_cost_of_energy_real: float=None
levelized_cost_of_energy_nominal: float=None
total_revenue: float=None
Expand Down Expand Up @@ -259,7 +259,10 @@ def net_cash_flow(self, project_life=25):
ncf = list()
ncf.append(-self.value('total_installed_cost'))
degrad_fraction = 1 # fraction of annual energy after degradation
for year in range(1, project_life + 1):
om_costs = self.o_and_m_cost()
self.cf_operating_expenses = tuple(np.asarray([om_costs*(1 + self.value('inflation_rate') / 100)**(year - 1) for year in range(1, project_life+1)]))
self.cf_utility_bill = np.zeros_like(self.cf_operating_expenses) #TODO make it possible for this to be non-zero
for i, year in enumerate(range(1, project_life + 1)):
degrad_fraction *= (1 - degradation[year - 1])
ncf.append(
(
Expand Down Expand Up @@ -349,4 +352,18 @@ def export_battery_values(self):
@property
def annual_energy(self) -> float:
return self.value('annual_energy_pre_curtailment_ac')

@property
def om_total_expenses(self) -> Sequence:
return self.value('om_total_expense')

# for compatibility with calls to SingleOwner
@property
def lcoe_real(self) -> float:
return self.value('levelized_cost_of_energy_real')

# for compatibility with calls to SingleOwner
@property
def lcoe_nom(self) -> float:
return self.value('levelized_cost_of_energy_nominal')

0 comments on commit bca13e2

Please sign in to comment.