I would like to ask whether it makes sense to think about the format in which sparse matrices are transferred to Gurobi?
I assume, Gurobi will internally use any of the formats CSC, CSR or even COO. So I thought it might be efficient with regard to time and memory to transfer the matrices in the format they are internally used (when using really big data).
I have only found a few pieces of information in the reference manual (https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/10.0/refman.pdf) when searching for the keywords CSC & CSR:
- In the C-API it is documented for adding constraints that some constraints are passed into the routines and returned by according queries in the CSR-format.
- In the C-API it is documented for adding variabels that constraint attributes vbeg are passed in the routines and returned by according queries in the CSC-format.
- In the python-API Model.getA() delivers a CSR-matrix.
Actually I am asking for the python-API, but this may differ when using the C-API directly, or?
Maybe that also differs for linear constraint matrices and quadratic constraint matrices?
Please sign in to leave a comment.