LP is a simple and lightweight solver-independent C/C++ wraper to Mixed-Integer Programming (MIP) solvers. It currently supports COIN-OR CBC, GLPK, CPLEX and GUROBI. It can be called from any C 89 (or higher) compatible compiler. I created LP because as someone used to the C based CPLEX callable library, I was frustrated with the relatively large object oriented framework that one had to know to successfully use all the features in the COIN-OR CBC integer optimizer (OSI, CGL, CBC...).
Besides the standard Creation/Modification, Problem Query and Optimization routines LP provides access to some usefull features to Mixed Integer Optimizers:
- Handling of solution pool
- MIPStart (entering an initial feasible solution)
- Callback for cut generation (currently only in CBC)
Just add lp.cpp and lp.h to your project and specify your mip solver
adding one of the following compilation directives (ex. in GCC
-DCBC
):
CBC
to build using the COIN-OR Branch-and-Cut solverGLPK
to build using the GNU Linear Programming Kit (GLPK) solverCPX
to build using the IBM CPLEX MIP (c) SolverGRB
to build using the Gurobi (c) MIP Solver
Just add all required libraries of your selected solver.