Skip to content
Tutorials Center
My learning

Topics

Lesson 8 of 49 ยท Modelling Decisions

The Product-Mix Model: Allocating Scarce Resources

Build and solve a classic product-mix model for a furniture workshop, read slack and shadow prices, and learn what an extra hour of a scarce resource is worth.

The product-mix problem is the founding example of linear programming. A business can make several products. Each product earns some profit and consumes some of a handful of scarce resources: materials, labor, machine time. How many of each product should it make? The problem looks simple, yet the answer is often surprising. The product with the highest profit per unit is not always the one you should make most of, because what matters is profit per unit of the scarce resource.

In this lesson you build the model for a small workshop, solve it, and then learn the most useful by-product of the solution: the shadow price, which tells you what one more hour of a resource is worth.

Three horizontal gauges show wood used 81 of 100, labor used 90 of 90 and finishing used 36 of 36, next to the optimal plan of 9 tables, 18 chairs and 0 shelves
The workshop's optimal plan fills labor and finishing completely while 19 units of wood stay unused.

What you will learn

  • How to formulate a product-mix model with several resources.
  • How to read slack, binding constraints and the optimal plan.
  • What a shadow price is and how to use it for decisions.
  • Why the best plan may leave a product out entirely.

Key terms

Product mix: the quantities of each product in a plan.

Binding constraint: a constraint that holds with equality at the optimum; its resource is used up.

Slack: the unused part of a resource; zero for binding constraints.

Shadow price: the increase in the optimal objective per extra unit of a resource, for small changes.

Opportunity cost: the value of the best alternative you give up.

The workshop

Oak Lane Workshop makes three products: tables, chairs and shelves. The example numbers below are invented.

Table Chair Shelf Available
Profit per unit ($) 80 45 60
Wood (mยฒ of board) 5 2 4 100
Labor (hours) 4 3 3 90
Finishing (hours) 2 1 2 36

How many tables, chairs and shelves per week should the workshop make to maximize profit?

Formulating the model

Variables. T, C, S = number of tables, chairs, shelves made per week. (We allow fractions for now; Chapter 3 treats whole numbers.)

Objective. Maximize 80T + 45C + 60S.

Constraints.

TEXT
5T + 2C + 4S โ‰ค 100    wood (mยฒ)
4T + 3C + 3S โ‰ค  90    labor (hours)
2T +  C + 2S โ‰ค  36    finishing (hours)
T, C, S โ‰ฅ 0

Each row is "resource used by the plan โ‰ค resource available". Each column of the coefficient table belongs to one product. A clean habit: write the data in a table first, then read the model off the table.

Solving and reading the solution

Python Solve the Oak Lane model

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The optimal plan is 9 tables, 18 chairs and no shelves, for $1,530 a week. Check it by hand: wood 5ยท9 + 2ยท18 = 81, labor 4ยท9 + 3ยท18 = 90, finishing 2ยท9 + 18 = 36, profit 720 + 810 = 1530.

Three things to notice:

  1. Labor and finishing are binding. Both are used completely. They are the bottlenecks.
  2. Wood has slack. 19 mยฒ are left over, so more wood would not help.
  3. Shelves are not made at all. A shelf earns $60, which sounds good, but it needs 3 labor hours and 2 finishing hours. Compared with tables and chairs, it uses the scarce resources too poorly.

Shadow prices: what is an extra hour worth?

The shadow price of a resource tells you how much the maximum profit rises if you had one more unit of that resource, while the rest of the model stays the same. Here finishing has a shadow price of $30 per hour, labor $5 per hour, and wood $0.

You can see why. One extra finishing hour lets you trade a little: make slightly more tables and fewer chairs in the proportion that uses the extra hour, and profit rises by exactly $30. Wood has slack, so an extra square meter is worth nothing; you already cannot use all you have.

Shadow prices turn the model into a decision tool:

  • If overtime on finishing costs $20 an hour, it is worth buying, since each hour brings in $30.
  • If an extra labor hour costs $12, it is not worth it, since it brings in only $5.
  • The workshop should not buy more wood.

The prices are valid only over a range. Beyond some amount, another resource becomes the bottleneck and the value changes. The next experiment shows this.

Python Profit as finishing hours increase

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The curve climbs steeply, then bends and goes flat: after roughly 43 finishing hours, labor and wood run out, and extra finishing time is worthless. That bend is where the shadow price changes.

Why not just make the most profitable product?

A tempting rule of thumb is "make as many of the highest-profit product as possible". Here the table earns $80, the most per unit. But the workshop can make at most 18 tables (the labor limit 4T โ‰ค 90 gives 22.5, finishing 2T โ‰ค 36 gives 18), earning $1,440. The optimal mix earns $1,530 because chairs use the leftover hours better. The right question is: how much profit does each product earn per unit of the resource that is scarce? A solver answers it for all resources at once.

Practical tips for product-mix models

  • Check feasibility of "do nothing". T = C = S = 0 should satisfy every constraint; if not, the model has a sign error.
  • Look at the binding constraints. They tell you where the business is limited and where to invest.
  • Test the shadow prices. Change a right-hand side by one unit, re-solve and compare; the change in profit should equal the shadow price.
  • Add real-world limits. Demand caps (C โ‰ค 25) and minimum production runs are further rows.

What to do with the answer

A product-mix solution is the start of a conversation, not the end of one. Suppose the workshop manager reads the result: "Make 9 tables and 18 chairs, no shelves." The natural reactions are practical. Can we really stop making shelves? A regular customer may expect them, so the manager might add a minimum of 5 shelves per week as a new constraint and re-solve, which shows the cost of the commitment: the drop in profit caused by that rule. Can we buy more finishing time? The shadow price says each hour is worth $30 up to about 43 hours, so a temporary worker at $20 an hour pays for himself. Is the weekly plan stable? The ranging analysis in the duality and sensitivity lesson would show how much the table's price can move before the mix changes.

Notice how many of these questions are answered by re-solving the same model with one number changed. That is the strength of having a model: "what if" questions that would take days of argument become a few seconds of computation.

Common misconceptions

"The product with the highest profit per unit should be made most." Profit per unit ignores how much scarce resource each unit consumes.

"Shadow prices are the market prices of resources." They are the value of a resource inside this model. The market price may be higher or lower, and the comparison tells you whether to buy.

"A shadow price applies to any size of change." It holds only for small changes, until a different constraint becomes binding.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. At the optimum, labor has 0 slack. What does that mean?

    Zero slack means the resource is used completely: the constraint is binding.
  2. 2. The optimal plan makes no shelves although each earns $60. Why?

    What matters is profit per unit of the scarce resources, not profit per unit of product.
  3. 3. The shadow price of finishing is $30 per hour. An extra finishing hour costs $22. What should the workshop do (small change)?

    Each hour yields $30 of extra profit and costs $22, a net gain of $8.
  4. 4. Wood has slack 19. What is the shadow price of wood?

    More of a resource you cannot use fully adds no profit.
  5. 5. A shadow price is valid...

    When another constraint becomes binding, the value of the resource changes.

Summary

  • A product-mix model maximizes profit subject to resource-use limits; read the model off a data table.
  • Binding constraints are the bottlenecks; slack shows unused resources.
  • Shadow prices give the value of one more unit of a resource and guide investments, within a range.
  • Profit per unit of product is not enough; profit per unit of scarce resource decides the mix.
  • Solve, then check by hand and by what-if experiments.

Next: Diet and Blending Models