@@ -222,6 +222,8 @@ def read_parameters(self, model: Model) -> None:
222
222
model .logger .info (f'Init { str (__class__ )} : { sys ._getframe ().f_code .co_name } ' )
223
223
super ().read_parameters (model ) # read the parameters for the parent.
224
224
225
+ is_sam_econ_model = model .economics .econmodel .value == EconomicModel .SAM_SINGLE_OWNER_PPA
226
+
225
227
# Deal with all the parameter values that the user has provided that relate to this extension.
226
228
# super.read_parameter will have already dealt with all the regular values, but anything unusual
227
229
# may not be dealt with, so check.
@@ -244,12 +246,21 @@ def read_parameters(self, model: Model) -> None:
244
246
if key .startswith ("AddOn OPEX" ):
245
247
val = float (model .InputParameters [key ].sValue )
246
248
self .AddOnOPEXPerYear .value .append (val ) # this assumes they put the values in the file in consecutive fashion
249
+
247
250
if key .startswith ("AddOn Electricity Gained" ):
251
+ if is_sam_econ_model :
252
+ raise NotImplementedError ('AddOn Electricity is not supported for SAM Economic Models' )
253
+
248
254
val = float (model .InputParameters [key ].sValue )
249
255
self .AddOnElecGainedPerYear .value .append (val ) # this assumes they put the values in the file in consecutive fashion
256
+
250
257
if key .startswith ("AddOn Heat Gained" ):
258
+ if is_sam_econ_model :
259
+ raise NotImplementedError ('AddOn Heat is not supported for SAM Economic Models' )
260
+
251
261
val = float (model .InputParameters [key ].sValue )
252
262
self .AddOnHeatGainedPerYear .value .append (val ) # this assumes they put the values in the file in consecutive fashion
263
+
253
264
if key .startswith ("AddOn Profit Gained" ):
254
265
val = float (model .InputParameters [key ].sValue )
255
266
self .AddOnProfitGainedPerYear .value .append (val ) # this assumes they put the values in the file in consecutive fashion
0 commit comments