max_ ( variables )

Used to set a decision variable equal to the maximum of a list of decision variables (or constants). You can pass the arguments as a Python list or as a comma-separated list.

Example usage:

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

Return value:

Returns a GenExpr object.