MLinExpr.zeros()

zeros ( shape )

Construct an all-zero MLinExpr object of the given shape.

Arguments:

shape: An int, or tuple of int. The requested shape.

Return value:

An MLinExpr, initialized to zero.

Example usage:

  mle = gp.MLinExpr.zeros(3)
  x = model.addMVar(3)
  mle += 2 * x