From 1b80ad6154848c17f195074acd4d5f5f0c22b91e Mon Sep 17 00:00:00 2001 From: Naoki-Hiraoka Date: Sat, 26 Sep 2020 20:17:41 +0900 Subject: [PATCH] [Solver.tpp] add warning message to updateHessianMatrix and updateLinearConstraintsMatrix for RowMajor --- include/OsqpEigen/Solver.tpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/OsqpEigen/Solver.tpp b/include/OsqpEigen/Solver.tpp index d0325eb..2c62f52 100644 --- a/include/OsqpEigen/Solver.tpp +++ b/include/OsqpEigen/Solver.tpp @@ -25,6 +25,11 @@ bool OsqpEigen::Solver::updateHessianMatrix(const Eigen::SparseCompressedBasedata->P, @@ -127,6 +132,12 @@ bool OsqpEigen::Solver::updateLinearConstraintsMatrix(const Eigen::SparseCompres return false; } + if(linearConstraintsMatrix.IsRowMajor){ + std::cerr << "[OsqpEigen::Solver::updateLinearConstraintsMatrix] The constraints matrix has to be ColMajor" + << std::endl; + return false; + } + // evaluate the triplets from old and new hessian sparse matrices if(!OsqpEigen::SparseMatrixHelper::osqpSparseMatrixToTriplets(m_workspace->data->A,