Ask Your Question
0

Linear programming with algebraic numbers

asked 11 years ago

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.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 11 years ago

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

Preview: (hide)
link
0

answered 11 years ago

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!

Preview: (hide)
link

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: 11 years ago

Seen: 378 times

Last updated: Jul 18 '13