# GMDH Streamline Docs

### Site Tools

ordering-plan-calculation-dc

# 6.4.2. Two-Echelon Planning

In this article, we explain how Streamline calculates a DC ordering plan for planning items that are distributed in this DC. These items are shown on the Distribution center tab.

Consider an example of a two-echelon model represented in the figure below.

In the example, an item is distributed over N stores from a distribution center. In addition to the distribution, DC sells this item to customers.

To calculate a DC ordering plan for such an item, Streamline performs two steps:

1. First, it calculates ordering plans for this item for N locations at the lowest echelon based on the sales forecasts. This gives us N Ordering plans which form a part of DC demand at the highest echelon.

2. Then, the DC ordering plan is calculated using the Excel-like formulas below.

DC order qty1 = MAX(CEILING( MAX(0, D_salesOC + DOC + DC safety stock + Qty_to_shipLT,OC - Remaining + Debt_accumulated), DC rounding), DC min lot), (1)

Remaining = MAX(0, MAX(0, DC on hand) + Qty_to_receiveLT,OC - (D_salesLT + DLT) ),

,

Where:

• D_salesOC – the demand forecast generated based on the item sales in the DC during the DC order cycle coming after the DC lead time. If the DC doesn't sell the item, this term equals zero.
• D_salesLT – the demand forecast generated based on the item sales in the DC during the DC lead time. If the DC doesn't sell the item, this term equals zero.
• DOC – the demand forecast generated based on the item distribution demand from N locations at the lowest echelon during the DC order cycle coming after the DC lead time.
• DLT – the demand forecast generated based on the item distribution demand from N locations at the lowest echelon during the DC lead time.
• Ordering planj, `j` = 1, …, N – the ordering plans calculated for the item at the lowest echelon (see Step 1). These are shown in the Ordering plan section on the Inventory planning tab.
• Qty_to_shipLT,OC and Qty_to_receiveLT,OC – the quantities that are to be shipped and received to the DC correspondingly within the DC lead time plus DC order cycle period. Those can be viewed in the In transition details dialog opened from the Distribution center tab.
• DC safety stock – the safety stock for the item in DC. In our case, it is a sum of two safety stocks. One of them refers to sales activity, another one, to distribution. It is shown in the DC safety stock column on the Distribution center tab.
• DC on hand, DC order cycle, DC lead time, DC rounding, DC min lot – replenishment parameters shown in the Distribution center tab.

The calculated DC order qty1 is shown in the Qty column of the Current order section on the Distribution center tab.

Formula (1) determines the quantity to order for the first DC order cycle. To calculate replenishment quantities for next order cycles, the following Excel-like formula is used:

DC order qty1 = MAX(CEILING( MAX(0, D_sales(OCi) + D(OCi) + DC safety stocki + Qty_to_ship(OCi) - Qty_to_receive(OCi) - Remainingi), DC rounding), DC min lot), (2)

.

Where:

• D_sales(OCi) – the demand forecast generated based on the item sales in the DC during `i`-th DC order cycle. If the DC doesn't sell the item, this term equals zero.
• DOC – the demand forecast generated based on the item distribution demand from N locations at the lowest echelon during `i`-th DC order cycle.
• Ordering planj, `j` = 1, …, N – the ordering plans calculated for the item at the lowest echelon (see Step 1).
• Qty_to_ship(OCi) and Qty_to_receive(OCi) – the quantities that are to be shipped and received to the DC correspondingly within `i`-th DC order cycle.
• DC safety stocki – the DC safety stock for `i`-th DC order cycle.
• Remainingi-1 – the remaining DC on-hand at the end of the previous DC order cycle period.