A variable, X_ijt, can be used to represent the amount ordered for stocking point i in level j at period t. The lower bound of each X_ijt is 0. A conservative upper bound on X_ijt is found simply by summing the demands at all leaves under this stocking point from now until the end of the planning horizon. This is equivalent to assuming that all necessary stock for the remaining periods will be ordered immediately.

Orders for period t are assumed to be made (and fulfilled, there is a 0 lead time assumption) before period t begins. Inventory levels for period t refer to the end of period t. There are two common methods of representing the inventory remaining after each period, as discussed below.

Inventory in the Conventional Model

In the conventional model, a variable, I_ijt, is used to represent the amount of stock held at stocking point i in level j after period t.

The objective can now be expressed:

where N_j denotes the number of nodes in level j. Note that the objective as expressed above involves the reification of (X_ijt > 0). This expression can be bound to an explicit 0/1 variable (δ_ijt, the approach commonly adopted in the MIP model of this problem) and the δ variables used for branching.

Further constraints govern how inventory is supplied between stocking points:

where W(i,j,j-1) denotes the children of the ith stocking point in level j. In short, the above expression specifies that the closing inventory for I_ijt is the closing inventory for the same stocking point in the previous period, plus the amount ordered, minus the amount supplied.

Inventory in the Echelon Model

An alternative model views the supply-chain structure in echelons. An echelon is a stocking point and all of its descendants, as follows:
Ech6*****************************  Level
*                  |            *
*                  V            *
*                +---+          *
*                | F |          *    3
*                +---+          * 
*            ___/     \___      *
*           /             \     *
*Ech4******V********** Ech5V*****
**       +---+       * * +---+ **
**       | D |       * * | E | **    2
**       +---+       * * +---+ **
**     _/     \_     * *   |   **
**    /         \    * *   |   **
**   V           V   * *   V   **
**Ech1***     Ech2**** *Ech3*****
***+---+*     *+---+** **+---+***
***| A |*     *| B |** **| C |***    1
***+---+*     *+---+** **+---+***
*****|***********|**** ****|*****
     V           V         V
A variable, E_ijt, represents the amount of stock held at the end of period t in the echelon whose highest node is the ith node in level j. The conventional holding cost per unit of inventory is replaced by an echelon holding cost, e_ij, defined as follows: where W(i,j,j+1)denotes the parent of the ith stocking point in level j. Recall the assumption that a parent always has a smaller holding cost than any of its children. Hence, e_ij can be thought of as the incremental cost of holding a unit of inventory at stocking point ij instead of its parent.

The objective can now be expressed:

The constraints governing how inventory is supplied between stocking points are as follows: where V(i, j) denotes the leaves descended from stocking point i in level j, and d_i1t is the demand at leaf i in period t. That is, inventory held in an echelon at the end of period t is the inventory in the same echelon in the previous period plus the inventory ordered minus the demand at the leaves associated with that echelon.

One further set of constraints relate an echelon whose highest stocking point is stocking point i in level j and the echelons whose highest stocking points are the children of stocking point ij:

where again W(i,j,j-1) denotes the children of the ith stocking point in level j.

Implied Constraints

A variety of implied constraints can be used to improve these basic models.

Code

A basic Ilog Solver 5.x program to solve the Wagner-Whitin problem can be found below:
File Type Notes
DistributionWagnerWhitin.essence Essence
DistributionWagnerWhitin-partialfunc.essence Essence
WagCP.zip zip
WagHybrid.zip zip