5151 sys .exit ("Ensure https://github.com/POptUS/minq has been cloned and that minq/py/minq5/ is on the PYTHONPATH" )
5252
5353
54- def sum_squared (x ):
55- return np .sum (np .power (x , 2 ))
56-
57-
5854def synthetic_beamline_mapping (H , _ , sim_specs ):
5955 x = H ["x" ][0 ]
6056 assert len (x ) == 4 , "Assuming 4 inputs to this function"
@@ -75,7 +71,7 @@ def synthetic_beamline_mapping(H, _, sim_specs):
7571
7672 nworkers , is_manager , libE_specs , _ = parse_args ()
7773
78- assert nworkers == 2 , "This test is just for two workers"
74+ assert nworkers == 2 , "This test is just for two workers, as only one localopt run is being performed "
7975
8076 for inst in range (2 ):
8177 if inst == 0 :
@@ -108,9 +104,9 @@ def synthetic_beamline_mapping(H, _, sim_specs):
108104 "persis_in" : ["f" , "fvec" ] + [n [0 ] for n in gen_out ],
109105 "out" : gen_out ,
110106 "user" : {
111- "initial_sample_size" : 1 ,
112- "stop_after_k_runs" : 1 ,
113- "max_active_runs" : 1 ,
107+ "initial_sample_size" : 1 , # The initial sampled point will be the starting point
108+ "stop_after_k_runs" : 1 , # Only one local optimization run will be performed
109+ "max_active_runs" : 1 , # Only one local optimization run will be performed,
114110 "sample_points" : np .atleast_2d (0.1 * (np .arange (n ) + 1 )),
115111 "localopt_method" : "ibcdfo_pounders" ,
116112 "run_max_eval" : 100 * (n + 1 ),
0 commit comments