#10505: Round values returned by CPLEX when the variable's type is 
integer/binary
----------------------------------+-----------------------------------------
   Reporter:  ncohen              |          Owner:  ncohen       
       Type:  defect              |         Status:  needs_review 
   Priority:  major               |      Milestone:  sage-4.7.2   
  Component:  linear programming  |       Keywords:               
Work_issues:                      |       Upstream:  N/A          
   Reviewer:  David Coudert       |         Author:  Nathann Cohen
     Merged:                      |   Dependencies:               
----------------------------------+-----------------------------------------
Changes (by ncohen):

  * status:  needs_info => needs_review


Comment:

 Oops... You are right !

 The thing is that casting it to Integer would mean having to create a new
 object for each returned variable, even when using the code from the C
 level. And casting it to a Python int would mean that you can not divide
 is safely anymore (1/2 becomes 0).

 What do you think of letting it stay like that ? The goal was really to be
 able to test (variable == 0) without fearing that variable (declared as
 binary in the LP) would have 0.0000001 as a value.

 We can still *really* cast the values to integer in situations where the
 user expect it, like in #11367 which just got reviewed.

 While I was at it, though, I noticed a mistake in the documentation
 generated from the mip.pyx file : the first line contained a math equation
 which was not properly written.. I just updated the patch to fix it !
 `:-)`

 Nathann

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