## 3 State of the Problem
### Mathematical Model and Optimization  
In this stage, mathematical-solution-based mixed integer programming provides the optimum solution. Linear programing consists of goals, constraints, and decision variables [14]. The model becomes mixed integer programing (MIP) if at least one decision variable is an integer [47]. The notation used in the proposed model is defined as follows:  
\(UP_{ij}\); Model binary decision variable is equal to 1 when parking station \(i\) and circuit combination j is assigned and 0 otherwise; \(i\in I\) and \(j\in J\)  
\(GP_{\bar{i}}\): The required number of AGVs for the combination of parking station \(i\) and AGV circuit \(j\in I\)\(\Omega\)s: Set of combinations for the sth AGV circuit \(s\in S\)  
The problem is formulated as follows,  
The goal is:  
\[Min\ Z=\sum_{j\ \in\ I}\ \sum_{i\ \in\ I}GP_{ij}UP_{ij} \tag{3}\]  
Subject to:  
\[\sum_{j\ \in\ \Omega_{i}}\ \sum_{i\ \in\ I}UP_{ij}=1\ \forall s\ \in\ S \tag{4}\]  
\[\sum_{j\ \in\ B}UP_{ij}=1\ \ \forall i\ \in\ I \tag{5}\]  
The objective function (3) minimizes the required number of AGVs. Constraint (4) ensures that each AGV circuit is assigned to one parking station. Similarly, constraint (5) ensures that each parking station is assigned to only one AGV circuit combination. In this model, the equation constraints increase exponentially with the increase in AGV circuits. This complexity renders the mathematical model unsuitable for complex problems, since the mathematical model cannot be used easily to solve large-sized complex problems. Therefore, heuristic algorithms were used to solve these kinds of problems. In this study, the genetic algorithm (GA) is used to handle these kinds of problems. The pseudocode of the GA is shown in Algorithm 2. The GA works with parameter codes called chromosomes and each chromosome is a solution candidate. All chromosomes are analyzed with the fitness function as it tries to find the optimal solution based on genetic operators and continues until the criteria are met [48; 49]. The pseudocode of the GA employed in the current study is presented in Algorithm 2. Each chromosome includes \(S\) genes. Genes reflect the parking stations to which the AGV circuits are assigned. In the initialization phase, each gene (AGV circuit) is assigned randomly across \(I\) (the set of parking stations). The single-point mutation method was adopted in the present study. A random number was calculated for each chromosome gene, and mutation was implemented when the mutation probability was greater than the random number. The mutation was low at Pm = 0.05, and the mutated gene increased or decreased by 1 when compared to the second calculated random number.  
```
1 Begin
2 Set iteration number
3 Initialize population
4 Evaluate population according to the fitness value
5 While stopping condition not fulfilled Do
6 Increase iteration number
7 Select parents from current population by roulette wheel selection and perform reproduction
8 Perform crossover operator to the randomly selected chromosomes
9 Generate new population
10 Evaluate population according to the fitness value
11 End
12 Return best fitness value and population
13 End
```  
**Algorithm 2**Compute Minimum Required Number of AGVs