{"id":17202045,"url":"https://github.com/colcarroll/simplex_solver","last_synced_at":"2025-03-25T09:14:41.443Z","repository":{"id":23634053,"uuid":"27003871","full_name":"ColCarroll/simplex_solver","owner":"ColCarroll","description":"Explanatory implementation of the simplex method","archived":false,"fork":false,"pushed_at":"2014-11-22T16:07:52.000Z","size":200,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T08:29:26.813Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ColCarroll.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":"2014-11-22T15:59:40.000Z","updated_at":"2014-11-22T16:07:52.000Z","dependencies_parsed_at":"2022-08-22T03:30:44.978Z","dependency_job_id":null,"html_url":"https://github.com/ColCarroll/simplex_solver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColCarroll%2Fsimplex_solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColCarroll%2Fsimplex_solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColCarroll%2Fsimplex_solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColCarroll%2Fsimplex_solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ColCarroll","download_url":"https://codeload.github.com/ColCarroll/simplex_solver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245431721,"owners_count":20614184,"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":[],"created_at":"2024-10-15T02:13:28.341Z","updated_at":"2025-03-25T09:14:41.376Z","avatar_url":"https://github.com/ColCarroll.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"simplex_solver\n==============\n\nExplanatory implementation of the simplex method.  Uses only standard python library and makes some WILD assumptions about solvability, so be gentle.  \n\nUsage\n=====\nThe file can be run using the `main` function.  Edit the coefficients there.  All coefficients should be integers.  Didn't finish implementing the method for the case of equality constraints.\n\n\n```\n$ python simplex.py \nWe seek to minimize the function\n\nZ = -2x - 3y - 4z\n\nSubject to the constraints\n\n3x + 2y + z \u003c= 10\n2x + 5y + 3z \u003c= 15\n\nand the constraint that each variable must be nonnegative.\n\n\nThe canonical tableaux is\n\n|   1   2   3   4   0   0   0   |   \n|   0   3   2   1   1   0   10  |   \n|   0   2   5   3   0   1   15  |   \n\nSelect row 2, column 2 as the pivot and reduce to get\n\n|      1      0      5/3    10/3   -2/3   0      -20/3  |      \n|      0      1      2/3    1/3    1/3    0      10/3   |      \n|      0      0      11/3   7/3    -2/3   1      25/3   |      \n\nSelect row 3, column 3 as the pivot and reduce to get\n\n|        1        0        0        25/11    -4/11    -5/11    -115/11  |        \n|        0        1        0        -1/11    5/11     -2/11    20/11    |        \n|        0        0        1        7/11     -2/11    3/11     25/11    |        \n\nSelect row 3, column 4 as the pivot and reduce to get\n\n|       1       0       -25/7   0       2/7     -10/7   -130/7  |       \n|       0       1       1/7     0       3/7     -1/7    15/7    |       \n|       0       0       11/7    1       -2/7    3/7     25/7    |       \n\nSelect row 2, column 5 as the pivot and reduce to get\n\n|      1      -2/3   -11/3  0      0      -4/3   -20    |      \n|      0      7/3    1/3    0      1      -1/3   5      |      \n|      0      2/3    5/3    1      0      1/3    5      |      \n\nNow the first row is entirely nonpositive, so the minimum value of Z is -20\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolcarroll%2Fsimplex_solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolcarroll%2Fsimplex_solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolcarroll%2Fsimplex_solver/lists"}