The Economic Order Quantity model balances two competing costs: the fixed cost of placing an order (which favours ordering rarely, in big batches) against the cost of holding stock in a warehouse (which favours ordering often, in small batches). The order size that minimises their sum is:
EOQ* = √(2DS / H)
TC(Q) = (D/Q)·S + (Q/2)·H
ordering holding
Reorder point R = (D/365)·L
Between orders, stock drains at the daily demand rate d = D/365, tracing a sawtooth. A replenishment order of size Q is placed the moment stock falls to the reorder point R, and arrives L days later — set R too low or L too long and the line hits zero before the truck arrives, a stockout. The warehouse below fills to Q and drains to 0 on exactly this cycle; the cost chart plots the ordering-cost curve (falling), the holding-cost curve (rising) and their sum, with the current Q and the true minimum EOQ* both marked.
- Q slider — the order batch size actually used by the simulation; drag it away from EOQ* to see the total-cost curve climb on either side.
- Set Q = EOQ* — snaps the order quantity to the cost-minimising value for the current D, S, H.
- Lead time L — days between placing an order and the truck arriving; a truck model slides toward the warehouse while an order is in transit.