How Hexaly solves TV media planning problems with millions of variables for TF1


TF1 is a major media group in Europe and the leading TV group in France, with a 20% audience share and 30% of the advertising market. The company generated €2 billion in sales in 2020, mainly thanks to media planning. TF1 PUB is the group’s advertising agency, selling time to advertisers. For example, TF1 PUB markets the advertising space of the TF1 Group channels: TF1, TMC, TFX, TF1 Séries Films, LCI, TV Breizh, Ushuaïa TV, and Histoire TV.

TF1’s media planning problem

TF1 PUB offers its customers the option of automatically planning their campaigns on the TF1 Group’s channels with pricing based on the audience observed. This planning requires a daily re-optimization of all campaigns to reach the guaranteed audience at the end of the campaign.

Input data

  • 7 channels
  • 35 marketing targets
  • 860 campaigns
  • 35,000 commercial breaks
  • 150,000 spots allocated


For each campaign, decide which commercials to broadcast in each spot of each commercial break


  • Do not exceed the capacity of each commercial break (packing)
  • Respect competition rules between campaigns (mutual exclusion)


  • Meet the marketing criteria for each campaign (quality of service) as best as possible
  • Maximize the resulting income for TV channels (revenue optimization)

Custom media planning solution

We have customized Hexaly Optimizer to deliver a custom media planning engine to optimize all campaigns every night. We helped TF1 PUB fine-tune business rules and objectives to produce high-quality campaigns for advertisers. For example, we introduced easy-to-read aggregated qualitative indices to qualify the resulting TV campaigns given the many marketing criteria to optimize: green is perfect, orange is good, and red is unacceptable. After optimization, media planners can visualize the campaigns with all their KPIs and possibly modify and reoptimize them.

TF1 PUB estimates the resulting gains at up to 2% of the turnover of these campaigns.

Mathematical model and results

Here is the size of the instances to be solved once modeled using Hexaly, and the key performance figures of the resolution:

  • 10 million variables, including 1 million binaries
  • 1 million constraints
  • 100+ lexicographically-ordered objectives
  • Time limit: 1 hour

Why Hexaly?

Off-the-shelf media planning solutions available on the software market, mainly based on the IBM ILOG CPLEX mathematical solver, could not solve such huge and rich-featured media planning problems. Furthermore, the optimization engine built upon Hexaly for TF1 is fully customizable. For example, it includes probabilistic inventory management rules to serve demands better while consuming less advertising space. Finally, the modeling features offered by the Hexaly OptimizerAPIs (the C# API in this case), much richer than the one of MILP solvers, make it possible to define constraints and objectives matching the business needs precisely, in a straightforward way, without the need to linearize or to approximate. For example, nonlinear expressions like products or ratios of variables can be modeled as is when using Hexaly.

We optimize our channels revenues thanks to Hexaly. Versatile, fast, and scalable, it helps us solve problems involving millions of decision variables in minutes. We estimate the resulting gains at up to 2% of the turnover per year. Beyond, the Hexaly team quickly acquired a deep understanding of the TV and advertising business, thus becoming a partner of choice. They bring us powerful software solutions but also precious quantitative insights helping TF1 make the right strategic decisions.

Emmanuel Guyot Customer Marketing and Revenue Management Director, TF1

Please look at our customers‘ webpage to discover more case studies in various industries. Are you interested in trying it out? Get free trial licenses here. In the meantime, feel free to contact us; we will be glad to exchange your optimization problems.