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:
25072507 self .CCap .value = (self .sam_economics_calculations .capex .quantity ()
25082508 .to (self .CCap .CurrentUnits .value ).magnitude )
25092509
2510- # FIXME WIP adjust OPEX for royalties
2511- # FIXME WIP unit conversion
25122510 average_annual_royalties = np .average (self .sam_economics_calculations .royalties_opex [1 :]) # ignore Year 0
25132511 if average_annual_royalties > 0 :
25142512 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):
13121312 self .assertIsNotNone (opex_result [royalties_output_name ])
13131313 self .assertEqual (58.88 , opex_result [royalties_output_name ]['value' ])
13141314 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 )
13161328 else :
13171329 self .assertIsNone (opex_result [royalties_output_name ])
You can’t perform that action at this time.
0 commit comments