#16504: A mandatory 'nonnegative' argument for
MixedIntegerLinearProgram.new_variable() until the standard changes
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.3
Component: linear | Resolution:
programming | Merged in:
Keywords: | Reviewers:
Authors: Nathann Cohen | Work issues:
Report Upstream: N/A | Commit:
Branch: u/ncohen/16504 | b1f43af754d4ab7e136015519c7fc0cdbe32dd36
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
Can you undo this change:
{{{
#!diff
@@ -241,11 +239,10 @@ cdef class MixedIntegerLinearProgram(SageObject):
sage: g = graphs.PetersenGraph()
sage: p = MixedIntegerLinearProgram(maximization=True)
- sage: b = p.new_variable()
+ sage: b = p.new_variable(binary=True)
sage: p.set_objective(sum([b[v] for v in g]))
sage: for (u,v) in g.edges(labels=None):
... p.add_constraint(b[u] + b[v], max=1)
- sage: p.set_binary(b)
sage: p.solve(objective_only=True)
4.0
"""
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/16504#comment:21>
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.