|
cyqlone
develop
Fast, parallel and vectorized solver for linear systems with optimal control structure.
|
#include <cyqlone/conversion.hpp>#include <batmat/assume.hpp>#include <guanaqo/blas/hl-blas-interface.hpp>#include <algorithm>#include <numeric>Go to the source code of this file.
Namespaces | |
| namespace | cyqlone |
Functions | |
| void | cyqlone::reference_to_gradient (const LinearOCPStorage &ocp, std::span< const real_t > ref, std::span< real_t > qr) |
| Simply computes the gradient of the quadratic cost \( J(x, u) = \sum_{j=1}^{N-1} \ell_j(x^j, u^j) + \ell_N(x^N) \), with \( \ell_j(x, u) = \tfrac12 \left\| \begin{pmatrix} x - x^j_\text{ref}
\\ u - u^j_\text{ref} \end{pmatrix} \right\|_{H_j}^2 \), with the Hessian \( H_j = \begin{pmatrix} Q_j & S_j^\top \\ S_j & R_j \end{pmatrix} \). | |
| void | cyqlone::reference_to_gradient (LinearOCPStorage &ocp, std::span< const real_t > ref) |
| Simply computes the gradient of the quadratic cost \( J(x, u) = \sum_{j=1}^{N-1} \ell_j(x^j, u^j) + \ell_N(x^N) \), with \( \ell_j(x, u) = \tfrac12 \left\| \begin{pmatrix} x - x^j_\text{ref}
\\ u - u^j_\text{ref} \end{pmatrix} \right\|_{H_j}^2 \), with the Hessian \( H_j = \begin{pmatrix} Q_j & S_j^\top \\ S_j & R_j \end{pmatrix} \). | |