PuLP is an LP modeler written in python. PuLP can generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear problems. Monitor and control user input devices. The mouse listener thread. The listener callbacks are invoked directly from an operating thread on some platforms, notably Windows. This means that long running procedures and blocking operations should not be invoked from the callback, as this risks freezing input for all processes.
![]() Latest version
Released:
PuLP is an LP modeler written in python. PuLP can generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear problems.
Project description
PuLP is an LP modeler written in Python. PuLP can generate MPS or LP filesand call GLPK[1], COIN CLP/CBC[2], CPLEX[3], and GUROBI[4] to solve linearproblems.
Installation
The easiest way to install pulp is via PyPi
If pip is available on your system:
Otherwise follow the download instructions on the PyPi page.On Linux and OSX systems the tests must be run to make the defaultsolver executable.
Examples
See the examples directory for examples.
PuLP requires Python >= 2.7.
The examples use the default solver (CBC), to use other solvers they must be available.
Documentation
Documentation is found on https://coin-or.github.io/pulp/.
Use LpVariable() to create new variables. To create a variable 0 <= x <= 3:
![]()
To create a variable 0 <= y <= 1:
Use LpProblem() to create new problems. Create “myProblem”:
![]()
Combine variables to create expressions and constraints, then add them to theproblem:
If you add an expression (not a constraint), it willbecome the objective:
To solve with the default included solver:
To use another sovler to solve the problem:
Display the status of the solution:
You can get the value of the variables using value(). ex:
Exported Classes:
Exported Functions:
Comments, bug reports, patches and suggestions are welcome.pulp-or-discuss@googlegroups.com
Copyright J.S. Roy (js@jeannot.org), 2003-2005Copyright Stuart A. Mitchell (stu@stuartmitchell.com)See the LICENSE file for copyright information.
References:
[1] http://www.gnu.org/software/glpk/glpk.html[2] http://www.coin-or.org/[3] http://www.cplex.com/[4] http://www.gurobi.com/
Release historyRelease notifications
2.0
1.6.10
1.6.9
1.6.8
1.6.7
1.6.6
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.9
1.5.8
1.5.7
1.5.6
1.5.4
1.5.3
1.5.2
1.5.1
1.5.0
1.4.9
1.4.8
1.4.7
1.4.6
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.1
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for PuLP-2.0-py3-none-any.whl
Hashes for PuLP-2.0.tar.gz
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |