|
9 | 9 |
|
10 | 10 | import numpy as np
|
11 | 11 |
|
| 12 | +from geophires_x.GeoPHIRESUtils import sig_figs |
12 | 13 | from geophires_x.OptionList import PlantType
|
13 | 14 | from geophires_x.OptionList import WellDrillingCostCorrelation
|
14 | 15 | from geophires_x_client import GeophiresXClient
|
@@ -1428,3 +1429,31 @@ def test_royalty_rate_escalation(self):
|
1428 | 1429 |
|
1429 | 1430 | expected_last_year_revenue = ppa_revenue_MUSD[-1] * max_expected_rate
|
1430 | 1431 | self.assertAlmostEqual(expected_last_year_revenue, royalties_cash_flow_MUSD[-1], places=3)
|
| 1432 | + |
| 1433 | + def test_royalty_rate_with_addon(self): |
| 1434 | + """ |
| 1435 | + Verifies that custom EXTENDED ECONOMICS header print logic in Outputs works as expected |
| 1436 | + (geophires_x.Outputs.Outputs._print_extended_economics_header) |
| 1437 | + """ |
| 1438 | + |
| 1439 | + addon_profit_MUSD = 15 |
| 1440 | + |
| 1441 | + result = GeophiresXClient().get_geophires_result( |
| 1442 | + ImmutableGeophiresInputParameters( |
| 1443 | + from_file_path=self._get_test_file_path( |
| 1444 | + 'examples/example_SAM-single-owner-PPA-4.txt' # Royalty rate example |
| 1445 | + ), |
| 1446 | + params={ |
| 1447 | + 'AddOn Nickname 1': 'Waste Heat Absorption Chiller', |
| 1448 | + 'AddOn CAPEX 1': 50, |
| 1449 | + 'AddOn OPEX 1': 1, |
| 1450 | + 'AddOn Profit Gained 1': addon_profit_MUSD, |
| 1451 | + }, |
| 1452 | + ) |
| 1453 | + ) |
| 1454 | + |
| 1455 | + self.assertEqual(30, sig_figs(result.result['EXTENDED ECONOMICS']['Royalty Holder NPV']['value'], 1)) |
| 1456 | + |
| 1457 | + addon_cash_flow = _cash_flow_profile_row(result.result['SAM CASH FLOW PROFILE'], 'Capacity payment revenue ($)') |
| 1458 | + self.assertEqual(0, addon_cash_flow[0]) |
| 1459 | + self.assertTrue(all(it == addon_profit_MUSD * 1e6 for it in addon_cash_flow[1:])) |
0 commit comments