Go to the documentation of this file.
36 double t_cholsolve_ms;
127 double linalg_time_ms;
int ndlqr_GetNumVars(NdLqrSolver *solver)
Gets the total number of decision variables for the problem.
Definition: solver.c:211
Matrix * diagonals
(nhorizon,2) array of diagonal blocks (Q,R)
Definition: solver.h:121
NdLqrProfile ndlqr_NewNdLqrProfile()
Create a profile initialized with zeros.
Definition: solver.c:11
void ndlqr_CompareProfile(NdLqrProfile *base, NdLqrProfile *prof)
Compare two profiles, printing the comparison to stdout.
Definition: solver.c:49
void ndlqr_ResetSolver(NdLqrSolver *solver)
Resets the rsLQR solver.
Definition: solver.c:98
double solve_time_ms
total solve time in milliseconds.
Definition: solver.h:126
int nhorizon
length of the time horizon
Definition: solver.h:117
int ndlqr_PrintSolveProfile(NdLqrSolver *solver)
Prints a summary of how long individual components took.
Definition: solver.c:224
void ndlqr_CopyProfile(NdLqrProfile *dest, NdLqrProfile *src)
Copy the profile information to a new profile.
Definition: solver.c:25
NdData * fact
factorization
Definition: solver.h:123
A struct describing how long each part of the solve took, in milliseconds.
Definition: solver.h:31
Defines the LQRProblem type.
Binary tree for rsLQR algorithm.
NdData * data
original matrix data
Definition: solver.h:122
int ninputs
number of control inputs
Definition: solver.h:116
int depth
depth of the binary tree
Definition: solver.h:118
int num_threads
Number of threads used by the solver.
Definition: solver.h:129
int ndlqr_GetNumThreads(NdLqrSolver *solver)
Get the number of threads used during the rsLQR solve.
Definition: solver.c:219
The binary tree for the rsLQR solver.
Definition: binary_tree.h:64
Represents a matrix of double-precision data.
Definition: matrix.h:71
Defines core linear algebra routines needed by the solvers.
int nvars
number of decision variables (size of the linear system)
Definition: solver.h:119
Main solver for rsLQR.
Definition: solver.h:114
void ndlqr_PrintProfile(NdLqrProfile *profile)
Print a summary fo the profile.
Definition: solver.c:35
A struct for storing all of the info for the Cholesky factorization of the rsLQR solver.
NdLqrProfile ndlqr_GetProfile(NdLqrSolver *solver)
Ge the internal profile data from a solve.
Definition: solver.c:230
int nstates
size of state vector
Definition: solver.h:115
NdData * soln
solution vector (also the initial RHS)
Definition: solver.h:124
Core storage container for the rsLQR solver.
Definition: nddata.h:83
int ndlqr_SetNumThreads(NdLqrSolver *solver, int num_threads)
Set the number of threads to be used during the solve.
Definition: solver.c:213
int ndlqr_InitializeWithLQRProblem(const LQRProblem *lqrprob, NdLqrSolver *solver)
Initialize the solver with data from an LQR Problem.
Definition: solver.c:122
void ndlqr_PrintSolveSummary(NdLqrSolver *solver)
Prints a summary of the solve.
Definition: solver.c:196
NdLqrSolver * ndlqr_NewNdLqrSolver(int nstates, int ninputs, int nhorizon)
Create a new solver, allocating all the required memory.
Definition: solver.c:61
void ndlqr_ResetProfile(NdLqrProfile *prof)
Reset the profile to its initialized state.
Definition: solver.c:16
Describes an LQR problem with affine terms.
Definition: lqr_problem.h:31
int ndlqr_FreeNdLqrSolver(NdLqrSolver *solver)
Deallocates the memory for the solver.
Definition: solver.c:108
Stores a list of CholeskyInfo structs for the rsLQR solver.
Definition: cholesky_factors.h:30
Defines the core storage types used by the rsLQR solver.