Skip to content

Commit

Permalink
om_total_expenses property assigned as tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrunik committed Oct 15, 2024
1 parent e03901c commit bcd3990
Showing 1 changed file with 6 additions and 3 deletions.
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 @@ -351,7 +354,7 @@ def annual_energy(self) -> float:
return self.value('annual_energy_pre_curtailment_ac')

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

# for compatibility with calls to SingleOwner
Expand Down

0 comments on commit bcd3990

Please sign in to comment.