C/C++

Main solver API

The main C/C++ API is imported from the header osqp.h and provides the following functions

Sublevel API

Sublevel C/C++ API is also imported from the header osqp.h and provides the following functions

Warm start

OSQP automatically warm starts primal and dual variables from the previous QP solution. If you would like to warm start their values manually, you can use

Update problem data

Problem data can be updated without executing the setup again using the following functions.

Data types

The most basic used datatypes are

  • c_int: can be long or int if the compiler flag DLONG is set or not

  • c_float: can be a float or a double if the compiler flag DFLOAT is set or not.

The relevant structures used in the API are

Data

The matrices are defined in Compressed Sparse Column (CSC) format.

Settings

Solution

Info

Workspace

Scaling

Polish