Model.store_sparse_pattern#

Model.store_sparse_pattern()[source]#

Store rows and columns of the non-zeros in the Jacobians for building the sparsity pattern.

This function converts the internal 0-indexed equation/variable address to the numerical addresses for the loaded system.

Calling sequence: For each Jacobian name, fx, fy, gx and gy, store by a) generated constant and variable Jacobians c) user-provided constant and variable Jacobians, d) user-provided block constant and variable Jacobians

Notes

If self.n == 0, skipping this function will avoid appending empty lists/arrays and non-empty values, which, as a combination, is not accepted by kvxopt.spmatrix.