#12823: Allow constants for objective function & deletion of rows in
MixedIntegerLinearProgram
--------------------------------------+-------------------------------------
Reporter: john_perry | Owner: ncohen
Type: defect | Status: needs_work
Priority: major | Milestone: sage-5.0
Component: linear programming | Resolution:
Keywords: solver objective | Work issues: failing doctests
Report Upstream: N/A | Reviewers:
Authors: john_perry, ncohen | Merged in:
Dependencies: 12833 | Stopgaps:
--------------------------------------+-------------------------------------
Changes (by davidloeffler):
* status: needs_review => needs_work
* work_issues: => failing doctests
Comment:
Patchbot's not happy:
{{{
**********************************************************************
File
"/storage/masiao/sage-5.0.beta13-patchbot/devel/sage-12823/sage/numerical/mip.pyx",
line 1101:
sage: p.number_of_constraints()
Expected:
3
Got:
2
**********************************************************************
File
"/storage/masiao/sage-5.0.beta13-patchbot/devel/sage-12823/sage/numerical/mip.pyx",
line 1131:
sage: p.remove_constraint([0, 1])
Exception raised:
Traceback (most recent call last):
File
"/storage/masiao/sage-5.0.beta13-patchbot/local/bin/ncadoctest.py", line
1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File
"/storage/masiao/sage-5.0.beta13-patchbot/local/bin/sagedoctest.py", line
38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File
"/storage/masiao/sage-5.0.beta13-patchbot/local/bin/ncadoctest.py", line
1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_17[8]>", line 1, in <module>
p.remove_constraint([Integer(0), Integer(1)])###line 1131:
sage: p.remove_constraint([0, 1])
File "mip.pyx", line 1070, in
sage.numerical.mip.MixedIntegerLinearProgram.remove_constraint
(sage/numerical/mip.c:6538)
def remove_constraint(self, int i):
TypeError: an integer is required
**********************************************************************
File
"/storage/masiao/sage-5.0.beta13-patchbot/devel/sage-12823/sage/numerical/mip.pyx",
line 1132:
sage: p.show()
Expected:
Maximization:
<BLANKLINE>
Constraints:
x_0 <= 4.0
...
Got:
Maximization:
<BLANKLINE>
Constraints:
x_0 + x_1 <= 10.0
x_0 - x_1 <= 0.0
x_0 <= 4.0
Variables:
x_0 is a continuous variable (min=0.0, max=+oo)
x_1 is a continuous variable (min=0.0, max=+oo)
**********************************************************************
2 items had failures:
1 of 12 in __main__.example_16
2 of 12 in __main__.example_17
***Test Failed*** 3 failures.
For whitespace errors, see the file
/home/masiao/.sage/tmp/fermat-6426/mip_26729.py
[2.5 s]
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12823#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.