#20362: MIP backends: Make variable type consistent between add_variable,
set_variable_type (with deprecation)
---------------------------+----------------------------
   Reporter:  mkoeppe      |            Owner:
       Type:  enhancement  |           Status:  new
   Priority:  major        |        Milestone:  sage-7.2
  Component:  numerical    |         Keywords:  lp
  Merged in:               |          Authors:
  Reviewers:               |  Report Upstream:  N/A
Work issues:               |           Branch:
     Commit:               |     Dependencies:
   Stopgaps:               |
---------------------------+----------------------------
 Status quo:
  * add_variable uses 3 logical switches `binary=False, continuous=False,
 integer=False` (see #20324 regarding their defaulting behavior)
  * this matches the methods `is_variable_continuous` etc.
  * `set_variable_type` expresses the same thing using values 1, 0, -1.

 Proposal (from #20354 discussion):
  * `add_variable` there should take a `variable_type` parameter,
 defaulting to `'continuous'`, with other possible values `'binary'`,
 `'integer'`.
  * possibly deprecate the 3 switches
  * `set_variable_type` should take the same `variable_type` values
 `'continuous'`, `'binary'`, `'integer'`.
  * definitely deprecate values `1`, `0`, `-1`.

 There are similar idiosyncrasies elsewhere in the backend interface
 (should be made separate tickets)
  * Minimization is expressed as `maximization=False` in the constructor;
 as `set_sense(-1)`; is queried by `is_maximization`
  * ...

--
Ticket URL: <http://trac.sagemath.org/ticket/20362>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to