A binary tree structure for detecting inventory problems. A first
embodiment detects on-hand inventory problems. A second embodiment
detects inventory requirements problems. Both embodiments use a binary
tree whose nodes store time values and delta values. The delta values
represent inventory consumers or producers. The time values of trees used
for inventory requirements problems are shifted in accordance with
build-ahead times.