Announcing CVExp: A library for making linear programming easier

D

David Baird

Here is the PyPI page:

http://pypi.python.org/pypi/cvexp/0.1

And here is the homepage:

http://www.aclevername.com/projects/cvexp/

CVExp currently supports solving linear, integer linear, and quadratic
optimization problems via lpsolve55, GLPK, and CVXOPT. There are
packages readily available in Debian and Ubuntu for python-glpk and
python-cvxopt, so installation is easy on these platforms:

apt-get install python-setuptools # for easy_install
apt-get install python-glpk python-cvxopt
easy_install cvexp

Here is a quick example of using CVExp+GLPK to solve a problem:

from cvexp.builders import var
from cvexp.builders import integer
from cvexp.builders import minimize
from cvexp.translate_glpk import solve

X = var('X') # the 'X' name is optional
Y = var('Y') # ...and so is 'Y'

sol = solve((
Y + 0.1 == X,
Y >= 9.8 - X,
integer(Y),
minimize(Y),
), out_filename='problem.out') # out_filename is optional
print 'X =', sol[X] # >>> 5.1
print 'Y =', sol[Y] # >>> 5
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top