Google Optimization Tool : Tool for Competitive Programmers


Hey, Guys Learner is here with an amazing tool for Competitive Programmers I think it will help to solve problems in the more better way.

What is Google Optimization Tool?

Google Optimization Tools (OR-Tools) is a fast and portable software suite for solving combinatorial optimization problems.

The suite contains:

  • A constraint programming solver.
  • A simple and unified interface to several linear programming and mixed integer programming solvers, including CBCCLPGLOPGLPKGurobiCPLEX, and SCIP.
  • Graph algorithms (shortest paths, min cost flow, max flow, linear sum assignment).
  • Algorithms for the Traveling Salesman Problem and Vehicle Routing Problem.
  • Bin packing and knapsack algorithms.

Google created OR-Tools in C++, but you can also use it with Python, C#, or Java.

What is Combinatorial Optimization?

A combinatorial optimization is an approach to finding the best solution out of a very large set of possible solutions. When the set is so large that it’s impractical to search through all of them, various techniques can be used to narrow down the set or speed up the search.
Google’s OR-Tools software suite makes it easy to solve many types of combinatorial optimization problems. It 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 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 paths 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”).

Graph Algorithms

Code for finding shortest paths, min-cost flows, max flows, and linear sum assignments.

How to Install it?

Software requirements for a Linux/Mac OS X binary installation

  • Before installing OR-Tools with support for Python, you must install Python setuptools. On Linux, you can do so by opening a command window and entering
    sudo apt-get install python-setuptools
  • Before installing OR-Tools with support for C++, Java, and C#, you must install g++. On Linux, you can do so by entering
    sudo apt-get install g++
  • Before installing a binary distribution on Mac OS X, you must install the Xcode Command Line Tools. To do so, open the Terminal, found in /Applications/Utilities/, and enter
    xcode-select --install
  • If you plan to use OR-Tools with C#, you must install Mono version 4.2.0 or later, with 64 bit support. You can download the latest version of Mono from the Mono Download page.

How to use it?

Go through here.

Wanna Contribute?

Go through here (:
{Code With Code@ter}

Give Your Reviews

Leave a Reply