{"id":13501598,"url":"https://github.com/coin-or/pulp","last_synced_at":"2025-05-16T08:02:50.541Z","repository":{"id":28722009,"uuid":"32243098","full_name":"coin-or/pulp","owner":"coin-or","description":"A python Linear Programming API","archived":false,"fork":false,"pushed_at":"2025-04-28T23:30:08.000Z","size":99742,"stargazers_count":2243,"open_issues_count":101,"forks_count":406,"subscribers_count":72,"default_branch":"master","last_synced_at":"2025-05-09T07:04:28.646Z","etag":null,"topics":["constraints","mip","pulp","python","solver"],"latest_commit_sha":null,"homepage":"http://coin-or.github.io/pulp/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coin-or.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"pchtsp"}},"created_at":"2015-03-15T03:21:16.000Z","updated_at":"2025-05-08T07:23:53.000Z","dependencies_parsed_at":"2023-09-24T11:42:58.802Z","dependency_job_id":"bc5ec6cf-a284-4163-8064-61c33cfb67cd","html_url":"https://github.com/coin-or/pulp","commit_stats":{"total_commits":366,"total_committers":91,"mean_commits":4.021978021978022,"dds":0.7021857923497268,"last_synced_commit":"a812f001b50119e4479ea5bc17f8e38ce28c4296"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coin-or%2Fpulp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coin-or%2Fpulp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coin-or%2Fpulp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coin-or%2Fpulp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coin-or","download_url":"https://codeload.github.com/coin-or/pulp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493382,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["constraints","mip","pulp","python","solver"],"created_at":"2024-07-31T22:01:43.089Z","updated_at":"2025-05-16T08:02:45.531Z","avatar_url":"https://github.com/coin-or.png","language":"Python","readme":"pulp\n**************************\n\n.. image:: https://travis-ci.org/coin-or/pulp.svg?branch=master\n    :target: https://travis-ci.org/coin-or/pulp\n.. image:: https://img.shields.io/pypi/v/pulp\n    :target: https://pypi.org/project/PuLP/\n    :alt: PyPI\n.. image:: https://img.shields.io/pypi/dm/pulp\n    :target: https://pypi.org/project/PuLP/\n    :alt: PyPI - Downloads\n\nPuLP is an linear and mixed integer programming modeler written in Python. With PuLP, it is simple to create MILP optimisation problems and solve them with the latest open-source (or proprietary) solvers.  PuLP can generate MPS or LP files and call solvers such as GLPK_, COIN-OR CLP/`CBC`_, CPLEX_, GUROBI_, MOSEK_, XPRESS_, CHOCO_, MIPCL_, HiGHS_, SCIP_/FSCIP_.\n\nThe documentation for PuLP can be `found here \u003chttps://coin-or.github.io/pulp/\u003e`_.\n\nPuLP is part of the `COIN-OR project \u003chttps://www.coin-or.org/\u003e`_. \n\nInstallation\n================\n\nPuLP requires Python 3.9 or newer.\n\nThe easiest way to install PuLP is with ``pip``. If ``pip`` is available on your system, type::\n\n     python -m pip install pulp\n\nOtherwise follow the download instructions on the `PyPi page \u003chttps://pypi.python.org/pypi/PuLP\u003e`_.\n\n\nQuickstart \n===============\n\nUse ``LpVariable`` to create new variables. To create a variable x with 0  ≤  x  ≤  3::\n\n     from pulp import *\n     x = LpVariable(\"x\", 0, 3)\n\nTo create a binary variable, y, with values either 0 or 1::\n\n     y = LpVariable(\"y\", cat=\"Binary\")\n\nUse ``LpProblem`` to create new problems. Create a problem called \"myProblem\" like so::\n\n     prob = LpProblem(\"myProblem\", LpMinimize)\n\nCombine variables in order to create expressions and constraints, and then add them to the problem.::\n\n     prob += x + y \u003c= 2\n\nAn expression is a constraint without a right-hand side (RHS) sense (one of ``=``, ``\u003c=`` or ``\u003e=``). If you add an expression to a problem, it will become the objective::\n\n     prob += -4*x + y\n\nTo solve the problem  with the default included solver::\n\n     status = prob.solve()\n\nIf you want to try another solver to solve the problem::\n\n     status = prob.solve(GLPK(msg = 0))\n\nDisplay the status of the solution::\n\n     LpStatus[status]\n     \u003e 'Optimal'\n\nYou can get the value of the variables using ``value``. ex::\n\n     value(x)\n     \u003e 2.0\n\n\nEssential Classes\n------------------\n\n\n* ``LpProblem`` -- Container class for a Linear or Integer programming problem\n* ``LpVariable`` -- Variables that are added into constraints in the LP problem\n* ``LpConstraint`` -- Constraints of the general form\n\n      a1x1 + a2x2 + ... + anxn (\u003c=, =, \u003e=) b\n\n* ``LpConstraintVar`` -- A special type of constraint for constructing column of the model in column-wise modelling\n\nUseful Functions\n------------------\n\n* ``value()`` -- Finds the value of a variable or expression\n* ``lpSum()`` -- Given a list of the form [a1*x1, a2*x2, ..., an*xn] will construct a linear expression to be used as a constraint or variable\n* ``lpDot()`` -- Given two lists of the form [a1, a2, ..., an] and [x1, x2, ..., xn] will construct a linear expression to be used as a constraint or variable\n\nMore Examples\n================\n\nSeveral tutorial are given in `documentation \u003chttps://coin-or.github.io/pulp/CaseStudies/index.html\u003e`_ and pure code examples are available in `examples/ directory \u003chttps://github.com/coin-or/pulp/tree/master/examples\u003e`_ .\n\nThe examples use the default solver (CBC). To use other solvers they must be available (installed and accessible). For more information on how to do that, see the `guide on configuring solvers \u003chttps://coin-or.github.io/pulp/guides/how_to_configure_solvers.html\u003e`_.\n\n\nFor Developers \n================\n\n\nIf you want to install the latest version from GitHub you can run::\n\n    python -m pip install -U git+https://github.com/coin-or/pulp\n\n\nOn Linux and MacOS systems, you must run the tests to make the default solver executable::\n\n     sudo pulptest\n\n\n\n\nBuilding the documentation\n--------------------------\n\nThe PuLP documentation is built with `Sphinx \u003chttps://www.sphinx-doc.org\u003e`_.  We recommended using a\n`virtual environment \u003chttps://docs.python.org/3/library/venv.html\u003e`_ to build the documentation locally.\n\nTo build, run the following in a terminal window, in the PuLP root directory\n\n::\n\n    cd pulp\n    python -m pip install -r requirements-dev.txt\n    cd doc\n    make html\n\nA folder named html will be created inside the ``build/`` directory.\nThe home page for the documentation is ``doc/build/html/index.html`` which can be opened in a browser.\n\nContributing to PuLP\n-----------------------\nInstructions for making your first contribution to PuLP are given `here \u003chttps://coin-or.github.io/pulp/develop/contribute.html\u003e`_.\n\n**Comments, bug reports, patches and suggestions are very welcome!**\n\n* Comments and suggestions: https://github.com/coin-or/pulp/discussions\n* Bug reports: https://github.com/coin-or/pulp/issues\n* Patches: https://github.com/coin-or/pulp/pulls\n\nCopyright and License \n=======================\nPuLP is distributed under an MIT license. \n\n     Copyright J.S. Roy, 2003-2005\n     Copyright Stuart A. Mitchell\n     See the LICENSE file for copyright information.\n\n.. _Python: http://www.python.org/\n\n.. _GLPK: http://www.gnu.org/software/glpk/glpk.html\n.. _CBC: https://github.com/coin-or/Cbc\n.. _CPLEX: http://www.cplex.com/\n.. _GUROBI: http://www.gurobi.com/\n.. _MOSEK: https://www.mosek.com/\n.. _XPRESS: https://www.fico.com/es/products/fico-xpress-solver\n.. _CHOCO: https://choco-solver.org/\n.. _MIPCL: http://mipcl-cpp.appspot.com/\n.. _SCIP: https://www.scipopt.org/\n.. _HiGHS: https://highs.dev\n.. _FSCIP: https://ug.zib.de\n","funding_links":["https://github.com/sponsors/pchtsp"],"categories":["Python","\u003cspan id=\"head24\"\u003e3.2. Optimization\u003c/span\u003e","Optimization"],"sub_categories":["\u003cspan id=\"head25\"\u003e3.2.1. Metaheuristic\u003c/span\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoin-or%2Fpulp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoin-or%2Fpulp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoin-or%2Fpulp/lists"}