30
30
VERTICAL_WELL_DEPTH_OUTPUT_NAME = 'Well depth'
31
31
32
32
33
- def print_outputs_rich (output_file : str , text_output_file : strParameter , html_output_file : strParameter , model : Model ):
33
+ def print_outputs_rich (
34
+ text_output_file : strParameter ,
35
+ html_output_file : strParameter ,
36
+ model : Model ,
37
+ sdac_results : list ,
38
+ addon_results : list ,
39
+ sdac_df : pd .DataFrame ,
40
+ addon_df : pd .DataFrame ):
34
41
"""
35
42
TODO Implementation of rich output in this method/file is duplicative of Outputs.PrintOutputs. This adds undue
36
43
code complexity, maintenance overhead, inconsistency, and potential for bugs. Rich output should instead be
@@ -49,9 +56,7 @@ def print_outputs_rich(output_file: str, text_output_file: strParameter, html_ou
49
56
CAPEX = []
50
57
OPEX = []
51
58
surface_equipment_results = []
52
- addon_results = []
53
- sdac_resa_results = []
54
- pumping_power_results = []
59
+ # addon_results = []
55
60
56
61
simulation_metadata .append (OutputTableItem ('GEOPHIRES Version' , geophires_x .__version__ ))
57
62
simulation_metadata .append (OutputTableItem ('Simulation Date' , datetime .datetime .now ().strftime ('%Y-%m-%d' )))
@@ -878,26 +883,16 @@ def print_outputs_rich(output_file: str, text_output_file: strParameter, html_ou
878
883
879
884
pumping_power_profiles = pumping_power_profiles .reset_index ()
880
885
881
- addon_df = pd .DataFrame ()
882
- sdac_df = pd .DataFrame ()
883
- addon_results : list [OutputTableItem ] = []
884
- sdac_results : list [OutputTableItem ] = []
885
-
886
- if model .economics .DoAddOnCalculations .value :
887
- addon_df , addon_results = model .addoutputs .PrintOutputs (model )
888
- if model .economics .DoSDACGTCalculations .value :
889
- sdac_df , sdac_results = model .sdacgtoutputs .PrintOutputs (model )
890
-
891
886
if text_output_file .Provided :
892
- Write_Text_Output (output_file , simulation_metadata , summary , economic_parameters ,
887
+ Write_Text_Output (text_output_file . value , simulation_metadata , summary , economic_parameters ,
893
888
engineering_parameters ,
894
889
resource_characteristics , reservoir_parameters , reservoir_stimulation_results , CAPEX ,
895
890
OPEX ,
896
891
surface_equipment_results , sdac_results , addon_results , hce , ahce , cashflow ,
897
892
pumping_power_profiles , sdac_df , addon_df )
898
893
899
894
# Get rid of any trailing spaces in that output file - they are confusing the testing code
900
- with open (output_file , 'r+' ) as fp :
895
+ with open (text_output_file . value , 'r+' ) as fp :
901
896
lines = fp .readlines ()
902
897
fp .seek (0 )
903
898
fp .truncate ()
0 commit comments