Skip to content

Commit 6c24b89

Browse files
method rename, py39 compat
1 parent 522e934 commit 6c24b89

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/geophires_x/Economics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55
import numpy_financial as npf
66
import geophires_x.Model as Model
7-
from geophires_x.EconomicsSam import compute_sam_financials
7+
from geophires_x.EconomicsSam import calculate_sam_economics
88
from geophires_x.OptionList import Configuration, WellDrillingCostCorrelation, EconomicModel, EndUseOptions, PlantType, \
99
_WellDrillingCostCorrelationCitation
1010
from geophires_x.Parameter import intParameter, floatParameter, OutputParameter, ReadParameter, boolParameter, \
@@ -471,7 +471,7 @@ def CalculateLCOELCOHLCOC(econ, model: Model) -> tuple:
471471
model.surfaceplant.annual_heating_demand.value * discount_vector) * 1E2 # cents/kWh
472472
LCOH = LCOH * 2.931 # $/Million Btu
473473
elif econ.econmodel.value == EconomicModel.SAM_SINGLE_OWNER_PPA:
474-
LCOE = compute_sam_financials(model)['LCOE']['value']
474+
LCOE = calculate_sam_economics(model)['LCOE']['value']
475475
else:
476476
# must be BICYCLE
477477
# average return on investment (tax and inflation adjusted)
@@ -2963,7 +2963,7 @@ def Calculate(self, model: Model) -> None:
29632963
)
29642964

29652965
if self.econmodel.value == EconomicModel.SAM_SINGLE_OWNER_PPA:
2966-
sam_economics = compute_sam_financials(model)
2966+
sam_economics = calculate_sam_economics(model)
29672967
self.ProjectNPV.value = sam_economics['NPV']['value']
29682968
self.ProjectIRR.value = sam_economics['IRR']['value']
29692969
# FIXME WIP VIR + MOIC

src/geophires_x/EconomicsSam.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def get_single_owner_parameters(model: Model) -> dict[str, Any]:
5555
return ret
5656

5757

58-
def compute_sam_financials(
58+
def calculate_sam_economics(
5959
model: Model
6060
) -> dict[str, dict[str, Any]]:
6161
custom_gen = CustomGeneration.new()
@@ -69,7 +69,7 @@ def compute_sam_financials(
6969
file_names = [f'{project_name}_{module}' for module in ['custom_generation', 'grid', 'utilityrate5', 'singleowner']]
7070
modules = [custom_gen, grid, utility_rate, single_owner]
7171

72-
for module_file, module in zip(file_names, modules, strict=True):
72+
for module_file, module in zip(file_names, modules):
7373
with open(Path(project_dir, f'{module_file}.json'), encoding='utf-8') as file:
7474
data = json.load(file)
7575
# loop through each key-value pair

0 commit comments

Comments
 (0)