{"id":17258862,"url":"https://github.com/ispaneli/lippy","last_synced_at":"2025-04-14T05:32:26.077Z","repository":{"id":62576341,"uuid":"430446746","full_name":"ispaneli/lippy","owner":"ispaneli","description":"A module for solving linear programming problems on Python.","archived":false,"fork":false,"pushed_at":"2023-03-22T17:44:06.000Z","size":139,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T19:52:28.145Z","etag":null,"topics":["bnd","branch-and-bound","brute-force","cutting-plane-method","game-theory","game-theory-algorithms","gomory-cut","linear-programming","math","mathematica","mathematics","optimization-algorithms","optimization-methods","python","python-types","python3","simplex","simplex-algorithm","simplex-method","zero-sum-game"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/lippy","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ispaneli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-21T18:23:33.000Z","updated_at":"2025-03-12T12:03:55.000Z","dependencies_parsed_at":"2024-11-08T02:29:13.566Z","dependency_job_id":"678fd0cb-c59d-4d89-b1ac-c5edc1a4f143","html_url":"https://github.com/ispaneli/lippy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispaneli%2Flippy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispaneli%2Flippy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispaneli%2Flippy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ispaneli%2Flippy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ispaneli","download_url":"https://codeload.github.com/ispaneli/lippy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248826832,"owners_count":21167759,"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":["bnd","branch-and-bound","brute-force","cutting-plane-method","game-theory","game-theory-algorithms","gomory-cut","linear-programming","math","mathematica","mathematics","optimization-algorithms","optimization-methods","python","python-types","python3","simplex","simplex-algorithm","simplex-method","zero-sum-game"],"created_at":"2024-10-15T07:22:23.703Z","updated_at":"2025-04-14T05:32:25.637Z","avatar_url":"https://github.com/ispaneli.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\r\n  \u003ca href=\"https://pypi.org/project/lippy\"\u003e\r\n    \u003cimg src=\"https://raw.githubusercontent.com/ispaneli/lippy/master/docs/img/logo.png\" alt=\"Lippy\"\u003e\r\n  \u003c/a\u003e\r\n\u003c/p\u003e\r\n\u003cp align=\"center\"\u003e\r\n  \u003cem\u003eLippy - solving linear programming problems.\u003c/em\u003e\r\n\u003c/p\u003e\r\n\u003cp align=\"center\"\u003e\r\n  \u003ca href=\"https://github.com/ispaneli/lippy/actions?query=workflow%3ATests+event%3Apush+branch%3Amaster\" target=\"_blank\"\u003e\r\n      \u003cimg src=\"https://github.com/ispaneli/lippy/workflows/Tests/badge.svg?event=push\u0026branch=master\" alt=\"Tests\"\u003e\r\n  \u003c/a\u003e\r\n  \u003ca href=\"https://pypi.org/project/lippy\" target=\"_blank\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/pypi/v/lippy?color=%2334D058\u0026label=pypi%20package\" alt=\"Package version\"\u003e\r\n  \u003c/a\u003e\r\n  \u003ca href=\"https://pypi.org/project/lippy\" target=\"_blank\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/pypi/pyversions/lippy.svg?color=%2334D058\" alt=\"Supported Python versions\"\u003e\r\n  \u003c/a\u003e\r\n  \u003ca href=\"https://pypi.org/project/lippy\" target=\"_blank\"\u003e\r\n    \u003cimg src=\"https://static.pepy.tech/personalized-badge/lippy?period=total\u0026units=none\u0026left_color=grey\u0026right_color=brightgreen\u0026left_text=Downloads\" alt=\"Total downloads\"\u003e\r\n  \u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n---\r\n\r\n**Source Code**:\r\n\u003ca href=\"https://github.com/ispaneli/lippy\" target=\"_blank\"\u003e\r\n  https://github.com/ispaneli/lippy\r\n\u003c/a\u003e\r\n\r\n---\r\n\r\n**Lippy** is a module for solving **linear programming problems** on Python.\r\n\r\nProvides:\r\n1. [Simplex method in primal linear programming](#simplex-method-in-primal-linear-programming)\r\n2. [Simplex method in dual linear programming](#simplex-method-in-dual-linear-programming)\r\n3. [Branch and bound in integer linear programming](#branch-and-bound-in-integer-linear-programming)\r\n4. [Brute force method in integer linear programming](#brute-force-method-in-integer-linear-programming)\r\n5. [Cutting-plane method in integer linear programming](#cutting-plane-method-in-integer-linear-programming)\r\n6. [Zero-sum game in game theory using Simplex method](#zero-sum-game-in-game-theory-using-simplex-method)\r\n\r\n---\r\n\r\n## Simplex method in primal linear programming\r\n\r\n```python\r\nimport lippy as lp\r\n\r\n\r\nc_vec = [6, 6, 6]\r\na_matrix = [\r\n    [4, 1, 1],\r\n    [1, 2, 0],\r\n    [0, 0.5, 4]\r\n]\r\nb_vec = [5, 3, 8]\r\n\r\nsimplex = lp.SimplexMethod(c_vec, a_matrix, b_vec)\r\nsolution, func_value = simplex.solve()\r\n```\r\n\r\n---\r\n\r\n## Simplex method in dual linear programming\r\n\r\n```python\r\nimport lippy as lp\r\n\r\n\r\nc_vec = [6, 6, 6]\r\na_matrix = [\r\n    [4, 1, 1],\r\n    [1, 2, 0],\r\n    [0, 0.5, 4]\r\n]\r\nb_vec = [5, 3, 8]\r\n\r\nc_vec, a_matrix, b_vec = lp.primal_to_dual_lp(c_vec, a_matrix, b_vec)\r\nsimplex = lp.SimplexMethod(c_vec, a_matrix, b_vec)\r\nsolution, func_value = simplex.solve()\r\n```\r\n\r\n---\r\n\r\n## Branch and bound in integer linear programming\r\n\r\n```python\r\nimport lippy as lp\r\n\r\n\r\nc_vec = [3, 3, 7]\r\na_matrix = [\r\n    [1, 1, 1],\r\n    [1, 4, 0],\r\n    [0, 0.5, 3]\r\n]\r\nb_vec = [3, 5, 7]\r\n\r\nbab = lp.BranchAndBound(c_vec, a_matrix, b_vec)\r\nsolution, func_value = bab.solve()\r\n```\r\n\r\n---\r\n\r\n## Brute force method in integer linear programming\r\n\r\n```python\r\nimport lippy as lp\r\n\r\n\r\nc_vec = [3, 3, 7]\r\na_matrix = [\r\n    [1, 1, 1],\r\n    [1, 4, 0],\r\n    [0, 0.5, 3]\r\n]\r\nb_vec = [3, 5, 7]\r\n\r\nforce = lp.BruteForce(c_vec, a_matrix, b_vec)\r\nsolution, func_value = force.solve()\r\n```\r\n\r\n---\r\n\r\n## Cutting-plane method in integer linear programming\r\n\r\n```python\r\nimport lippy as lp\r\n\r\n\r\nc_vec = [3, 3, 7]\r\na_matrix = [\r\n    [1, 1, 1],\r\n    [1, 4, 0],\r\n    [0, 0.5, 3]\r\n]\r\nb_vec = [3, 5, 7]\r\n\r\ngomory = lp.CuttingPlaneMethod(c_vec, a_matrix, b_vec)\r\ngomory.solve()\r\n```\r\n\r\n---\r\n\r\n## Zero-sum game in game theory using Simplex method\r\n\r\n```python\r\nimport lippy as lp\r\n\r\n\r\ngame_matrix = [\r\n    [8, 1, 17, 8, 1],\r\n    [12, 6, 11, 10, 16],\r\n    [4, 19, 11, 15, 2],\r\n    [17, 19, 6, 17, 16]\r\n]\r\n\r\ngame = lp.ZeroSumGame(game_matrix)\r\nstrategies = game.solve()\r\n```\r\n\r\n---\r\n\r\n## Logging\r\n\r\nExisting logging modes:\r\n1. FULL_LOG\r\n2. MEDIUM_LOG\r\n3. LOG_OFF *(default)*\r\n\r\nLogging is set when initializing a class object.\r\n\r\nFor example:\r\n\r\n```python\r\nsimplex = lp.SimplexMethod(c_vec, a_matrix, b_vec, log_mode=lp.LogMode.FULL_LOG)\r\n```\r\n\r\n```python\r\nbab = lp.BranchAndBound(c_vec, a_matrix, b_vec, log_mode=lp.LogMode.MEDIUM_LOG)\r\n```\r\n\r\n---\r\n\r\n## License\r\n\r\nThis project is licensed under the terms of the [MIT license](https://github.com/ispaneli/lippy/blob/master/LICENSE).\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fispaneli%2Flippy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fispaneli%2Flippy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fispaneli%2Flippy/lists"}