PuLP is a free open source software written in Python. It is used to describe optimisation problems as mathematical models. PuLP can then call any of numerous external LP solvers (CBC, GLPK, CPLEX, Gurobi etc) to solve this model and then use python commands to manipulate and display the solution.
Note that to install PuLP you must first have a working python installation as described in installing python.
PuLP requires Python >= 2.5. Though it can be made to work with Python 2.4
The latest version of PuLP can be freely obtained from coin-or. Please note that this version of PuLP has not been tested with operating systems other than Microsoft Windows and Ubuntu Linux.
In windows (please make sure easy_install is on your path):
c:\Python26\Scripts\> easy_install -U pulp
$ sudo easy_install -U pulp $ sudo pulptest #needed to get the default solver to work
Then follow the instructions below to test your installation
To access the examples and pulp source code use the instructions below to install from source
Install python (installing python)
Download the PuLP zipfile
The PuLP function library is now able to be imported from any python command line. Go to IDLE or PyDev and type
>>> from pulp import *
to load in the functions. (You need to re-import the functions each time after you close the GUI) PuLP is written in a programming language called Python, and to use PuLP you must write Python code to describe your optimization problem.
$ sudo python setup.py install
$ sudo apt-get install glpk
$ python bootstrap.py $ bin/buildout -c solvers.cfg $ cp parts/lib/* src/pulp/ $ sudo setup.py install
To test that that you pulp installation is working correctly please type the following into a python interpreter and note that the output should be similar. The output below is what you would expect if you have not installed any other solvers and the CoinMP solver bundled with pulp works.
>>> import pulp >>> pulp.pulpTestAll() Solver pulp.pulp.COIN_MEM unavailable. Solver pulp.pulp.COIN_CMD unavailable. Testing continuous LP solution Testing maximize continuous LP solution Testing unbounded continuous LP solution Testing MIP solution Testing MIP relaxation Testing feasibility problem (no objective) Testing an infeasible problem Testing an integer infeasible problem (Error to be fixed) Testing column based modelling Testing column based modelling with empty constraints Testing dual variables and slacks reporting Testing resolve of problem Testing Sequential Solves Testing fractional constraints Testing elastic constraints (no change) Testing elastic constraints (freebound) Testing elastic constraints (penalty unchanged) Testing elastic constraints (penalty unbounded) * Solver pulp.pulp.COINMP_DLL passed. Solver pulp.pulp.GLPK_MEM unavailable. Solver pulp.pulp.GLPK_CMD unavailable. Solver pulp.pulp.XPRESS unavailable.