get_structural_incidence_matrix
(function from pyomo.contrib.incidence_analysis.interface
)
- pyomo.contrib.incidence_analysis.interface.get_structural_incidence_matrix(variables, constraints, **kwds)[source]
Return the incidence matrix of Pyomo constraints and variables
- Parameters:
variables (List of Pyomo VarData objects)
constraints (List of Pyomo ConstraintData objects)
include_fixed (Bool) – Flag for whether fixed variables should be included in the matrix nonzeros
- Returns:
COO matrix. Rows are indices into the user-provided list of constraints, columns are indices into the user-provided list of variables. Entries are 1.0.
- Return type:
scipy.sparse.coo_matrix