File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -2507,8 +2507,6 @@ def Calculate(self, model: Model) -> None:
2507
2507
self .CCap .value = (self .sam_economics_calculations .capex .quantity ()
2508
2508
.to (self .CCap .CurrentUnits .value ).magnitude )
2509
2509
2510
- # FIXME WIP adjust OPEX for royalties
2511
- # FIXME WIP unit conversion
2512
2510
average_annual_royalties = np .average (self .sam_economics_calculations .royalties_opex [1 :]) # ignore Year 0
2513
2511
if average_annual_royalties > 0 :
2514
2512
self .royalties_opex .value = average_annual_royalties
Original file line number Diff line number Diff line change @@ -1312,6 +1312,18 @@ def test_royalty_rate(self):
1312
1312
self .assertIsNotNone (opex_result [royalties_output_name ])
1313
1313
self .assertEqual (58.88 , opex_result [royalties_output_name ]['value' ])
1314
1314
self .assertEqual ('MUSD/yr' , opex_result [royalties_output_name ]['unit' ])
1315
- # FIXME WIP assert total opex includes royalties
1315
+
1316
+ total_opex_MUSD = opex_result ['Total operating and maintenance costs' ]['value' ]
1317
+
1318
+ opex_line_item_sum = 0
1319
+ for line_item_names in [
1320
+ 'Wellfield maintenance costs' ,
1321
+ 'Power plant maintenance costs' ,
1322
+ 'Water costs' ,
1323
+ royalties_output_name ,
1324
+ ]:
1325
+ opex_line_item_sum += opex_result [line_item_names ]['value' ]
1326
+
1327
+ self .assertEqual (opex_line_item_sum , total_opex_MUSD )
1316
1328
else :
1317
1329
self .assertIsNone (opex_result [royalties_output_name ])
You can’t perform that action at this time.
0 commit comments