#11607: read constraints from linear program
----------------------------------+-----------------------------------------
Reporter: john_perry | Owner: ncohen
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.7.2
Component: linear programming | Keywords: sd32
Work_issues: | Upstream: N/A
Reviewer: Nathann Cohen | Author: John Perry
Merged: | Dependencies:
----------------------------------+-----------------------------------------
Changes (by newvalueoldvalue):
* status: needs_info => needs_review
* reviewer: => Nathann Cohen
* author: john_perry => John Perry
Comment:
Helloooooooooooo !!!
Sorry for all this time spent on that ticket. Your patch is nice, though
it required a bit of other modifications:
* The documentation mentionned a former ``n`` parameter
* I reformatted this a bit to fit with the other methods
* I thought it was more natural to return only one triple and not a
list of only one triple when ``indices`` is an integer
* There was something bad with the doctests : the order in which the
values are returned (the indices and the coefficient) depends on the
solver, so running tests on your file with CBC or CPLEX installed returned
new errors. For this reason, I rewrote a bit the documentation so that the
examples are at first *not* tested. In a second section, I wrote some code
reordering the output before the tests so that the functions are indeed
tested, and so that the tests work for any solver.
* While reviewing the code I found something really scary in CPLEX's
interface : the constraints of the shape add_constraint(lb <= function <=
ub) were actually totally wrong ! I added the line which was missing. This
bug ony happened when adding both bounds at the same time (which you do in
your example), so I hope no one was hurt `:-/`. Anyway it is far better
with this fixed !
I attach to this ticket my reviewer's patch. If you agree with the
changes, you can set this ticket to "positive review" `:-)`
Apply:
* [attachment:trac_11607_read_constraints_from_lp.patch]
* [attachment:trac_11607_reviewer.patch]
Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11607#comment:13>
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.