55
66import libensemble .gen_funcs
77
8- libensemble .gen_funcs .rc .aposmm_optimizers = "nlopt "
8+ libensemble .gen_funcs .rc .aposmm_optimizers = "scipy "
99
1010if platform .system () in ["Linux" , "Darwin" ]:
1111 multiprocessing .set_start_method ("fork" , force = True )
@@ -66,14 +66,13 @@ def combined_func(x):
6666
6767@pytest .mark .extra
6868def test_standalone_persistent_aposmm ():
69- from math import gamma , pi , sqrt
7069
7170 import libensemble .gen_funcs
7271 from libensemble .message_numbers import FINISHED_PERSISTENT_GEN_TAG
7372 from libensemble .sim_funcs .six_hump_camel import six_hump_camel_func , six_hump_camel_grad
7473 from libensemble .tests .regression_tests .support import six_hump_camel_minima as minima
7574
76- libensemble .gen_funcs .rc .aposmm_optimizers = "nlopt "
75+ libensemble .gen_funcs .rc .aposmm_optimizers = "scipy "
7776 from libensemble .gen_funcs .persistent_aposmm import aposmm
7877
7978 persis_info = {"rand_stream" : np .random .default_rng (1 ), "nworkers" : 4 }
@@ -90,16 +89,16 @@ def test_standalone_persistent_aposmm():
9089 "initial_sample_size" : 100 ,
9190 # 'localopt_method': 'LD_MMA', # Needs gradients
9291 "sample_points" : np .round (minima , 1 ),
93- "localopt_method" : "LN_BOBYQA " ,
92+ "localopt_method" : "scipy_Nelder-Mead " ,
9493 "standalone" : {
9594 "eval_max" : eval_max ,
9695 "obj_func" : six_hump_camel_func ,
9796 "grad_func" : six_hump_camel_grad ,
9897 },
99- "rk_const " : 0.5 * (( gamma ( 1 + ( n / 2 )) * 5 ) ** ( 1 / n )) / sqrt ( pi ) ,
100- "xtol_abs " : 1e-6 ,
101- "ftol_abs " : 1e-6 ,
102- "dist_to_bound_multiple" : 0.5 ,
98+ "opt_return_codes " : [ 0 ] ,
99+ "nu " : 1e-8 ,
100+ "mu " : 1e-8 ,
101+ "dist_to_bound_multiple" : 0.01 ,
103102 "max_active_runs" : 6 ,
104103 "lb" : np .array ([- 3 , - 2 ]),
105104 "ub" : np .array ([3 , 2 ]),
@@ -124,7 +123,6 @@ def test_standalone_persistent_aposmm():
124123
125124@pytest .mark .extra
126125def test_standalone_persistent_aposmm_combined_func ():
127- from math import gamma , pi , sqrt
128126
129127 import libensemble .gen_funcs
130128 from libensemble .message_numbers import FINISHED_PERSISTENT_GEN_TAG
@@ -147,12 +145,12 @@ def test_standalone_persistent_aposmm_combined_func():
147145 "initial_sample_size" : 100 ,
148146 # 'localopt_method': 'LD_MMA', # Needs gradients
149147 "sample_points" : np .round (minima , 1 ),
150- "localopt_method" : "LN_BOBYQA " ,
148+ "localopt_method" : "scipy_Nelder-Mead " ,
151149 "standalone" : {"eval_max" : eval_max , "obj_and_grad_func" : combined_func },
152- "rk_const " : 0.5 * (( gamma ( 1 + ( n / 2 )) * 5 ) ** ( 1 / n )) / sqrt ( pi ) ,
153- "xtol_abs " : 1e-6 ,
154- "ftol_abs " : 1e-6 ,
155- "dist_to_bound_multiple" : 0.5 ,
150+ "opt_return_codes " : [ 0 ] ,
151+ "nu " : 1e-8 ,
152+ "mu " : 1e-8 ,
153+ "dist_to_bound_multiple" : 0.01 ,
156154 "max_active_runs" : 6 ,
157155 "lb" : np .array ([- 3 , - 2 ]),
158156 "ub" : np .array ([3 , 2 ]),
0 commit comments