Opened 3 years ago

Last modified 3 years ago

#26551 new defect

GLPK backend: Default glp_intopt_only causes some pure LPs to fail

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-8.5
Component: numerical Keywords: lp
Cc: jwewang@… Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

GLPKBackend sets its parameter simplex_or_intopt to glp_intopt_only, whether integer variables are present or not. Apparently this is not a great default for pure LP solving.

sage: %runfile sage/GLPK_bug.sage
sage: p = generate_lp()
sage: p.solve()
MIPSolverException: GLPK: Problem has no feasible solution
sage: p.solver_parameter("simplex_or_intopt", "simplex_then_intopt")
sage: p.solve()
MIPSolverException: GLPK: Problem has no feasible solution
sage: p.solver_parameter("simplex_or_intopt", "simplex_only")
sage: p.solve()
-2.1458471804786995e-05

Attachments (2)

GLPK_bug.sage (7.8 KB) - added by mkoeppe 3 years ago.
GLPK_bug1.sage (1.2 KB) - added by gh-jiawei-wang-ucd 3 years ago.
sage: %runfile sage/GLPK_bug.sage sage: p = generate_lp() sage: p.solve()

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by mkoeppe

Changed 3 years ago by gh-jiawei-wang-ucd

sage: %runfile sage/GLPK_bug.sage sage: p = generate_lp() sage: p.solve()

comment:1 Changed 3 years ago by gh-jiawei-wang-ucd

Here is another (small) example that the default parameter simplex_or_intopt causes pure lp to fail.

See attachment GLPK_bug1.sage

sage: %runfile sage/GLPK_bug1.sage

sage: p = generate_lp1()

sage: p.solve()

MIPSolverException: GLPK: The LP (relaxation) problem has no dual feasible solution

sage: p.solver_parameter("simplex_or_intopt", "simplex_then_intopt")

MIPSolverException: GLPK: The LP (relaxation) problem has no dual feasible solution

sage: p.solver_parameter("simplex_or_intopt", "simplex_only")

MIPSolverException: GLPK: Problem has unbounded solution

sage: p.solver_parameter("simplex_or_intopt", "exact_simplex_only")

3.586974648031236e-06

Note: See TracTickets for help on using tickets.