Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
Model.getA()
getA ( )
Query the linear constraint matrix of the model. You'll need to
have scipy
installed for this function to work.
Arguments:
Return value:
The matrix as a scipy.sparse matrix in CSR format.
Example usage:
A = model.getA() sense = numpy.array(model.getAttr("Sense",model.getConstrs())) # extract sub matrices of (in)equality constraints Aeq = A[sense == '=', :] Ale = A[sense == '<', :] Age = A[sense == '>', :]