{"id":13749077,"url":"https://github.com/emallson/rplex","last_synced_at":"2026-01-21T19:37:11.280Z","repository":{"id":56543700,"uuid":"76070012","full_name":"emallson/rplex","owner":"emallson","description":"Rust bindings for CPLEX","archived":false,"fork":false,"pushed_at":"2022-08-31T14:47:00.000Z","size":24,"stargazers_count":5,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-09T11:34:57.594Z","etag":null,"topics":["cplex","optimization","rust-bindings"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emallson.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":"2016-12-09T21:00:53.000Z","updated_at":"2022-09-28T09:18:33.000Z","dependencies_parsed_at":"2022-08-15T20:40:28.513Z","dependency_job_id":null,"html_url":"https://github.com/emallson/rplex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emallson/rplex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emallson%2Frplex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emallson%2Frplex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emallson%2Frplex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emallson%2Frplex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emallson","download_url":"https://codeload.github.com/emallson/rplex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emallson%2Frplex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28641279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T18:04:35.752Z","status":"ssl_error","status_checked_at":"2026-01-21T18:03:55.054Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cplex","optimization","rust-bindings"],"created_at":"2024-08-03T07:00:54.946Z","updated_at":"2026-01-21T19:37:11.250Z","avatar_url":"https://github.com/emallson.png","language":"Rust","readme":"# RPLEX\n\nRust bindings for\n[CPLEX](https://www-01.ibm.com/software/commerce/optimization/cplex-optimizer/),\nan IP/MIP/QP solver from IBM. Currently highly experimental but\nworking for IP/MIP problems.\n\n```toml\n[dependencies]\nrplex = {version = \"0.2\", git = \"https://github.com/emallson/rplex.git\"} \n```\n\nYou *must* have CPLEX installed for RPLEX to work. The build script\nattempts to locate CPLEX automatically (and should do so assuming\nyou've installed it at the usual location on Linux). CPLEX is not\nnecessary to run a binary compiled with RPLEX; static linking is used.\n\n[Documentation](http://atlanis.net/doc/rs/rplex/)\n\n## !!Warning!!\n\nThere is an issue with the `var!` macro which has not been resolved where it cannot distinguish between `var!(lb \u003c= name)` and `var!(name \u003c= ub)` shorthands (see  https://github.com/emallson/rplex/issues/3). These will eventually be removed, but I no longer have a copy of CPLEX available to use in supporting RPLEX.\n\n# Example\n\n```rust\nfn lpex1() {\n    // create a CPLEX environment\n    let env = Env::new().unwrap();\n    // populate it with a problem\n    let mut prob = Problem::new(\u0026env, \"lpex1\").unwrap();\n    // maximize the objective\n    prob.set_objective_type(ObjectiveType::Maximize).unwrap();\n    // create our variables\n    let x1 = prob.add_variable(var!(0.0 \u003c= \"x1\" \u003c= 40.0 -\u003e 1.0)).unwrap();\n    let x2 = prob.add_variable(var!(\"x2\" -\u003e 2.0)).unwrap();\n    let x3 = prob.add_variable(var!(\"x3\" -\u003e 3.0)).unwrap();\n    println!(\"{} {} {}\", x1, x2, x3);\n\n    // add our constraints\n    prob.add_constraint(con!(\"c1\": 20.0 \u003e= (-1.0) x1 + 1.0 x2 + 1.0 x3)).unwrap();\n    prob.add_constraint(con!(\"c2\": 30.0 \u003e= 1.0 x1 + (-3.0) x2 + 1.0 x3)).unwrap();\n\n    // solve the problem\n    let sol = prob.solve().unwrap();\n    println!(\"{:?}\", sol);\n    // values taken from the output of `lpex1.c`\n    assert!(sol.objective == 202.5);\n    assert!(sol.variables == vec![VariableValue::Continuous(40.0),\n                                    VariableValue::Continuous(17.5),\n                                    VariableValue::Continuous(42.5)]);\n}\n```\n\n(Translated from the CPLEX example code `lpex1.c`. Taken from an\n[actual test](src/lib.rs))\n\n# License\n\nIBM, CPLEX and associated items are (c) IBM.\n\nCopyright (c) 2016, J. David Smith All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nNeither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","funding_links":[],"categories":["Projects"],"sub_categories":["Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femallson%2Frplex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femallson%2Frplex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femallson%2Frplex/lists"}