Opened 9 years ago

Last modified 9 years ago

#12019 closed defect

doctest failure in linear_programming.rst (multiple correct solutions) — at Version 1

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:
Authors: Reviewers:
Report Upstream: N/A 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
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by emil)

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]


  [(0, 1), (6, 9), (2, 7), (3, 4), (5, 8)]


  [(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.

Change History (2)

comment:1 Changed 9 years ago by emil

  • Description modified (diff)

Changed 9 years ago by ncohen

Note: See TracTickets for help on using tickets.