## 3 The Proposed Solution Algorithms
### Ant Colony Optimization (ACO)  
ACO is an approximate optimization approach, proposed by [PERSON], [PERSON], and [PERSON] [54], that was inspired by the behavior of ants. Ants use pheromones for sharing information in order to reach food by using the shortest path. ACO has been successfully implemented to several combinatorial optimization problems, such as Travelling Salesman [55], vehicle routing [56], and scheduling problems [57].  
[PERSON] and et al. [42] proposed a mathematical model for integrated PDP and a solution algorithm using ant colony optimization. [PERSON] and et al. [43] developed a 0-1 integer mathematical model for PDP and ant colony optimization to solve the production part. [PERSON] and et al. [44] proposed an ant colony optimization approach for decentralized PDP.  
At the beginning of the ACO process, whole constants, variables (iteration limit, tolerance etc.), and weight matrix are defined. A weight matrix which will be updated according to the choices of ants and pheromone amounts is defined by the size of input variables (suppliers, plants, retailers, and warehouses).  
Iteration limits and ant population sizes are defined in compliance with the objective function type. The optimization process proceeds till the iteration limit is reached. Each step of the iteration begins with a transportation route determination. Routes are defined by the weight matrix in each step of the iteration. At the beginning of the process, first route is defined randomly because of equality of the weight matrix. The existing route is sent to GAMS solver module and the success rate or with another saying objective function fitness value (\(z_{j}\)) is calculated and saved. Calculated objective value is compared to the best fitness value. If a new fitness value is equal or better than the tolerance level, the pheromone amount (ph) is calculated and each active relation of the weight matrix is updated and rewarded using the calculated ph value. If the fitness value is worse than the tolerance level, the weight matrix is updated by using the calculated ph value and the selection probability of the existing route is decreased. If GAMS finds an infeasible solution, the optimization process carries on with previous objective function value (\(z_{j-1}\)). ACO process pseudo code for maximization problem is given in Table 1.  
\begin{table}
\begin{tabular}{|l|} \hline
**Cost Maximization Problem (Z1 NIS, Z2 PIS, Z3 PIS)** \\ Define iteration limit, objective tolerance, pheromone update constant (iter\_lim, tol, ph) \\ Define transportation path using same initializing values (iter\_lim/2) weight matrix for each set (UKSW, \\
**UKPW, UKWW)** \\ Create random initializing transportation path route randomly using weight matrix \\ Evaluate GAMS using existed route, calculate fitness and save \\ Initialize ant population (antpop) \\ for \(j=2\) iter\_lim \\ Create fabric-supplier binary relation matrix (UKS) \\ for \(i=1\): antpop \\ Create random route according to weight matrix (UKSW) \\ end \\ Create fabric-supplier binary relation matrix (UKP) \\ for \(i=1\): antpop \\ Create random route according to weight matrix (UKPW) \\ end \\ Create fabric-supplier binary relation matrix (UKW) \\ for \(i=1\): antpop \\ Create random route according to weight matrix (UKWW) \\ end \\ Evaluate existing route (transportation path) in GAMS (\(z_{j}\)) \\ Calculate pheromone values (ph) for each route \\ if \(z_{j}>\text{zbest}/\text{tol}\) \\ \(\text{ph}=z_{j}/\text{zbest}\) \\ else \\ \(\text{ph}=\text{zbest}/z_{i}\) \\ Update transportation path weight matrix for active node (UKSW, UKPW, UKWW) \\ end \\ \hline \end{tabular}
\end{table}
Table 1: Pseudo-code for ACO.