diff --git a/test/boxopt_test.cpp b/test/boxopt_test.cpp index b54ae17..36ea579 100644 --- a/test/boxopt_test.cpp +++ b/test/boxopt_test.cpp @@ -23,15 +23,15 @@ TEST(BoxOptTest, BasicAssertions) { constexpr auto fsoft = [](auto x) { auto u0 = x[0]; auto u1 = x[1]; - return fcore(u0, u1) + 0.125 * poly::math::softplus(8.0 * gcore(u0, u1)); + return fcore(u0, u1) + 0.25 * poly::math::softplus(8.0 * gcore(u0, u1)); }; poly::utils::OwningArena<> arena; double opt0 = poly::math::minimize(&arena, box, fsoft); double u0 = box.transformed()[0]; double u1 = box.transformed()[1]; std::cout << "u0 = " << u0 << "; u1 = " << u1 << '\n'; - EXPECT_LT(std::abs(3.4567 - u0), 1e-3); - EXPECT_LT(std::abs(7.8 - u1), 1e-3); + EXPECT_LT(std::abs(3.45128 - u0), 1e-3); + EXPECT_LT(std::abs(7.78878 - u1), 1e-3); box.decreaseUpperBound(0, 3); double opt1 = poly::math::minimize(&arena, box, fsoft); EXPECT_LT(opt0, opt1); @@ -39,7 +39,7 @@ TEST(BoxOptTest, BasicAssertions) { double u11 = box.transformed()[1]; std::cout << "u01 = " << u01 << "; u11 = " << u11 << '\n'; EXPECT_EQ(u01, 3.0); - EXPECT_LT(std::abs(9.132 - u11), 1e-3); + EXPECT_LT(std::abs(9.10293 - u11), 1e-3); poly::math::Vector r{0, 0}; double opti = poly::math::minimizeIntSol(&arena, r, 1, 32, fsoft);