MLinExpr.copy()

copy ( )

Create a copy of a linear matrix expression.

Return value:

Copy of expression object.

Example usage:

  orig = 2 * model.addMVar(3) + 1.0
  copy = orig.copy()
  copy += 2.0  # Leaves 'orig' untouched