#7652: Adds Linear Programming to the Constructions document
-----------------------------+----------------------------------------------
Reporter: ncohen | Owner: mvngu
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.3
Component: documentation | Keywords:
Work_issues: | Author: Nathann Cohen
Upstream: N/A | Reviewer: Minh Van Nguyen
Merged: |
-----------------------------+----------------------------------------------
Comment(by mvngu):
New reviewer patch attached, which needs some reviewing. Note that the
patch `trac_7652.patch` results in the following doctest failures:
{{{
[mv...@sage sage-4.3.alpha1-7652-linear]$ ./sage -t -long devel/sage-
main/doc/en/constructions/linear_programming.rst
sage -t -long "devel/sage-
main/doc/en/constructions/linear_programming.rst"
**********************************************************************
File "/scratch/mvngu/sandbox/sage-4.3.alpha1-7652-linear/devel/sage-
main/doc/en/constructions/linear_programming.rst", line 112:
sage: p.set_objective( p["first unique variable"] + B[2] + p[-3] )
Exception raised:
Traceback (most recent call last):
File
"/scratch/mvngu/sandbox/sage-4.3.alpha1-7652-linear/local/bin/ncadoctest.py",
line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File
"/scratch/mvngu/sandbox/sage-4.3.alpha1-7652-linear/local/bin/sagedoctest.py",
line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File
"/scratch/mvngu/sandbox/sage-4.3.alpha1-7652-linear/local/bin/ncadoctest.py",
line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_2[4]>", line 1, in <module>
p.set_objective( p["first unique variable"] + B[Integer(2)] +
p[-Integer(3)] )###line 112:
sage: p.set_objective( p["first unique variable"] + B[2] + p[-3] )
AttributeError: MixedIntegerLinearProgram instance has no attribute
'__getitem__'
**********************************************************************
File "/scratch/mvngu/sandbox/sage-4.3.alpha1-7652-linear/devel/sage-
main/doc/en/constructions/linear_programming.rst", line 134:
sage: print x_sol
Expected:
{1: 0.83333333333333337, 2: 0.0}
Got:
{1: None, 2: None}
**********************************************************************
2 items had failures:
1 of 5 in __main__.example_2
1 of 9 in __main__.example_3
***Test Failed*** 2 failures.
For whitespace errors, see the file
/home/mvngu/.sage//tmp/.doctest_linear_programming.py
[2.1 s]
exit code: 1024
}}}
My reviewer patch resolves the second failure, but I'm unable to resolve
the first one. Help wanted.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7652#comment:3>
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.