#16490: Create a linear programming backend for cvxopt
-------------------------------------+-------------------------------------
       Reporter:  ingolfured         |        Owner:  ingolfured
           Type:  enhancement        |       Status:  new
       Priority:  minor              |    Milestone:  sage-6.3
      Component:  linear             |   Resolution:
  programming                        |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  2fc6f054ae7f6faa36782ba85829540c15e3720b
  u/ingolfured/create_a_linear_programming_backend_for_cvxopt|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by ncohen):

 Yo !

 > > You put cvxopt before gurobi in the ordering of LP solvers: this list
 is meant to be "use the fastest solver available installed on this
 computer". Is CVXOPT faster than Gurobi ?
 >
 > This list for making the most suitable for the task solver the default.

 No, this list is a linear ordering that makes Sage's default the first
 solver that can be called and that appears in the list. If CVXOPT is the
 second, and as it is available by default, then none of the others will
 ever become the default. And unless you tell me that CVXOPT is faster than
 gurobi it should appear afterwards.

 > > 1) It is useless to put anything after a solver which is installed by
 default
 >
 > huh?
 >
 > >
 > > 2) PPL cannot really be a "default solver" as it misses the important
 feature of being able to solve integer linear programs.
 >
 > We have discussed this in April:
 > let me quote your email dated 22.04.14:
 >
 > > > DP 1) I'd like this:
 >
 > > > DP sage:
 sage.numerical.backends.generic_backend.default_mip_solver(solver='PPL')
 >
 > > > DP to work...
 >
 > > NC Well. PPL is just missing from the list of keywords, it should only
 be
 >
 > > NC added there. Can you write the patch ? I will review it, it takes
 ten
 >
 > > NC seconds.

 I don't see what you intend by quoting me against myself. Just read the
 code :

 {{{
     if solver is None:

         if default_solver is not None:
             return default_solver

         else:
             for s in ["Cplex", "Cvxopt", "Gurobi", "Coin", "Glpk", "Ppl"]:
                 try:
                     default_mip_solver(s)
                     return s
                 except ValueError:
                     pass
 }}}

 If CPLEX is available, Cplex will be used. If CVXOPT is available, it will
 be used. And CVXOPT is always available, so none of the others LP will
 ever be used.

 If you want to be able to make CVXOPT the default solver all you need is
 this part of your branch
 {{{
     elif solver == "Cvxopt":
         try:
             from sage.numerical.backends.cvxopt_backend import
 CVXOPTBackend
             default_solver = solver
         except ImportError:
             raise ValueError("CVXOPT is not available. Please refer to the
 documentation to install it.")
 }}}

 Touching the list changes the "automatically defined" default solver of
 Sage. And as the code shows, by puting cvxopt second you may as well
 remove anything that appears after it. Similarly, it's useless to put
 anything after Glpk. In the current state the function will only test
 Cplex and CVXOPT.

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/16490#comment:22>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to