Skip to content

Commit a01a49e

Browse files
SAM-EM support for State ITC amount - WIP to adjust ITC outputs
1 parent b5a79b5 commit a01a49e

4 files changed

Lines changed: 43 additions & 3 deletions

File tree

src/geophires_x/Economics.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,17 @@ def __init__(self, model: Model):
12141214
PreferredUnits=PercentUnit.TENTH,
12151215
CurrentUnits=PercentUnit.TENTH,
12161216
ErrMessage="assume default investment tax credit rate (0)",
1217-
ToolTipText="Investment tax credit rate (see docs)"
1217+
ToolTipText="Investment tax credit rate (ITC). For SAM Economic Models, this is the federal rate."
1218+
)
1219+
self.ritc_state = self.ParameterDict[self.ritc_state.Name] = floatParameter(
1220+
'State Investment Tax Credit Amount',
1221+
DefaultValue=0.0,
1222+
Min=0.0,
1223+
Max=self.totalcapcost.Max,
1224+
UnitType=self.totalcapcost.UnitType,
1225+
PreferredUnits=self.totalcapcost.PreferredUnits,
1226+
CurrentUnits=self.totalcapcost.CurrentUnits,
1227+
ToolTipText='State investment tax credit amount (state ITC).'
12181228
)
12191229
self.PTR = self.ParameterDict[self.PTR.Name] = floatParameter(
12201230
"Property Tax Rate",
@@ -2775,7 +2785,8 @@ def _warn(_msg: str) -> None:
27752785
self.royalty_rate_schedule,
27762786
self.royalty_supplemental_payments,
27772787
self.construction_capex_schedule,
2778-
self.bond_financing_start_year
2788+
self.bond_financing_start_year,
2789+
self.ritc_state
27792790
]
27802791
for sam_em_only_param in sam_em_only_params:
27812792
if sam_em_only_param.Provided:

src/geophires_x/EconomicsSam.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,9 @@ def _get_single_owner_parameters(model: Model) -> dict[str, Any]:
680680
geophires_itc_tenths = Decimal(econ.RITC.value)
681681
ret['itc_fed_percent'] = [float(geophires_itc_tenths * Decimal(100))]
682682

683+
geophires_state_itc_usd = Decimal(econ.ritc_state.quantity().to(convertible_unit('USD')).magnitude)
684+
ret['itc_sta_amount'] = [float(geophires_state_itc_usd)]
685+
683686
if econ.PTCElec.Provided:
684687
ret['ptc_fed_amount'] = [econ.PTCElec.quantity().to(convertible_unit('USD/kWh')).magnitude]
685688

src/geophires_x_schema_generator/geophires-request.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,14 +1857,23 @@
18571857
"maximum": 1.0
18581858
},
18591859
"Investment Tax Credit Rate": {
1860-
"description": "Investment tax credit rate (see docs)",
1860+
"description": "Investment tax credit rate (ITC). For SAM Economic Models, this is the federal rate.",
18611861
"type": "number",
18621862
"units": "",
18631863
"category": "Economics",
18641864
"default": 0.0,
18651865
"minimum": 0.0,
18661866
"maximum": 1.0
18671867
},
1868+
"State Investment Tax Credit Amount": {
1869+
"description": "State investment tax credit amount (state ITC).",
1870+
"type": "number",
1871+
"units": "MUSD",
1872+
"category": "Economics",
1873+
"default": 0.0,
1874+
"minimum": 0.0,
1875+
"maximum": 100000.0
1876+
},
18681877
"Property Tax Rate": {
18691878
"description": "Property tax rate (see docs)",
18701879
"type": "number",

tests/geophires_x_tests/test_economics_sam.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,6 +1387,23 @@ def test_chp_fixed_plant_cost_requires_electrical_plant_cost_allocation_ratio(se
13871387

13881388
self.assertIn('CHP Electrical Plant Cost Allocation Ratio is required', str(re.exception))
13891389

1390+
def test_state_itc_amount(self):
1391+
r: GeophiresXResult = GeophiresXClient().get_geophires_result(
1392+
ImmutableGeophiresInputParameters(
1393+
from_file_path=self._get_test_file_path('generic-egs-case-2_sam-single-owner-ppa.txt'),
1394+
params={
1395+
'State Investment Tax Credit Amount': 4,
1396+
'Construction Years': 1,
1397+
},
1398+
)
1399+
)
1400+
1401+
line_item = 'State ITC amount income ($)'
1402+
cash_flow_row = self._get_cash_flow_row(r.result['SAM CASH FLOW PROFILE'], line_item)
1403+
self.assertEqual(4_000_000, cash_flow_row[1])
1404+
1405+
# FIXME WIP assert Investment Tax Credit output field is correct state + fed
1406+
13901407
@staticmethod
13911408
def _new_model(
13921409
input_file: Path,

0 commit comments

Comments
 (0)