Skip to content

More fixes for copying a MIP and the MIPVariables created by new_variable #20657

@mkoeppe

Description

@mkoeppe

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions