#20328 closed defect (fixed)
tests related to cplex / gurobi
Reported by:  vdelecroix  Owned by:  

Priority:  major  Milestone:  sage7.2 
Component:  linear programming  Keywords:  
Cc:  mkoeppe, dimpase  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  Dima Pasechnik 
Report Upstream:  N/A  Work issues:  
Branch:  cfaf157 (Commits)  Commit:  
Dependencies:  #19525  Stopgaps: 
Description (last modified by )
 File "numerical/backends/generic_backend.pyx", line 1153, the following doctest is wrong if gurobi is available
sage: default_mip_solver("GUROBI") Traceback (most recent call last): ... ValueError: Gurobi is not available. Please refer to the documentation to install it.
 File "numerical/backends/cplex_backend.pyx", line 861
Failed example: p.solve() # optional  CPLEX Expected: Traceback (most recent call last): ... MIPSolverException: 'CPLEX: The primal has no feasible solution' Got: Traceback (most recent call last): ... MIPSolverException: CPLEX: The primal has no feasible solution
 File "numerical/backends/gurobi_backend.pyx", line 686
Failed example: p.solve() # optional  Gurobi Expected: Traceback (most recent call last): ... MIPSolverException: 'Gurobi: The problem is infeasible' Got: Traceback (most recent call last): ... MIPSolverException: Gurobi: The problem is infeasible
 File "numerical/backends/gurobi_backend.pyx", line 449
Failed example: p.get_values([x,y]) # optional  Gurobi Expected: [0.0, 3.0] Got: [0.0, 3.0]
 File "numerical/backends/gurobi_backend.pyx", line 484
Failed example: p.row(0) # optional  Gurobi Expected: ([0, 1, 2, 3, 4], [0.0, 1.0, 2.0, 3.0, 4.0]) Got: ([1, 2, 3, 4], [1.0, 2.0, 3.0, 4.0])
 File "numerical/backends/gurobi_backend.pyx", line 554
Failed example: p.row(0) # optional  Gurobi Expected: ([0, 1, 2, 3, 4], [0.0, 1.0, 2.0, 3.0, 4.0]) Got: ([1, 2, 3, 4], [1.0, 2.0, 3.0, 4.0])
 File "numerical/backends/gurobi_backend.pyx", line 607
Failed example: p.row(0) # optional  Gurobi Expected: ([0, 1, 2, 3, 4], [0.0, 1.0, 2.0, 3.0, 4.0]) Got: ([1, 2, 3, 4], [1.0, 2.0, 3.0, 4.0])
Change History (9)
comment:1 Changed 5 years ago by
 Description modified (diff)
comment:2 Changed 5 years ago by
 Description modified (diff)
 Summary changed from stupid doctest related to gurobi to tests related to cplex / gurobi
comment:3 Changed 5 years ago by
 Dependencies set to #19525
comment:4 Changed 5 years ago by
 Branch set to u/mkoeppe/tests_related_to_cplex___gurobi
comment:5 Changed 5 years ago by
 Cc dimpase added
 Commit set to cfaf1576465a26032a11d21d914d0fa3ed62c2e0
 Status changed from new to needs_review
Here's a fix for the remaining failures with Gurobi.
mip.pyx is no longer testing with the default MIP solver; now always uses GLPK. Testing with the default MIP solver seems like a bad idea. We'll ensure consistency of the backends using the new backend testsuite introduced in #20323, #20424.
New commits:
658972c  Fix doctests when Gurobi is installed

cfaf157  Instead of running MixedIntegerLinearProgram doctests with the default solver, use GLPK

comment:6 Changed 5 years ago by
I've tested with current Gurobi and current CPLEX on Mac OS X. All tests pass.
comment:7 Changed 5 years ago by
 Reviewers set to Dima Pasechnik
 Status changed from needs_review to positive_review
comment:8 Changed 5 years ago by
 Branch changed from u/mkoeppe/tests_related_to_cplex___gurobi to cfaf1576465a26032a11d21d914d0fa3ed62c2e0
 Resolution set to fixed
 Status changed from positive_review to closed
comment:9 Changed 4 years ago by
 Commit cfaf1576465a26032a11d21d914d0fa3ed62c2e0 deleted
Followup: #20600
Note: See
TracTickets for help on using
tickets.
Some of these were fixed in #19525.