Alex Fleischer
IBM Data Science in Practice
3 min readMay 21, 2019

--

Optimization : simply do more with less, zoo, buses and kids

All companies and businesses need to make decisions. Good managers quickly make good decisions. Common sense states that with good data, simple problems lead to simple solutions.

Common sense is wrong.

Let me show that with a tiny example that my maths teacher gave us when I was 14. This is tiny albeit very similar to common business problems.

300 kids need to travel to the London zoo.The school may rent 40 seats and 30 seats buses for $500 and $400 . How many buses of each size do you use to minimize cost?

For many people, the answer is simple, even trivial. A seat costs $12.50 for 40 seats buses and $13.33 for 30 seats buses. So we should prefer 40-seater buses to 30-seater buses. So we first spend $3500 (7*$500) for 7 buses and 280 kids and then add an eighth bus for $400 (30 seats) for the remaining 20 kids. Total cost is $3900.

This looks fine. But this is not the best solution. With 6 buses 40 seats (240 kids and $3000) and 2 buses 30 seats (60 kids, $800), we can move the kids and pay only $3800). We can save $100!

The best decision is not that obvious.

Back then, I had wrote a small program in Pascal. My maths teacher (Mrs C) was not happy with my solution, since she wanted us to use geometry and not a computer program. She wanted us to use a ruler and a square. I was not happy with her solution. And what if you had five bus sizes instead of two! Then geometry would no longer work.

The right method for companies is a mix of my approach (program) and my teacher’s (mathematical): mathematical optimization and, in particular IBM CPLEX, can solve those problems but with many more decision variables (we call such things as the bus quantities decision variables). Real business problems in real companies do not require two decision variables like in our toy problem but thousands or dozens of thousands (or even many more sometimes).

Describing those problems is easy. We can rely on many programming languages, Python included, or use a modeling language such as OPL.

The same model with words, in OPL and in Python

Optimization can help tons of business decisions. With modern tools and languages this is no longer a difficult task. Plus with real business problems, the Return On Investment won’t be $100 as in our toy bus problem, it will be millions of dollars, as we see with many of our customers using CPLEX.

IBM ILOG CPLEX Optimization Studio is a prescriptive analytics solution that enables rapid development and deployment of decision optimization models using mathematical and constraint programming.

Let me mention Banque de France (French Central Bank) and Dijon Hospital.

NB:

Thanks to Rémi who rewrote my first draft and my contacts who have translated my first draft into Arabic, Catalan, Chinese, Dutch, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Italian, Japanese, Korean, Persian, Polish, Portuguese, Russian, Spanish, Swedish, Turkish, Vietnamese

PS:

Part 2 with starting points with other python API, scala, C++, Java …

--

--

Alex Fleischer
IBM Data Science in Practice

Optimization Expert at IBM Europe. His expertise is in computer science, mathematics, artificial intelligence and Optimization. Sup Aéro graduate 1996.