#13646: Bug in p.add_constraint (when input is True/False)
-----------------------------------------------+----------------------------
       Reporter:  ncohen                       |         Owner:  ncohen      
           Type:  defect                       |        Status:  needs_review
       Priority:  major                        |     Milestone:  sage-5.5    
      Component:  linear programming           |    Resolution:              
       Keywords:                               |   Work issues:              
Report Upstream:  N/A                          |     Reviewers:              
        Authors:  Nathann Cohen, Volker Braun  |     Merged in:              
   Dependencies:                               |      Stopgaps:              
-----------------------------------------------+----------------------------
Description changed by vbraun:

Old description:

> That awful thing again. See bug report at :
> https://groups.google.com/d/topic/sage-support/VVTWhE0w7i0/discussion
>
> The problem is that the linear functions need to integrate with the rest
> of sage to play nice. The patched mip.pyx adds a parent class for linear
> functions and suitable coercion and rich comparison. Now the following
> works as expected:
> {{{
> sage: p = MixedIntegerLinearProgram()
> sage: x = p.new_variable()
> sage: x[1] >= 10
> 10 <= x_0
> sage: 10 <= x[1]
> 10 <= x_0
> }}}

New description:

 That awful thing again. See bug report at :
 https://groups.google.com/d/topic/sage-support/VVTWhE0w7i0/discussion

 The problem is that the linear functions need to integrate with the rest
 of sage to play nice. The patched mip.pyx adds a parent class for linear
 functions and suitable coercion and rich comparison. Now the following
 works as expected:
 {{{
 sage: p = MixedIntegerLinearProgram()
 sage: x = p.new_variable()
 sage: x[1] >= 10
 10 <= x_0
 sage: 10 <= x[1]
 10 <= x_0
 }}}

 Apply [attachment:trac_13646_fix_mip.patch]

--

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