Skip to content

Commit 7290e92

Browse files
Unprotect numerical_input_value
1 parent d950bd9 commit 7290e92

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/geophires_x/Economics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ def __init__(self, model: Model):
994994
UnitType=Units.NONE,
995995
ErrMessage="assume default well drilling cost correlation (10)",
996996
ToolTipText="Select the built-in well drilling and completion cost correlation: " +
997-
'; '.join([f'{it._numerical_input_value}: {it.value}' for it in WellDrillingCostCorrelation])
997+
'; '.join([f'{it.numerical_input_value}: {it.value}' for it in WellDrillingCostCorrelation])
998998
)
999999

10001000
self.DoAddOnCalculations = self.ParameterDict[self.DoAddOnCalculations.Name] = boolParameter(

src/geophires_x/OptionList.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __new__(cls, *args, **kwds):
1818
return obj
1919

2020
def __init__(self, numerical_input_value: int, _: str):
21-
self._numerical_input_value = numerical_input_value
21+
self.numerical_input_value = numerical_input_value
2222

2323
def __eq__(self, other):
2424
return str(self) == str(other)
@@ -30,7 +30,7 @@ def get_end_use_option_from_input_string(input_string:str):
3030
"""
3131

3232
for option in EndUseOptions:
33-
if input_string == str(option._numerical_input_value):
33+
if input_string == str(option.numerical_input_value):
3434
return option
3535

3636
raise ValueError(f'Unknown End-Use Option input value: {input_string}')
@@ -105,7 +105,7 @@ def __new__(cls, *args, **kwds):
105105
return obj
106106

107107
def __init__(self, numerical_input_value: int, _: str, c2: float, c1: float, c0: float):
108-
self._numerical_input_value = numerical_input_value
108+
self.numerical_input_value = numerical_input_value
109109
self._c2 = c2
110110
self._c1 = c1
111111
self._c0 = c0

src/geophires_x/SurfacePlant.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,11 @@ def __init__(self, model: Model):
234234
"End-Use Option",
235235
value=EndUseOptions.ELECTRICITY,
236236
AllowableRange=[1, 2, 31, 32, 41, 42, 51, 52],
237+
values_enum=EndUseOptions,
237238
UnitType=Units.NONE,
238239
ErrMessage="assume default end-use option (1: electricity only)",
239240
ToolTipText="Select the end-use application of the geofluid heat: " +
240-
'; '.join([f'{it._numerical_input_value}: {it.value}' for it in EndUseOptions])
241+
'; '.join([f'{it.numerical_input_value}: {it.value}' for it in EndUseOptions])
241242
)
242243
self.plant_type = self.ParameterDict[self.plant_type.Name] = intParameter(
243244
"Power Plant Type",

0 commit comments

Comments
 (0)