QPALM
A proximal augmented Lagrangian method for QPs.
|
QPALM main solver API. More...
#include "constants.h"
#include "global_opts.h"
#include "iteration.h"
#include "lin_alg.h"
#include "linesearch.h"
#include "newton.h"
#include "nonconvex.h"
#include "scaling.h"
#include "solver_interface.h"
#include "termination.h"
#include "types.h"
#include "util.h"
#include "validate.h"
Go to the source code of this file.
Functions | |
Main solver API | |
void | qpalm_set_default_settings (QPALMSettings *settings) |
Set default settings from constants.h file. More... | |
QPALMWorkspace * | qpalm_setup (const QPALMData *data, const QPALMSettings *settings) |
Initialize QPALM solver allocating memory. More... | |
void | qpalm_warm_start (QPALMWorkspace *work, c_float *x_warm_start, c_float *y_warm_start) |
Warm start workspace variables x, x_0, x_prev, Ax, Qx, y and sigma. More... | |
void | qpalm_solve (QPALMWorkspace *work) |
Solve the quadratic program. More... | |
void | qpalm_update_settings (QPALMWorkspace *work, const QPALMSettings *settings) |
Update the settings to the new settings. More... | |
void | qpalm_update_bounds (QPALMWorkspace *work, const c_float *bmin, const c_float *bmax) |
Update the lower and upper bounds. More... | |
void | qpalm_update_q (QPALMWorkspace *work, const c_float *q) |
Update the linear part of the cost. More... | |
void | qpalm_cleanup (QPALMWorkspace *work) |
Cleanup the workspace by deallocating memory. More... | |
QPALM main solver API.
This file contains the main functions that can be called by the user. The user can load the default settings, setup the workspace with data and settings, warm_start the primal and dual variables, run the solver, update the settings, bounds and linear part of the cost, and finally cleanup the workspace afterwards.
void qpalm_cleanup | ( | QPALMWorkspace * | work | ) |
Cleanup the workspace by deallocating memory.
This function should be the called after the user is done using QPALM.
work | Workspace |
void qpalm_set_default_settings | ( | QPALMSettings * | settings | ) |
Set default settings from constants.h file.
Assumes settings are already allocated in memory.
settings | Settings structure |
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 |
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 |
NB Implementation detail: store Einv*Ax and Einv*z in temp_2m. The infinity norm of that vector is equal to the maximum of the infinity norms of Einv*Ax and Einv*z.
void qpalm_update_bounds | ( | QPALMWorkspace * | work, |
const c_float * | bmin, | ||
const c_float * | bmax | ||
) |
Update the lower and upper bounds.
Use NULL to indicate that one of the bounds does not change.
work | Workspace |
bmin | New lower bounds |
bmax | New upper bounds |
void qpalm_update_q | ( | QPALMWorkspace * | work, |
const c_float * | q | ||
) |
Update the linear part of the cost.
This causes an update of the cost scaling factor as well.
work | Workspace |
q | Linear part of the objective |
void qpalm_update_settings | ( | QPALMWorkspace * | work, |
const QPALMSettings * | settings | ||
) |
Update the settings to the new settings.
work | Workspace |
settings | New settings |
void qpalm_warm_start | ( | QPALMWorkspace * | work, |
c_float * | x_warm_start, | ||
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 |