diff --git a/src/test/storm/solver/GmmxxMinMaxLinearEquationSolverTest.cpp b/src/test/storm/solver/GmmxxMinMaxLinearEquationSolverTest.cpp index da68456fe..db72b1087 100644 --- a/src/test/storm/solver/GmmxxMinMaxLinearEquationSolverTest.cpp +++ b/src/test/storm/solver/GmmxxMinMaxLinearEquationSolverTest.cpp @@ -19,6 +19,7 @@ TEST(GmmxxMinMaxLinearEquationSolver, SolveWithStandardOptions) { auto factory = storm::solver::GmmxxMinMaxLinearEquationSolverFactory(); auto solver = factory.create(A); + solver->setHasUniqueSolution(); ASSERT_NO_THROW(solver->solveEquations(storm::OptimizationDirection::Minimize, x, b)); ASSERT_LT(std::abs(x[0] - 0.5), storm::settings::getModule().getPrecision()); @@ -42,6 +43,8 @@ TEST(GmmxxMinMaxLinearEquationSolver, SolveWithStandardOptionsAndEarlyTerminatio auto factory = storm::solver::GmmxxMinMaxLinearEquationSolverFactory(); auto solver = factory.create(A); + solver->setLowerBound(0.0); + solver->setUpperBound(1.0); solver->setTerminationCondition(std::make_unique>(storm::storage::BitVector(A.getRowGroupCount(), true), false, bound, true)); ASSERT_NO_THROW(solver->solveEquations(storm::OptimizationDirection::Minimize, x, b)); @@ -111,6 +114,7 @@ TEST(GmmxxMinMaxLinearEquationSolver, SolveWithPolicyIteration) { auto factory = storm::solver::GmmxxMinMaxLinearEquationSolverFactory(storm::solver::MinMaxMethodSelection::PolicyIteration); auto solver = factory.create(A); + solver->setHasUniqueSolution(); ASSERT_NO_THROW(solver->solveEquations(storm::OptimizationDirection::Minimize, x, b)); ASSERT_LT(std::abs(x[0] - 0.5), storm::settings::getModule().getPrecision()); diff --git a/src/test/storm/solver/NativeMinMaxLinearEquationSolverTest.cpp b/src/test/storm/solver/NativeMinMaxLinearEquationSolverTest.cpp index bfd1defcc..bdebc139e 100644 --- a/src/test/storm/solver/NativeMinMaxLinearEquationSolverTest.cpp +++ b/src/test/storm/solver/NativeMinMaxLinearEquationSolverTest.cpp @@ -20,6 +20,7 @@ TEST(NativeMinMaxLinearEquationSolver, SolveWithStandardOptions) { auto factory = storm::solver::NativeMinMaxLinearEquationSolverFactory(); auto solver = factory.create(A); + solver->setHasUniqueSolution(); ASSERT_NO_THROW(solver->solveEquations(storm::OptimizationDirection::Minimize, x, b)); @@ -83,7 +84,9 @@ TEST(NativeMinMaxLinearEquationSolver, SolveWithPolicyIteration) { auto factory = storm::solver::NativeMinMaxLinearEquationSolverFactory(storm::solver::MinMaxMethodSelection::PolicyIteration); auto solver = factory.create(A); - + solver->setLowerBound(0.0); + solver->setUpperBound(1.0); + ASSERT_NO_THROW(solver->solveEquations(storm::OptimizationDirection::Minimize, x, b)); ASSERT_LT(std::abs(x[0] - 0.5), storm::settings::getModule().getPrecision());