|
13 | 13 | from geophires_x.Model import Model |
14 | 14 |
|
15 | 15 | # noinspection PyProtectedMember |
16 | | -from geophires_x.EconomicsSam import calculate_sam_economics, _sig_figs, _SAM_CASH_FLOW_PROFILE_KEY |
| 16 | +from geophires_x.EconomicsSam import ( |
| 17 | + calculate_sam_economics, |
| 18 | + _sig_figs, |
| 19 | + _SAM_CASH_FLOW_PROFILE_KEY, |
| 20 | + _GEOPHIRES_TO_SAM_PRICING_MODEL_RATE_CONVERSION_CONSTANT, |
| 21 | +) |
17 | 22 |
|
18 | 23 | # noinspection PyProtectedMember |
19 | 24 | from geophires_x.EconomicsSamCashFlow import _clean_profile |
@@ -50,7 +55,19 @@ def _npv(r: GeophiresXResult) -> float: |
50 | 55 | self.assertEqual(ir['value'], 7.0) |
51 | 56 | self.assertEqual(ir['unit'], '%') |
52 | 57 |
|
53 | | - npvs = [_npv(self._get_result({'Starting Electricity Sale Price': x / 100.0})) for x in range(1, 20, 4)] |
| 58 | + inflation = 0.02 |
| 59 | + rate_params = [ |
| 60 | + { |
| 61 | + 'Starting Electricity Sale Price': x / 100.0, |
| 62 | + # Escalation rate must remain constant percent |
| 63 | + 'Electricity Escalation Rate Per Year': x |
| 64 | + * inflation |
| 65 | + / 100.0 |
| 66 | + / _GEOPHIRES_TO_SAM_PRICING_MODEL_RATE_CONVERSION_CONSTANT, |
| 67 | + } |
| 68 | + for x in range(1, 20, 4) |
| 69 | + ] |
| 70 | + npvs = [_npv(self._get_result(rp)) for rp in rate_params] |
54 | 71 | for i in range(len(npvs) - 1): |
55 | 72 | self.assertLess(npvs[i], npvs[i + 1]) |
56 | 73 |
|
|
0 commit comments