File tree 1 file changed +0
-31
lines changed
1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -381,34 +381,3 @@ BOOST_AUTO_TEST_CASE(nlopt_loc_opt)
381
381
algo.evolve (pop);
382
382
BOOST_CHECK (algo.extract <nlopt>()->get_last_opt_result () >= 0 );
383
383
}
384
-
385
- BOOST_AUTO_TEST_CASE (nlopt_initial_population_not_respecting_bounds_throw_test)
386
- {
387
- // We test that the algorithm throws if the initial population does not respect the bounds
388
- auto pop = population{hs71{}, 1 };
389
- auto a = nlopt{" slsqp" };
390
- auto dv = pop.get_x ()[0 ];
391
- dv[0 ] = prob.get_bounds ().first [0 ] - 1 .;
392
- pop.set_x (0 , dv);
393
- BOOST_CHECK_THROW (nlopt.evolve (pop), std::invalid_argument);
394
-
395
- dv = pop.get_x ()[0 ];
396
- dv[0 ] = prob.get_bounds ().second [0 ] + 2 .;
397
- pop.set_x (0 , dv);
398
- BOOST_CHECK_THROW (nlopt.evolve (pop), std::invalid_argument);
399
-
400
- dv = pop.get_x ()[0 ];
401
- dv[0 ] = std::numeric_limits<double >::quiet_NaN ();
402
- pop.set_x (0 , dv);
403
- BOOST_CHECK_THROW (nlopt.evolve (pop), std::invalid_argument);
404
-
405
- dv = pop.get_x ()[0 ];
406
- dv[0 ] = std::numeric_limits<double >::infinity ();
407
- pop.set_x (0 , dv);
408
- BOOST_CHECK_THROW (nlopt.evolve (pop), std::invalid_argument);
409
-
410
- dv = pop.get_x ()[0 ];
411
- dv[0 ] = prob.get_bounds ().first [0 ] + prob.get_bounds ().second [0 ] / 2.0 ;
412
- pop.set_x (0 , dv);
413
- BOOST_CHECK_NO_THROW (nlopt.evolve (pop));
414
- }
You can’t perform that action at this time.
0 commit comments