ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 17 Jul 2013 20:33:02 -0500Linear 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.Tue, 16 Jul 2013 21:24:26 -0500https://ask.sagemath.org/question/10357/linear-programming-with-algebraic-numbers/Answer 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 04:08:17 -0500https://ask.sagemath.org/question/10357/linear-programming-with-algebraic-numbers/?answer=15247#post-id-15247Answer 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!Wed, 17 Jul 2013 20:33:02 -0500https://ask.sagemath.org/question/10357/linear-programming-with-algebraic-numbers/?answer=15250#post-id-15250