Combinatorial optimization seeks to find the best solution to a problem out of a very large set of possible solutions. Here are some examples:
- Vehicle routing: Find optimal routes for vehicle fleets that pick up and deliver packages given constraints (e.g., "this truck can't hold more than 20,000 pounds" or "all deliveries must be made within a two-hour window").
- Scheduling: find the optimal schedule for complex set of tasks, some of which need to be performed before others, on a fixed set of machines, or other resources.
- Bin packing: pack as many objects of various sizes as possible into a fixed number of bins with maximum capacities.
In most cases, problems like these have a vast number of possible solutions—too many for a computer to search them all. To overcome this, OR-Tools uses state-of-the-art algorithms to narrow down the search set, in order to find an optimal (or close to optimal) solution.
OR-Tools includes solvers for:
- Constraint Programming
- A set of techniques for finding feasible solutions to a problem expressed as constraints (e.g., a room can't be used for two events simultaneously, or the distance to the crops must be less than the length of the hose, or no more than five TV shows can be recorded at once).
- Linear and Mixed-Integer Programming
- The Glop linear optimizer finds the optimal value of a linear objective function, given a set of linear inequalities as constraints (e.g., assigning people to jobs, or finding the best allocation of a set of resources while minimizing cost). Glop and the mixed-integer programming software SCIP are also available via both Google Sheets and Google Apps Script.
- Vehicle Routing
- A specialized library for identifying best vehicle routes given constraints.
- Finding the optimal schedule for complex set of tasks, some of which need to be performed before others, on a fixed set of machines, or other resources.
- Graph Algorithms
- Code for finding shortest paths in graphs, min-cost flows, max flows, and linear sum assignments.
- Bin packing
- Code for packing items in bins to obtain the maximum quantity of packed items.