## 3 State of the Problem
### Time Window Approach  
In the first stage, the required AGV number was computed for each AGV circuit combination assigned to every parking station by the time window approach. The time windows are from the beginning of the allowable service time (a) to the end of the allowable service time (b) for each order. Each order should be fulfilled within these time intervals. The parameters and notations used in this problem and their explanations are given in Table 1.  
\begin{table}
\begin{tabular}{c l} \hline \hline
**Notations** & **Explanations** \\ \hline \(l\) & Set of Parking Stations \\ \hline \(S\) & Set of AGV circuits that reflect the type of part carried by the AGV \\ \hline \(J\) & Set of AGV circuit combinations \\ \hline \(B\) & Total AGV circuits in a single parking station \\ \hline \(O\) & Set of transportation orders \\ \hline \(L\) & Time within which the new delivery should arrive at the consumption station \\ \hline \(a_{o}\) & Beginning of the allowable service time o \(\in\) O \\ \hline \(b_{o}\) & End of the allowable service time o \(\in\) O \\ \hline \(K\) & Set of AGVs \\ \hline \(t_{s}\) & Time required to finish a tour depending on the AGV circuit s \(\in\) S \\ \hline \(f_{dk}\) & The time of assignment of the AGV k to order \(o\in K;o\in O\) \\ \hline \(\epsilon_{sk}\) & Release time of AGV k is in order o; currently, AGV k is ready at the parking station \(k\in K;o\in O\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: The parameters and notations of the problem.  
Figure 2: AGV multi-circuit illustration.  
\[a_{o}\leq f_{ok}\leq b_{o}\ \ \forall o\in O\ ;\ \forall k\in K \tag{1}\]  
\[e_{ok}=f_{ok}+t_{s}\ \forall o\in O;\ \forall k\in K;\ \forall s\in S \tag{2}\]  
An AGV cannot deliver the parts before the beginning and after the end of the allowable service time. (1) The release time of AGV \(k\) is calculated by adding an assignment of time to the time required to finish a tour. (2) The first order (\(O=1\)) is realized with the first AGV (\(k=1\)). If the above constraints are not satisfied with the current number of AGVs, the required number of AGVs is increased by 1, otherwise \(k\) remains constant. This approach can easily produce a solution for low order numbers and AGV circuit combinations, but if the complexity of the system increases, it needs to be solved with an algorithm, since the number of calculations increases exponentially with the number of AGV circuits. The algorithm first checks the AGV transfer order. If the AGV request is associated with this AGV circuit combination, the request is assigned to the first AGV (\(k=1\)) and the release time of the AGV is calculated. When a new request arrives, the algorithm checks if there is an idle AGV. If there is an AGV available, this AGV is assigned to the new order; however, if an AGV is not available, an additional AGV is added to the system to meet the new request. This algorithm was run on Matlab R17 for all AGV line combinations and all parking stations [46]. The pseudocode for this algorithm is shown in Algorithm 1.  
```
1 Initialize
2 WHILE stop condition not fulfilled DO
3 Begin
4 FOR parking station: =1 TO \(I\)DO
5 FOR station combination: = 1 TO \(B\)DO
6 Assigned = 0
7 Used = 0
8 FOR order: =1 TO \(O\)DO
9 FOR station combination index: =1 TO \(S\)DO
10 IF order station == station combination index THEN
11 Find min agv release time, define as miniay and agv row as mininindex agv
12 IF miniay < \(a_{i}\)THEN
13 Assigned = miniindex agv
14\(f_{ok}=a_{j}\)
15\(e_{ok}=f_{ok}+t_{s}\)
16 Else IF \(a_{j}\)< miniay < \(b_{j}\)THEN
17\(f_{ok}=\miniay\)
18\(e_{ok}=f_{ok}+t_{s}\)
19 Else IF \(b_{j}\)< miniay THEN
20 Used = Used + 1
21 Assigned = Used
22\(f_{ok}=a_{j}\)
23\(e_{ok}=f_{ok}+t_{s}\)Set of combinations for the sth AGV circuit sIS
24 END
25 END
26 Usedagv(parking station, station combination) = Used
27 END
28 END
29 END
30
312 END
```  
**Algorithm 1**Compute the required number of AGVs for each station combinations and each parking stations