## 4 Results
### Temporary DistMx Calculation  
The Authors observed that acquiring distance values from the OSRM website is possible, however, it may take a long time. In the case of sending individual inquiries, the time to complete the distance matrix was a few hours for N = 203 points. In the case of sending aggregated questions, it was possible to shorten this time to about tens of minutes. In unfavorable connectivity or problems with the service overflow, this time may be extended to unacceptable values (hours or more). Therefore, an alternative method of generating temporary values has been proposed. In the absence of current values obtained from the OSRR website, the distance can firstly be estimated based on the quasi-Euclidean metric. The following formula can be used to find the shortest distance (_DistEucl_) between two points located on a sphere with radius \(R\). \[DistEucl=2\cdot R\cdot arcsin\left(\sqrt{sin^{2}\left(\frac{\varphi 1-\varphi 2}{2} \right)+cos(\varphi 1)\cdot cos(\varphi 2)\cdot sin^{2}\left(\frac{\lambda 1- \lambda 2}{2}\right)}\right) \tag{1}\]  
where  
\(\varphi 1\), \(\varphi 2\) are the latitude of point 1 and 2, respectively; \(\lambda 1\), \(\lambda 2\) are the longitude of point 1 and 2, respectively; and \(R\) is the Earth's radius (6371 km)  
The distance determined from relation (1) is usually underestimated as the routes connecting two points are generally not a straight line. The relative underestimation error is derived from the simple Formula:  
\[Err=\frac{DistOSRM-DistEucl}{DistEucl} \tag{2}\]  
where  
\(d_{OSRM}\) is the actual distance obtained from the OSRM service, and \(d_{nav}\) is the theoretical distance calculated from the dependence (1). As both _DistEucl_ and _DistOSMR_ matrices are known, the dependence of the error value on the actual distance value was investigated. The analysis shows that for short distances (<3 km), the error value (underestimation level) may be significantly higher than for the entire sample. Therefore, the data set was segmented concerning the distance value, and for each segment, the average error value was determined with the 95% confidence interval (Figure 3). The preliminary analyzes show that for ultra-short distances (below 3 km), the theoretical value of the distance should be corrected (increased) by a factor as high as \(\sim\)0.7. For longer distances (3-6 km), the correction factor can be estimated at the level of \(\sim\)0.35, and for the remaining distances at the level of \(\sim\)0.28. Figure 2: Location of destinations in geographical coordinates. Obtaining more correct values of the distance matrix can be achieved by designating an appropriate scaling function. This function can be an approximation of a _DistOSRM_ = f(_DistEucl_) relation. On the other hand, it may be more advantageous to find a function that approximates the error value (2) dependence on the distance (1). In such a case, the general form of the function may be as follows:  
\[Err(DistEucl)=a.\epsilon^{b.DistEucl}+c \tag{3}\]  
In these considerations, the authors decided to approximate the error value using the Formula (3). The \(a\), \(b\), and \(c\) coefficients were determined by minimizing the mean square error (MSE). Optimization calculations were made using the non-linear generalized reduced gradient method [55], implemented in the Solver tool of Microsoft Excel software. For the data set the following coefficients were obtained: \(a\) = 0.766346, \(b\) = 1.25415 and \(c\) = 0.287121. Based on the dependence (3), the distribution of the correction coefficient as a function of the original value of the distance calculated from the dependence (1) was also determined. As a result of applying the dependencies (1) and (3), a distance matrix named _DistEuclCorr_ was calculated as follows. \[DistEuclCorr[i,j]=\left\{ \begin{array}{cc}0&if\ DistEucl[i,j]=0\\ &(Correction(DistEucl[i,j])\cdot DistEucl[i,j])\ \ otherwise\end{array} \right.