# On the Use of Learnheuristics in Vehicle Routing Optimization Problems with Dynamic Inputs
## 5 Computational Experiments
### Parameters of the Algorithm and the Tests  
Our methodology has a few parameters that need to be set before executing the algorithm. As in any other metaheuristic, the choice of these parameters could eventually affect the performance of our algorithm. First, the model for the BB has three parameters: the regression parameters \(\{\beta_{1},\beta_{2}\}\), and the error term \(\epsilon\) (see Equation (1)). Our approach to fix them consists in: (_i_) the BB should give corrections of reasonable order of magnitude; and (_ii_) this order of magnitude should be the same for all instances. Considering these two statements, the BB is modeled as:  
\[c_{ij}^{*}:=f\big{(}c_{ij},S\big{)}=c_{ij}\Bigg{(}1+\frac{Q_{i}^{k}}{C}-\frac{ 1}{2}+\epsilon\Bigg{)}, \tag{2}\]  
with \(C\) being the capacity of the vehicle. In this way, \(\{\beta_{1},\beta_{2}\}=\Big{\{}\frac{1}{C},-\frac{1}{2}\Big{\}}\). Let us consider the extreme cases:  
\[c_{ij}^{*}=\begin{cases}\big{(}\frac{3}{2}+\epsilon\big{)}c_{ij}&\text{if }Q_{i}^{k}=C,\\ \big{(}\frac{1}{2}+\epsilon\big{)}c_{ij}&\text{if }Q_{i}^{k}=0.\end{cases} \tag{3}\]  
With this model, the corrections are bounded to \(\Big{[}\frac{1}{2}+\epsilon,\,\frac{3}{2}+\epsilon\Big{]}\) times the average cost of the edge for all instances. The extreme cases here are reasonable as the corrections do not change the average cost drastically. Using the capacity of the vehicle as a parameter allows us to generalize the corrections for all the instances, thus avoiding possible difficulties in using a general model for any type of problem configuration. The error term \(\epsilon\) is set in a range \(\big{[}-10^{-3},\,10^{-3}\big{]}\), which is about two orders of magnitude smaller than the order of the corrections. As discussed in [41], one effective way to transform a deterministic heuristic into a biased-randomized algorithm is by using a geometric probability distribution. This allows for assigning, during the solution-constructionprocess, higher probabilities of being selected to those movements that are more promising according to the heuristic criterion. The geometric distribution has only one parameter \(p\in(0,1)\). Values of \(p\) closer to 1 reproduce the greedy behavior of the original heuristic, while values of \(p\) closer to 0 represent a uniform selection of candidates, which ignores the logic behind the heuristic. Values in between these extremes allow for considering this logic while, at the same time, do not follow a greedy deterministic behavior. After some initial tests, we noticed that the BR-CWS probabilistic algorithm was able to provide high-quality solutions when using values of \(p\) inside the interval \((0.1,0.3)\).  
In the iterative procedure, there is a lot of data generated by the BB. There is no need to use all of it to compute a predictive model that estimates, in an accurate way, the BB. In the preliminary tests we realized, it was observed that only around 500 instances of data were needed to build an accurate model. In this way, the computational time is reduced by not updating the predictive model at every iteration of the algorithm.  
As is usual in the literature, the algorithm has been executed several times for each approach, each time with a different seed for the pseudo-random number generator. The same 30 seeds have been employed for both approaches. Only the best solutions have been stored. This reduces the options of obtaining a poor solution due to the effect of the seed [43].