Skip to content

Commit

Permalink
Adding options for precomputed QR of constraint matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
aescande committed Jun 13, 2024
1 parent 6337651 commit 6ac2f40
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion include/jrl-qp/SolverOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand All @@ -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_;
Expand Down Expand Up @@ -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_;
Expand Down

0 comments on commit 6ac2f40

Please sign in to comment.