## 4 Illustrative Example  
In this section, an illustrative example is described. We consider the application of a DEH algorithm to a shuttle-lift-crane based automated storage and retrieval system (SLC-AS/RS) [27]. The SLC-AS/RS is an automated warehouse frequently used in the steel industry, where it is generally dedicated to billets or metal bar bundles storage. The storage and retrieval operations involve three different types of machines: shuttles, lifts, and cranes. Each machine is autonomous, but it has to cooperate with other machines. Because of this requirement, the system is characterized by a high degree of synchronization in the tasks of the machines. An accurate description of an SLC-AS/RS is provided in [PERSON] et al. [28], [PERSON] et al. [29] and [PERSON] [27], who provide a good description of the system elements (Figure 5). Figure 4: Flow-chart illustrating the DEH concept. The optimization of the SLC-AS/RS productivity involves several decisions and many different aspects. On the one hand, the entering material must be assigned to a storage location that can host it, and the assignment to a specific storage location causes certain machines to be involved. On the other hand, customers' orders are characterized by three elements: the product required, the quantity required--expressed in kilograms--and the minimum quality level required. According to these three characteristics, the system has to define which items in stock are retrieved to fulfill each customer order. Retrieving one item instead of another might have a significant impact on the operations schedule. The optimization of a system like this requires two different components: (i) a discrete event simulation process to correctly reproduce the system behavior, including all synchronizations and machines interoperability; and (ii) a heuristic optimization component able to take all the above-mentioned decisions by providing a high-quality solution in a short computational time. In this way, the DES component can be used to evaluate the effects of the decisions made by the heuristic procedure, and the heuristic component can use the DES response to make its next decisions. In order to provide an illustrative example, the heuristic component is simply a greedy approach that emulates the 'common sense' decisions an expert manager would make. The greedy approach is then enhanced with a biased randomization behavior in order to generate a different solution at each iteration, thus allowing exploring the solution space to escape from local optima. A simplified pseudo-code of the proposed solution is illustrated in Algorithm 1. ```
bestSol \(\leftarrow\) heuristic0 bestMakespan \(\leftarrow\) simulation(bestSol) while availableComputationalTime > 0 do newSol \(\leftarrow\) heuristic0 newMakespan \(\leftarrow\) simulation(newSol) ifnewMakespan \(<\) bestMakespan then bestSol \(\leftarrow\) newSol bestMakespan \(\leftarrow\) newMakespan endif endwhile
```  
**Algorithm 1** The proposed solution approach based on the DEH  
Figure 5: Schematic representation of SLC-AS/RS elements. It is important to point out that using the DES provides the framework with many further benefits in terms of flexibility and simplicity. First, it would be possible to consider aspects that are typical in a real-world scenario (e.g., machine downtimes and failures). Secondly, the DES could be extended into a simheuristic approach through the introduction of stochastic operations with only slight changes in the overall framework. Finally, the simulation may provide additional information to define if a solution is better than another, such as the overall machine waiting time, the length of queues, etc. In Figure 6, the results of the BR-DEH algorithm are compared to the ones provided by a simple greedy heuristic. The results are expressed in terms of the makespan needed to carry out 20 storage and retrieval requests (hence, lower is better).