On Oct 21, 10:17 am, Urs Hackstein <[email protected]>
wrote:
> I wonder what kind of systems of inequalities can be solved using sage
> and whether there are other routines than solve?
You can solve linear programs using several different packages, such
as cvxopt and MixedIntegerLinearProgram.
I don't know enough about the topic to comment intelligently on the
merits of one or the other package (maybe Nathann will do so) but, for
example, a simple system of linear inequalities can be set up and
solved rather easily with MILP:
sage: lp = MixedIntegerLinearProgram()
sage: lp.add_constraint(lp[0]-lp[1],min=1)
sage: lp.add_constraint(lp[1]-lp[2],min=1)
sage: lp.add_constraint(lp[2]-lp[3],max=1)
sage: lp.solve()
0.0
sage: lp.get_values([lp[0],lp[1],lp[2]])
[2.0, 1.0, 0.0]
It's a little harder to set up cvxopt.
regards
john perry
--
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-support
URL: http://www.sagemath.org