Opened 8 years ago
Closed 8 years ago
#12019 closed defect (fixed)
doctest failure in linear_programming.rst (multiple correct solutions)
Reported by: | emil | Owned by: | ncohen |
---|---|---|---|
Priority: | minor | Milestone: | sage-4.8 |
Component: | linear programming | Keywords: | doctests, linear programming, GLPK, multible solutions |
Cc: | ncohen | Merged in: | sage-4.8.alpha3 |
Authors: | Nathann Cohen | Reviewers: | Emil Widmann |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
sage -t -force_lib "devel/sage/doc/en/thematic_tutorials/ linear_programming.rst" ********************************************************************** File "/mnt/sda6/COMPILE/sage-4.7.2/devel/sage/doc/en/ thematic_tutorials/linear_programming.rst", line 366: sage: [e for e,b in matching.iteritems() if b == 1] Expected: [(0, 1), (6, 9), (2, 7), (3, 4), (5, 8)] Got: [(1, 6), (0, 4), (2, 3), (5, 8), (7, 9)] **********************************************************************
The result is correct but it is different from the expected solution. The tested problem has multiple solutions and it seems that the result of the example is machine dependent.
The proposed fix is to flag the example as "not tested" and also to change the documentation so that users are aware that there is more than one correct solution.
I don't know the reason for this dependency but Nathann Cohen mentioned it might depend on the GLPK library.
http://groups.google.com/group/sage-devel/browse_thread/thread/e1886d5ba5ade945
Attachments (2)
Change History (12)
comment:1 Changed 8 years ago by
- Description modified (diff)
Changed 8 years ago by
comment:2 Changed 8 years ago by
- Status changed from new to needs_review
comment:3 Changed 8 years ago by
I would like to know on which system these failures occur. Sage has been widely tested on many different systems, so I'm surprised to see this failure.
comment:4 Changed 8 years ago by
this one seems food enough for me... I attach system report :-) strange thing is, it happened the first time for me
comment:5 Changed 8 years ago by
I mean the error was not there with the previous versions I compiled (4.31, 4.32, 4.6, 4.61)
comment:6 Changed 8 years ago by
- Status changed from needs_review to positive_review
comment:7 Changed 8 years ago by
- Work issues assessment if funtionality is tested elsewhere, if not create TEST section with example with unique solution, change help docstring so users are aware of multible solutions deleted
emil: write your name as Reviewer on this ticket and also add yourself to http://trac.sagemath.org/sage_trac/#AccountNamesMappedtoRealNames
comment:8 Changed 8 years ago by
- Reviewers set to emil
comment:9 Changed 8 years ago by
- Reviewers changed from emil to Emil Widmann
comment:10 Changed 8 years ago by
- Merged in set to sage-4.8.alpha3
- Resolution set to fixed
- Status changed from positive_review to closed
I think that adding a flag "not tested" to this line is more than sufficient in this case. The LP code is being tested in so many places (and the matching stuff too), that everything would fail (and actually does, when there is the slightest bug with MIP) if there is anything wrong.
Nathann