QPALM main
Proximal Augmented Lagrangian method for Quadratic Programs
Loading...
Searching...
No Matches
Data Structures | Functions
Main solver API

Detailed Description

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.
 
QPALMWorkspaceqpalm_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.
 

Function Documentation

◆ qpalm_set_default_settings()

void qpalm_set_default_settings ( QPALMSettings settings)

Set default settings from constants.h file.

Assumes settings are already allocated in memory.

Parameters
settingsSettings structure

Definition at line 33 of file qpalm.c.

+ Here is the caller graph for this function:

◆ qpalm_setup()

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 and settings validation
  • problem data scaling
Parameters
dataProblem data
settingsSolver settings
Returns
Solver environment

Definition at line 68 of file qpalm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qpalm_warm_start()

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.

Parameters
workWorkspace
x_warm_startWarm start for the primal variables
y_warm_startWarm start for the dual variables

Definition at line 260 of file qpalm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qpalm_solve()

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.

Parameters
workWorkspace

Definition at line 483 of file qpalm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qpalm_cancel()

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.

+ Here is the caller graph for this function:

◆ qpalm_update_settings()

void qpalm_update_settings ( QPALMWorkspace work,
const QPALMSettings settings 
)

Update the settings to the new settings.

Warning
Decreasing settings->scaling is not allowed. Increasing it is possible.
Parameters
workWorkspace
settingsNew settings

Definition at line 610 of file qpalm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qpalm_update_bounds()

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.

Parameters
workWorkspace
bminNew lower bounds
bmaxNew upper bounds

Definition at line 643 of file qpalm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qpalm_update_q()

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.

Parameters
workWorkspace
qLinear part of the objective

Definition at line 690 of file qpalm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qpalm_update_Q_A()

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.

Parameters
workWorkspace
QxElements of Q (upper diagonal part)
AxElements of A

Definition at line 711 of file qpalm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qpalm_cleanup()

void qpalm_cleanup ( QPALMWorkspace work)

Cleanup the workspace by deallocating memory.

This function should be the called after the user is done using QPALM.

Parameters
workWorkspace

Definition at line 735 of file qpalm.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: