documentation update for installation
This commit is contained in:
67
INSTALL
67
INSTALL
@@ -4,26 +4,26 @@ Installation
|
|||||||
Note that to install PuLP you must first have a working python installation as
|
Note that to install PuLP you must first have a working python installation as
|
||||||
described in `installing python`_.
|
described in `installing python`_.
|
||||||
|
|
||||||
PuLP requires Python >= 2.5. Though it can be made to work with Python 2.4
|
PuLP requires Python >= 2.6.
|
||||||
|
|
||||||
The latest version of PuLP can be freely obtained from coin-or_.
|
The latest version of PuLP can be freely obtained from github_.
|
||||||
Please note that this version of PuLP has not been tested with operating systems
|
Please note that this version of PuLP has not been tested with operating systems
|
||||||
other than Microsoft Windows and Ubuntu Linux.
|
other than Microsoft Windows and Ubuntu Linux.
|
||||||
|
|
||||||
Easy install and pypi installation
|
Pip and pypi installation
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
By far the easiest way to install pulp is through the use of EasyInstall_ and
|
By far the easiest way to install pulp is through the use of pip_ and
|
||||||
CheeseShop_.
|
CheeseShop_.
|
||||||
|
|
||||||
* Install EasyInstall
|
* Install pip
|
||||||
* In windows (please make sure easy_install is on your path)::
|
* In windows (please make sure pip is on your path)::
|
||||||
|
|
||||||
c:\Python26\Scripts\> easy_install -U pulp
|
c:\Python26\Scripts\> pip install pulp
|
||||||
|
|
||||||
* In Linux::
|
* In Linux::
|
||||||
|
|
||||||
$ sudo easy_install -U pulp
|
$ sudo pip install pulp
|
||||||
$ sudo pulptest #needed to get the default solver to work
|
$ sudo pulptest #needed to get the default solver to work
|
||||||
|
|
||||||
* Then follow the instructions below to test your installation
|
* Then follow the instructions below to test your installation
|
||||||
@@ -70,18 +70,10 @@ Linux Installation
|
|||||||
$ sudo apt-get install glpk
|
$ sudo apt-get install glpk
|
||||||
|
|
||||||
* install gurobi_ (free academic licenses)
|
* install gurobi_ (free academic licenses)
|
||||||
* install cplex_ (and pay $$)
|
* install cplex_ (also a license for academics)
|
||||||
* or compile coinMP_ and pulp from source using buildout and copy the files
|
|
||||||
|
|
||||||
.. code-block:: sh
|
|
||||||
|
|
||||||
$ python bootstrap.py
|
|
||||||
$ bin/buildout -c solvers.cfg
|
|
||||||
$ cp parts/lib/* src/pulp/
|
|
||||||
$ sudo setup.py install
|
|
||||||
|
|
||||||
.. _glpk: http://www.gnu.org/software/glpk/
|
.. _glpk: http://www.gnu.org/software/glpk/
|
||||||
.. _CoinMP: http://projects.coin-or.org/CoinMP
|
.. _CBC: https://projects.coin-or.org/Cbc
|
||||||
.. _cplex: http://cplex.com
|
.. _cplex: http://cplex.com
|
||||||
.. _gurobi: http://gurobi.com
|
.. _gurobi: http://gurobi.com
|
||||||
|
|
||||||
@@ -90,38 +82,49 @@ Testing your PuLP installation
|
|||||||
To test that that you pulp installation is working correctly please type the
|
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.
|
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
|
The output below is what you would expect if you have not installed any other
|
||||||
solvers and the CoinMP_ solver bundled with pulp works.
|
solvers and the CBC_ solver bundled with pulp works.
|
||||||
|
|
||||||
>>> import pulp
|
>>> import pulp
|
||||||
>>> pulp.pulpTestAll()
|
>>> pulp.pulpTestAll()
|
||||||
Solver pulp.pulp.COIN_MEM unavailable.
|
Testing zero subtraction
|
||||||
Solver pulp.pulp.COIN_CMD unavailable.
|
|
||||||
Testing continuous LP solution
|
Testing continuous LP solution
|
||||||
Testing maximize continuous LP solution
|
Testing maximize continuous LP solution
|
||||||
Testing unbounded continuous LP solution
|
Testing unbounded continuous LP solution
|
||||||
|
Testing Long Names
|
||||||
|
Testing repeated Names
|
||||||
|
Testing zero constraint
|
||||||
|
Testing zero objective
|
||||||
|
Testing LpVariable (not LpAffineExpression) objective
|
||||||
|
Testing Long lines in LP
|
||||||
|
Testing LpAffineExpression divide
|
||||||
Testing MIP solution
|
Testing MIP solution
|
||||||
Testing MIP relaxation
|
Testing MIP relaxation
|
||||||
Testing feasibility problem (no objective)
|
Testing feasibility problem (no objective)
|
||||||
Testing an infeasible problem
|
Testing an infeasible problem
|
||||||
Testing an integer infeasible problem (Error to be fixed)
|
Testing an integer infeasible problem
|
||||||
Testing column based modelling
|
Testing column based modelling
|
||||||
Testing column based modelling with empty constraints
|
|
||||||
Testing dual variables and slacks reporting
|
Testing dual variables and slacks reporting
|
||||||
Testing resolve of problem
|
|
||||||
Testing Sequential Solves
|
|
||||||
Testing fractional constraints
|
Testing fractional constraints
|
||||||
Testing elastic constraints (no change)
|
Testing elastic constraints (no change)
|
||||||
Testing elastic constraints (freebound)
|
Testing elastic constraints (freebound)
|
||||||
Testing elastic constraints (penalty unchanged)
|
Testing elastic constraints (penalty unchanged)
|
||||||
Testing elastic constraints (penalty unbounded)
|
Testing elastic constraints (penalty unbounded)
|
||||||
* Solver pulp.pulp.COINMP_DLL passed.
|
* Solver pulp.solvers.PULP_CBC_CMD passed.
|
||||||
Solver pulp.pulp.GLPK_MEM unavailable.
|
Solver pulp.solvers.CPLEX_DLL unavailable
|
||||||
Solver pulp.pulp.GLPK_CMD unavailable.
|
Solver pulp.solvers.CPLEX_CMD unavailable
|
||||||
Solver pulp.pulp.XPRESS unavailable.
|
Solver pulp.solvers.CPLEX_PY unavailable
|
||||||
|
Solver pulp.solvers.COIN_CMD unavailable
|
||||||
|
Solver pulp.solvers.COINMP_DLL unavailable
|
||||||
|
Solver pulp.solvers.GLPK_CMD unavailable
|
||||||
|
Solver pulp.solvers.XPRESS unavailable
|
||||||
|
Solver pulp.solvers.GUROBI unavailable
|
||||||
|
Solver pulp.solvers.GUROBI_CMD unavailable
|
||||||
|
Solver pulp.solvers.PYGLPK unavailable
|
||||||
|
Solver pulp.solvers.YAPOSIB unavailable
|
||||||
|
|
||||||
.. _`installing python`: http://www.diveintopython.org/installing_python/index.html
|
.. _`installing python`: http://www.diveintopython.org/installing_python/index.html
|
||||||
.. _coin-or: https://projects.coin-or.org/PuLP
|
.. _github: https://github.com/stumitchell/pulp-or
|
||||||
.. _EasyInstall: http://pypi.python.org/pypi/setuptools
|
.. _pip: https://pypi.python.org/pypi/pip
|
||||||
.. _CheeseShop: http://pypi.python.org
|
.. _CheeseShop: http://pypi.python.org
|
||||||
.. _`PuLP zipfile`: http://www.coin-or.org/download/source/PuLP/
|
.. _`PuLP zipfile`: https://github.com/stumitchell/pulp-or/archive/master.zip
|
||||||
|
|
||||||
|
|||||||
@@ -158,4 +158,4 @@ We can make our code return all the solutions by editing our code as shown after
|
|||||||
.. literalinclude:: ../../../examples/Sudoku2.py
|
.. literalinclude:: ../../../examples/Sudoku2.py
|
||||||
:lines: 82-115
|
:lines: 82-115
|
||||||
|
|
||||||
The full file using this is available `Sudoku2.py <https://projects.coin-or.org/PuLP/browser/trunk/examples/Sudoku2.py?format=txt>`_. When using this code for sudoku problems with a large number of solutions, it could take a very long time to solve them all. To create sudoku problems with multiple solutions from unique solution sudoku problem, you can simply delete a starting number constraint. You may find that deleting several constraints will still lead to a single optimal solution but the removal of one particular constraint leads to a sudden dramatic increase in the number of solutions.
|
The full file using this is available `Sudoku2.py <https://github.com/stumitchell/pulp-or/raw/master/examples/Sudoku2.py>`_. When using this code for sudoku problems with a large number of solutions, it could take a very long time to solve them all. To create sudoku problems with multiple solutions from unique solution sudoku problem, you can simply delete a starting number constraint. You may find that deleting several constraints will still lead to a single optimal solution but the removal of one particular constraint leads to a sudden dramatic increase in the number of solutions.
|
||||||
|
|||||||
Reference in New Issue
Block a user