# Addressing the Algorithm Selection Problem through an Attention-Based Meta-Learner Approach
## 3 Solution Model
### Dataset  
We used the VRPTW instances from the Solomon benchmark [43] (composed of problems with 25, 50, and 100 customers) to generate a dataset to test the proposed mechanism for learning the performance mapping between problem instances and the algorithm space. The generated dataset comprises 26 features that characterize each VRPTW instance and a target corresponding to one of the three algorithms that, on average, solved a particular instance at the lowest cost. Subsequently, we used the three algorithms to solve each VRPTW instance to define the specific configuration that best solved each one. Figure 1 presents a kernel density plot that compares the distributions of the resulting best cost solutions for the three problem sizes in the Solomon benchmark. The plot shows that although there is an overlap in the cost of the solutions across the problem sizes, the cost of the solutions generally increases with the problem size. The distribution of solutions for larger problem sizes is shifted to the right, indicating that the solutions are generally more expensive. This trend is consistent with the intuition that larger problems are more complex than smaller ones and require more resources to solve, which leads to higher costs. It is worth noting that the kernel density plot provides a probabilistic representation of the distribution of the solutions rather than a point estimate of the mean or median solution cost. Therefore, while the trend of increasing cost with problem size is evident in the plot, the exact magnitude of the increase and the shape of the distribution could be better understood by calculating summary statistics such as the mean and standard deviation. However, since the VRPTW is only the application problem and not the focus of this research, we do not show these values. As mentioned, each of the three algorithms employed in this work corresponds to an instance of SA and they differ only by their neighborhood operators, for which three different heuristics were used: intraroute 2-opt, intraroute Or-opt, and GENI exchange. Such heuristics are briefly described below and exemplified in Figure 2. Other than that, the three algorithms share the same values for the remaining hyperparameters, such as initial temperature (\(T_{max}=35\)), final temperature (\(T_{min}=0.1\)), cooling rate (\(\alpha=0.95\)), and the number of iterations at a given temperature (\(k=50\)). **Intraroute 2-opt** reverses the order of the customers inside a segment of a randomly selected route. Figure 2a illustrates the behavior of intraroute 2-opt. In the example, a randomly selected segment from the original route \(D-1-\mathbf{3}-\mathbf{2}-4-D\) was reversed from \(3-2\) to \(2-3\), which resulted in the updated route \(D-1-\mathbf{2}-\mathbf{3}-4-D\). **Intraroute Or-opt** moves a random segment of customers from a random route to another random position within the same route. This heuristic is exemplified in Figure 2b; in this case, the randomly selected segment was \(2-3\) and was moved from the last position before returning to the depot at the second position right after visiting customer 1, effectively modifying the original route from \(D-1-4-5-\mathbf{2}-\mathbf{3}-D\) to \(D-1-\mathbf{2}-\mathbf{3}-4-5-D\). **GENI exchange** randomly selects two routes and inserts a randomly selected customer from the first route into a position between two random customers from a different random segment within the second route. GENI exchange is shown in Figure 2c where customer 8 was randomly selected from route \(1\)\(D-1-2-3-\mathbf{8}-D\), and was reduced to \(D-1-2-3-D\) after removing it from the route. In the case of route \(2\)\(D-9-6-5-7-4-D\), it was updated by selecting a random position in which customer 8 from route 1 was inserted. In this case, customer 8 was inserted between segment \(9-7\), resulting in a new segment \(9-8-7\) and yielding the final extended route 2 as \(D-9-\mathbf{8}-7-6-5-4-D\).