From 6ac2f40f1737251d1592ac22e02a4c568b66711a Mon Sep 17 00:00:00 2001 From: Adrien Escande Date: Thu, 13 Jun 2024 16:11:41 +0200 Subject: [PATCH] Adding options for precomputed QR of constraint matrix --- include/jrl-qp/SolverOptions.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/include/jrl-qp/SolverOptions.h b/include/jrl-qp/SolverOptions.h index 50dc396..8fb7975 100644 --- a/include/jrl-qp/SolverOptions.h +++ b/include/jrl-qp/SolverOptions.h @@ -20,7 +20,11 @@ enum class GFactorization /** G is given as the lower triangular matrix invL such that G^-1 = invL^T invL */ L_INV, /** G is given as the lower triangular matrix invL such that G^-1 = invL invL^T */ - L_TINV + L_TINV, + /** G is given as a matrix J = L^-T Q, where G = L L^T and Q is the orthonormal + matrix appearing in the QR decomposition of the activated constraints (see other + options for details). */ + L_TINV_Q }; /** Options for the solvers*/ @@ -30,6 +34,7 @@ struct JRLQP_DLLAPI SolverOptions double bigBnd_ = 1e100; bool warmStart_ = false; bool equalityFirst_ = false; //True if all equality constraints are given first in the constraint matrix + bool RIsGiven_ = false; // True when the R factor in the decomposition of some initially active constraints is given. If equalityFirst is true, these are the equality constraints. Ignored if gFactorization != L_TINV_Q or equalityFirst_ = false. GFactorization gFactorization_ = GFactorization::NONE; std::uint32_t logFlags_ = 0; std::ostream * logStream_ = &defaultStream_; @@ -101,6 +106,16 @@ struct JRLQP_DLLAPI SolverOptions return *this; } + bool RIsGiven() const + { + return RIsGiven_; + } + SolverOptions & RIsGiven(bool Rgiven) + { + RIsGiven_ = Rgiven; + return *this; + } + GFactorization gFactorization() const { return gFactorization_;