Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbiggio/cplex-rs
Binding of IBM Cplex library
https://github.com/mbiggio/cplex-rs
Last synced: about 2 months ago
JSON representation
Binding of IBM Cplex library
- Host: GitHub
- URL: https://github.com/mbiggio/cplex-rs
- Owner: mbiggio
- License: apache-2.0
- Created: 2024-03-22T08:32:37.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-20T17:01:34.000Z (8 months ago)
- Last Synced: 2024-11-07T09:27:20.472Z (2 months ago)
- Language: C
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - cplex-rs - rs)[:package:](https://crates.io/crates/cplex-rs-sys) - safe rust bindings for [CPLEX](https://www.ibm.com/products/ilog-cplex-optimization-studio/cplex-optimizer). (Projects / Libraries)
README
# cplex-rs ![CI Pipeline](https://github.com/mbiggio/cplex-rs/actions/workflows/ci.yml/badge.svg)
Safe rust bindings for [CPLEX](https://www.ibm.com/products/ilog-cplex-optimization-studio/cplex-optimizer), based on the existing [rplex](https://github.com/emallson/rplex/tree/master) project.
It adds a few features on top of `rplex`, such as:
* parameter namespaces consistent with the native C/C++ CPLEX API
* more structured error handling
* possibility to add variables and constraints in batch
* raw bindings generate at compile time parsing the actual cplex headerIt also remove some features which are present `rplex`, especially the macros to define constraints and variables, since they present some issues.
It depends on the raw cplex bindings, generated through [bindgen](https://github.com/rust-lang/rust-bindgen) in the [cplex-rs-sys](./cplex-rs-sys/README.md) crate.
To build this repo, a valid CPLEX installation must be present on the system. If the CPLEX installation path is not the standard one, you will need to pass the `CPLEX_PATH` environment variable to `cargo` with the cplex installation path of choice, e.g.:
```bash
CPLEX_PATH=/path/to/cplex/installation cargo build
```## Testing
Tests in the CI are run using a personal copy of the CPLEX community edition, deployed in a docker image a private docker repository.If you want to generate an image with your own CPLEX installation to test this repo, you can find instructions in the [./utils](./utils/README.md) folder on how to do so.