{"id":13748712,"url":"https://github.com/ztlpn/minilp","last_synced_at":"2025-12-30T04:04:53.874Z","repository":{"id":56383142,"uuid":"236020634","full_name":"ztlpn/minilp","owner":"ztlpn","description":"A pure Rust linear programming solver","archived":true,"fork":false,"pushed_at":"2020-11-11T03:17:06.000Z","size":305,"stargazers_count":85,"open_issues_count":5,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-05T15:56:37.553Z","etag":null,"topics":["linear-programming","rust","simplex-algorithm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ztlpn.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-01-24T14:46:30.000Z","updated_at":"2025-04-27T13:34:58.000Z","dependencies_parsed_at":"2022-08-15T17:40:48.557Z","dependency_job_id":null,"html_url":"https://github.com/ztlpn/minilp","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/ztlpn%2Fminilp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztlpn%2Fminilp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztlpn%2Fminilp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ztlpn%2Fminilp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ztlpn","download_url":"https://codeload.github.com/ztlpn/minilp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253240350,"owners_count":21876593,"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-programming","rust","simplex-algorithm"],"created_at":"2024-08-03T07:00:47.931Z","updated_at":"2025-12-12T15:15:23.690Z","avatar_url":"https://github.com/ztlpn.png","language":"Rust","funding_links":[],"categories":["Projects"],"sub_categories":["Provers and Solvers"],"readme":"# minilp\n\n[![Crates.io](https://img.shields.io/crates/v/minilp.svg)](https://crates.io/crates/minilp)\n[![Documentation](https://docs.rs/minilp/badge.svg)](https://docs.rs/minilp/)\n\nA fast linear programming solver library.\n\n[Linear programming](https://en.wikipedia.org/wiki/Linear_programming) is a technique for\nfinding the minimum (or maximum) of a linear function of a set of continuous variables\nsubject to linear equality and inequality constraints.\n\n## Features\n\n* Pure Rust implementation.\n* Able to solve problems with hundreds of thousands of variables and constraints.\n* Incremental: add constraints to an existing solution without solving it from scratch.\n* Problems can be defined via an API or parsed from an\n  [MPS](https://en.wikipedia.org/wiki/MPS_(format)) file.\n\nWarning: this is an early-stage project. Although the library is already quite powerful and fast,\nit will probably cycle, lose precision or panic on some harder problems. Please report\nbugs and contribute code!\n\n## Examples\n\nBasic usage\n\n```rust\nuse minilp::{Problem, OptimizationDirection, ComparisonOp};\n\n// Maximize an objective function x + 2 * y of two variables x \u003e= 0 and 0 \u003c= y \u003c= 3\nlet mut problem = Problem::new(OptimizationDirection::Maximize);\nlet x = problem.add_var(1.0, (0.0, f64::INFINITY));\nlet y = problem.add_var(2.0, (0.0, 3.0));\n\n// subject to constraints: x + y \u003c= 4 and 2 * x + y \u003e= 2.\nproblem.add_constraint(\u0026[(x, 1.0), (y, 1.0)], ComparisonOp::Le, 4.0);\nproblem.add_constraint(\u0026[(x, 2.0), (y, 1.0)], ComparisonOp::Ge, 2.0);\n\n// Optimal value is 7, achieved at x = 1 and y = 3.\nlet solution = problem.solve().unwrap();\nassert_eq!(solution.objective(), 7.0);\nassert_eq!(solution[x], 1.0);\nassert_eq!(solution[y], 3.0);\n```\n\nFor a more involved example, see [examples/tsp](examples#tsp), a solver for the travelling\nsalesman problem.\n\n## License\n\nThis project is licensed under the [Apache License, Version 2.0](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztlpn%2Fminilp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fztlpn%2Fminilp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztlpn%2Fminilp/lists"}