ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 18 Jul 2013 03:33:02 +0200Linear programming with algebraic numbershttps://ask.sagemath.org/question/10357/linear-programming-with-algebraic-numbers/Is it possible to use one of the built in routines for linear programming with algebraic numbers, instead of floating point numbers.
I have to solve a problem on algebraic operators exactly, not numerically.Wed, 17 Jul 2013 04:24:26 +0200https://ask.sagemath.org/question/10357/linear-programming-with-algebraic-numbers/Answer by Klaus Scheicher for <p>Is it possible to use one of the built in routines for linear programming with algebraic numbers, instead of floating point numbers.</p>
<p>I have to solve a problem on algebraic operators exactly, not numerically.</p>
https://ask.sagemath.org/question/10357/linear-programming-with-algebraic-numbers/?answer=15250#post-id-15250Thank you. I already adapted an existing Python code!Thu, 18 Jul 2013 03:33:02 +0200https://ask.sagemath.org/question/10357/linear-programming-with-algebraic-numbers/?answer=15250#post-id-15250Answer by Nathann for <p>Is it possible to use one of the built in routines for linear programming with algebraic numbers, instead of floating point numbers.</p>
<p>I have to solve a problem on algebraic operators exactly, not numerically.</p>
https://ask.sagemath.org/question/10357/linear-programming-with-algebraic-numbers/?answer=15247#post-id-15247I do not think so. But with the PPL solver you can solve LP over Q.
Look at that :
sage: p = MixedIntegerLinearProgram(solver="PPL")
sage: x = p.new_variable()
sage: p.add_constraint(2*x[1]+3*x[2] == 1)
sage: p.solve()
0
sage: p.get_values(x)
{1: 0, 2: 1/3}
Nathann
Wed, 17 Jul 2013 11:08:17 +0200https://ask.sagemath.org/question/10357/linear-programming-with-algebraic-numbers/?answer=15247#post-id-15247