7.06a–7.06c - Formulating linear programmes

7.06a–7.06c - Formulating linear programmes

Turn a practical choice into a linear programme: define variables, write constraints and decide what to maximise or minimise. You will translate ratios, introduce slack variables and investigate numerical cases, so that every line of the model has a clear meaning.

Variables and the objective

A workshop earns more from each stool than from each shelf: could making fewer stools nevertheless earn more altogether? A stool earns £6 and a shelf earns £5, but they use different amounts of the workshop's limited resources. We will build a model that makes the trade-off visible.

You already know

A linear expression has variables only to the first power, with constant coefficients, such as 6x+5y6x + 5y. You can solve linear equations and inequalities, reversing the inequality sign when multiplying or dividing by a negative number.

Start by saying exactly what a variable counts. “Let xx be stools” is incomplete: is it the number made, their price or the time spent on them? Use “Let xx be the number of stools made in one day”. The time period matters because the resource limits must cover the same period.

Linear programme

A linear programme chooses values of decision variables to maximise or minimise a linear objective function, subject to linear constraints. For example, maximising P=6x+5yP = 6x + 5y subject to resource inequalities is linear. Maximising P=xyP = xy is not: the product of two decision variables is not linear.

The objective measures success. Its coefficients are the contribution from one unit of each variable; its units are the units of the total being optimised. The model must state the direction of optimisation as well as the expression.

Worked example 1: maximising profit

Question. A workshop makes stools and shelves. Each stool contributes £6 profit and each shelf contributes £5. Define two variables and write down the objective for the daily production plan.

Plan. Define daily quantities, then multiply each quantity by its profit per item.

Let xx be the number of stools made per day and yy the number of shelves made per day.

profit from stools=6xpounds per dayprofit from shelves=5ypounds per dayP=6x+5yadd the contributions\begin{aligned} \text{profit from stools} &= 6x && \text{pounds per day} \\ \text{profit from shelves} &= 5y && \text{pounds per day} \\ P &= 6x + 5y && \text{add the contributions} \end{aligned}

Why this step? The variables count items, so multiplying by pounds per item gives profit in pounds.

Answer. Maximise P=6x+5yP = 6x + 5y, where PP is daily profit in pounds.

Check. Making 22 stools and 33 shelves gives 6(2)+5(3)=276(2) + 5(3) = 27, or £27 profit.

The second example changes the quantity being optimised from profit to cost. The arithmetic is identical; the required direction is reversed.

Worked example 2: minimising cost

Question. Two feed mixtures cost £6 and £5 per kilogram respectively. A farmer must meet specified nutritional requirements. Define variables and write down the objective for the daily feed plan.

Plan. Measure both quantities in kilograms and add their daily costs.

Let xx and yy be the masses, in kilograms, of the first and second mixtures used per day.

cost of the first mixture=6xpoundscost of the second mixture=5ypoundsC=6x+5ytotal daily cost\begin{aligned} \text{cost of the first mixture} &= 6x && \text{pounds} \\ \text{cost of the second mixture} &= 5y && \text{pounds} \\ C &= 6x + 5y && \text{total daily cost} \end{aligned}

Why this step? Meeting the requirements is compulsory, so the objective selects the cheapest plan among those that meet them.

Answer. Minimise C=6x+5yC = 6x + 5y, where CC is measured in pounds.

Check. Using 2 kg2\,\mathrm{kg} and 3 kg3\,\mathrm{kg} costs £27, but this calculation alone does not establish that the nutritional requirements are met.

A cheaper plan may be unacceptable, and a more profitable plan may be impossible. Constraints will distinguish what is desirable from what is allowed.

Exam tip

Write “Maximise” or “Minimise”. An expression such as P=6x+5yP = 6x + 5y, without its direction, does not fully specify the objective.

Now choose variables whose units fit the costs given.

Resource and demand constraints

A constraint turns a sentence about available resources or required output into a mathematical condition on the same decision variables.

For the workshop, suppose each stool uses 44 hours of machine time and 11 unit of timber; each shelf uses 22 hours and 22 units. The daily limits are 2424 machine hours and 1212 units of timber. A table keeps the contributions separate.

ResourceOne stoolOne shelfDaily availability
Machine time, hours44222424
Timber, units11221212

Each row gives one inequality. The left side is the amount used, not the amount left over.

Feasible solution

A feasible solution satisfies every constraint, including the restrictions on the variables. For example, (x,y)=(4,4)(x, y) = (4, 4) satisfies 4x+2y≤244x + 2y \le 24 and x+2y≤12x + 2y \le 12; (5,3)(5, 3) does not satisfy the first inequality.

Non-negativity restrictions such as x≥0x \ge 0 are called trivial constraints. The name does not make them optional. Whole items also require integer variables; masses and lengths may take non-integer values.

Worked example 3: limited resources

Question. Use the workshop table to formulate the resource constraints. Include the restrictions needed when stools and shelves are whole items.

Plan. Add the resource use in each row and require that it does not exceed availability.

4x+2y≤24machine hours availablex+2y≤12timber availablex,y≥0no negative productionx,y∈Zwhole items\begin{aligned} 4x + 2y &\le 24 && \text{machine hours available} \\ x + 2y &\le 12 && \text{timber available} \\ x, y &\ge 0 && \text{no negative production} \\ x, y &\in \mathbb{Z} && \text{whole items} \end{aligned}

Why this step? “Available” imposes an upper limit; it does not say that the workshop must use every resource completely.

Answer. The four displayed restrictions, together with maximising P=6x+5yP = 6x + 5y, form the production model.

Check. At (3,4)(3, 4), machine use is 20≤2420 \le 24 and timber use is 11≤1211 \le 12, so the plan is feasible even though some resources remain.

The next example changes an upper resource limit into a minimum requirement. That changes the direction of the inequality.

Worked example 4: minimum requirements

Question. Each kilogram of feed A supplies 44 units of nutrient U and 11 unit of nutrient V. Feed B supplies 22 and 22 units respectively. A daily ration needs at least 2424 units of U and at least 1212 units of V. Formulate the constraints, where xx and yy are the kilograms of A and B used.

Plan. Form the nutrient totals and require each to reach its minimum.

4x+2y≥24minimum U requirementx+2y≥12minimum V requirementx,y≥0masses cannot be negative\begin{aligned} 4x + 2y &\ge 24 && \text{minimum U requirement} \\ x + 2y &\ge 12 && \text{minimum V requirement} \\ x, y &\ge 0 && \text{masses cannot be negative} \end{aligned}

Why this step? The left sides are nutrient supplied, so supplying more is permitted; supplying less is not.

Answer. 4x+2y≥244x + 2y \ge 24, x+2y≥12x + 2y \ge 12 and x,y≥0x, y \ge 0. There is no integer restriction because the feed can be weighed out.

Check. (x,y)=(4,4)(x, y) = (4, 4) supplies exactly 2424 units of U and 1212 of V. The zero ration fails both requirements.

An exact requirement gives an equality, for example x+y=10x + y = 10 when exactly 1010 items are required. If a formulation is requested using inequalities only, replace it by both x+y≤10x + y \le 10 and x+y≥10x + y \ge 10.

Watch out

Wrong: 4x+2y=244x + 2y = 24 merely because 2424 machine hours are available. Right: 4x+2y≤244x + 2y \le 24. Equality would incorrectly exclude feasible plans that leave machine time unused.

Check the meaning of the left side before choosing its inequality sign.

Ratio and proportion constraints

A ratio condition compares quantities; it does not supply their total. Translate the comparison before cancelling denominators.

If at least twice as many stools as shelves must be made, then x≥2yx \ge 2y. Substituting a simple pair is a useful direction check: (6,2)(6, 2) should pass, while (2,6)(2, 6) should fail. These translation rules are not in the formula booklet: learn them by their meaning.

Worked example 5: a lower bound on a ratio

Question. A workshop makes xx stools and yy shelves. It must make at least twice as many stools as shelves. Write this as a linear inequality.

Plan. Compare the number of stools with twice the number of shelves.

required stools=2ytwice the shelvesx≥2yat least this manyx−2y≥0equivalent linear form\begin{aligned} \text{required stools} &= 2y && \text{twice the shelves} \\ x &\ge 2y && \text{at least this many} \\ x - 2y &\ge 0 && \text{equivalent linear form} \end{aligned}

Why this step? “Twice as many stools” refers to xx, so xx is compared with 2y2y, not 2x2x with yy.

Answer. x≥2yx \ge 2y.

Check. Six stools and two shelves satisfy 6≥46 \ge 4; two stools and six shelves fail 2≥122 \ge 12.

The next example changes a comparison between the two types into a fraction of the total. The denominator must include both types.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account