## 2 Methods and Modeling  
In this paper, the design of the distribution network includes three levels in which the first level is allocated to suppliers, the second level to cross-docks, and the third level to factories. In this system, there are several suppliers that transfer different raw materials to several cross-docks. Each channel is allocated to a cross-dock for a special product. Then, these materials are transferred to factories in the least possible time. The entrance rate of items from supplier to cross-docks is probable and follows a general probability distribution. On the other hand, item startup and delivery within cross-docks are also probable and follow a general probability distribution. Service time in each warehouse depends on the number of existing doors; therefore, we can model each warehouse in the form of a G/G/m queue system where \(m\) stands for the number of doors (Figure 1). The first level includes several suppliers and each supplier tries to meet distribution network requirements by offering various products. * Suppliers' locations are not predetermined and their final location is selected from among several potential locations. * The manufactured items by suppliers are transferred to the warehouse by different transportation vehicles. * This level includes costs related to suppliers and items transferred from suppliers to warehouses. * The second level includes cross-docks or distribution centers. Figure 1: Three-level structure in the supply chain. * Warehouse locations are not determined in advance and are chosen from among several potential locations. * There are several servers in each warehouse in charge of receiving, packaging, and sending items. * Warehouses are of cross-dock type and items are sent as soon as they are packaged. Hence, storage costs are neglected. * Location costs are fixed and unique and determined based on warehouse location. * The third level includes a factory which is in charge of producing the final product. * Factory location is not predetermined and the final location is selected from among several potential locations. Regarding examined features in the desirable distribution network, decisions are made as follows:  
Location decisions  
* Which potential suppliers should be established so that related costs are minimized? * Which potential warehouses should be established so that related costs are minimized? * Which potential factories should be established so that related costs are minimized? * Allocation decisions
* Which active suppliers should be chosen by warehouses for supplying their desired products so that total cost is minimized? * Which active warehouses should be chosen by factories for supplying their desired products so that total cost is minimized? * Which transportation vehicle should be selected for transferring products between suppliers and warehouses? * Which transportation vehicle should be selected for transferring products between warehouses and factories? Related decisions to warehouse planning  
How many servers should exist in each established warehouse to respond to product transfer and packaging so that costs are minimized? The proposed model assumptions are as follows:  
* The discharging process for input vehicles follows first in first out. It means that the first input vehicle that enters the cross-docks area is allocated to a free entrance door if there is any; otherwise, it will wait in the area. * Door capacities are the same in each warehouse. * Input and output trucks are not allowed to exit the warehouse and interrupt their respective services until the discharging and loading processes are over. * Servicing time (load discharging) in each door is probable and follows a general probability distribution. * Warehouses and factories are capacitated. Decision-making variables are as follows in term of concept:  
1. Supplier locations
2. Cross-dock locations
3. Factory locations
4. Allocating suppliers to warehouses
5. Allocating warehouses to factories
6.