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. (FIG. 2). The delta
values represent inventory consumers or producers. (FIG. 6). The time
values of trees used for inventory requirements problems are shifted in
accordance with build-ahead times. (FIG. 6).