Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Integer Linear Programming and the Google Optim...

Integer Linear Programming and the Google Optimization Toolset

GDG Reading & Thames Valley DevFest 2015

Selma Ardelean

November 14, 2015
Tweet

Transcript

  1. > whoami • Junior Software Developer @ NewVoiceMedia • Interested

    in machine learning, artificial intelligence and optimization techniques @matah @s_ardelean selma.ardelean@gmail.com
  2. Lınear Optımızatıon or lınear programıng is the name given to

    computing the best solution to a problem modeled as a set of linear relationships.
  3. A bit of history • Developed during World War 2

    • Released to the public in 1947 • Active work going on • Still quite a few open problems George Bernard Dantzig Leonid Kantorovich John von Neumann
  4. Variables: x, y Objective function: 3*x + 4*y Constraints: x

    + 2*y <= 14 3*x - y >= 0 x - y <= 2 Basic Example
  5. Simplex Algorithm Let’s just call it magic • Proposed by

    George Bernard Dantzig in 1947 • average case polynomial complexity • worst case exponential complexity • used widely in practice
  6. Procedure 1. Simplify constraints 2. Represent constraints geometrically 3. Get

    coordinates of all vertices and replace into the objective function
  7. Applications • Transportation problem • Minimization of production costs •

    Maximization of profit • Telecommunications networks • Cellular networks • Scheduling • Travelling Salesman
  8. Google Optimization Toolset • Open Source under the Apache License

    ◦ https://github.com/google/or-tools • Written in C++ • Used internally at Google • Provides an APIs for various languages: C++, Java, Python and C# • Can be used with other solvers • Does provide its own open source linear solver: GLOP • Actively being developed • Documentation has come a long way
  9. The Problem: Stigler diet, named for economics Nobel laureate George

    Stigler, who computed an inexpensive way to fulfill basic nutritional needs given a set of foods The Constraints: The Variables: The Objective: minimize cost
  10. Resources • Discrete Optimization Course ◦ https://class.coursera.org/optimization-003 • https://en.wikipedia.org/wiki/Integer_programming •

    Scheduling problem ◦ https://github.com/evilqubit/lpSolve • lp_solve API reference ◦ http://lpsolve.sourceforge.net/5.5/ • Online example of simplex algorithm ◦ http://www.zweigmedia.com/RealWorld/simplex.html • Gurobi solver reference ◦ http://www.gurobi.com/
  11. Conclusion I am by no means an expert in anything

    Linear programming is applicable to a variety of problems The Google Optimization toolset is easy to use and understand And provides much more than just a linear solver Math is fun!