{"id":30127771,"url":"https://github.com/rust-or/lp-solvers","last_synced_at":"2025-08-10T17:10:33.511Z","repository":{"id":57641745,"uuid":"352129360","full_name":"rust-or/lp-solvers","owner":"rust-or","description":"library implementing interaction with various linear programming solvers","archived":false,"fork":false,"pushed_at":"2024-03-19T18:31:35.000Z","size":1064,"stargazers_count":17,"open_issues_count":3,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-09-09T15:16:50.424Z","etag":null,"topics":["linear-programming","lp","operations-research","optimization","rust","solver"],"latest_commit_sha":null,"homepage":"https://docs.rs/lp-solvers/","language":"Rust","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/rust-or.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}},"created_at":"2021-03-27T17:03:27.000Z","updated_at":"2024-06-20T11:34:18.000Z","dependencies_parsed_at":"2022-09-07T03:54:33.937Z","dependency_job_id":"791f9259-87e7-4035-842a-c7a1aa738f6c","html_url":"https://github.com/rust-or/lp-solvers","commit_stats":{"total_commits":355,"total_committers":19,"mean_commits":18.68421052631579,"dds":0.3915492957746479,"last_synced_commit":"8eb3f90869f3bcc16d035bfe165e6f6bff939941"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/rust-or/lp-solvers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-or%2Flp-solvers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-or%2Flp-solvers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-or%2Flp-solvers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-or%2Flp-solvers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-or","download_url":"https://codeload.github.com/rust-or/lp-solvers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-or%2Flp-solvers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269756394,"owners_count":24470566,"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-08-10T02:00:08.965Z","response_time":71,"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":["linear-programming","lp","operations-research","optimization","rust","solver"],"created_at":"2025-08-10T17:10:30.919Z","updated_at":"2025-08-10T17:10:33.495Z","avatar_url":"https://github.com/rust-or.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lp-solvers\n\nLibrary implementing interaction with various linear programming solvers.\n\nIt uses the [.lp file format][lp] to interact with external solver binaries.\n\n[lp]: https://www.gurobi.com/documentation/9.1/refman/lp_format.html\n\n## Supported solvers\n\n - [gurobi](https://www.gurobi.com/)\n - [cplex](https://www.ibm.com/analytics/cplex-optimizer) (with the `cplex` feature)\n - [cbc](https://www.coin-or.org/Cbc/)\n - [glpk](https://www.gnu.org/software/glpk/)\n - **auto**: automatically finds which of the above solver is installed at runtime, and uses it.\n\nYou need to have the solver you want to use installed on your machine already for this library to work.\n\n## Example\n\n```rust\n\nuse lp_solvers::lp_format::{Constraint, LpObjective};\nuse lp_solvers::problem::{Problem, StrExpression, Variable};\nuse lp_solvers::solvers::{CbcSolver, SolverTrait};\nuse lp_solvers::solvers::Status::Optimal;\n\nfn solve_integer_problem_with_solver\u003cS: SolverTrait\u003e(solver: S) {\n    let pb = Problem { // Alternatively, you can implement the LpProblem trait on your own structure\n        name: \"int_problem\".to_string(),\n        sense: LpObjective::Maximize,\n        objective: StrExpression(\"x - y\".to_string()), // You can use other expression representations\n        variables: vec![\n            Variable {\n                name: \"x\".to_string(),\n                is_integer: true,\n                lower_bound: -10.,\n                upper_bound: -1.,\n            },\n            Variable {\n                name: \"y\".to_string(),\n                is_integer: true,\n                lower_bound: 4.,\n                upper_bound: 7.,\n            },\n        ],\n        constraints: vec![Constraint {\n            lhs: StrExpression(\"x - y\".to_string()),\n            operator: Ordering::Less,\n            rhs: -4.5,\n        }],\n    };\n    let solution = solver.run(\u0026pb).expect(\"Failed to run solver\");\n    assert_eq!(solution.status, Optimal);\n    // solution.results is now {\"x\":-1, \"y\":4}\n}\n\nfn main() {\n    solve_integer_problem_with_solver(CbcSolver::default())\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-or%2Flp-solvers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-or%2Flp-solvers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-or%2Flp-solvers/lists"}