This is a follow-up on #20461.
- a new
MixedIntegerLinearProgram.copy method that takes a names keyword argument, enabling this operation:
sage: p.<x,y> = MixedIntegerLinearProgram()
sage: q.<newx,newy> = p.copy()
and the less magical syntax
sage: q, newx, newy = p.copy([x, y])
- if
MixedIntegerLinearProgram.new_variable has been called, it should set a flag and then if __copy__ (or __deepcopy__) are called, it should display a warning (deprecation??) and refer the user to the new copy method.
Depends on #20602
CC: @dimpase @videlec @jdemeyer @nbruin
Component: numerical
Issue created by migration from https://trac.sagemath.org/ticket/20657