#13148: make LP return the number of variables
--------------------------------------+-------------------------------------
Reporter: dimpase | Owner: ncohen
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.2
Component: linear programming | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
--------------------------------------+-------------------------------------
Changes (by ncohen):
* status: needs_review => needs_work
Comment:
-_-
Ahem... With Gurobi installed the doctests do not pass, because of their
stupid way of storing double inequalities :
{{{
sage: p = MixedIntegerLinearProgram()
sage: p.add_constraint(p[0] - p[2], min = 1, max = 4)
sage: p.number_of_variables()
3
sage: p.show()
Maximization:
Constraints:
R0: 4.0 <= x_0 - x_1 + RgR0 <= 4.0
Variables:
x_0 is a continuous variable (min=0.0, max=+oo)
x_1 is a continuous variable (min=0.0, max=+oo)
RgR0 is a continuous variable (min=0.0, max=3.0)
}}}
Of course I expect that your code works with any other solver `^^;`
Could you change the first constraint so that it is a "simple" inequality
(with not both an upper and lower bound) ?
Your patch also needs some commit message. And I do not know if there is
any rule about patches filenames ending with a .patch, but we will find
out soon `:-)`
Sorry about this Gurobi ugliness `:-p`
Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13148#comment:2>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.