rsLQR  0.1
NdData Struct Reference

Core storage container for the rsLQR solver. More...

#include <nddata.h>

Data Fields

int nstates
 size of state vector
 
int ninputs
 number of control inputs
 
int nsegments
 number of segments, or one less than the length of the horizon
 
int depth
 number of columns of factors to store
 
int width
 width of each factor. Will be n for matrix data and typically 1 for the right-hand-side vector.
 
double * data
 pointer to entire chunk of allocated memory
 
NdFactorfactors
 (nsegments, depth) array of factors. Stored in column-order.
 

Detailed Description

Core storage container for the rsLQR solver.

Represents an array of memory blocks, arranged as follows:

\[ \begin{bmatrix} F_1^{(1)} & X_1^{(2)} & \dots & X_1^{(K)} \\ F_2^{(1)} & X_2^{(2)} & \dots & X_2^{(K)} \\ \vdots & \vdots & \ddots & \vdots \\ F_{N-1}^{(1)} & X_{N-1}^{(2)} & \dots & X_{N-1}^{(K)} \\ \end{bmatrix} \]

Each \( F \) is a NdFactor further dividing this memory into chunks of size (n,w) or (m,w), where the width w is equal to NdData.width. Each block is stored as an individual Matrix, which stores the data column-wise. This keeps the data for a single block together in one contiguous block of memory. The entire block of memory for all of the factors is allocated as one large block (with pointer NdData.data).

In the solver, this is used to represent both the KKT matrix data and the right-hand-side vector. When storing the matrix data, each column represents a level of the binary tree. The current implementation only allows for a single right-hand-side vector, so that when width is passed to the initializer, it only creates a single column of factors. Future modifications could alternatively make the right-hand-side vector the last column in the matrix data, as suggested in the original paper.

Methods


The documentation for this struct was generated from the following file: