Opened 3 years ago
Last modified 3 years ago
#20657 new defect
More fixes for copying a MIP and the MIPVariables created by new_variable
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-7.3 |
Component: | numerical | Keywords: | lp |
Cc: | dimpase, vdelecroix, jdemeyer, nbruin | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #20602 | Stopgaps: |
Description
This is a follow-up on #20461.
- a new
MixedIntegerLinearProgram.copy
method that takes anames
keyword argument, enabling this operation:sage: p.<x,y> = MixedIntegerLinearProgram() sage: q.<newx,newy> = p.copy()
and the less magical syntaxsage: 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 newcopy
method.
Change History (2)
comment:1 Changed 3 years ago by
- Cc nbruin added
comment:2 Changed 3 years ago by
- Dependencies set to #20602
Note: See
TracTickets for help on using
tickets.