Skip to content

Commit

Permalink
Avoid non-deterministic QPUnitTests failure (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Nov 6, 2024
1 parent b9ce739 commit e535f6f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/QPTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ TEST_CASE("QPProblem")
OsqpEigen::Solver solver;
solver.settings()->setVerbosity(true);
solver.settings()->setAlpha(1.0);
// This is required to avoid non-deterministic non-accurate solutions
solver.settings()->setPolish(true);

REQUIRE_FALSE(solver.data()->setHessianMatrix(H_s));
solver.data()->setNumberOfVariables(2);
Expand Down

0 comments on commit e535f6f

Please sign in to comment.