Migration guide from v0.6.x

This is a migration document that lists the changes required to migrate from V0.6 to V1.0 of the OSQP API.

API changes

In this section, we describe the changes done to the API. These include new functions, modified functions and structures, etc.

Action

What to look for

OSQPInfo

The fields of OSQPInfo were changed.

OSQPSettings

The fields of OSQPSettings were changed..

OSQPSolver

OSQPSolver now holds all the information previously stored at OSQPWorkspace (OSQPInfo*, OSQPSettings*, OSQPInformation*, and OSQPWorkspace*).

osqp_cleanup

osqp_cleanup now gets OSQPSolver* instead of OSQPWorkspace*.

OSQPCscMatrix

CSC matrices are stored in OSQPCscMatrix, and are updated with csc_set_data.

osqp_setup

The function osqp_setup and its signature changed.

l,u,q

The vectors l,u,q are updated via osqp_update_vec (which replaces osqp_update_lin_cost and osqp_update_bounds).

osqp_update_data_mat

All of the fields of a data matrix are updated with osqp_update_data_mat (which replaces osqp_update_lower_bound, osqp_update_upper_bound, osqp_update_P_A, osqp_update_P, and osqp_update_A).

osqp_warm_start

The function osqp_warm_start replaces osqp_warm_start_x and osqp_warm_start_y.

osqp_solve

osqp_solve now gets OSQPSolver*.

Renaming

The following types and variables were renamed.

Action

What to look for

polishing

Changed polish to polishing in OSQPSettings.

warn_starting

Changed warm_start to warm_starting in OSQPSettings.

OSQPInt

OSQPInt replaces c_int.

OSQPFloat

OSQPFloat replacees c_float.

Value changes

The following values were cahnged.

Action

What to look for

OSQP_TIME_LIMIT

The default time of OSQP_TIME_LIMIT is now 1e10.

enum osqp_linsys_solver_type

The possbible values changed from QDLDL_SOLVER,MKL_PARDISO_SOLVER to OSQP_UNKNOWN_SOLVER,OSQP_DIRECT_SOLVER,OSQP_INDIRECT_SOLVER.