|
13 | 13 | from geophires_x.EconomicsUtils import BuildPricingModel, wacc_output_parameter, nominal_discount_rate_parameter, \
|
14 | 14 | real_discount_rate_parameter, after_tax_irr_parameter, moic_parameter, project_vir_parameter, \
|
15 | 15 | project_payback_period_parameter, inflation_cost_during_construction_output_parameter, \
|
16 |
| - total_capex_parameter_output_parameter |
| 16 | + total_capex_parameter_output_parameter, royalties_opex_parameter_output_parameter |
17 | 17 | from geophires_x.GeoPHIRESUtils import quantity
|
18 | 18 | from geophires_x.OptionList import Configuration, WellDrillingCostCorrelation, EconomicModel, EndUseOptions, PlantType, \
|
19 | 19 | _WellDrillingCostCorrelationCitation
|
@@ -1906,6 +1906,7 @@ def __init__(self, model: Model):
|
1906 | 1906 | PreferredUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR,
|
1907 | 1907 | CurrentUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR
|
1908 | 1908 | )
|
| 1909 | + self.royalties_opex = self.OutputParameterDict[self.royalties_opex.Name] = royalties_opex_parameter_output_parameter() |
1909 | 1910 |
|
1910 | 1911 | # district heating
|
1911 | 1912 | self.peakingboilercost = self.OutputParameterDict[self.peakingboilercost.Name] = OutputParameter(
|
@@ -2502,10 +2503,17 @@ def Calculate(self, model: Model) -> None:
|
2502 | 2503 | # Setting capex_total distinguishes capex from CCap's display name of 'Total capital costs',
|
2503 | 2504 | # since SAM Economic Model doesn't subtract ITC from this value.
|
2504 | 2505 | self.capex_total.value = (self.sam_economics_calculations.capex.quantity()
|
2505 |
| - .to(self.capex_total.CurrentUnits.value).magnitude) |
| 2506 | + .to(self.capex_total.CurrentUnits.value).magnitude) |
2506 | 2507 | self.CCap.value = (self.sam_economics_calculations.capex.quantity()
|
2507 | 2508 | .to(self.CCap.CurrentUnits.value).magnitude)
|
2508 | 2509 |
|
| 2510 | + # FIXME WIP adjust OPEX for royalties |
| 2511 | + # FIXME WIP unit conversion |
| 2512 | + average_annual_royalties = np.average(self.sam_economics_calculations.royalties_opex[1:]) # ignore Year 0 |
| 2513 | + if average_annual_royalties > 0: |
| 2514 | + self.royalties_opex.value = average_annual_royalties |
| 2515 | + self.Coam.value += self.royalties_opex.quantity().to(self.Coam.CurrentUnits.value).magnitude |
| 2516 | + |
2509 | 2517 | self.wacc.value = self.sam_economics_calculations.wacc.value
|
2510 | 2518 | self.nominal_discount_rate.value = self.sam_economics_calculations.nominal_discount_rate.value
|
2511 | 2519 | self.ProjectNPV.value = self.sam_economics_calculations.project_npv.quantity().to(
|
|
0 commit comments