Safety Stock and Inventory Systems, MRP, Aggregate Planning and Lean; Assignment, Transportation and Network Flow

The Production Planning and Control and Operations Research lines name items the earlier chapter did not cover: safety stock and inventory-control systems, materials requirement planning, aggregate production planning, lean manufacturing, and the transportation, assignment and network-flow models. The earlier chapter taught the deterministic EOQ, linear programming by vertices, CPM and queues. Real inventories face random demand, so a safety stock buffers the lead time at a chosen service level; the MRP logic explodes a master schedule through a bill of materials, netting stock and offsetting by lead times, which is arithmetic you can do exactly; aggregate planning compares chase, level and hybrid strategies by cost; lean replaces forecasts with pull signals (kanban, takt time). The three network models are special linear programmes with algorithms far faster than simplex: the assignment problem (Hungarian method), the transportation problem (initial solution by north-west corner, least cost or Vogel, then optimisation by MODI) and maximum flow (augmenting paths, max-flow = min-cut). Each result here was computed by program, the combinatorial ones against an independent check: the 4 × 4 assignment optimum 13 was found by enumerating all 24 permutations and the Hungarian reduction reaches the same; the transportation optimum 750 was confirmed by a min-cost-flow solver, and Vogel's method reaches it; the example network has a maximum flow of 15.
Overview

Safety Stock, Reorder Point and Inventory-Control Systems

2 min read

With uncertain demand, running out during the replenishment lead time is the risk, so stock is held above the average need: reorder point ROP = average demand during lead time + safety stock, and safety stock SS = z σ_L, where σ_L is the standard deviation of demand over the lead time and z comes from the service level (the probability of not stocking out in a cycle): z = 1.28 for 90%, 1.645 for 95%, 2.33 for 99%. If daily demand has mean 50 and standard deviation 8 and the lead time is a fixed 9 days, σ_L = σ_d √L = 8 × √9 = 24.0, so SS = 1.645 × 24.0 = 39.5 units and ROP = 50 × 9 + 39.5 = 489.5. Note the square root: risk grows as √L, not L. If the lead time itself varies with standard deviation σ_LT (0.5 days), the combined σ = √(L σ_d² + d̄² σ_LT²) = 34.7 and the safety stock rises to 57.0 — lead-time variability often hurts more than demand variability.

SystemRuleSafety stock must cover
Fixed-order-quantity (Q, ROP) — continuous revieworder Q when stock reaches ROPdemand over the lead time L
Periodic review (P, T / order-up-to S)every R days order up to Sdemand over R + L (here 52.6 units, larger)
Two-binreorder when the first bin emptiesthe second bin is the ROP

The periodic system must protect over R + L, so for a weekly review (R = 7) and the same L = 9 its σ is 8 × √16 = 32.0 and its safety stock 52.6, against 39.5 for the continuous system — the price of not watching the stock all the time. Classification for control: ABC analysis ranks items by annual consumption value (about 70% of value in 10% of items, class A: tight control); VED by criticality (vital, essential, desirable); FSN by movement rate (fast, slow, non-moving); HML by unit price.

With uncertain demand, running out during the replenishment lead time is the risk, so stock is held above the average need: reorder point ROP = average demand during lead time + safety…

MRP, Aggregate Planning and Lean Manufacturing

2 min read · 3 parts

MRP takes the master production schedule (what end items, when), the bill of materials (BOM, the product tree with quantities per parent) and the inventory status (on hand, scheduled receipts, lead times), and for each item computes net requirement = gross requirement − on hand − scheduled receipts, then offsets by the lead time to get the planned order release date, and passes gross requirements to the children = net × quantity-per. Example: 100 of A needed in week 8; A uses 2 B and 3 C; B uses 1 D. On hand: A 20, B 40, C 0, D 30. Lead times: A 1, B 2, C 1, D 3 weeks. A: net 80, release in week 7. B: gross 2 × 80 = 160, net 120, release in week 5. C: gross 240, net 240, release in week 6. D: gross 120, net 90, release in week 2 (the earliest release, setting how far ahead the whole product must be started). Lot sizing (lot-for-lot, EOQ, period order quantity) then groups the releases. MRP II adds capacity and shop-floor feedback; ERP adds finance and the rest of the firm.

Aggregate production planning sets, for the medium term, the total output, workforce and inventory by period, treating products as one aggregate. Pure strategies: chase (produce what is demanded, varying the workforce: hiring/firing cost), level (constant output, absorbing the swings in inventory or backlog: carrying cost) and hybrid. For demand 100, 150, 200, 150 and an opening workforce at 100: level production 150 per period builds inventory of 50, 50, 0, 0, i.e. 100 unit-periods, costing 100 × 2 = 200; chase changes output by +50, +50, −50, costing 100 hires × 5 + 50 fires × 8 = 900. The cheaper plan depends entirely on the ratio of the two unit costs. Lean manufacturing attacks the seven wastes — overproduction (the worst, since it creates the others), waiting, transport, over-processing, inventory, motion, defects — with pull (kanban), small lots and quick changeover (SMED), 5S, visual control and error-proofing (poka-yoke). Takt time = available time / customer demand: 450 min for 225 units gives 2 min per unit. Number of kanbans N = D L (1 + α)/C: 120/h × 0.5 h × 1.1 / 10 per container = 6.6, so 7 containers.

The MRP example as a product tree
A: 100 in week 8Net 80, release week 7
  • B (2 per A)Net 120, release week 5
    • D (1 per B): net 90, release week 2
  • C (3 per A)Net 240, release week 6
Net requirement = gross − on hand − scheduled receipts, offset by lead time.

MRP takes the master production schedule (what end items, when), the bill of materials (BOM, the product tree with quantities per parent) and the inventory status (on hand, scheduled…

The Assignment and Transportation Problems

2 min read · 2 parts

Assignment: n workers to n jobs, one each, minimising total cost (a zero-one LP with an integer optimum). Hungarian method: (1) subtract each row's minimum from its row; (2) subtract each column's minimum from its column; (3) cover all zeros with the fewest lines; if the number of lines equals n, an assignment on zeros exists; otherwise subtract the smallest uncovered element from uncovered elements and add it at line intersections, and repeat. For the 4 × 4 cost matrix [[9,2,7,8],[6,4,3,7],[5,8,1,8],[7,6,9,4]]: row minima total 10; after the column reduction (column minima 3, 0, 0, 0) the matrix has 6 zeros and a zero-cost assignment, and the optimum is 13 with workers 1 to 4 on jobs 2, 1, 3, 4 (checked against all 24 permutations). Variants: unbalanced (add dummy rows or columns of zeros); maximisation (subtract every entry from the largest, or negate); prohibited assignments (cost M, very large).

Transportation: ship from m sources (supply s_i) to n sinks (demand d_j) at cost c_ij per unit, minimising total cost; it must be balanced (Σs = Σd, else add a dummy), and a basic feasible solution has m + n − 1 occupied cells. Initial solutions: north-west corner (fast, ignores cost), least cost (better) and Vogel's approximation (VAM) (allocate to the row or column with the greatest penalty = difference of its two smallest costs; usually nearest to optimal). Optimise by MODI (u–v): for occupied cells u_i + v_j = c_ij, then the opportunity cost of an empty cell is c_ij − u_i − v_j; a negative value means a cheaper plan exists, so shift flow round the closed loop through that cell until all are non-negative. Supplies 20, 30, 25, demands 25, 20, 30, costs [[8,6,10],[9,12,13],[14,9,16]]: north-west corner costs 910, least cost 810, Vogel 750, and the optimum, confirmed by an independent min-cost-flow solver, is 750. Degeneracy (fewer than m + n − 1 occupied cells) is repaired with an ε allocation. The assignment problem is the special case of a square transportation problem with all supplies and demands equal to 1.

Assignment: n workers to n jobs, one each, minimising total cost (a zero-one LP with an integer optimum). Hungarian method: (1) subtract each row's minimum from its row; (2) subtract each…

Network Flow: Maximum Flow, Minimum Cut and Shortest Path

2 min read · 2 parts

In a directed network with arc capacities, the maximum-flow problem asks for the largest flow from source s to sink t, with conservation at every intermediate node and 0 ≤ flow ≤ capacity on each arc. Ford–Fulkerson (augmenting-path) method: find any s–t path with spare capacity (in the residual graph, where each arc also has a reverse arc carrying the flow already sent, which lets a bad earlier choice be undone), push the bottleneck amount along it, update, repeat until no path remains; choosing the shortest path each time (Edmonds–Karp) bounds the work polynomially. The max-flow min-cut theorem: the maximum flow equals the minimum capacity of any cut (a set of arcs whose removal separates s from t). Example: arcs S→A 10, S→B 5, A→B 15, A→T 5, B→T 10. The program's augmenting paths give max flow = 15, and the cut {S→A, S→B} of capacity 15 (also {A→T, B→T}, 15) proves nothing larger exists. Applications: pipeline and traffic capacity, bipartite matching (a flow problem with unit capacities), and project-selection models.

Shortest path (Dijkstra, non-negative weights): fix the node with the smallest tentative distance, relax its neighbours, repeat. On the graph with edges 0–1 (4), 0–2 (1), 2–1 (2), 1–3 (5), 2–3 (8), 3–4 (3) the program finds distances from node 0 of 0, 3, 1, 8, 11: the path to node 1 goes through node 2 (1 + 2 = 3, not the direct 4), and to node 4 it is 0–2–1–3–4 = 11. Dijkstra fails with negative arcs (use Bellman–Ford, which also detects negative cycles); a minimum spanning tree (Prim, Kruskal) connects all nodes at least total weight and is a different question from a shortest path. All of these are special cases of the minimum-cost flow problem, which also contains transportation and assignment — which is why a single network-simplex code solves the lot.

⚠️ Check balance and the count of basic cells
Before any transportation method, check Σ supply = Σ demand (add a dummy otherwise) and that your starting solution has exactly m + n − 1 occupied cells. For assignment, make the matrix square first. A VAM allocation that exhausts a row and a column simultaneously creates degeneracy that must be repaired with an ε.

In a directed network with arc capacities, the maximum-flow problem asks for the largest flow from source s to sink t, with conservation at every intermediate node and 0 ≤ flow ≤ capacity…

Key takeaways

  • SS = zσ_L with σ_L = σ_d√L; ROP = d̄L + SS; z = 1.645 for 95%; lead-time variability adds d̄²σ_LT² under the root; a periodic system protects over R + L, so it needs more safety stock than a continuous one.
  • MRP: net = gross − on hand − receipts; planned release = need date − lead time; children get gross = net × quantity-per; ABC ranks by value, VED by criticality, FSN by movement.
  • Aggregate plans: chase versus level versus hybrid, compared by hiring/firing against carrying cost; lean: seven wastes, takt = available time/demand, kanbans N = DL(1 + α)/C.
  • Assignment by the Hungarian method (row reduce, column reduce, cover zeros, adjust); transportation needs balance and m + n − 1 basic cells, with NWC, least cost and VAM for the start and MODI for the optimum.
  • Max flow = min cut (Ford–Fulkerson with residual arcs); Dijkstra needs non-negative weights; assignment, transportation, max flow and shortest path are all special minimum-cost-flow problems.

Practice questions (24)

Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.

  1. Daily demand has mean 50 and standard deviation 8, the lead time is a fixed 9 days and the service level is 95% (z = 1.645). The safety stock is nearest to:

    1. 118.5 units
    2. 450 units
    3. 13.2 units
    4. 39.5 units
    Show answer

    Answer: D — 39.5 units

    σ_L = 8 × √9 = 24; SS = 1.645 × 24 = 39.5. The 13.2 option uses σ_d without the square-root-of-lead-time scaling; 118.5 uses σ_d × L (a linear, not square-root, growth).
  2. The safety stock needed in a periodic-review (P) system, compared with a continuous-review (Q) system of the same lead time and service level, is:

    1. smaller, because orders are placed on a fixed schedule
    2. the same
    3. zero, because review is regular
    4. larger, because it must cover demand over the review period plus the lead time
    Show answer

    Answer: D — larger, because it must cover demand over the review period plus the lead time

    Between reviews nothing can be ordered, so a stock-out can occur during R + L rather than L alone; σ over R + L is larger, hence the larger safety stock.
  3. Product A (100 needed in week 8, 20 on hand, lead time 1 week) uses 2 units of B per A. B has 40 on hand. Find the net requirement of B.

    Numerical answer — type the value.

    Show answer

    Answer: 120

    Net A = 100 − 20 = 80; gross B = 2 × 80 = 160; net B = 160 − 40 = 120. Using the gross 100 of A instead would give 160, a common slip.
Show the other 21 questions
  1. Which is regarded in lean manufacturing as the worst of the seven wastes?

    1. overproduction
    2. motion
    3. defects
    4. waiting
    Show answer

    Answer: A — overproduction

    Overproduction creates the others: it needs extra stock, transport, handling and waiting, and it hides defects. Pull systems such as kanban are designed to prevent it.
  2. The number of kanban containers for demand 120 per hour, replenishment lead time 0.5 h, container capacity 10 and safety factor 0.1 is:

    1. 7
    2. 12
    3. 60
    4. 6
    Show answer

    Answer: A — 7

    N = D L (1 + α)/C = 120 × 0.5 × 1.1/10 = 6.6, rounded up to 7 because a fraction of a container cannot be used.
  3. Solve the assignment problem with cost matrix [[9, 2, 7, 8], [6, 4, 3, 7], [5, 8, 1, 8], [7, 6, 9, 4]] (rows workers, columns jobs). Find the minimum total cost.

    Numerical answer — type the value.

    Show answer

    Answer: 13

    Row reduction subtracts 10 in total and the column reduction leaves a zero-cost assignment; the optimum is 13 (workers on jobs 2, 1, 3, 4), confirmed by enumerating all 24 permutations.
  4. A transportation problem with 3 sources and 4 destinations that is balanced and non-degenerate has how many occupied (basic) cells in a basic feasible solution?

    1. 6
    2. 5
    3. 12
    4. 7
    Show answer

    Answer: A — 6

    m + n − 1 = 3 + 4 − 1 = 6, because the balance equation makes one of the m + n constraints redundant. Fewer occupied cells means degeneracy, repaired with an ε.
  5. Supplies 20, 30, 25, demands 25, 20, 30 and costs [[8, 6, 10], [9, 12, 13], [14, 9, 16]]. The north-west corner rule gives a starting cost of 910. Compared with the optimum (750), Vogel's method gives:

    1. 910, same as north-west corner
    2. it cannot be applied to this matrix
    3. 730, below the optimum
    4. 750, equal to the optimum here
    Show answer

    Answer: D — 750, equal to the optimum here

    The program's VAM total is 750 and the min-cost-flow optimum is 750. VAM is a heuristic that is usually, not always, optimal; no start can ever beat the optimum, which rules out the option below it.
  6. The maximum flow from S to T in the network with arcs S→A 10, S→B 5, A→B 15, A→T 5, B→T 10 is:

    1. 15
    2. 20
    3. 10
    4. 30
    Show answer

    Answer: A — 15

    The cut {S→A, S→B} has capacity 15 and the flow S→A 10, S→B 5, A→T 5, A→B 5, B→T 10 attains it, so max flow = min cut = 15. The sum of all capacities (45) is not a bound that matters.
  7. In an MRP record the gross requirement for a part is 100 units, 30 units are on hand and 20 units are scheduled to be received. The net requirement is _____ units.

    Numerical answer — type the value.

    Show answer

    Answer: 50

    Net requirement = gross − on hand − scheduled receipts = 100 − 30 − 20 = 50 units. Subtracting only the on-hand stock gives 70, forgetting the receipts already on order.
  8. A kanban system is best described as:

    1. a push system driven by a forecast-based master schedule
    2. a pull system, in which downstream consumption triggers upstream production
    3. an inventory-forecasting algorithm
    4. a method of scheduling by critical ratio
    Show answer

    Answer: B — a pull system, in which downstream consumption triggers upstream production

    A kanban card authorises production or movement only when a downstream station has consumed material, which makes it a pull system. A push system, such as classical MRP, releases work against a forecast-driven schedule regardless of downstream consumption.
  9. Two workers must be assigned to two jobs, one each. The cost matrix is [[4, 6], [5, 3]] (rows: workers, columns: jobs). The minimum total cost is _____.

    Numerical answer — type the value.

    Show answer

    Answer: 7

    There are only two assignments: (4 + 3) = 7 and (6 + 5) = 11. The minimum is 7. Picking the smallest entry in each row independently, 4 and 3, happens to work here, but it can fail by assigning two workers to the same job.
  10. A balanced transportation problem has 3 sources and 3 destinations. The number of basic (allocated) cells in a non-degenerate basic feasible solution is _____.

    Numerical answer — type the value.

    Show answer

    Answer: 5

    A non-degenerate basic feasible solution has m + n − 1 occupied cells = 3 + 3 − 1 = 5. One constraint is redundant because total supply equals total demand. The value 6 is m + n, which forgets the redundancy; 9 counts every cell.
  11. In a capacitated network, the maximum flow from source to sink equals:

    1. the capacity of the minimum cut
    2. the number of arcs leaving the source
    3. the capacity of the largest arc
    4. the sum of all arc capacities
    Show answer

    Answer: A — the capacity of the minimum cut

    The max-flow min-cut theorem states that the maximum flow equals the capacity of the minimum cut separating source from sink. The sum of all capacities, or the largest single capacity, ignores the bottleneck structure.
  12. Daily demand for an item averages 50 units and the replenishment lead time is 4 days. The expected demand during the lead time is _____ units.

    Numerical answer — type the value.

    Show answer

    Answer: 200

    Expected lead-time demand = daily demand × lead time = 50 × 4 = 200 units. This is the reorder point when no safety stock is held. Taking the square root of the lead time (the rule for standard deviations) would give 100, which does not apply to means.
  13. The primary aim of just-in-time (JIT) production is to:

    1. maximise the utilisation of every machine
    2. eliminate waste, including excess inventory
    3. maximise batch size to reduce setup cost
    4. maintain large buffers against uncertainty
    Show answer

    Answer: B — eliminate waste, including excess inventory

    JIT aims to eliminate waste (muda) by producing only what is needed, when it is needed, which keeps inventory low and exposes problems. Maximising utilisation or batch size builds inventory, and large buffers are exactly what JIT tries to remove.
  14. Daily demand has a standard deviation of 10 units, the lead time is a fixed 9 days and the service-level factor is z = 1.65. The safety stock, in units, is _____ (one decimal place).

    Numerical answer — type the value.

    Show answer

    Answer: 49.5

    Safety stock = z σ_d √L = 1.65 × 10 × √9 = 1.65 × 10 × 3 = 49.5 units. The variance scales with the lead time, so the standard deviation scales with √L, not L: using L gives 148.5.
  15. Three jobs are assigned to three workers, one each, with cost matrix [[10, 9, 8], [7, 6, 10], [8, 12, 7]] (rows: workers, columns: jobs). The minimum total cost is _____.

    Numerical answer — type the value.

    Show answer

    Answer: 22

    Enumerating the six assignments gives totals 10 + 6 + 7 = 23, 10 + 10 + 12 = 32, 9 + 7 + 7 = 23, 9 + 10 + 8 = 27, 8 + 7 + 12 = 27 and 8 + 6 + 8 = 22. The Hungarian method agrees: subtracting the row minima 8, 6, 7 and then 1 from column 1 leaves [[1, 1, 0], [0, 0, 4], [0, 5, 0]], and the zeros allow the assignment (row 1, col 3), (row 2, col 2), (row 3, col 1), which costs 8 + 6 + 8 = 22 at the original costs. Taking each row's minimum, 8 + 6 + 7 = 21, is the tempting lower bound but it uses job 3 twice.
  16. In a network with arcs S→A (8), S→B (6), A→T (5), B→T (7) and A→B (4), where the numbers are capacities, the maximum flow from S to T is _____.

    Numerical answer — type the value.

    Show answer

    Answer: 12

    The cut separating {S, A, B} from {T} contains A→T (5) and B→T (7), with capacity 12. A flow of 12 is achievable: send 8 along S→A (5 continue to T, 3 go on to B) and 4 along S→B, so B receives 7 and forwards all 7 to T. Total 5 + 7 = 12. By max-flow min-cut the maximum equals the minimum cut, 12, not the cut at the source (14).
  17. One unit of product A needs 2 units of B and 3 units of C, and one unit of B needs 2 units of D. For a demand of 50 units of A, with 60 units of D already in stock and no other stock or receipts, the net requirement of D is _____ units.

    Numerical answer — type the value.

    Show answer

    Answer: 140

    Explode the bill of materials: B needed = 50 × 2 = 100; D needed = 100 × 2 = 200 gross. Net D = 200 − 60 = 140 units. The product of 2 × 3 for B and C (6 per A) is irrelevant here, since C does not feed D, and netting stock at the A or B level instead of at D gives a different figure.
  18. A transportation problem has supplies 30 and 40, demands 20, 30 and 20, and unit costs [[4, 6, 8], [5, 7, 3]] (rows: sources, columns: destinations). The total cost of the initial solution by the north-west corner method is _____.

    Numerical answer — type the value.

    Show answer

    Answer: 340

    Start at the top-left cell: x₁₁ = min(30, 20) = 20 (cost 80); remaining supply 10 in row 1, so x₁₂ = 10 (cost 60); column 2 still needs 20, so x₂₂ = 20 (cost 140); row 2 has 20 left for column 3: x₂₃ = 20 (cost 60). Total = 80 + 60 + 140 + 60 = 340. The method ignores costs, so the cheapest-looking cells (such as the cost 3 cell used last) do not guide it.
  19. Solve the assignment problem with cost matrix [[12, 8, 15, 9], [10, 14, 11, 13], [9, 7, 12, 10], [14, 11, 8, 12]] (rows: workers, columns: jobs). The minimum total cost is _____.

    Numerical answer — type the value.

    Show answer

    Answer: 34

    Enumerating the 24 assignments (or applying the Hungarian method: subtract row minima, then column minima, and cover the zeros) gives the optimum 34, with workers 1-4 assigned to jobs 4, 1, 2, 3 respectively. Check: the costs are 9, 10, 7, 8, summing to 34. Taking each row's minimum independently, 8 + 10 + 7 + 8 = 33, gives an infeasible lower bound because it sends workers 1 and 3 to the same job, job 2.
  20. In a periodic-review system the review period is 7 days and the lead time is 3 days. Daily demand has a standard deviation of 12 units and z = 1.645. The safety stock, in units, is _____ (one decimal place).

    Numerical answer — type the value.

    Show answer

    Answer: 62.4

    In a periodic-review system the stock must cover demand over the review period plus the lead time: SS = z σ_d √(R + L) = 1.645 × 12 × √10 = 1.645 × 12 × 3.162 = 62.4 units. Using only the lead time, √3, gives 34.2, which is the continuous-review (Q-system) answer and is smaller.
  21. Demand is 240 units per hour, the replenishment lead time is 0.5 hour, each kanban container holds 20 units and the policy factor (safety) is 10%. The number of kanban containers required is _____ (nearest whole number not less than the computed value).

    Numerical answer — type the value.

    Show answer

    Answer: 7

    N = D × L × (1 + α)/C = 240 × 0.5 × 1.1/20 = 132/20 = 6.6, and the number of containers must be a whole number not below this, so 7. Rounding down to 6 would leave the line short during the replenishment lead time.