# MPSolver Interface

Google's open source software suite for optimization,
[OR-Tools](https://github.com/google/or-tools), provides the MPSolver wrapper
for solving [linear programming](https://developers.google.com/optimization/lp) and
[mixed integer programming](https://developers.google.com/optimization/mip) problems.

To solve pure integer programming problems you can also use the
[CP-SAT](https://developers.google.com/optimization/cp/cp_solver) solver.

## Examples

The following pages provide examples that illustrate MPSolver usage:

- [Solving the Stigler diet problem](https://developers.google.com/optimization/lp/stigler_diet) using Glop
- [Solving an LP problem](https://developers.google.com/optimization/lp/lp_example) using Glop
- [Solving a MIP problem](https://developers.google.com/optimization/mip/mip_example) using SCIP
- [Solving a bin packing problem](https://developers.google.com/optimization/pack/bin_packing) using SCIP
- [Solving an assignment problem](https://developers.google.com/optimization/assignment/assignment_example) using CP-SAT
- [Using arrays to define a model](https://developers.google.com/optimization/mip/mip_var_array)

## Common tasks

The following section demonstrates common tasks related to solving
and .

### Time limits

The example below shows how to set a search time limit of 15 milliseconds when
using .

### Python

```python
solver.set_time_limit(15)
```

### C++

```c++
solver->set_time_limit(15);
```

### Java

```java
solver.setTimeLimit(15)
```

### C#

```c#
solver.SetTimeLimit(15);
```

*[Glop]: Google Linear Optimization
*[MIPs]: Mixed Integer Programming
*[LPs]: Linear Programming