Media Spend Optimization With Linear Programming

This post shares the preliminary information and code for the 8th Episode of Friday Fun, which will be published on 03/08. In this episode, we will explore a use case for linear programming in the marketing domain. We will use linear programming to optimize our media spend.

Our hypothetical company is Laughing Green Foods, which aims to bring fresh salad to the masses. Leveraging AI, they have developed an “AI-enabled” vending machine for salads. Don’t ask how salads can be fresh long enough to be vended via vending machines. The very goal of inserting the term “AI-enabled” was to bamboozle you so that you do not ask questions since your belief is that as long as the term “AI-enabled” is there, anything is possible. 😄

Jokes apart, Laughing Green is a startup on a budget. They are planning an advertising blitz, with a total budget of $282,000. The money will be spent on a TV advertising blitz during one weekend (Friday, Saturday, and Sunday) . The three options available are: 

  • Daytime advertising,
  • Evening news advertising, and
  • Sunday game-time advertising. 

The detailed numbers and business constraints will be shared in the Episode 8 of “Friday Fun” that will be published later today. The Episode can be watched here:

If you are curious, the files below have the solution to the use case we will discuss. You can take a peek.

We have solved the optimization problem (since it is pretty simple), in both Excel and Python (Pyomo).

Here is the Excel file with the problem structured and solved. Solver available in Excel has been used.

The same problem has been solved in Python, using Pyomo. The link to the workbook is here:

https://anaconda.cloud/share/notebooks/a01a2d2b-ebce-4111-9768-e88d76e6ed49/overview

Looking forward to share the details in Episode 8 of “Friday Fun”.


Leave a comment