Skip to content

GLPKExactBackend - a variation on GLPKBackend that sets a solver parameter and signals errors on integer variables #20446

@mkoeppe

Description

@mkoeppe

GLPK has an exact simplex method, which can be requested by setting a solver parameter.
Via #20406, a user can set this parameter.

It would be more convenient to define a named backend that does that.

Also, setting the solver parameter actually causes GLPK to solve the continuous relaxation, ignoring all integer variables. This might be surprising to users.

sage: delsarte_bound_additive_hamming_space(19,15,7,isinteger=True)
3
sage: from sage.numerical.backends.generic_backend import get_solver
sage: def glpk_exact_solver():                                               
        b = get_solver(solver="GLPK")
        b.solver_parameter("simplex_or_intopt", "exact_simplex_only")
        return b
sage: delsarte_bound_additive_hamming_space(19,15,7,solver=glpk_exact_solver,isinteger=True)
glp_exact: 54 rows, 20 columns, 795 non-zeros
...
2

So there would be value in a named backend that actually signals an error when the user requests integer variables (like the CVXOpt and InteractiveLP backends do).

sage: delsarte_bound_additive_hamming_space(19,15,7,solver="GLPK/exact",isinteger=True)
ValueError: This backend does not handle integer variables

Follow-up wishlist item: #20458: GLPKBackend/GLPKExactBackend: Support "glp_simplex followed by glp_exact"

CC: @dimpase @videlec

Component: numerical

Author: Matthias Koeppe

Branch/Commit: 8fc11ea

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/20446

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions