#12736: More solver options for GLPK
--------------------------------------+-------------------------------------
       Reporter:  john_perry          |         Owner:  ncohen  
           Type:  enhancement         |        Status:  new     
       Priority:  major               |     Milestone:  sage-5.0
      Component:  linear programming  |    Resolution:          
       Keywords:  solver parameters   |   Work issues:          
Report Upstream:  N/A                 |     Reviewers:          
        Authors:                      |     Merged in:          
   Dependencies:                      |      Stopgaps:          
--------------------------------------+-------------------------------------

Comment (by john_perry):

 The declaration of the `solve()` method of the `MixedIntegerLinearProgram`
 class is

 {{{
     def solve(self, solver=None, log=0, objective_only=False):
 }}}
 Within the function we have

 {{{
         self._backend.set_verbosity(log)
 }}}
 Makes sense, you say, right? Well, no, for three reasons:

  1. It renders moot the `msg_lev` solver paramter.
  1. It's a bit weird to initialize `log`  to 0, since the solvers are
 already initialized to shut up in `__cinit__` .
  1. Someone might want to see whether the solver is making any progress,
 by setting the verbosity through the solver parameter, rather than through
 `solve()` .

 IMHO, the user ought to have that option; otherwise, there's no point to
 allowing a `msg_level` option at all. This is easily fixed, too: change
 the default value of `log` to `None`, and then the code to,

 {{{
         if log != None:
           self._backend.set_verbosity(log)
 }}}
 This should retain compatibility with the previous setup.

 What do you guys think?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12736#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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to