Skip to main content

Retail & E-Commerce

Store Location · Inventory · Fulfillment

Retail sits atop a hierarchy of operations research problems that span every link in the value chain. Walmart processes over one million transactions per hour; Amazon ships more than ten million items per day. Behind these numbers lie stochastic inventory models deciding what to stock, facility location models choosing where to build, and transportation problems routing each order from warehouse to doorstep — three foundational OR challenges that define modern commerce.

Domain Context

The newsvendor problem is the canonical single-period stochastic inventory model: order too much and you incur holding/markdown costs; order too little and you lose sales. Every grocery chain, fashion retailer, and e-commerce warehouse faces this tradeoff daily across thousands of SKUs. The optimal order quantity is set by the critical ratio cu / (cu + co), where cu is the unit cost of under-stocking and co is the unit cost of over-stocking. For multi-period settings, the (s, S) policy extends this to a reorder-point / order-up-to-level framework with stochastic demand simulation.

Problem type: Stochastic inventory optimisation (newsvendor). Determine order quantities for perishable or seasonal SKUs to minimise total expected overage plus underage cost under uncertain demand, subject to budget and shelf-space constraints.

Mathematical Formulation min E[c_o · max(0, Q - D) + c_u · max(0, D - Q)]
s.t. Q* = F-1(c_u / (c_u + c_o)) // critical ratio
     D ~ Normal(μ, σ2) // demand distribution
// (s,S): reorder when inventory ≤ s, order up to S

Inventory Solver

5
Newsvendor (Critical Ratio)
(s, S) Simulation
Select scenario and click Solve.
Evidence Base
  • Arrow, K. J., Harris, T., & Marschak, J. (1951). Optimal inventory policy. Econometrica, 19(3), 250–272. Published
  • Scarf, H. (1958). A min-max solution of an inventory problem. In Studies in the Mathematical Theory of Inventory and Production, Stanford University Press. Published
  • Retail inventory management at scale: Walmart, Amazon, and Zara use newsvendor-derived replenishment engines across millions of SKU-location pairs. Operational
Domain Context

The maximal covering location problem (MCLP) asks: given a set of demand zones and a limited number of facilities, where should we place stores to maximise the total demand covered within a service radius? Every retail chain from Starbucks to Costco employs variants of this model. The greedy coverage heuristic iteratively places each new store at the location covering the most uncovered demand, while Lagrangian relaxation provides tighter bounds by dualising the coverage constraints.

Problem type: Maximum coverage facility location. Select p facility sites from a candidate set to maximise total population covered within a distance threshold, subject to a cardinality constraint on the number of open sites.

Mathematical Formulation max Σj d_j · y_j
s.t. y_j ≤ Σi ∈ N_j x_i   ∀ j // covered only if facility nearby
     Σi x_i = p // open exactly p facilities
     x_i, y_j ∈ {0,1} // binary variables

Location Solver

10
3
Greedy Coverage
Lagrangian Relaxation
Select scenario and click Solve.
Evidence Base
  • Church, R. & ReVelle, C. (1974). The maximal covering location problem. Papers of the Regional Science Association, 32, 101–118. Published
  • Daskin, M. S. (1995). Network and Discrete Location: Models, Algorithms, and Applications. Wiley. Published
Domain Context

The transportation problem is the foundational LP in logistics: ship goods from a set of supply nodes (warehouses, distribution centres) to a set of demand nodes (stores, customers) at minimum total cost. Every e-commerce fulfilment engine — from Amazon's multi-DC network to Shopify's distributed warehousing — solves a variant of this problem in real time. The northwest corner method provides an initial basic feasible solution, improved to optimality by the MODI (modified distribution) method. Vogel's approximation method (VAM) often starts closer to optimal, requiring fewer iterations.

Problem type: Balanced transportation problem (LP). Assign shipments from m supply centres to n demand destinations to minimise total shipping cost, subject to supply capacity and demand satisfaction constraints.

Mathematical Formulation min Σi,j c_ij · x_ij
s.t. Σj x_ijs_i   ∀ supply i // supply capacity
     Σi x_ijd_j   ∀ demand j // demand satisfaction
     x_ij ≥ 0 // non-negativity

Fulfillment Solver

4×3
NW Corner + MODI
Vogel's (VAM)
Select scenario and click Solve.
Evidence Base
  • Hitchcock, F. L. (1941). The distribution of a product from several sources to numerous localities. Journal of Mathematics and Physics, 20, 224–230. Published
  • Koopmans, T. C. (1949). Optimum utilization of the transportation system. Econometrica, 17 (Supplement), 136–146. Published
  • Dantzig, G. B. (1951). Application of the simplex method to a transportation problem. In Activity Analysis of Production and Allocation. Published

Explore More Applications

See how the same mathematical families — stochastic programming, facility location, network flow — apply across healthcare, energy, transportation, and manufacturing.

Portfolio
ESC