Google's open source software suite for optimization, OR-Tools, provides the MPSolver wrapper for solving linear programming and mixed integer programming problems.
To solve pure integer programming problems you can also use the CP-SAT solver.
Examples
The following pages provide examples that illustrate MPSolver usage:
- Solving the Stigler diet problem using Glop
- Solving an LP problem using Glop
- Solving a MIP problem using SCIP
- Solving a bin packing problem using SCIP
- Solving an assignment problem using CP-SAT
- Using arrays to define a model
Common tasks
The following section demonstrates common tasks related to solving LPs and MIPs.
Time limits
The example below shows how to set a search time limit of 15 milliseconds when using Glop.
Python
solver.set_time_limit(15)
C++
solver->set_time_limit(15);
Java
solver.setTimeLimit(15)
C#
solver.SetTimeLimit(15);