{"id":32519657,"url":"https://github.com/rystrauss/simplex","last_synced_at":"2025-10-28T04:38:54.058Z","repository":{"id":40962598,"uuid":"247988220","full_name":"rystrauss/simplex","owner":"rystrauss","description":"Implementation of the Simplex algorithm for solving linear programs.","archived":false,"fork":false,"pushed_at":"2022-06-22T01:54:08.000Z","size":23,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-30T00:43:01.880Z","etag":null,"topics":["constrained-optimization","linear-programming","optimization","simplex-algorithm"],"latest_commit_sha":null,"homepage":"","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/rystrauss.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}},"created_at":"2020-03-17T14:17:12.000Z","updated_at":"2020-11-25T21:54:32.000Z","dependencies_parsed_at":"2022-09-01T03:13:21.013Z","dependency_job_id":null,"html_url":"https://github.com/rystrauss/simplex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rystrauss/simplex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rystrauss%2Fsimplex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rystrauss%2Fsimplex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rystrauss%2Fsimplex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rystrauss%2Fsimplex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rystrauss","download_url":"https://codeload.github.com/rystrauss/simplex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rystrauss%2Fsimplex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281386563,"owners_count":26492014,"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","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["constrained-optimization","linear-programming","optimization","simplex-algorithm"],"created_at":"2025-10-28T04:38:49.869Z","updated_at":"2025-10-28T04:38:53.966Z","avatar_url":"https://github.com/rystrauss.png","language":"Python","readme":"# Simplex Algorithm\n\nThe `simplex` package contained in this repository provides an interface for constructing linear programs\nand solving them with the [Simplex algorithm](https://en.wikipedia.org/wiki/Simplex_algorithm).\n\n## Usage\n\nConsider the following LP:\n\n**Maximize 3x + 4y subject to the following constraints:**\n\nx + 2y ≤ 14\n\n3x - y ≥ 0\n\nx - y ≤ 2\n\n\nThe code below demonstrates how to construct and solve this LP using the `simplex` package.\n\nFor simplicity, this solver assumes that the objective is to be maximized and does not provide the option to set\nexplicit lower bounds on variables.\n\n```python\nfrom simplex import Solver\n\n# Create the solver\nsolver = Solver()\n\n# Create variables\nx = solver.add_variable('x', Solver.INFINITY)\ny = solver.add_variable('y', Solver.INFINITY)\n\n# Constraint 0: x + 2y \u003c= 14.\nconstraint0 = solver.add_constraint(-Solver.INFINITY, 14)\nconstraint0.set_coefficient(x, 1)\nconstraint0.set_coefficient(y, 2)\n\n# Constraint 1: 3x - y \u003e= 0.\nconstraint1 = solver.add_constraint(0, Solver.INFINITY)\nconstraint1.set_coefficient(x, 3)\nconstraint1.set_coefficient(y, -1)\n\n# Constraint 2: x - y \u003c= 2.\nconstraint2 = solver.add_constraint(-Solver.INFINITY, 2)\nconstraint2.set_coefficient(x, 1)\nconstraint2.set_coefficient(y, -1)\n\n# Objective function: 3x + 4y.\nobjective = solver.objective()\nobjective.set_coefficient(x, 3)\nobjective.set_coefficient(y, 4)\n\n# Solve the linear program\nstatus = solver.solve()\n\nprint('Solution status:', status)\nprint('Objective value:', objective.solution_value)\nprint('x value:', x.solution_value)\nprint('y value:', y.solution_value)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frystrauss%2Fsimplex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frystrauss%2Fsimplex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frystrauss%2Fsimplex/lists"}