Learn
Lesson · Linear Programming Models · Keeping it linear

Goal Programming and Deviation Variables

A target is not a constraint. It is an equation carrying two deviation variables, one for falling short and one for overshooting, of which you penalise only the one you mind. Priorities are then handled lexicographically: one linear programme per level, each freezing the deviation the level above it achieved. A preemptive goal programme is a sequence of programmes rather than one programme with weights.

3S + 4D + u₁ − o₁ = 60 the profit target, u₁ is minded 3S + 6D + u₂ − o₂ = 30 the overtime limit, o₂ is minded D + u₃ − o₃ = 12 the deluxe run, u₃ is minded every u and o ≥ 0 level 1: minimise the minded deviation of the first goal level 2: freeze what level 1 achieved as an equality, then the next goal
Three targets, six deviation variables, one programme per level

Core ideas

What this lesson establishes

Two ideas are easy and one is the lesson: the frozen constraint is what makes this a sequence rather than a weighting.

1

A target is an equation with two deviations, and you penalise one of them

3S + 4D + u₁ − o₁ = 60 holds at every feasible plan, whatever the plan is: u₁ takes up a shortfall and o₁ an overshoot. Minimising u₁ alone says “I mind missing 60, I do not mind beating it”, which is what an aspiration means.

2

Priorities are levels, and each level hands the next an equality

Level one minimises the first goal's minded deviation. Level two adds the row “that deviation equals what level one achieved” and then minimises the second goal's. The frozen row is not a suggestion: it is what stops the second level from spending the first level's achievement.

3

The order is the answer

The same three goals, reordered, give different plans. Profit first meets the profit target and pays 30 hours of overtime; overtime first meets the overtime limit and misses profit by 30; the deluxe run first meets two goals and pays 54 hours of overtime. None of these is more correct than the others, and choosing between them is not a mathematical act.

The material

Targets, deviations and priority levels

Why a target should not be a hard constraint, what the two deviation variables do, and how a preemptive ordering becomes a sequence of programmes.

A cabinet shop builds standard and deluxe units, S and D, both counted in units a week. Its one hard constraint is 60 machine hours: 2S + 3D ≤ 60. It also has three things it would like: 60 pounds of profit at 3 and 4 a unit, no more than 30 hours of overtime at 3 and 6 a unit, and 12 deluxe units built.

Written as constraints, those three are infeasible together, and “infeasible” is a much worse answer than “missed by 12 units” when the numbers were aspirations in the first place. The point of a goal programme is to keep the model answerable and make the compromise visible.

Definition · Deviation variables

A target a·x = b is written a·x + u − o = b with u ≥ 0 and o ≥ 0, where u is the amount by which the plan falls short and o the amount by which it overshoots. The objective penalises whichever of the two the situation minds.

At most one of u and o is positive at an optimum: the penalised one is pushed to zero if it can be, and the unpenalised one only grows when the row forces it. That is the same direction argument the rewrites lesson made, which is why this lesson sits beside it.

2S + 3D ≤ 60 machine hours, a hard constraint 3S + 4D + u₁ − o₁ = 60 pounds of profit; u₁ is minded 3S + 6D + u₂ − o₂ = 30 hours of overtime; o₂ is minded D + u₃ − o₃ = 12 deluxe units; u₃ is minded S, D, and every u and o ≥ 0

One programme per level

Take the goals in the order profit, overtime, deluxe run. Level one minimises u₁ and achieves 0: a plan of no standard units and 15 deluxe ones reaches the profit target exactly. Level two adds the row u₁ = 0 and minimises o₂, which comes out at 30 hours — the profit target, now frozen, is what makes that overtime unavoidable. Level three adds o₂ = 30 and minimises u₃, which comes out at 12: the deluxe run is what pays.

Reorder and everything moves. Overtime first: o₂ = 0 with a plan of five deluxe units, then profit misses by 30 and the deluxe run still misses by 12. Deluxe run first: it is met, profit is met as well, and overtime is 54 hours over its limit. Three orderings, three different sacrifices, all of them optimal for the priorities they were given.

Example · The frozen row is what makes it a sequence

At level two of the profit-first ordering the model contains u₁ = 0 as an equality. Without it, minimising o₂ would simply abandon the profit target — the second level would undo the first. With it, the second level searches only among the plans that already achieve what the first level achieved, which is what “preemptive” means.

The other way this goes wrong, and it is silent

The tempting alternative is one objective: minimise u₁ + o₂ + u₃. It solves, and it reports a total of 42. But u₁ is in pounds, o₂ is in hours and u₃ is in units, and nothing in the arithmetic objects to adding pounds to hours. The plan it returns is 10 standard units and no deluxe ones, with a profit shortfall of 30, no overtime and a deluxe shortfall of 12 — which is the answer to the overtime-first ordering, arrived at without anyone choosing that ordering.

That is the failure mode to watch: a weighted objective always produces a number, and the number encodes an exchange rate between pounds and hours that nobody wrote down. Weights can be made to work, but only by scaling each deviation into a common currency on purpose. Raise the weight on a pound of profit to 4 and the weighted answer switches to the profit-first plan, which shows how little the unscaled version was saying.

None of this leaves the linear class. Every row is linear, the deviations are ordinary non-negative variables, and each level is an ordinary linear programme. What is new is that the answer is a sequence of solves and a sentence: which goal was sacrificed, at which level, and by how much in its own unit.

Interactive

Targets, deviations, and one programme per priority

A preemptive goal programme is a sequence of linear programmes

Targets, deviations, and one programme per priorityEach level freezes what the level above it achieved
met exactlymissed, and by how muchnothing frozen yet

Method

Building a preemptive goal programme

Hard constraints first, then one target at a time, then the order — which is a decision from the situation and not from the model.

1

Separate the hard constraints from the aspirations

The machine hours are hard: no plan may exceed them. The profit, the overtime and the deluxe run are aspirations. Anything in the second list that goes into the first can make the model infeasible, and infeasible is not an answer.

2

Give each target two deviations and penalise only the one you mind

u for the shortfall, o for the overshoot, both at or above zero. Beating a profit target is not a defect, so o₁ is not penalised; exceeding an overtime limit is, so o₂ is.

3

Put the goals in priority order, from the situation

The ordering is the substance of the answer and it comes from whoever owns the problem. Record it explicitly: a goal programme with an accidental order is a model that has made somebody's decision for them.

4

Solve one level at a time, freezing each achieved deviation

After each level, add the row “this deviation equals what was just achieved” and move on. Report every level's deviation in its own unit, and name the goal that paid for the rest.

Targets, deviations and levels

Score 0 / 0

Three goals, two orderings, and one weighted objective

The same three targets and the same hard constraint throughout. Only the order changes, and then only the method.

hard 2S + 3D ≤ 60 targets 3S + 4D + u₁ − o₁ = 60 mind u₁ pounds 3S + 6D + u₂ − o₂ = 30 mind o₂ hours D + u₃ − o₃ = 12 mind u₃ units profit, then overtime, then the deluxe run level 1 minimise u₁ u₁ = 0 plan (0, 15) level 2 u₁ = 0 frozen, minimise o₂ o₂ = 30 plan (20, 0) level 3 o₂ = 30 frozen, minimise u₃ u₃ = 12 plan (20, 0) the deluxe run is what pays overtime, then profit, then the deluxe run level 1 minimise o₂ o₂ = 0 plan (0, 5) level 2 o₂ = 0 frozen, minimise u₁ u₁ = 30 plan (10, 0) level 3 u₁ = 30 frozen, minimise u₃ u₃ = 12 plan (10, 0) the profit target is what pays one weighted objective: minimise u₁ + o₂ + u₃ total 42, plan (10, 0), u₁ = 30, o₂ = 0, u₃ = 12 which is the overtime-first answer, chosen by nobody

The two orderings sacrifice different goals and neither is wrong. What is wrong is the third block: the weighted objective adds 30 pounds to 0 hours to 12 units, calls the total 42, and silently commits to the second ordering. Nothing in the arithmetic complains, which is why this way of writing it fails quietly rather than loudly.

For a faded rehearsal, put the deluxe run first, then profit, then overtime. The supplied first move is level one: minimising u₃ needs D = 12, which uses 36 of the 60 machine hours. Work out what the next two levels achieve and which goal ends up paying — then reorder in the lab and check both numbers, including the overtime figure, which is larger than in either ordering above.

Common mistakes

1
Making a target a hard constraintThree aspirations promoted to rows here have no common solution, and the model returns “infeasible” — which tells whoever asked nothing about which target to relax or by how much. A deviation variable converts an unanswerable model into a report that names the shortfall in its own unit.
2
Adding deviations in different units into one objectivePounds, hours and units summed with equal weights produce a number and a plan, and the plan encodes an exchange rate nobody chose: here it quietly solves the overtime-first ordering. If weights are wanted, each deviation has to be scaled into a common currency deliberately.
3
Penalising both deviations of a targetMinimising u₁ + o₁ says a plan is punished for beating the profit target as well as for missing it, which turns an aspiration into a demand for exactly 60. Choose the one the situation minds, and let the other absorb whatever the row forces on it.

Check your understanding

✓
Finish when you can say which goal paid, at which level, and in what unit.

You should be able to separate hard constraints from targets, write each target with two deviations and penalise the right one, solve the levels in a stated order freezing each achieved deviation, and say what a single weighted objective would have hidden.

Note: Both lessons so far in this part have added variables to keep a model linear. The next one adds variables to a model that was already linear, for a different reason: every solver wants equalities, and turning inequalities into equalities is a modelling act whose new variables measure something real.

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.