#16504: Fix the confusion in MILP.new_variable()
--------------------------------------+----------------------------
       Reporter:  jdemeyer            |        Owner:
           Type:  defect              |       Status:  needs_review
       Priority:  major               |    Milestone:  sage-6.3
      Component:  linear programming  |   Resolution:
       Keywords:                      |    Merged in:
        Authors:                      |    Reviewers:
Report Upstream:  N/A                 |  Work issues:
         Branch:  u/ncohen/16504      |       Commit:
   Dependencies:                      |     Stopgaps:
--------------------------------------+----------------------------
Changes (by ncohen):

 * status:  new => needs_review
 * branch:   => u/ncohen/16504


Comment:

 Hello !

 Here is the branch. Took much longer than I thought.

 What it does :
 - Removes the `is_nonnegative`, `set_nonnegative` functions that were
 introduced in #15521 as 'nonnegative' is not meant to be a variable type
 but a  'property' of any type. Those functions are renamed to `is_real`
 and `set_real`, i.e. their status before #16504

 - It was formerly possible to do things like that
 {{{
 sage: p = MixedIntegerLinearProgram()
 sage: v = p.new_variable()
 sage: p.set_min(v[0],15)
 sage: p.get_min(v[0])
 15.0
 }}}
   but it was NOT possible to do things like that
 {{{
 sage: p.set_min(v,17)
 sage: p.get_min(v[18])
 17.0
 }}}
   i.e. it was possible to define upper/lower bound on a specific variable,
 but not to do the same on a dictionary of variables in such a way that the
 new variables created fro the dictionary will inherit the bounds. But
 that's exactly what we wanted to do here.

   Thus I needed to add arguments lower/upper bound to the constructor of
 `MIPVariable`, plus set functions where it was needed.

 Well... `needs_review` !

 Nathann

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