Changes between Version 1 and Version 2 of Ticket #20602


Ignore:
Timestamp:
06/27/16 01:32:46 (4 years ago)
Author:
mkoeppe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20602

    • Property Cc chapoton novoselt added
    • Property Authors changed from to Matthias Koeppe
    • Property Summary changed from MixedIntegerLinearProgram.gen() does not do anything useful to Deprecate MixedIntegerLinearProgram.gen(), __call__, linear_function, which do not do anything useful; add default_variable method
  • Ticket #20602 – Description

    v1 v2  
    1919}}}
    2020
    21 I think mip.gen(i) should simply return the same variable that mip[i] returns (and like mip[i], it should create this variable in the backend if it does not exist yet).
     21To summarize, the `gen` method pretends that it can refer to backend variables (and so do `linear_function` and the special `__call__` method that is identical to `linear_function`). In reality, these methods cannot be use for anything except for what is tested in the docstring: printing some meaningless stuff.
    2222
     23This patch deprecates these three methods and removes the corresponding confusing and useless examples from the class documentation.
    2324
     25In return, the notion of the "default MIP variable" (which `__getitem__` refers to) is explained; and it is exposed to the user by new method `default_variable`.
    2426