Practice: From a Described Problem to a Model

Recognition · Classification

A bakery plans next week's production. Flour is bought at a quoted market price of £0.70 per kilogram. In a model of next week's plan, what is that price?

2 hints available, least help first.

Hint 1: Retrieval cue

Can the bakery walk out and change this number next week?

Hint 2: Concept cue

Quantities the decision maker sets are variables; everything else given in the description is data.

Construction · Direct application · Explanation

A print shop runs one press and one binding line for 40 hours and 25 hours respectively next week. A booklet takes 6 minutes on the press and 5 minutes on the binder, and earns £1.80. A poster takes 4 minutes on the press, no binding, and earns £0.90. Paper is bought at £0.02 per sheet from a supplier with ample stock; a booklet uses 20 sheets and a poster 1. A regular customer has ordered 150 posters that must be produced.

Build the model. Define the variables, write the objective with its direction, write one constraint per restriction, and state for each constraint what it forbids. Name any quantity in the description that is data rather than a decision, and say why.

Write your answer, then compare it with the worked solution.

3 hints available, least help first.

Hint 1: Retrieval cue

Which numbers can the print shop change next week, and which arrive already fixed?

Hint 2: Concept cue

Capacities are stated in hours and consumption in minutes. One of them has to be converted before the units on the two sides of a constraint agree.

Hint 3: Strategy cue

Take the description one sentence at a time and label each as a restriction, data, or commentary before writing any algebra.

Compare with the worked solution

Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.

Variables.

x 1 = booklets produced next week , x 2 = posters produced next week .

Both are counts per week.

Data. Press and binder minutes per item, hours available, earnings per item, the paper price and the customer's order quantity. The paper price is data the print shop does not set; it is also irrelevant to this model, because earnings are stated per item and no constraint limits paper. Saying so is part of the answer: a quantity can be data and still produce no line.

Objective. Earnings are being maximised:

max 1.80 x 1 + 0.90 x 2 .

Pounds per item times items gives pounds.

Press capacity. 40 hours is 2400 minutes:

6 x 1 + 4 x 2 ≤ 2400 .

Forbids: any plan needing more than 2400 press-minutes. Minutes per item times items gives minutes, matching the right side.

Binding capacity. 25 hours is 1500 minutes, and posters need none:

5 x 1 ≤ 1500 .

Forbids: producing more than 300 booklets, whatever the press allows.

Customer order.

x 2 ≥ 150 .

Forbids: any plan that fails the committed order.

Sign restrictions. Negative production is meaningless, so

x 1 , x 2 ≥ 0 .

The order constraint already forces x 2 ≥ 150 , so nonnegativity on x 2 removes nothing; it is stated because it remains true of the quantity and keeps the model correct if the order is later withdrawn.

Read back. Three restrictions in the description, three constraints. The paper sentence produced no line, and the reason is recorded rather than left for a reader to guess.

A complete answer does each of these:

  • variables defined with units
  • variables are choices
  • objective with direction
  • constraints identified
  • nonnegativity complete

Error diagnosis · Evaluation

A modeller is planning a courier's day. They write:

max 14 d 1 + 9 d 2 subject to d 1 + d 2 = D , f = 1.55 , d 1 + d 2 ≤ 400 , 3 d 1 + 2 d 2 ≤ 480 , d 1 , d 2 ≥ 0 ,

where d 1 and d 2 are express and standard deliveries made, D is total deliveries, f is the fuel price per litre, and the last capacity constraint is driver minutes. Each delivery takes at most 3 minutes and no route exceeds 400 stops.

Identify every line that does no work, say why in each case, and give the model that remains.

Write your answer, then compare it with the worked solution.

2 hints available, least help first.

Hint 1: Retrieval cue

For each line, name an assignment it forbids that the other lines would otherwise permit.

Hint 2: Concept cue

One line defines a symbol, one fixes a quantity nobody chooses, and one is implied by a tighter constraint.

Compare with the worked solution

Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.

d 1 + d 2 = D does no work. D was introduced to mean total deliveries, so the equation is how D is defined rather than a restriction on d 1 and d 2 . No assignment of the two can violate it. If total deliveries are worth reporting, compute the sum after solving; if some restriction applies to the total, write that restriction instead.

f = 1.55 does no work, and f should not be a variable. The courier does not set the fuel price. A variable fixed to a constant gives the model nothing to decide, and it invites a later edit that lets the price float. The price belongs in a cost coefficient if fuel cost is being modelled, and nowhere if earnings are already stated net.

d 1 + d 2 ≤ 400 does no work here. Driver minutes give 3 d 1 + 2 d 2 ≤ 480 . Since each delivery consumes at least 2 minutes, the time constraint already caps the total at 240, below 400. The stop limit removes nothing from the feasible set. This depends on the data: raise the driver minutes and the stop limit starts to bind, so it is redundant in this instance rather than redundant in principle.

What remains.

max 14 d 1 + 9 d 2 subject to 3 d 1 + 2 d 2 ≤ 480 , d 1 , d 2 ≥ 0 .

What the three faults have in common. Each line is true of the situation. Truth is not the test: a constraint earns its place by ruling out an assignment the rest of the model would otherwise permit, and none of the three does.

A complete answer does each of these:

  • variables are choices
  • constraints identified

Method selection · Comparison · Evaluation

A hospital asks: given the theatre time we have next month, which operations should we schedule to treat the most urgent cases?

Two modellers respond.

Modeller A takes theatre hours as data and lets the number of each operation type be the variables.

Modeller B takes the number of each operation type as data, drawn from last month's actuals, and lets theatre hours be the variable.

Decide which model answers the question the hospital asked, and say what question the other one answers. Then state the circumstance under which the other model would be the right one.

Write your answer, then compare it with the worked solution.

2 hints available, least help first.

Hint 1: Retrieval cue

What did the hospital say it wanted to decide?

Hint 2: Concept cue

Whatever the model treats as a variable is what it is free to choose. Compare that freedom with the freedom the hospital actually has next month.

Compare with the worked solution

Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.

Modeller A answers the question. The hospital asked which operations to schedule, so the operation counts are what it sets and theatre time is the limit it works within. Variables: the number of each operation type next month. Data: theatre hours available, theatre time consumed per operation type, and whatever measure of urgency the objective maximises.

Modeller B answers a different question: how much theatre time would be needed to deliver last month's case mix again. That is a capacity question, and its answer is a quantity of hours rather than a schedule. It cannot tell the hospital which operations to schedule, because the mix was fixed as data before the model ran.

When B is the right model. When the decision genuinely is about theatre capacity: whether to open a weekend list, hire a locum team, or commission a new theatre. Then the case mix is a forecast the hospital does not control within the period, and the hours are what it sets. The same two quantities swap roles, and which is which is decided by the decision being made rather than by anything in the quantities themselves.

The general point. Choosing what is variable is choosing what question the model answers. A model whose variables are wrong can be solved correctly and still be useless, because it is optimising over the wrong freedom.

A complete answer does each of these:

  • variables are choices
  • objective with direction

Transfer · Construction · Explanation

A university department is allocating 2,000 hours of teaching-assistant time across four courses for a term. Each course j has an enrolment n j , a recommended ratio of one assistant hour per eight students, and a measured gain in pass rate per assistant hour, g j . No course may receive less than half its recommended hours, and no course may receive more than twice. The department wants the largest total pass-rate gain.

Build the model. Then state one restriction a real department would face that this description leaves out, and say whether your model could carry it without changing what the variables mean.

Write your answer, then compare it with the worked solution.

2 hints available, least help first.

Hint 1: Retrieval cue

What is the department free to set, and in what unit?

Hint 2: Concept cue

The recommended level is computed from enrolment, which makes it data rather than a decision.

Compare with the worked solution

Comparing does not record a result. Judging your own written answer cannot show that you can do this without help.

Variables.

h j = assistant hours allocated to course  j  this term , j = 1 , … , 4 .

Data. Enrolments n j , the ratio of one hour per eight students, the gains g j , and the 2,000-hour budget. The recommended level r j = n j / 8 is derived from data and is itself data.

Objective.

max ∑ j = 1 4 g j h j .

Gain per hour times hours gives gain.

Budget.

∑ j = 1 4 h j ≤ 2000 .

Forbids: allocating more time than exists.

Floor and ceiling per course.

0.5 r j ≤ h j ≤ 2 r j , j = 1 , … , 4 .

Forbids: starving a course below half its recommendation, and hoarding beyond twice it. Both bounds are in hours, matching h j .

Sign restrictions. The floor already gives h j ≥ 0.5 r j > 0 , so an explicit nonnegativity line adds nothing while the floors stand. Negative hours are meaningless, so that removing the floor later does not silently admit them.

A restriction the description omits. Assistant hours are supplied by people with limited availability, so no single course can absorb more hours than its assistants can work in a term. That is an upper bound per course, which the model already has a place for: tighten the ceiling to the smaller of 2 r j and the availability limit. The variables keep their meaning.

A different omission would not be so accommodating. If assistants can only be assigned in whole shifts, h j stops being a continuous quantity and the model needs integer variables, which changes what kind of program this is.

A complete answer does each of these:

  • variables defined with units
  • objective with direction
  • constraints identified
  • nonnegativity complete
Practice data

Your practice record is stored in this browser only. Clearing it removes every answer and every scheduled review, and cannot be undone.

Results update as you type. Use the up and down arrow keys to move between results, Enter to open one, and Escape to close.

Type to search.

Settings

Appearance

Interface density

Your record

Your progress is stored in this browser and nowhere else: an identifier, the answers you have given, the mastery states and review schedule derived from them, and the lesson you last opened. Clearing it makes you a new learner on this device. It cannot be undone, and it will not affect your appearance or density settings.

Focus timer

Focus--minutes remaining

Phase

Kept in this browser only, and used to label the session in your own history.

Today

Nothing recorded yet. Finish a focus session and it will appear here.

Settings

Focus sessions between long breaks.

Sessions you are aiming for in a day.

Notifications

Your history

Sessions are stored in this browser and nowhere else. They are not evidence and never reach your mastery record.