#12884: Fix problems introduced by remove_constraint functionality in MIP
----------------------------------------------------------------------------+
Reporter: john_perry |
Owner: ncohen
Type: defect |
Status: needs_review
Priority: minor |
Milestone: sage-5.1
Component: linear programming |
Resolution:
Keywords: glpk, mixed integer programming, mip, linear programming |
Work issues:
Report Upstream: N/A |
Reviewers:
Authors: John Perry |
Merged in:
Dependencies: #12823 |
Stopgaps:
----------------------------------------------------------------------------+
Comment (by ncohen):
Hellooooooooo !!!
> Okay, a patch is ready. I don't see any way of removing the constraints
efficiently, shy of trying to changing the constraints to a list. I'm not
sure we lose that much in terms of efficiency in searching for a new
constraint, but removing the ith constraint is quick and easy. Maybe you
have a better way of removing the constraints?
Well, what about taking the ith constraint, then normalize it (as you do
before adding it to the set), then pop the normalized constraint out of
the set ? We could have a _normalize_constraint method in the main class,
which would be called before adding or removing a constraint, couldn't we
?
And could you please add a doctest ? Otherwise I am pretty sure we could
forget again this duplication mechanism next time we work on constraints
`:-)`
Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12884#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.