Skip to content
Tutorials Center
My learning

Topics

Lesson 11 of 49 · Modelling Decisions

Chapter 2 Review: Modelling Decisions

Review Chapter 2: variables, objectives, constraints, product-mix, diet and blending, binary logic. Includes a words-to-math cheat sheet and ten quiz questions.

Chapter 2 gave you the main skill of operations research: translating a story into a model. This review collects the translation rules on one page, lets you practice with a small model builder, and tests you with ten mixed questions. Before you start, try to recall from memory the three parts of a model and one example of each.

A cheat sheet translating phrases such as at most, at least, exactly, yes or no and if A then B into mathematical symbols
The chapter on one page: each phrase in a problem statement has a standard mathematical form.

What you will learn

  • A compact recap of every lesson in Chapter 2.
  • The words-to-math translation table.
  • A self-test mixing all five topics.

Key terms

Decision variable: what you choose. Objective: what you maximize or minimize. Constraint: a rule that must hold.

Shadow price: value of one more unit of a resource. Slack: unused resource.

Binary variable: 0 or 1. Big-M: a large constant that switches a constraint on or off.

Recap table

Lesson Key ideas Example result
Overview Three parts: variables, objective, constraints Sunrise Bakery story to model
Variables, objective, constraints Units, types, linearity assumptions Nursery: 24 rose and 24 tulip trays, $504
Product mix Binding constraints, shadow prices Workshop: 9 tables, 18 chairs, $1,530
Diet and blending ≥ constraints, composition rules Cheapest diet about $3.48, whole servings $3.65
Binary variables Selection, fixed charges, big-M With setups, only product 3: net $510

Words to math

In the problem text In the model
"at most", "no more than", "capacity" ≤
"at least", "minimum", "requirement" ≥
"exactly", "must balance" =
"cannot be negative" x ≥ 0
"yes or no", "open or not" binary y ∈ {0, 1}
"choose at most k" Σ y ≤ k
"if A then B" yₐ ≤ y_b
"setup cost if used" cost F·y and x ≤ M·y
"percentage of the blend" rewrite in absolute amounts

Practice: a tiny model builder

The builder below turns phrases into constraint rows and solves the nursery problem from Lesson 2. Read how each statement maps to one call, then change the numbers and re-run.

Python Build a model from statements

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.

Flashcards: modelling vocabulary

A worked synthesis: the Corner Café

To see the chapter's ideas working together, read this short story and model it in your head before reading on. The Corner Café bakes muffins and scones each morning. A muffin earns $1.20 and a scone $1.50. The oven holds 120 pieces per morning in total (muffins and scones together). Mixing time is 150 minutes: a tray of 10 muffins needs 10 minutes and a tray of 10 scones 20 minutes, so one muffin needs 1 minute and one scone 2 minutes. The café wants to sell at least 30 muffins to regular customers. How many of each should it bake?

Variables: m = muffins, s = scones (pieces, continuous for now). Objective: maximize 1.20m + 1.50s. Constraints: m + s ≤ 120 (oven), m + 2s ≤ 150 (mixing), m ≥ 30 (regulars), m, s ≥ 0. This one story uses a capacity constraint, a requirement and sign restrictions, exactly the translation table above.

Now think. Because a scone earns only slightly more than a muffin but takes twice the mixing time, the mix is a real trade-off, and both constraints may bind. If you solve it (try the code below), you will find the shadow prices of the two limits, which tell the café whether a bigger oven or a faster mixer is the better investment. If the café sold only whole trays, you would add integer variables, as in the product-mix and binary lessons. If it had to pay a $15 setup fee for running the scone line at all, you would add a binary variable and the link s ≤ M·y.

Python Solve the Corner Café 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.

Common misconceptions

"A longer model is a better model." Each extra variable or rule must earn its place by changing the decision.

"The solver's answer proves the model is right." A wrong rule gives a confident wrong answer. Verify by hand.

"Shadow prices and slacks are minor details." They tell you where to invest and where not to, often more valuable than the plan itself.

Check your understanding

Quick check · 10 questions

of 10 answered You scored / 10 · perfect!

  1. 1. Which phrase becomes a ≥ constraint?

    A minimum requirement is a ≥ constraint.
  2. 2. In the product-mix workshop, wood has slack 19. What is the shadow price of wood?

    An unused resource has no value at the margin.
  3. 3. How is "choose at most 2 of 4 projects" written with binary variables?

    The sum counts chosen projects.
  4. 4. What does yC ≤ yA say?

    When yC = 1, yA must be 1.
  5. 5. The nursery model's optimal plan was 24 roses and 24 tulips. What was the profit?

    12·24 + 9·24 = 288 + 216 = 504.
  6. 6. Which assumption of linear models fails with a volume discount?

    With a price break, cost does not scale in proportion to quantity.
  7. 7. Why is the whole-serving diet at least as costly as the fractional diet?

    Restricting the choices cannot reduce the minimum cost.
  8. 8. In a blend of fixed batch size 1,000 kg, "at least 20% protein" is linear because...

    The batch size is fixed, so the share rule multiplies out to a linear inequality.
  9. 9. In x ≤ M·y, why do we want M as small as valid?

    Loose big-M values weaken the model.
  10. 10. A model recommends eight cups of rice a day. What should you do?

    Absurd answers point to gaps in the model.

Summary

  • Every model: decision variables, one objective, constraints.
  • Product-mix models maximize under capacity limits; diet and blending models minimize under requirements.
  • Shadow prices, slack and binding constraints explain where the limits bite.
  • Binary variables express selection, logic and fixed charges.
  • Translate phrases carefully, verify by hand, and look for missing rules.

Next: Chapter 3 overview: Linear and Integer Programming