and_()


and_()

and_ ( *args )

Used to set a binary decision variable equal to the logical AND of a list of other binary decision variables.

Note that the Gurobi Python interface includes an equivalent all_() function.

Arguments:

*args (Var, or list of Var, or tupledict of Var values): The variables over which the AND concatenation will be taken.

Example usage:

  m.addConstr(z == and_(x, y))
  m.addConstr(z == and_([x, y]))

Return value:

Returns a GenExpr object.