Learn
Lesson · Linear Programming Models · The four model families

Product Mix and Packing Constraints

A packing row says usage ≤ availability. Its coefficients are per-unit rates read down a column of a data table, and the gap it leaves at a point is that resource's slack, measured in the resource's own unit. A row with no slack left is tight, and this lesson is careful about what tight does and does not tell you.

usage ≤ availability rate per unit × units made, summed over the products slack = availability − usage, in that resource’s own unit tight ⇔ slack = 0 ⇔ the resource is used right up 3C + 2T ≤ 18 at (2, 6): 18 ≤ 18, slack 0 C ≤ 4 at (2, 6): 2 ≤ 4, slack 2 bench hours
A packing row, and what its slack measures

Core ideas

What this lesson establishes

One shape, repeated once per resource. The interesting content is in the slacks, and in one thing they cannot tell you.

1

A packing row has usage on the left and availability on the right

Every ≤ row in this family is the same sentence: what the plan consumes of one resource, at most what there is of it. The row belongs to the resource, not to the product, so three products and three shops give three rows and not nine.

2

The coefficients are per-unit rates, read down a column

The assembly row 3C + 2T ≤ 18 takes its 3 from the chairs column of the assembly row of the table and its 2 from the tables column. Reading the table across instead of down transposes the model into a different, solvable, wrong one, which is why the lab prints the table beside the programme it produced.

3

Slack is the unused amount, in the resource’s own unit

At (2, 6) the carpentry row has 2 bench hours left and the other two rows have nothing left. That number is not a score and not a percentage: it is hours, and the same optimum has a slack in each row measured in a different unit.

The material

Packing rows, slack, and what tight does not mean

One row per resource, read off a table; the slacks at the optimum; and the question this course deliberately cannot answer yet.

The data arrive as a table, and the model is a transcription of it. Rates down the columns, availabilities down the right, and the profit row underneath.

chairs (C) tables (T) available carpentry shop 1 0 4 bench hours finishing shop 0 2 12 finishing hours assembly line 3 2 18 assembly hours profit a unit 3 5 —
Definition · Slack

For a row a·x ≤ b and a point x, the slack of the row at x is b − a·x. It is at or above zero exactly where the row holds, and the row is tight at x when the slack is zero.

Slack is a quantity in the situation and not a diagnostic: the slack in the carpentry row is the bench hours the plan leaves unused. “Standard Form, Slack and Surplus” promotes it to a variable of the model; here it is only computed.

The two-product workshop is worth 36 at (2, 6), and the slacks there are 2 bench hours, 0 finishing hours and 0 assembly hours. Two of the three rows are used right up, which is the usual state of affairs: an optimum of a two-variable programme sits where two boundaries cross.

A third product, and the end of the picture

Let the workshop also make benches, at 1 bench hour, 1 finishing hour and 2 assembly hours each, earning 4. The table grows a column, every row grows a term, and the optimum becomes 75/2 at (1, 9/2, 3) with all three rows tight. Two things changed. The answer is a fraction, and there is no longer a picture: three decisions cannot be drawn on a plane, so the lab hands the programme to the exact simplex instead of enumerating corners.

Both routes are solving the same kind of object and they agree wherever they overlap — pin the bench column at zero and the engine returns 36 again. That agreement is worth more than either method alone, because it is the only evidence that the picture was a method and not a habit.

Tight is not the same as worth relieving

A tight row is a resource the plan has used up. It is tempting to read that as “the bottleneck”, and to conclude that one more hour of it would buy something. It need not.

Example · Three exhausted resources, two of them worth nothing

Push the assembly line to 24 hours. The optimum moves to (4, 6) and earns 42, and now all three rows are tight: 4 ≤ 4, 12 ≤ 12 and 24 ≤ 24. Add a twenty-fifth assembly hour and the answer is still 42, with one assembly hour idle. Add a bench hour and it is still 42. Add two finishing hours and it is 45. Three resources exhausted, one of them worth paying for.

What separates them is a number this course cannot yet compute: the change in the optimum for one more unit of a resource, and the range of availabilities over which that change is the truth. It is called a shadow price, it is “Duality and Sensitivity Analysis”, and the honest report here is that a tight row names a resource the plan exhausted and says nothing about what relieving it would be worth.

The slacks do settle a smaller question completely, and it is worth having. A row with slack left is a row that is not currently deciding anything: change its availability by less than its slack and neither the plan nor the profit moves at all.

Interactive

Product mix, written from a table

Per-unit rates down the columns, availabilities down the right

Product mix, written from a tablePer-unit rates down the columns, availabilities down the right
the feasible regionits cornersthe winning corner

Method

Building a packing model from a table

The table is the model. These four steps are a transcription with two checks in it.

1

One row per resource, one column per product

Count the rows of your model before writing them: as many as there are things in limited supply. A row for each product is the commonest transposition, and it produces a model about nothing at all.

2

Read the rates down the column of the product

The chairs column of the table supplies the coefficient of C in every row. Write the column out beside the rows it feeds if the table is wide; a misplaced rate is invisible once the programme is written.

3

Check each row for units, both sides

hours per unit × units is hours, and the availability is hours of the same shop. When a rate is quoted in minutes and an availability in hours, that is a real error and the only place it shows is here.

4

Solve, then read the slacks before the answer

Which rows are tight is the structural fact about the solution; the objective value is one number. Note the slacks in their own units, and resist the conclusion that a tight row is worth relieving.

Rates, rows and slacks

Score 0 / 0

Three products and three shops, solved by the engine

The two-product version is worth 36 at (2, 6) and can be drawn. Adding the bench column removes the picture and changes the kind of answer, so it is the case worth writing out in full.

chairs (C) tables (T) benches (B) available carpentry 1 0 1 4 bench hours finishing 0 2 1 12 finishing hours assembly 3 2 2 18 assembly hours profit a unit 3 5 4 — maximise 3C + 5T + 4B subject to C + B ≤ 4 2T + B ≤ 12 3C + 2T + 2B ≤ 18 C, T, B ≥ 0 optimum C = 1, T = 9/2, B = 3 profit 75/2 carpentry 1 + 3 = 4 ≤ 4 slack 0 tight finishing 9 + 3 = 12 ≤ 12 slack 0 tight assembly 3 + 9 + 6 = 18 ≤ 18 slack 0 tight check 3(1) + 5(9/2) + 4(3) = 3 + 45/2 + 12 = 75/2

Every row is tight, the plan asks for four and a half tables, and 75/2 is not a number a decimal would have kept. A reader who wanted whole tables has a real question and it is answered in “Integer Programming”, not by rounding — that warning is the standing one on this course.

For a faded rehearsal, drop the bench column and take the finishing shop from 12 hours to 13. The supplied first move is which rows can possibly change: only the ones that were tight, because a row with slack to spare is not deciding anything. Predict the new plan and profit, then check it against the lab, and say in a sentence why the carpentry slack grew rather than shrank.

Common mistakes

1
Reading a tight row as a bottleneck worth relievingTight means used up. It does not mean that one more unit would buy anything, and two resources can both be exhausted with only one of them worth paying for. The distinction is a price and a range, which this course can name and deliberately cannot compute; saying so is more useful than guessing.
2
One row per product instead of one row per resourceThe rows of a packing model belong to the things in limited supply and the columns to the things you decide. Transposing the table produces a model that builds, solves and answers a question nobody asked, and the usual symptom is coefficients that all look like profits.
3
Quietly dropping a row with slack in itA row with slack at one optimum is not a row you may delete: move an availability or a profit and it can become the row that binds. What the slack licenses is narrower and exact — changing that availability by less than its slack moves neither the plan nor the objective.

Check your understanding

✓
Finish when you can say which rows are tight before you are told the objective value.

You should be able to transcribe a rate table into rows and columns without transposing it, compute the slack in every row at a given point in that row's own unit, and state what a tight row does and does not settle.

Note: A packing row limits what a plan may consume. The next family turns the inequality round: a requirement says a plan must supply at least something, its gap is an over-fulfilment rather than an unused remainder, and the region such rows cut out has no ceiling at all — which turns out to be harmless, for a reason worth being careful about.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.