3 ms·
There is a bit of an art to formulating a correct and efficient mixed integer program (MIP) of non-trivial size, and in my experience, it's not something that
by wenc 8y ago
There is a bit of an art to formulating a correct and efficient mixed integer program (MIP) of non-trivial size, and in my experience, it's not something that can be picked up easily. It's easy to formulate toy problems (most of us use this guide [1]), but formulating large complex problems efficiently requires quite a bit of know-how and years of study (e.g. convex hull relaxations, custom cuts, heuristics, decomposition, leveraging randomness, etc.) This kind of thing lie in the domain of specialists (operations research folks) rather than software developers.
The performance of commercial solvers (Gurobi, CPLEX, Xpress) has improved a lot and many are used in things like airline crew scheduling. The best open-source MIP solver is currently CBC (SCIP is better but only free for non-commercial use), but commercial solvers beat these by a mile. Even so large-scale MIPs are still complex beasts.
It's worth noting that if the problem doesn't require any optimization (merely constraint satisfaction), MIPs might be overkill. A rules engine would probably be easier to implement and maintain. Even SQL (which is set theory in disguise) will often get you most of the way there. And if optimization was needed, a greedy algorithm would probably work most of the time.
There are many successful commercial applications of MIPs but typically they are in circumscribed areas. MIPs are best deployed when there is a definite need for an optimal result, and when there is expertise available to maintain the resulting complex models. (Note: even ITA software in the linked article didn't attempt to model the problem as an MIP)
[1] https://www.artelys.com/uploads/pdfs/Xpress/mipformref-1.pdf https://www.artelys.com/uploads/pdfs/Xpress/mipformref-1.pdf
- tonyarkles 8y agoInteresting historical note: Google bought ITA in 2010.
- wenc 8y agoRight. ITA's flight search tool was best-of-class in its time (and still is). Their competition at the time were Amadeus and Sabre which were written in assembly and ran on old-school mainframes. ITA's founders were MIT AI Lab alum so they wrote the first version of their software in Lisp. [1] ITA's code now powers Google Flights. [1] http://www.paulgraham.com/carl.html http://www.paulgraham.com/carl.html