#12309: GLPK crashes or hangs on certain inputs
----------------------------------+-----------------------------------------
   Reporter:  john_perry          |          Owner:  ncohen                     
                   
       Type:  defect              |         Status:  needs_review               
                   
   Priority:  major               |      Milestone:  sage-5.0                   
                   
  Component:  linear programming  |       Keywords:                             
                   
Work_issues:                      |       Upstream:  Reported upstream. 
Developers deny it's a bug.
   Reviewer:                      |         Author:                             
                   
     Merged:                      |   Dependencies:  #10785                     
                   
----------------------------------+-----------------------------------------

Comment(by ncohen):

 > `glp_simplex` doesn't take `iocp` parameters.

 Right right, so you need to update its log level too ! Sorry about that.

 > Even if true, and it probably is, that would still be overkill

 Granted, granted. So I only have two remarks on your patch :
     * First, I guess that ``self.scmp`` behaves like ``self.iocp`` and
 should also be deallocated in ``__dealloc__``
     * Could you add a doctest that shows the signal returned by your code
 when a bad lp is solved without the preprocessing flag, and how it is
 solved afterwards ? The shortest bad example I was able to produce from
 you .py file is this one :
 {{{
 lp = MixedIntegerLinearProgram(solver="GLPK")
 lp.add_constraint( lp[1] +lp[2] -2.0 *lp[3] , max =-1.0)
 lp.add_constraint( lp[0] -4.0/3 *lp[1] +1.0/3 *lp[2] , max =-1.0/3) # <--
 succeeds up to here w/last line
 lp.add_constraint( lp[0] +0.5 *lp[1] -0.5 *lp[2] +0.25 *lp[3] , max
 =-0.25) # <--- fails here w/last line
 lp.add_constraint( lp[0] +4.0 *lp[1] -lp[2] +lp[3] , max =-1.0) # <-- last
 line
 lp.solve()
 }}}

 I also believe the documentation you added about the ``preprocessing``
 flag is worth being in a .. WARNING:: environment. This way it'll appear
 in red in the HTML documentation, and should attract the attention of
 somebody having some troubles with GLPK. That's up to you `:-)`

 Sorry if I am being a little slow, there are several nasty patches needing
 attention at the same time (not to mention the awful CBC one) and "free
 time" is a long-forgotten dream these days `O_o`

 Nathann

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