Announcing CVExp: A library for making linear programming easier

David Baird dhbaird at
Wed Feb 18 01:13:00 EST 2009

Here is the PyPI page:

And here is the homepage:

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 import var
from import integer
from 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,
           ), out_filename='problem.out') # out_filename is optional
print 'X =', sol[X] # >>> 5.1
print 'Y =', sol[Y] # >>> 5

More information about the Python-list mailing list