## 4 Results
### Influence of Distance Matrix Upload on Optimizer Cost Reduction  
One of the best methods of estimating the effectiveness of an optimizer is to compare the returned solutions with the solutions proposed by experienced planners. As mentioned in Section 3, both the order parameters (the size of requests, types and load capacity of vehicles, the location of destinations) and the proposed \"manual\" solution, including route sequences, were known. Thanks to this, it was possible to calculate the actual distance (_RealDist_) as the resulting cost function. This value was a reference to the values obtained in the optimizer (_OutCost_). Both the _RealDist_ and _OutCost_ values depend on the form of the assumed distance matrix. The open question is how the optimizer cost reduction (_Gain_) depends on the state of the matrix used. This parameter can be defined by Formula (5). \[Gain\left[\%\right]=\frac{RealDist-OutCost}{RealDist}\times 100 \tag{5}\]  
Using the optimization algorithms described in Section 3, _OutCost_ values were obtained for all free algorithm variants: Greedy, Simple RandSwap, and Wise RandSwap. In the RandSwap stage, the five attempts with 100,000 iterations were calculated due to its stochastic feature, and arithmetic mean value was reported. The best variant, as expected, was the Wise Rand Swap algorithm. Figure 4 compares the cost values (route distance) obtained for the two proposed forms of the used distance matrix. Although the average distance values in _DistEuclCorr_ were slightly higher than _DistOSMR_ (\(\sim\)0.5%), the actual distance (cost) calculated based on the result sequences was higher (by \(\sim\)2.2%) for the case of using the temporary matrix. This result may be due to the fact that the proposed routes do not contain the hops corresponding to the most significant values in the distance matrix. For the temporary distance matrix (_DistEuclCorr_), greedy optimization results in negative efficiency. It is then improved in the RandSwap stage. However, in the case of using actual distances obtained from the OSRM (_DistOSRM_) service, the \"greedy\" stage is characterized by positive cost reduction. The observation shows how important the actuality of the distance matrix is from the point of view of the optimizer's effectiveness. Assuming the theoretical values based on ha  
Figure 4: Optimizer effectivity vs. type of distance matrix. the greedy algorithm is not sufficiently effective (_Gain_ = \(-1.37\%\)) in the process of planning deliveries. Meanwhile, substituting actual values contradicts previous observations. The order of updating individual elements of the distance matrix is another aspect worth analyzing. As mentioned, it may take several hours to get all the actual distance values. Communication interruptions and service loads must be taken into account. For this reason, it is advisable to update the _DistEuclCorr_ matrix values successively. The analysis of the resulting sequence of the optimization algorithm allowed us to make the following observations. First, the maximum value of a single distance (hop) is comparable to half of the maximum value in the distance matrix. It means that larger values do not need to be updated urgently. It was estimated that such values constitute \(\sim\)10% of all matrix elements. Moreover, approx. 60% of the appeals used in the case of distances shorter than 20 km. For this reason, it makes sense to update the short distances first. They are, firstly, more often used in the optimizer, and secondly, the relative error value is more significant for smaller distance values. According to the assumptions, more in-depth analyses were carried out by examining the impact of the update level (in %) on cost reduction. A total of 20 different partially-updated \"mixed-matrices\" were generated, divided into two series. In the first series, matrices data was uploaded starting from the lowest distance values and the second starting from the highest ones, respectively. It started from 0% (_DistEuclCorr_) and increased by 10% up to 100% (_DistOSRM_).