MConstr.tolist()

tolist ( )

Return the constraints associated with this matrix constraint as a list of individual Constr objects.

Return value:

List of Constr objects.

Example usage:

  mc = model.addConstr(A @ x <= b)
  constrlist = mc.tolist()
  # Do something with the Constr correponding to mc[3]
  print(constrlist[3])