#10151: Update calls to MixedIntegerLinearProgram and its solve function to 
follow
the new interface
----------------------------------+-----------------------------------------
   Reporter:  ncohen              |       Owner:  ncohen      
       Type:  defect              |      Status:  needs_review
   Priority:  major               |   Milestone:  sage-4.6    
  Component:  linear programming  |    Keywords:              
     Author:  Nathann Cohen       |    Upstream:  N/A         
   Reviewer:                      |      Merged:              
Work_issues:                      |  
----------------------------------+-----------------------------------------
Changes (by ncohen):

  * status:  new => needs_review


Old description:



New description:

 Right now, the followinjg is happening
 {{{
 #!python
 sage: g = graphs.PetersenGraph()
 sage: g.dominating_set()
 IBM ILOG License Manager: "IBM ILOG Optimization Suite for Academic
 Initiative" is accessing CPLEX 12 with option(s): "e m b q ".
 [4, 6, 7]
 sage: g.dominating_set(solver = "GLPK")
 ---------------------------------------------------------------------------
 ValueError                                Traceback (most recent call
 last)

 /auto/sop-nas2a/u/sop-nas2a/vol/home_mascotte/ncohen/<ipython console> in
 <module>()

 /home/ncohen/sage/local/lib/python2.6/site-
 packages/sage/graphs/generic_graph.pyc in dominating_set(self,
 independent, value_only, solver, verbose)
    5666             return p.solve(objective_only=True, solver=solver,
 log=verbose)
    5667         else:
 -> 5668             p.solve(solver=solver, log=verbose)
    5669             b=p.get_values(b)
    5670             return [v for v in g.vertices() if b[v]==1]

 /home/ncohen/sage/local/lib/python2.6/site-packages/sage/numerical/mip.so
 in sage.numerical.mip.MixedIntegerLinearProgram.solve
 (sage/numerical/mip.c:5813)()

 ValueError: Solver argument deprecated. This parameter now has to be set
 when calling the class' constructor
 }}}

 The new interface between Sage and the LP solvers requires the solver's
 name to be given when the constructor is called.

 This patch applied, all is fine :

 {{{
 #!python
 sage: g = graphs.PetersenGraph()
 sage: g.dominating_set()
 IBM ILOG License Manager: "IBM ILOG Optimization Suite for Academic
 Initiative" is accessing CPLEX 12 with option(s): "e m b q ".
 [4, 6, 7]
 sage: g.dominating_set(solver = "GLPK")
 [0, 2, 6]
 }}}

 Apply first :

     * #10043
     * #10101
     * #9698
     * #9581
     * #10150

 This long list of undeserved dependencies is here to prevent this patch
 from having to be rebased, as it touches many files almost everywhere.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10151#comment:1>
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