@@ -15,7 +15,7 @@ test_that("termination criteria works", {
1515 list (arg = list (iters = 3L ), state = " term.iter" ),
1616 list (arg = list (time.budget = 3L ), state = " term.time" ),
1717 list (arg = list (exec.time.budget = 2 ), state = " term.exectime" ),
18- list (arg = list (target.fun.value = min(design $ y ) / 2 , iters = 30L ), state = " term.yval" ),
18+ list (arg = list (target.fun.value = min(design $ y ) / 3 , iters = 30L ), state = " term.yval" ),
1919 list (arg = list (max.evals = nrow(design ) + 2L ), state = " term.feval" )
2020 )
2121
@@ -40,7 +40,8 @@ test_that("termination criteria works", {
4040 term.set $ arg $ target.fun.value = term.set $ arg $ target.fun.value * (- 1 )
4141 ctrl = do.call(setMBOControlTermination , c(list (control = ctrl ), term.set $ arg ))
4242 or.max = mbo(f.max , design = design.max , control = ctrl , learner = learner )
43- expect_lt(abs(getOptPathLength(or $ opt.path )- getOptPathLength(or.max $ opt.path )), 2 )
43+ expect_gt(getOptPathLength(or $ opt.path ), nrow(design.max ))
44+ expect_lt(abs(getOptPathLength(or $ opt.path )- getOptPathLength(or.max $ opt.path )), 3 )
4445 }
4546 if (term.set $ state == " term.feval" ) {
4647 expect_equal(getOptPathLength(or $ opt.path ), term.set $ arg $ max.evals )
0 commit comments