Back to the on-screen lesson ·
Prescriptive against descriptive and predictive, the three parts of a model, and the problems a model earns nothing on.
Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.
By the end of this lesson you will be able to tell a decision problem from a description or a forecast, name the three parts of any optimization model — decision variables, objective, constraints — and write them down for a problem stated in words. You will also be able to say what the four possible replies from a solver mean, and to recognise the problems where building a model earns nothing because the alternatives do not interact.
You have maximised and minimised functions with calculus, and you have solved systems of linear equations with matrices. Both come back immediately. What is new is not a technique but a habit: writing down what is being decided, what is being judged and what is not allowed, before reaching for a method — and then asking what the method you reach for is actually entitled to claim.
Decision variable: a quantity you choose. Written $x$, $y$, and given a unit — items made this week, not items.
Objective: the single number being maximised or minimised, written as an expression in the decision variables.
Constraint: a rule any answer must satisfy, written as an equation or an inequality in the same variables.
Feasible: satisfying every constraint. A point is feasible or it is not; there is no partly.
Optimal: feasible, and no feasible point is better. Two words, and the first is the one that gets dropped.
Infeasible: no point satisfies every constraint at once.
Unbounded: feasible points exist and the objective improves along the region for ever.
Three questions can be asked of the same data, and they are not the same question.
| Question | What it answers | What comes back |
|---|---|---|
| Descriptive | What happened? | a summary |
| Predictive | What is likely to happen? | a forecast |
| Prescriptive | What should we do? | a decision |
Mathematical optimization answers the third. Given a set of available alternatives and a criterion, it selects the best element of that set. Prediction and optimization work together and are constantly confused: a forecast supplies the numbers a model is built on, and the model chooses the action. Machine learning finds patterns in data; optimization decides what to do given the rules. Neither substitutes for the other.
The three parts. Every model has the same three, and naming them is most of the work:
When it is not worth doing. A model earns its cost only when the alternatives interact: when improving one thing spends something another needs. Where the best answer can be read off a sorted list, a model adds machinery and returns what you already knew. And a model is never finished: the costs, capacities and demands it rests on drift, so it is re-solved rather than solved.
Another way: picture
A shaded region on a pair of axes, with a straight line sliding across it. The region is what the constraints allow; the line is one value of the objective. Slide the line as far as it will go while it still touches the region: where it last touches is the decision optimization returns.
Another way: steps
Faced with a decision problem, ask four questions in this order:
A solver does not always hand back an answer, and the other three replies are as informative as the first.
| Reply | What it means | What to do |
|---|---|---|
| Optimal | a feasible point, and none better | read the decision off it |
| Infeasible | no point satisfies every constraint | one constraint too many, or one written wrongly |
| Unbounded | the objective improves for ever | a constraint is missing |
| Many optima | an entire face is optimal | the objective is parallel to a binding constraint; choose among them on other grounds |
Infeasible and unbounded are almost always statements about the model rather than the world. A real workshop cannot make infinite profit, so an unbounded model has forgotten to say that something runs out.
Optimising a proxy. The objective is the thing that gets maximised, whether or not it is the thing you wanted. A delivery model told to minimise distance will happily produce a route nobody can drive inside a shift.
Treating a forecast as a fact. The demand in the model is a number; the demand in the world is a distribution. Unit 5 is about what to do with that, but the habit of remembering which is which starts here.
Building a model for an obvious answer. If there is no interaction between the choices, there is nothing to optimise. Sorting a list is not a worse method than a solver; it is the right one.
Solving it once. The data drifts. A model is a thing you run again, and a recommendation from six months ago is a recommendation about six months ago.
A model returns the best element of the set you gave it, judged by the criterion you wrote. It has no opinion about whether the set was the right set or the criterion the right criterion, and it cannot tell you that a constraint everybody in the building knows about was never written down. Every answer this course produces is conditional on a formulation, and the formulation is the part a person is responsible for. That is why unit 1 is six lessons of modelling before any method appears.
Deciding: how many of product one ($x$) and product two ($y$) to make this week. Those are the decision variables, in units of items.
Name what is being chosen first.
Judging: profit, $5x + 4y$ — one number, to be maximised. Not profit and speed; one.
One objective.
Not allowed: machine time $6x + 4y \le 24$, finishing time $x + 2y \le 6$, and $x, y \ge 0$. The last is a constraint too, and forgetting it is how a model comes back recommending negative production.
Every rule, including the obvious ones.
Which supplier did we spend most with last quarter? — descriptive. It is a query over what happened; no decision is being made.
A summary.
How much will we need next quarter? — predictive. The answer is a forecast, and it will be wrong by some amount nobody can remove.
A forecast, feeding the model.
Given that forecast, how should we split the order across suppliers? — prescriptive, and the only one of the three that is an optimization problem. It has a decision, a criterion, and constraints that make the choices interact.
A decision.
A hospital rosters forty nurses across twenty-one shifts, with skill requirements per shift, maximum consecutive nights, and leave already booked. Ask first: do the choices interact?
Start with interaction, not with size.
They do, in both directions: putting a nurse on Tuesday night uses them up for Wednesday morning, and the skill requirement on one shift changes who is available for every other.
So yes — and note that the size is not what makes it so. Four nurses over three shifts with the same rules is the same problem and still needs a model; forty over twenty-one merely makes it impossible to do by eye.
A depot has drivers, deliveries, and last week's records. Match each question to the kind of answer it asks for.
| Descriptive: reports what happened | Predictive: forecasts what is likely | Prescriptive: chooses an action under constraints | |
|---|---|---|---|
| How many vans went out last week? | |||
| How many deliveries are likely tomorrow? | |||
| How many vans should leave tomorrow with six drivers? |
A depot must decide how many vans to send out tomorrow with $8$ drivers. Put the four questions of formulating that decision into the order they can be answered in.
Number the steps in order (write the number in the box):
Which of these is worth building an optimization model for?
A workshop earns $4$ on each unit of the first product and $3$ on each unit of the second. Work out the profit of each of these three plans.
| units of $x$ | units of $y$ | profit | |
|---|---|---|---|
| Both products | 4 | 2 | |
| First only | 4 | 0 | |
| Second only | 0 | 2 |
A solver reports that the model has an unbounded objective. What has it found?
The workshop above finds a way to make $1$ more of the first product without giving up any of the second. What would the profit become?
Answer:
Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.
Which of these is worth building an optimization model for?
You can separate prescriptive questions from descriptive and predictive ones, name the three parts of a model, and say what infeasible and unbounded tell you about a formulation. Next: writing those three parts down properly, on a production problem.
10. Your turn: is this a problem for a model?, step 3