What's on the Menu? Solving the Product Mix Problem for Hydra's Pastry Pop-Up

What's on the Menu? Solving the Product Mix Problem for Hydra's Pastry Pop-Up

Chahira Mourad

@Zalando

Oct 6, 2024

Applied Scientist

Applied Scientist

The Morning Light and Last-Minute Puzzles

As Hydra walked into her shop, the morning light filtered through the windows, casting a warm glow on the freshly painted walls and gleaming pastry cases. She breathed in deeply, savoring the quiet before the hustle and bustle of opening day. This pop-up shop in Le Marais had been her dream, a chance to bring her creations to life in one of Paris’s most vibrant neighborhoods.

She could already picture the crowd—the curious tourists, the loyal locals—all eager to try her pastries. But there was one last puzzle to solve before her doors opened.

Setting up her shop wasn’t just about tossing ingredients together; it required strategy. Hydra’s pantry was stocked with essentials, but each pastry demanded different amounts of butter, flour, sugar, and eggs. Unsure of exact quantities, Hydra decided to buy her raw ingredients based on ballpark estimates and go from there. She knew she could fine-tune her approach with some optimization methods to make the most of her ingredients and, ultimately, her profit.

This challenge led her to the Product Mix Problem. In this problem, a collection of products compete for a limited set of resources under specific constraints. The question becomes: Given her ingredient limitations, what quantities of each pastry should she produce to maximize her output?

Crafting the Perfect Menu: Ingredients and Inspiration

After much deliberation (and maybe a few taste tests), Hydra settled on her opening menu:


  • Croissants – The classic, flaky pastry that would draw the morning crowd.

  • Éclairs – A crowd-pleaser with their creamy filling.

  • Tarte Tatin – A caramelized delight that adds a touch of elegance.

  • Pain au Chocolat – For the chocolate lovers.

  • Mille-feuille – Layers of puff pastry and cream, perfect for an indulgent bite.

  • Fruit Tarts – Featuring seasonal fruits, bright and fresh.

  • Madeleines – Simple, buttery treats that were easy to make in batches.


Each of these treats required different amounts of her key ingredients. To make her optimization model more tangible, Hydra laid out her available ingredients and each pastry’s requirements.

With her menu set, Hydra took a closer look at her resources. Her kitchen was stocked with essentials, but each ingredient was precious, and every pastry had its own profit potential. To plan her production wisely, Hydra reviewed two key things: the available stock of her ingredients and the required amount of ingredients for each pastry. Below, you'll find a summary of both.

This table shows the total amount of each ingredient Hydra has on hand.

This table shows the amount of each ingredient needed to make one unit of each pastry.

With her ingredient constraints and stock values in mind, Hydra was ready to optimize her product mix to maximize her production.

Modeling the Product Mix Problem

Breaking down her model, Hydra used her typical four-part approach: data, decision variables, objective function, and constraints.


  • Data: Hydra recorded the quantities of each ingredient she had in stock and noted the minimum quantity required for each pastry type to meet anticipated demand. This setup allowed her to easily plug numbers into her optimization model.




  • Decision Variables: Hydra defined her decision variables as the number of each pastry type to make.




  • Objective: Hydra’s goal is to maximize the total number of pastries she can produce. This objective can be written as:




  • Constraints: To achieve her objective, Hydra must not require more than her available stock of every ingredient and must make at least the minimum amount of every pastry.



After setting up this model, Hydra was ready to see the ideal pastry mix for maximizing the number of pastries made without running out of ingredients.

Shadow Price: The Hidden Value of Extra Ingredients

Hydra’s model was almost ready, but there was one more powerful concept she wanted to explore: the shadow price. While her current goal is to maximize the number of pastries, the concept of shadow prices would also be invaluable if she decided to shift to a profit-maximization approach. Shadow prices reveal the “worth” of each constrained resource—in Hydra’s case, her limited ingredients.

Let’s break it down:


  • What is a Shadow Price? A shadow price represents the additional value that could be generated if she had one more unit of a constrained resource. In Hydra’s context, it answers questions like, If I had one more kilogram of butter, how many additional pastries could I make?

  • Why is it Useful? Shadow prices provide Hydra with insights on which ingredients are most valuable to her production goals. If butter has a high shadow price, it implies that obtaining more butter would greatly increase her pastry output (or profit, in a different model). However, if cocoa has a low or zero shadow price, it means extra cocoa won’t improve her total production or profit. With these insights, Hydra can make informed decisions about where to allocate her budget and whether certain ingredients are worth the additional cost.


Maximizing Impact: When Every Gram Counts

To see shadow prices in action, let’s examine the butter constraint in Hydra’s model:



Suppose the shadow price of butter is 0.5. This would mean that each additional kilogram of butter Hydra could obtain would allow her to produce, on average, half an extra pastry across all types. If Hydra were maximizing profit, this shadow price could also be interpreted as a €0.5 increase in profit per extra kilogram of butter.

By analyzing shadow prices for each ingredient, Hydra can better understand which resources are the most valuable under her current constraints. This insight would be especially valuable if she scales up production or shifts to profit maximization. Shadow prices would then guide her budget decisions by helping her evaluate the potential return on investment for each ingredient.

Curious about how shadow prices are actually calculated? In the next article, we’ll cover the mechanics behind shadow prices and see how they are derived within an optimization framework.

Conclusion: A Sweet Success!

With her product mix model complete, Hydra now has a clear path forward to maximize her pastry production while carefully managing her limited ingredients. By setting minimum production targets and working within ingredient constraints, she can meet demand efficiently and avoid waste.

Exploring shadow prices added an extra layer of insight, showing her where additional resources would benefit her operation most. Though her current focus is on maximizing production, Hydra can now see how shadow prices could guide her decisions if she shifted to profit maximization, helping her prioritize ingredients with the highest return on investment.

Next time, we’ll revisit this same problem but with a new perspective, diving into primal-dual formulations and exploring how shadow prices are calculated. Stay tuned!

Optimzation4All

Follow us on social media

Sign up for the newsletter

The expertise hub is a bridge between experts and beginners, academia and industry, businesses and policymakers. Sharing knowledge creates a ripple effect empowering more people, facilitating innovation, and leading to smarter decisions. Small steps can make a huge impact! 

Whether you’re here to learn, share, or collaborate, you’re in the right place.

2025 © Optimization4All

Optimzation4All

Follow us on social media

Sign up for the newsletter

The expertise hub is a bridge between experts and beginners, academia and industry, businesses and policymakers. Sharing knowledge creates a ripple effect, empowering more people, facilitating innovation, and leading to smarter decisions. Small steps can make a huge impact! 

Whether you’re here to learn, share, or collaborate, you’re in the right place.


2025 © Optimization4All

2025 © Optimization4All