## 3 Methods
### Algorithms Implemented  
To calculate the shortest path between the selected points, the Dijkstra algorithm was employed as it is the most widely used pathfinding algorithm. It solves the single-source shortest-paths problem on a weighted graph \(G=(V,E)\) for the case in which all edge weights are nonnegative [14]. However, since the application allows users to add additional points to the path, the algorithm had to be adapted to handle all possible scenarios. [PERSON]'s  
Figure 2: The main page of the application.  
algorithm is designed to compute the shortest distance between two points, but it does not account for situations where points need to be avoided or added as waypoints, requiring additional code modifications. In Neo4j, the Graph Data Science plugin [15] offers a built-in implementation of Dijkstra, which was used to simplify the query. For SQL Server, the algorithm had to be manually implemented.  
In cases where there are no intermediate points, the Dijkstra algorithm can be executed without any additional modifications, as illustrated in the pseudocode in Algorithm 1. Virtual graphs or tables were utilized in this scenario because they are easier to manage and do not impact the original database or its performance. If the user wishes to avoid certain points, these can simply be excluded when constructing the virtual graph or table.  
```
1:Input: start the starting point, finish the finish point, noStairs the \"NoStairs\" filter, avoidedPoints the vector of avoided points
2:Output: Path and Weight
3:if (a complete map or one with only the noStairs filter applied is used) then
4:if (virtual graph/temporary table does not exist) then //Check if the virtual graph/temporary table already exists in memory
5: Create the corresponding one
6:endif
7:else //There are avoided points
8: Create virtual graph/temporary table that excludes the avoided points
9:endif
10:[tr, weight] = Apply Dijkstra
11:Path = tr
12:Weight = weight
```  
**Algorithm 1** Path finding without intermediate points  
When intermediate points are involved, the pathfinding algorithm must be executed multiple times. First, the shortest path between the intermediate points must be determined. To increase the complexity, we assumed that the order of visiting the intermediate points does not matter. This means all possible paths connecting the start, intermediate points, and the destination must be calculated and compared to identify the shortest one. The corresponding pseudocode is shown in Algorithm 2.  
```
1:Input: start the starting point, finish the finish point, noStairs the \"NoStairs\" filter, avoidedPoints the vector of avoided points, interPoints the vector of intermediate points
2:Output: Path and Weight
3:if (a complete map or one with only the noStairs filter applied is used) then
4:if (virtual graph/temporary table does not exist) then //Check if the virtual graph/temporary table already exists in memory
5:Create the corresponding one
6:endif
7:else //There are avoided points
8:Create virtual graph/temporary table that excludes the avoided points
9:endif
10:if (there are no intermediate points) then
11: Apply Dijkstra
12: Extract Result
13:end
```  
**Algorithm 2** Path finding with intermediate points