#20446: GLPKExactBackend - a variation on GLPKBackend that sets a solver 
parameter
and signals errors on integer variables
-------------------------------------+-------------------------------------
       Reporter:  mkoeppe            |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.2
      Component:  numerical          |   Resolution:
       Keywords:  lp                 |    Merged in:
        Authors:  Matthias Koeppe    |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  
u/mkoeppe/glpkexactbackend___a_variation_on_glpkbackend_that_sets_a_solver_parameter_and_signals_errors_on_integer_variables|
  e7a2bd7d86034b16c8407ae534d75c39956edbf4
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Description changed by mkoeppe:

Old description:

> 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
> }}}
>
> While at it, could also support the "glp_simplex followed by glp_exact"
> mode that is mentioned in http://trac.sagemath.org/ticket/18735#comment:7

New description:

 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"

--

--
Ticket URL: <http://trac.sagemath.org/ticket/20446#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to