#7652 closed enhancement (fixed)
Adds Linear Programming to the Constructions document
Reported by: | ncohen | Owned by: | mvngu |
---|---|---|---|
Priority: | major | Milestone: | sage-4.3 |
Component: | documentation | Keywords: | |
Cc: | mvngu | Merged in: | sage-4.3.rc1 |
Authors: | Nathann Cohen | Reviewers: | Minh Van Nguyen |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Attachments (2)
Change History (8)
comment:1 Changed 9 years ago by
Changed 9 years ago by
comment:2 Changed 9 years ago by
- Reviewers set to Minh Van Nguyen
- Status changed from new to needs_review
I have attached a reviewer patch trac_7652-reviewer.patch
that includes the following changes:
- some typo fixes
- proper ReST formatting
Once my patch is given some thumbs up, then patches should be applied in this order:
trac_7652.patch
trac_7652-reviewer.patch
comment:3 Changed 9 years ago by
New reviewer patch attached, which needs some reviewing. Note that the patch trac_7652.patch
results in the following doctest failures:
[mvngu@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.
comment:4 Changed 9 years ago by
- Status changed from needs_review to positive_review
Even when you think there is an error somewhere, your patches are perfect Minh !!! This example failed because of the patch #7637 mentioned in the description of the TRAC ticket, which is a small and recent improvement made for Martin Albrecht who needed something of the kind :-)
Once this patch is applied, yours is too, and there is no error in the docstrings, with or without the -optional flag... Positive review ! Thank you for your help again ! :-)
Nathann
comment:5 Changed 9 years ago by
- Merged in set to sage-4.3.rc1
- Resolution set to fixed
- Status changed from positive_review to closed
comment:6 Changed 9 years ago by
- Milestone changed from sage-4.3.1 to sage-4.3
I have not applied this but only read the patch file.
Comments on the English grammar:
should read
I'm not an expert on complexity theory, but I think
is not precisely correct as stated it it? Perhaps better would be
Sorry, I don't understand this beginning of a sentence: