Based on osqp/osqp#576 I understood that we had to stop using csc_spalloc and start using csc_set_data, however the two functions do not have the same functionality. So I compare csc_spalloc and csc_set_data code: csc_spalloc: https://github.com/osqp/osqp/blob/c2ab44edf74172125000656...
import osqp import numpy as np from scipy import sparse # Define problem data P = sparse.csc_matrix([[1, 0], [0, 1]]) A = sparse.csc_matrix([[1, 1]]) l = np.array([1]) u = np.array([1]) # Create an OSQP object prob = osqp.OSQP() # Setup workspace and change alpha...
As far as I understood the sparsity pattern of the hessian matrix is set in the following lines. casadi/casadi/interfaces/osqp/osqp_interface.cpp Lines 171 to 178 in fadc864 csc H; H.m = nx_; H.n = nx_; H.nz = H_.nnz(); H.nzmax = H_.nnz(); H.x = get_ptr...
85 std::vector<c_float> P_data;86 std::vector<c_int> P_indices;87 std::vector<c_int> P_indptr;88 DenseToCSCMatrix(P, &P_data, &P_indices, &P_indptr);89 90 // change A to csc format91 const MatrixXd& inequality_constraint_matrix =...