Open pablokrupa opened 2 years ago
Right now they need to be diagonal in the laxMPC, equMPC and ellipMPC solvers due to the way in which z_k is computed (I assume that the inverse of the Hessian is diagonal to speed up computations).
I have started working on making a version for non-diagonal matrices in the branch dev/non_diag, but I will not continue pursuing this line for now.
Support for non-diagonal Q
and R
matrices was added to the MPCT/EADMM solver in f030de196adc59f6147d86286fffd4c0f6421efe. A similar approach could probably be used in the other ADMM-based solvers.
The functions that compute the ingredients (for instance, compute_ellipMPC_ADMM_ingredients.m) currently assume that Q and R are diagonal, which is not necessary. It should be changed so that they can be non-diagonal.
This change will also require changing the part of the C code of each solver where vector q is updated (see for instance code_ellipMPC_ADMM_C.c).