#20656: MixedIntegerLinearProgram: Remove _variables dictionary
---------------------------+----------------------------------
Reporter: mkoeppe | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-7.3
Component: numerical | Keywords: lp
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies: #20461, #20462
Stopgaps: |
---------------------------+----------------------------------
The '_variables' attribute dictionary maps a "variable" (an "element" of a
`MIPVariable` "dictionary") to an index in the backend. This is redundant
because these "variables" are elements of type `LinearFunction`, and as
such know their index in the backend already.
{{{
sage: p = MixedIntegerLinearProgram(solver='GLPK')
sage: pv = p.new_variable(nonnegative=True)
sage: pv[0]
x_0
sage: pv[77]
x_1
sage: pv[0].dict().keys()
[0]
sage: pv[77].dict().keys()
[1]
}}}
See also: #20461, #20602
--
Ticket URL: <http://trac.sagemath.org/ticket/20656>
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.