Skip to content
BI & Data ScienceLinear programming: turning a business problem into a model

Formulas for this chapter

The LP model template

Maximise (or Minimise) Z = c1 x1 + c2 x2 + ... + cn xn subject to a11 x1 + a12 x2 + ... <= b1 a21 x1 + a22 x2 + ... <= b2 x1, x2, ..., xn >= 0

Every formulation question. Write the four blocks in this order: variables in words, objective with direction, one line per constraint, non-negativity.

xj
Decision variable j, defined in words with units
cj
Objective coefficient: profit or cost per unit of xj
aij
Amount of resource i used by one unit of xj
bi
Amount of resource i available, the right-hand side

Corner point of two constraints

Solve the two boundary equations simultaneously: a11 x + a12 y = b1 a21 x + a22 y = b2 Subtract when a term matches; else substitute.

Listing the corners of a two-variable feasible region. Discard any intersection that violates another constraint or non-negativity.

b1, b2
Right-hand sides of the two constraints
(x, y)
The candidate corner point

Slack and surplus

slack = RHS - LHS (for a <= constraint) surplus = LHS - RHS (for a >= constraint) Binding <=> slack = 0

After solving, to say which resource limits the business. Solver's Answer Report prints this column for you.

LHS
Left-hand side evaluated at the optimal solution
RHS
The stated limit
Step 1 of 25
The ideaTheory

Bodh Gaya to Pune

The class opens with a journey. Bus, train, car or flight. If your goal is the lowest cost you pick one option; if it is the shortest time you may pick another.

That is optimisation: choosing the best option according to a stated objective, while satisfying whatever conditions you are stuck with.

OptimisationFinding the best possible solution among many available options while satisfying certain conditions or constraints. Two flavours: maximise profit or revenue, or minimise cost, time, waste, error or risk.