good_lp
A Linear Programming modeler that is easy to use, performant with large problems, and well-typed.
use ;
Features and limitations
- Linear programming. This crate currently supports only the definition of linear programs. You cannot use it with quadratic functions, for instance.
- Continuous variables. Currently, only continuous variables are supported. Mixed-integer linear programming (MILP) is not supported.
- Not a solver. This crate uses other rust crates to provide the solvers. There is no solving algorithm in good_lp itself. If you have an issue with a solver, report it to the solver directly. See below for the list of supported solvers.
Contributing
Pull requests are welcome ! If you need any of the features mentioned above, get in touch. Also, do not hesitate to open issues to discuss the implementation.
Usage examples
You can find a resource allocation problem example in
resource_allocation_problem.rs.
Solvers
This library offers an abstraction over multiple solvers. By default, it uses cbc, but you can also activate other solvers using cargo features.
cbc
Used by default, performant, but requires to have a C compiler and the cbc C library installed.
In ubuntu, you can install it with:
sudo apt-get install coinor-cbc coinor-libcbc-dev
In MacOS, using homebrew :
brew install cbc
minilp
minilp is a pure rust solver, which means it works out of the box without installing anything else.
You can activate it with :
[]
= "0.1.0"
= false
= ["minilp"]
Then use minilp instead of coin_cbc in your code:
use minilp;
License
This library is published under the MIT license.