@@ -110,26 +110,11 @@ def sam_cash_flow_profile_all_years(self) -> list[list[Any]]:
110110 negative_year_index : int = self ._pre_revenue_years_count - 1 - pre_revenue_year
111111 pre_revenue_row_content [pre_revenue_year ] = f'Year -{ negative_year_index } '
112112
113- # for k, v in self.pre_revenue_costs_and_cash_flow.pre_revenue_cash_flow_profile_dict.items():
114- # # TODO move logic to _calculate_pre_revenue_costs_and_cashflow (_CONSTRUCTION_LINE_ITEM_DESIGNATOR)
115- # k_construction = k.split('(')[0] + '[construction] (' + k.split('(')[1]
116- #
117- # construction_rows.append([k_construction] + [_rnd(k, v, it_) for it_ in v])
118113 for _ , row_ in enumerate (self .pre_revenue_costs_and_cash_flow .pre_revenue_cash_flow_profile ):
119114 pre_revenue_row = row_ .copy ()
120115 pre_revenue_row .extend (['' ] * (col_count - len (pre_revenue_row )))
121116 construction_rows .append (pre_revenue_row )
122117
123- # FIXME WIP/TODO - zip with construction rows
124- # else:
125- # row_name = ret[row][0]
126- # if row_name in self.pre_revenue_costs_and_cash_flow.pre_revenue_cash_flow_profile:
127- # pre_revenue_row_content = [
128- # _rnd(k, v, it_)
129- # for it_ in self.pre_revenue_costs_and_cash_flow.pre_revenue_cash_flow_profile[row_name]
130- # ]
131- # insert_index = 2
132-
133118 # TODO zero-vectors e.g. Debt principal payment ($)
134119
135120 adjusted_row = [ret [row_index ][0 ]] + pre_revenue_row_content + ret [row_index ][insert_index :]
@@ -541,29 +526,8 @@ def _get_single_owner_parameters(model: Model) -> dict[str, Any]:
541526 # Pass the final, correct values to SAM
542527 ret ['total_installed_cost' ] = total_installed_cost_usd
543528
544- # TODO/WIP interest during construction (IDC) line item
545-
546- # pre_revenue_years_zero_vector = _pre_revenue_years_vector(model)
547-
548- # # https://nrel-pysam.readthedocs.io/en/main/modules/Singleowner.html#depreciation-group
549- # ret['depr_alloc_sl_20_percent'] = 0.0
550- # ret['depr_alloc_custom_percent'] = 100.0
551- #
552- # # Build custom depreciation schedule to handle pre-revenue years.
553- # # Standard 20-year straight-line depreciation for geothermal assets.
554- # straight_line_20_year_schedule = [2.5] + [5.0] * 19 + [2.5]
555- # depr_custom_schedule = pre_revenue_years_zero_vector + straight_line_20_year_schedule
556- #
557- # # Pad with zeros to match the analysis period length.
558- # analysis_period = _analysis_period(model)
559- # if len(depr_custom_schedule) < analysis_period:
560- # depr_custom_schedule.extend([0.0] * (analysis_period - len(depr_custom_schedule)))
561- #
562- # ret['depr_custom_schedule'] = depr_custom_schedule[:analysis_period]
563-
564529 opex_musd = econ .Coam .value
565530 ret ['om_fixed' ] = [opex_musd * 1e6 ] * model .surfaceplant .plant_lifetime .value
566- # ret['om_fixed'] = pre_revenue_years_zero_vector + ret['om_fixed']
567531
568532 # GEOPHIRES assumes O&M fixed costs are not affected by inflation
569533 ret ['om_fixed_escal' ] = - 1.0 * _pct (econ .RINFL )
@@ -575,14 +539,11 @@ def _get_single_owner_parameters(model: Model) -> dict[str, Any]:
575539
576540 geophires_itc_tenths = Decimal (econ .RITC .value )
577541 ret ['itc_fed_percent' ] = [float (geophires_itc_tenths * Decimal (100 ))]
578- # ret['itc_fed_percent'] = pre_revenue_years_zero_vector + ret['itc_fed_percent']
579542
580543 if econ .PTCElec .Provided :
581544 ret ['ptc_fed_amount' ] = [econ .PTCElec .quantity ().to (convertible_unit ('USD/kWh' )).magnitude ]
582- # ret['ptc_fed_amount'] = pre_revenue_years_zero_vector + ret['ptc_fed_amount']
583545
584546 ret ['ptc_fed_term' ] = econ .PTCDuration .quantity ().to (convertible_unit ('yr' )).magnitude
585- # ret['ptc_fed_term'] = ret['ptc_fed_term']+len(pre_revenue_years_zero_vector)
586547
587548 if econ .PTCInflationAdjusted .value :
588549 ret ['ptc_fed_escal' ] = _pct (econ .RINFL )
@@ -593,14 +554,11 @@ def _get_single_owner_parameters(model: Model) -> dict[str, Any]:
593554
594555 ppa_price_schedule_per_kWh = _get_ppa_price_schedule_per_kWh (model )
595556 ret ['ppa_price_input' ] = ppa_price_schedule_per_kWh
596- # ret['ppa_price_input'] = pre_revenue_years_zero_vector + ret['ppa_price_input']
597557
598558 if model .economics .royalty_rate .Provided :
599559 ret ['om_production' ] = _get_royalties_variable_om_USD_per_MWh_schedule (model )
600- # ret['om_production'] = pre_revenue_years_zero_vector + ret['om_production']
601560
602- # Debt/equity ratio ('Fraction of Investment in Bonds' parameter)
603- # ret['debt_percent'] = _pct(econ.FIB)
561+ # Debt/equity ratio
604562 ret ['debt_percent' ] = pre_revenue_costs .effective_debt_percent
605563
606564 # Interest rate
@@ -609,15 +567,13 @@ def _get_single_owner_parameters(model: Model) -> dict[str, Any]:
609567 # Project lifetime
610568 ret ['term_tenor' ] = model .surfaceplant .plant_lifetime .value
611569 ret ['term_int_rate' ] = _pct (econ .BIR )
612- # ret['loan_moratorium'] = len(pre_revenue_years_zero_vector)
613570
614571 ret ['ibi_oth_amount' ] = (econ .OtherIncentives .quantity () + econ .TotalGrant .quantity ()).to ('USD' ).magnitude
615572
616573 if model .economics .DoAddOnCalculations .value :
617574 add_on_profit_per_year = np .sum (model .addeconomics .AddOnProfitGainedPerYear .quantity ().to ('USD/yr' ).magnitude )
618575 add_on_profit_series = [add_on_profit_per_year ] * model .surfaceplant .plant_lifetime .value
619576 ret ['cp_capacity_payment_amount' ] = add_on_profit_series
620- # ret['cp_capacity_payment_amount'] =pre_revenue_years_zero_vector + ret['cp_capacity_payment_amount']
621577 ret ['cp_capacity_payment_type' ] = 1
622578
623579 return ret
0 commit comments