## 2 Methods and Modeling
### Genetic Algorithm  
The genetic algorithm uses a two-phase mechanism to define the solution. In the first phase, solutions are generated as coded items, and then, in the second phase, the coded solutions are decoded and show decision-making variable values as the result. Chromosome encryption and decryption methods for the proposed problem, which includes 8 potential distribution centers, 6 potential cross-docks, 5 potential factories, and 10 vehicle types are as follows: The first section shows the location of the suppliers. This section consists of a 1*P vector, where P is the maximum number of allowed suppliers. All of the vector digits are in (0, 1) intervals. To encrypt data, first, all of the numbers are multiplied by the potential number of suppliers and rounded up, and locations 5, 6, and 7 are selected to place the supplier. To determine which location is finally selected to place the supplier, the second section of the encrypted chromosome is multiplied by the number of potential nodes, and locations 5 and 6 are selected for the placing supplier. The third section determines the appropriate vehicles for good transferring from suppliers to cross-docks. This part includes a 1*P vector, where P is the maximum number of vehicles and all of the numbers are between 0 and 1. To decrypt the numbers, at first, all of the numbers are multiplied by the maximum number of transportation vehicles and rounded upwardly, and vehicles 4, 2, and 6 are selected to transfer materials from suppliers to cross-docks.  
The fourth section represents appropriate places for locating cross-docks. This part includes a 1*P vector, where P is the maximum number of allowed cross-docks and all of the numbers are between 0 and 1. To decrypt numbers, at first, all of the numbers are multiplied by the maximum number of cross-docks and rounded upwardly, and then, vehicles 1, 4, and 8 are selected to transfer materials from cross-docks to factories. The seventh section, which represents factory locations consists of 1*P vector, where P is the maximum number of allowed cross-docks and all of the numbers are between 0 and 1. To decrypt numbers, at first, all of the numbers are multiplied by the number of potential factories and rounded upwardly, and then, factories are located in 3, 6, and 5. To determine which location is finally chosen for placing suppliers, the eighth section of the chromosome is multiplied by the number of potential points, and the supplier is located in places 3 and 4. To determine which goods (1) from which supplier and with which vehicle and (2) from which cross-dock to which factory and with which vehicle should be transferred, the obtained results by previous phases are placed in a separate matrix as Table 4. Regarding the first column, products are transferred from supplier 5, by vehicle 4 to cross-dock 3, and then, by vehicle 8 from cross-dock 3 to factory 4.  
The ninth section determines each cross-dock server. This section consists of a 1*P vector, where P is the number of potential cross-docks and acquires one of the values from 0 to 1. To decrypt numbers, all of them are multiplied by the maximum number of servers and rounded upwardly, and then, 1, 2, and 5 servers are located in cross-docks. In the next step, the selection of the parent population that is affected by crossover and mutation operators is performed based on a crowded tournament selection operator. In mutation, each person's chromosome is changed individually and without any need to be merged with another person's chromosome based on probability rules. In this paper, we use the number of generations as the break condition, and its size is determined by parameter tuning based on [PERSON] et al. (2016).