QPALM
1.2.5
Proximal Augmented Lagrangian method for Quadratic Programs
|
The main C API of the QPALM solver.
Data Structures | |
struct | QPALMSolution |
Solution structure. More... | |
struct | QPALMScaling |
Problem scaling matrices stored as vectors. More... | |
struct | QPALMInfo |
Solver return information. More... | |
struct | QPALMData |
Data structure. More... | |
struct | QPALMSettings |
Settings struct. More... | |
Functions | |
void | qpalm_set_default_settings (QPALMSettings *settings) |
Set default settings from constants.h file. | |
QPALMWorkspace * | qpalm_setup (const QPALMData *data, const QPALMSettings *settings) |
Initialize QPALM solver allocating memory. | |
void | qpalm_warm_start (QPALMWorkspace *work, const c_float *x_warm_start, const c_float *y_warm_start) |
Warm start workspace variables x, x_0, x_prev, Ax, Qx, y and sigma. | |
void | qpalm_solve (QPALMWorkspace *work) |
Solve the quadratic program. | |
void | qpalm_cancel (QPALMWorkspace *work) |
Cancel the ongoing call to qpalm_solve. | |
void | qpalm_update_settings (QPALMWorkspace *work, const QPALMSettings *settings) |
Update the settings to the new settings. | |
void | qpalm_update_bounds (QPALMWorkspace *work, const c_float *bmin, const c_float *bmax) |
Update the lower and upper bounds. | |
void | qpalm_update_q (QPALMWorkspace *work, const c_float *q) |
Update the linear part of the cost. | |
void | qpalm_update_Q_A (QPALMWorkspace *work, const c_float *Qx, const c_float *Ax) |
Update the matrix entries of Q and A. | |
void | qpalm_cleanup (QPALMWorkspace *work) |
Cleanup the workspace by deallocating memory. | |
void qpalm_set_default_settings | ( | QPALMSettings * | settings | ) |
Set default settings from constants.h file.
Assumes settings are already allocated in memory.
settings | Settings structure |
Definition at line 33 of file qpalm.c.
QPALMWorkspace * qpalm_setup | ( | const QPALMData * | data, |
const QPALMSettings * | settings | ||
) |
Initialize QPALM solver allocating memory.
All the inputs must be already allocated in memory before calling.
It performs:
data | Problem data |
settings | Solver settings |
Definition at line 68 of file qpalm.c.
void qpalm_warm_start | ( | QPALMWorkspace * | work, |
const c_float * | x_warm_start, | ||
const c_float * | y_warm_start | ||
) |
Warm start workspace variables x, x_0, x_prev, Ax, Qx, y and sigma.
If x_warm_start or y_warm_start is given as NULL, then the related variables will be initialized to 0. This function also initializes the penalty parameters sigma and the matrix Asqrtsigma.
work | Workspace |
x_warm_start | Warm start for the primal variables |
y_warm_start | Warm start for the dual variables |
Definition at line 260 of file qpalm.c.
void qpalm_solve | ( | QPALMWorkspace * | work | ) |
Solve the quadratic program.
The final solver information is stored in the work->info structure.
The solution is stored in the work->solution structure.
If the problem is primal infeasible, the certificate is stored in work->delta_y.
If the problem is dual infeasible, the certificate is stored in work->delta_x.
work | Workspace |
Definition at line 483 of file qpalm.c.
void qpalm_cancel | ( | QPALMWorkspace * | work | ) |
Cancel the ongoing call to qpalm_solve.
Thread- and signal handler-safe.
Definition at line 479 of file qpalm.c.
void qpalm_update_settings | ( | QPALMWorkspace * | work, |
const QPALMSettings * | settings | ||
) |
void qpalm_update_bounds | ( | QPALMWorkspace * | work, |
const c_float * | bmin, | ||
const c_float * | bmax | ||
) |
void qpalm_update_q | ( | QPALMWorkspace * | work, |
const c_float * | q | ||
) |
void qpalm_update_Q_A | ( | QPALMWorkspace * | work, |
const c_float * | Qx, | ||
const c_float * | Ax | ||
) |
Update the matrix entries of Q and A.
This function does not allow a change in the patterns of Q and A. For this, the user will need to recall qpalm_setup.
work | Workspace |
Qx | Elements of Q (upper diagonal part) |
Ax | Elements of A |
Definition at line 711 of file qpalm.c.
void qpalm_cleanup | ( | QPALMWorkspace * | work | ) |