Ask Your Question
0

Linear programming with algebraic numbers

asked 2013-07-17 04:24:26 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

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.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2013-07-17 11:08:17 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I 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

edit flag offensive delete link more
0

answered 2013-07-18 03:33:02 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Thank you. I already adapted an existing Python code!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-07-17 04:24:26 +0100

Seen: 360 times

Last updated: Jul 18 '13