{"id":27277135,"url":"https://github.com/pooya-mohammadi/linear-programming","last_synced_at":"2025-04-11T16:57:54.036Z","repository":{"id":64964229,"uuid":"580086653","full_name":"pooya-mohammadi/linear-programming","owner":"pooya-mohammadi","description":"Linear Programming and Mixed-Integer Linear Programming with Python","archived":false,"fork":false,"pushed_at":"2022-12-19T17:29:16.000Z","size":1,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-05T06:39:47.058Z","etag":null,"topics":["linear-programing","linear-programming","lp","mixed-integer-linear-programming","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pooya-mohammadi.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-19T17:25:56.000Z","updated_at":"2023-02-22T08:17:31.000Z","dependencies_parsed_at":"2022-12-21T05:30:50.051Z","dependency_job_id":null,"html_url":"https://github.com/pooya-mohammadi/linear-programming","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooya-mohammadi%2Flinear-programming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooya-mohammadi%2Flinear-programming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooya-mohammadi%2Flinear-programming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooya-mohammadi%2Flinear-programming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pooya-mohammadi","download_url":"https://codeload.github.com/pooya-mohammadi/linear-programming/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248445859,"owners_count":21104987,"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":["linear-programing","linear-programming","lp","mixed-integer-linear-programming","python"],"created_at":"2025-04-11T16:57:53.361Z","updated_at":"2025-04-11T16:57:54.024Z","avatar_url":"https://github.com/pooya-mohammadi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linear Programing\n\n## LP Explanation\nLinear Programing is used to extract the minimum or maximum of **linear equations**. \nThe cool part about linear programing is that it can handle constraints over the input arguments. \n\n## Mixed-integer LP: \nAn extension of LP. In these problems, at least one variable takes a discrete integer value rather than continuous.\n\u003cbr/\u003e\nThe number of items like vehicles in an optimization problem can be represented with Mixed-integer LP.\n\n## LP with Python:\n1) Almost all the LP libraries are written in C, Fortran, or C++ because it's computationally intensive.\n\n## Small LP problem\n1) maximize: `z = 3x + 2y`\n2) subject to: \n   1) `2x + 2y \u003c 10`\n   2) `x \u003e 0`\n3) Mixed-Integer: by imposing the idea that x should be discrete or integer, the LP becomes Mixed-Integer LP. \n\n### Notations:\n1) independent variables or decision variables: x, y\n2) objective function, the cost function, or just the goal: z\n3) inequality constraints: 1, 2\n4) Infeasible Linear Programming problem: if no solution satisfies all the constraints.\n5) Unbounded LP problem: If the number of solutions is not finite.\n\n## Python packages:\n1) scipy\n2) PuLP\n\n## Installation:\nhttps://realpython.com/linear-programming-python/#installing-scipy-and-pulp\n\n```commandline\npip install -r requirements.txt\n```\nor\n```commandline\npython -m pip install -U git+https://github.com/coin-or/pulp\n```\n## References:\n1) https://realpython.com/linear-programming-python/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooya-mohammadi%2Flinear-programming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpooya-mohammadi%2Flinear-programming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooya-mohammadi%2Flinear-programming/lists"}