File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 23
23
24
24
write_solution = False
25
25
26
+
26
27
def _parse_args ():
27
28
# create a config object and parse
28
29
cfg = config .Config ()
@@ -40,6 +41,10 @@ def _parse_args():
40
41
description = "Run with async projective hedging instead of progressive hedging" ,
41
42
domain = bool ,
42
43
default = False )
44
+ cfg .add_to_config ("json_file_path" ,
45
+ description = "JSON file with the data paramaters (default ../distr/data_params.json)" ,
46
+ domain = str ,
47
+ default = "../distr/data_params.json" )
43
48
44
49
cfg .parse_command_line ("stoch_distr_admm_cylinders" )
45
50
return cfg
@@ -163,7 +168,7 @@ def main(cfg):
163
168
164
169
if cfg .scalable :
165
170
import json
166
- json_file_path = "../distr/data_params.json"
171
+ json_file_path = cfg . json_file_path
167
172
168
173
# Read the JSON file
169
174
with open (json_file_path , 'r' ) as file :
@@ -206,4 +211,4 @@ def main(cfg):
206
211
207
212
if __name__ == "__main__" :
208
213
cfg = _parse_args ()
209
- main (cfg )
214
+ main (cfg )
You can’t perform that action at this time.
0 commit comments