How should a factory split its machine hours between products? How much stock should a warehouse order at a time? Which route should a delivery van take through Karachi's traffic? Operations research (OR) answers such questions with mathematics, turning messy business decisions into optimisation problems with provably best answers. This article introduces the main tools and works through two problems step by step.
What Is an Optimisation Problem?
Every optimisation problem has three parts:
- Decision variables: the quantities you control, such as how many units to produce.
- An objective function: what you want to maximise (profit) or minimise (cost, time, distance).
- Constraints: the limits you must respect, such as machine capacity, budget or delivery deadlines.
When the objective and constraints are all linear, the problem is a linear programme (LP). When some variables must be whole numbers, such as the number of trucks, it becomes an integer programme. Logistics problems often involve both.
Linear Programming
A key theorem says that if an LP has an optimal solution, at least one optimal solution lies at a corner point (vertex) of the feasible region. George Dantzig's simplex method, developed in 1947, exploits this by walking from vertex to vertex, improving the objective each time. For two variables, we can see it with a graph.
Worked Example 1: A Production Planning LP
A small furniture workshop in Faisalabad makes chairs \( (x) \) and tables \( (y) \). Each chair earns PKR 300 profit and each table PKR 500. A chair needs 1 machine hour and 3 labour hours; a table needs 2 machine hours and 2 labour hours. Each day there are 40 machine hours and 60 labour hours available.
Step 1: Formulate.
$$ \text{Maximise } P = 300x + 500y $$
subject to
$$ x + 2y \le 40, \qquad 3x + 2y \le 60, \qquad x \ge 0, \; y \ge 0. $$
Step 2: Find the corner points.
- Origin: \( (0, 0) \).
- On the \( x \)-axis: \( 3x \le 60 \) gives \( x = 20 \); check \( 20 \le 40 \). Corner \( (20, 0) \).
- On the \( y \)-axis: \( 2y \le 40 \) gives \( y = 20 \); check \( 2(20) = 40 \le 60 \). Corner \( (0, 20) \).
- Intersection of the two constraints: subtract \( x + 2y = 40 \) from \( 3x + 2y = 60 \) to get \( 2x = 20 \), so \( x = 10 \) and \( y = (40 - 10)/2 = 15 \). Corner \( (10, 15) \).
Step 3: Evaluate the objective at each corner.
| Corner | Profit calculation | \( P \) (PKR) |
|---|---|---|
| \( (0, 0) \) | \( 0 + 0 \) | 0 |
| \( (20, 0) \) | \( 300(20) \) | 6,000 |
| \( (0, 20) \) | \( 500(20) \) | 10,000 |
| \( (10, 15) \) | \( 300(10) + 500(15) \) | 10,500 |
Step 4: Conclusion and check. The workshop should make 10 chairs and 15 tables per day for a maximum profit of PKR 10,500. Check the constraints: machine hours \( 10 + 30 = 40 \) and labour hours \( 30 + 30 = 60 \), so both resources are fully used, exactly what we expect at an intersection corner.
Shadow prices: solvers also report how much profit would rise if one more hour of a resource were available, which tells the manager where investment pays off most. We can find them by re-solving. With 41 machine hours, \( x + 2y = 41 \) and \( 3x + 2y = 60 \) give \( 2x = 19 \), so \( x = 9.5 \), \( y = 15.75 \) and profit \( 300(9.5) + 500(15.75) = 2{,}850 + 7{,}875 = 10{,}725 \). That is PKR 225 more, so a machine hour is worth PKR 225. With 61 labour hours instead, \( 2x = 21 \) gives \( x = 10.5 \), \( y = 14.75 \) and profit \( 3{,}150 + 7{,}375 = 10{,}525 \), so a labour hour is worth only PKR 25. Extra machine capacity is clearly the better investment.
Inventory Optimisation: The EOQ Model
Ordering too often wastes money on delivery and paperwork; ordering too much ties up cash and warehouse space. The Economic Order Quantity balances the two. With annual demand \( D \), cost per order \( S \) and holding cost per unit per year \( H \), the total annual cost is
$$ TC(Q) = \frac{D}{Q}S + \frac{Q}{2}H. $$
Setting \( TC'(Q) = -\frac{DS}{Q^2} + \frac{H}{2} = 0 \) gives
$$ Q^* = \sqrt{\frac{2DS}{H}}. $$
Worked Example 2: Ordering Cooking Oil Cartons
A Lahore distributor sells \( D = 12{,}000 \) cartons per year. Each order costs \( S = \) PKR 2,000 (transport and admin), and holding one carton for a year costs \( H = \) PKR 30.
Step 1: Compute \( Q^* \).
$$ Q^* = \sqrt{\frac{2 \times 12{,}000 \times 2{,}000}{30}} = \sqrt{\frac{48{,}000{,}000}{30}} = \sqrt{1{,}600{,}000} \approx 1{,}264.9 \text{ cartons}. $$
Step 2: Orders per year. \( D/Q^* = 12{,}000/1{,}264.9 \approx 9.49 \), roughly one order every 5.5 weeks.
Step 3: Annual cost. Ordering cost \( = 9.487 \times 2{,}000 \approx \) PKR 18,974 and holding cost \( = (1{,}264.9/2) \times 30 \approx \) PKR 18,974. Total \( \approx \) PKR 37,947.
Sanity check: at the optimum, ordering and holding costs are equal, which they are. If the distributor instead ordered 3,000 cartons at a time, cost would be \( 4 \times 2{,}000 + 1{,}500 \times 30 = 8{,}000 + 45{,}000 = \) PKR 53,000, much higher.
Routing and Network Problems
Logistics is full of network optimisation:
- Shortest path: Dijkstra's algorithm finds fastest routes in navigation apps.
- Transportation problem: an LP that ships goods from factories to warehouses at minimum cost.
- Travelling salesman problem (TSP): visit every city once and return. With \( n \) cities there are \( (n-1)!/2 \) distinct tours; for just 10 cities that is \( 9!/2 = 181{,}440 \), and for 20 cities it exceeds \( 6 \times 10^{16} \).
- Vehicle routing: TSP with many vans, capacity limits and delivery time windows, the daily problem of courier companies.
Because TSP and vehicle routing are NP-hard, researchers combine exact methods (branch and bound, cutting planes) with heuristics and metaheuristics such as genetic algorithms and simulated annealing.
Research Frontiers
- Stochastic and robust optimisation: decisions that hold up when demand or travel times are uncertain.
- Learning to optimise: machine learning models that guide solvers or predict good routes.
- Sustainable logistics: minimising carbon emissions alongside cost.
- Supply chain resilience: network design that survives disruptions such as floods or port closures.
Did You Know?
- Leonid Kantorovich formulated early linear programming ideas in 1939 and later shared the 1975 Nobel Memorial Prize in Economics for work on optimal resource allocation.
- The EOQ formula was published by Ford W. Harris in 1913 and is still taught in every business school.
- Modern solvers routinely handle LPs with millions of variables.
Key Takeaways
- Optimisation needs decision variables, an objective and constraints.
- An LP's optimum lies at a corner point; shadow prices show the value of extra resources.
- The EOQ formula \( Q^* = \sqrt{2DS/H} \) balances ordering and holding costs.
- Routing problems grow factorially, so research blends exact algorithms with smart heuristics.
Need help formulating an LP, using Excel Solver or completing an operations research assignment? Amathify's experts and PhD scholars provide step-by-step solutions via WhatsApp or the Ask a Question form.
Stuck on a problem or assignment?
Our experts and PhD scholars solve maths, physics and chemistry — step by step.