In this sub-section, the solutions to the three challenges that OPTORER faced are presented in detail.
3.1.1. Indoor Location and Positioning
OPTORER delivers a novel routing and exploration service that combines indoor and outdoor exploration in a single combined tour. While for the outdoors routing, the use of GPS has been recognized as the go-to solution, things are not so straightforward regarding indoors technology, where the solutions are under research and receive continuous updates.
Some of the more commonly used techniques for indoors location include:
- ▪
Wi-Fi fingerprinting
- ▪
Inertial Navigation
- ▪
Bluetooth Low Energy (BLE) beacons
- ▪
Visual-based Navigation
- ▪
Magnetic Field-based Navigation
For the most part, the above methods are quite different from each other, as they use completely different equipment as well as a wide class of algorithms to place an object/user in an interior space.
In [
12], the authors examine the use of metrics such as Wi-Fi Received Signal Strength Indication, Wi-Fi Round Trip Time and visible signs, which are processed by trilateration, Fingerprinting with Neural Networks and Fingerprinting with Nearest Neighbor algorithm. Of the algorithms, the neural networks and Nearest Neighbor methods yielded maximum accuracy, with a small difference between them. Trilateration yielded an order of magnitude worse accuracy. A more detailed study on the trilateration method was produced in [
13]. In this study, the authors describe the method of trilateration in detail. Next, they describe an experimental setup with three BLE transmitters in a room 9.0m long and 10.2m wide. Using a mobile device, they measured the error of the method at 163 points in the room. Their measurements were made with sample sizes of 1, 5, and 10 replicates and produced errors with means of 39.06m, 8.96m, and 7.97m and medians of 8.04, 5.54m, and 4.23m, respectively.
On the other hand, Bluetooth Low Energy (BLE) is a communication protocol for Wireless Personal Area Network technology, developed by the Bluetooth Special Interest Group (SIG). BLE, known as Bluetooth Smart, is part of the Bluetooth 4.0 standard, however, it has several additional functions compared to classic Bluetooth.
Indoor navigation using BLE radio beacons is an active area of research and development and is constantly evolving. BLE beacons are small battery-powered devices that transmit signals that can be received by mobile devices and have been used in a variety of applications, including indoor navigation.
Some of the current approaches to indoor navigation using BLE beacons include:
- o
Fingerprinting [14]: This method involves creating a database of signal fingerprints at known locations within a building and by using these fingerprints to estimate a user's location based on signals received from nearby radio beacons. This approach has proven efficient in many indoor environments, but can be computationally demanding, requiring frequent updates as the environment changes.
- o
Trilateration [
15,
16]: This method involves using the signals from at least three radio beacons to triangulate a user's location. Free Space Path Loss (FSPL) formula is a popular method to be combined with trilateration since it converts the Received Signal Strength Indices (RSSI) to beaccon distance and then use this as input to the trilateration process to convdert distances from known beacon location to coordinates. This approach is less computationally demanding than signal fingerprinting, but may be less accurate in environments with obstacles or other sources of interference.
- o
Machine learning [
17,
18]: This approach involves training machine learning algorithms to recognize patterns in signal data and use these patterns to estimate a user's location. This approach has the potential to be highly accurate and adaptable to changing environments, but requires large amounts of training data and can be sensitive to changes in the signal environment.
In summary, any approach to the indoor location problem must balance between accuracy and ease of implementation. At one end, there is the conventional solution of trilateration, which for two dimensions needs three transmitters and their coordinates. At the other extreme is the use of Fingerprinting, which requires a significant time investment to produce the measurements. In the case of data processing using neural networks, significant computing resources are also needed for their training.
A middle ground is demanded for OPTORER, as some solutions do not provide enough accuracy to be useful, while others are extremely difficult to implement in the real world, as the required measurements are extremely time-consuming and any change in the layout of the space requires repeating them from of zero.
The solution in OPTORER: In order to identify the optimal technique for OPTORER, a solution thath balances between accuracy and feasbility is followed, the One Dimensional Fingerprinting (1FDP). Measurements that were conducted at the University of West Attica's Ancient Olive Grove Campus, Hall ZA216, a rectangular room measuring 8.1 over 8.02m with 3 beacons located in well-known positions have supported the efficient performance of the approach.
Details about the methodology of the proposed solution and evaluation results for the performance of 1FDP can be seen in [
19].
Finally, it should be noted that for this service to be available to the end-user, a set of actions from the owner of the indoor space should take place in advance. First, the mapping of the indoor space should be designed using the Cartographer tool. There, the initial decisions to be made are the marking of spaces and the identification/assignment of the type of each space. The floor plan of each space is recreated through the repeating process of spaces marking by defining their shape, and placing inside the space of the corresponding emitters. After this step, the connections between the rooms are defined (e.g., mark any corridor) and the points of interest are also defined. The file then is uploaded to the Information Backend (see
Figure 2) and is ready to be included in the design of a tour.
Figure 3.
Recreation of an indoors space using the Cartographer tool.
Figure 3.
Recreation of an indoors space using the Cartographer tool.
Another important step is the selection of the BLE beacons. The following two requirements exist for BLE beacons: The first is omnidirectional signal support and the second is iBeacon protocol support. Additionally, the high advertising frequency is important. The next step includes the actual placement of the beacons inside the room. The placement of the beacons does not have to be in the exact location defined by the generated map, but it is recommended to use a trial-and-error approach to find an optimal point that produces a uniform signal with the smallest possible standard deviation.
3.1.3. Dynamic Multi-Criteria Routing Optimization
Problem Statement: The user starts an external tour from a geographic start point (START) with final destination a geographic arrival point (END), following a route that passes through a set of geographic points of interest (PoIs) and possibly a set of service points (STOPs). The START and END points can be the same (in case the user returns to his base after the tour) or different, while POIs or STOPs can be added by the user dynamically during the tour or even being removed. The sequence of visiting PoIs (SEQ - Sequence) can be defined from the beginning (in the case that this serves a thematic tour), or free (NOSEQ - No Sequence). The user, depending on the Means of Transport (s)he uses or not (MoT – Means of Transport) is properly routed to his final destination (END) through the points (s)he wants to visit (PoIs, STOPs). The routes suggested to the user are selected based on criteria which indicatively may be either the shortest in terms of distance, or the shortest in terms of time, or those that enhance the user's experience or allow better accessibility based on their abilities. Events (EVENTs) during a tour can dynamically reshape routing, making paths prohibitive in order to either protect the user, or avoid their discomfort, or facilitate the community.
One of the PoIs that a user visits may be an indoor space, such as a museum as long as the space is equipped with the BLE infrastructure described above. This allows the OPTORER mobile application to locate the user within it, with the user's starting point being an internal PoI (ISTART – Internal Start) and destination internally to another, or the same point (IEND – Internal End) passing through a series of internal PoIs (IPOIs – Internal POIs) and possible internal stops where services are provided (ISTOPs – Internal STOPs). Corresponding to the outdoor tour, the indoor tour can follow a visiting sequence of IPOIs (ISEQ – Internal Sequence) or not (INOSEQ – Internal No Sequence), while an internal event (IEVENT – Internal Event), or an external event (EVENT), can dynamically configure internal routing. For example, an indoor fire will lead the user to the emergency exit, but so will an external event such as an earthquake.
The tour may be subject to time restrictions, either as a whole (TTIME – Total Time – time from the moment of starting to the final destination) or regarding the visit to an individual POI named X (VTIME(X) – Visit Time to POI X – time of visit to point X).
Optimization Problem: The optimization problem that was addressed in OPTORER, for each user navigating externally, is to find the optimal route based on the criteria and constraints to be set, starting from the starting point (START) and ending at the arrival point (END) by traversing a series of POIs and STOPs (service points), which can be dynamically configured by the user by adding new ones or removing already declared ones.
The available routes from one point (START, POI, STOP) to another point (POI, STOP, END) arise depending on the MoTs used or not by the user, as well as other restrictions that may have to be satisfied. The best possible of the routes, taking into account in the solution of the problem the set of individual routes, is selected based on the criteria set and is expressed by an objective mathematical function, the value of which must be optimal (minimum or maximum) for the selected total path among all possible paths. Indicatively, the objective function can express the total distance to be traveled, or the total time of the route, or the cost of the route, or some other metric that expresses the user's experience during the route, or even weighted combination of more criteria than those mentioned and/or others.
Constraints of the problem may include the visiting sequence (SEQ, ISEQ) of PoIs to be already predetermined. This can serve the purposes of a thematic tour, inside a predefined tour that the user chooses, and which can be dynamically configured. Of course, the user can also deny the provided sequence for visiting PoIs. Visiting PoIs in a predetermined order reduces the complexity of the optimization problem, since it significantly limits the number of available routes considered when selecting the optimal one.
Modeling the optimization problem: Multiple optimization problems have been extensively studied in the past in various versions, which are suitable and can be modeled accordingly to form relating optimization problems like the one considered here. The benefit of such an approach is that it leverages years of research and development to fully understand the complexity of the problem, as well as the behavior and requirements of various solutions, with the goal of deriving an optimal or near-optimal solution in a short time for “large” problems, where the set of possible solutions to be considered is too many.
A well-studied routing problem, which can be generalized and properly formulated to express the optimization problem under consideration, is the
Vehicle Routing Problem (VRP). VRP is defined as that set of problems in which fleets of trucks are deployed in one or more depots. These fleets are required to serve a number of customers in pre-defined geographic locations.
The goal of VRP is to determine the appropriate routes to serve customers, with the minimum cost [
25]. In classic VRP, each vehicle starts from a depot and returns to the same depot after uniquely visiting a set of customers assigned to it on its decided route. A wide range of variations of the problem have been studied in the literature. When considering one depot and one vehicle,
only then the problem is the same as the well-known TSP (Travelling Salesman Problem) [
26], which was essentially the primary problem studied and from which VRP arose.
VRP belongs to the class of those problems where the decision of the optimal solution is NP-hard [
27], since there is no algorithm of polynomial complexity to solve the problem. This translates that VRP, as well as the problem addressed in OPTORER, belongs to a class of problems where the size of the problems (equivalent input size, e.g. number of customers, trucks, depots in the VRP) that can be solved by mathematical methods, or combinatorial optimization, is limited. This is because of the computing power, and thus the time required to find an optimal solution, as the problem size grows becomes prohibitive (i.e., it exponentially increases with problem size). Therefore, finding a globally optimal solution is time-realistic only for small-scale problems. However, a series of heuristics and metaheuristics algorithms that have been developed aim to find a good enough solution close to the optimal solution (i.e., near optimal solution) if not the optimal solution, with an intelligent and non-exhaustive search for solutions in short times and for large problem sizes.
A
heuristic algorithm is essentially a technique designed to solve a problem faster, while a
meta-heuristic is a higher-level process or heuristic designed to find, generate, tune, or select a heuristic that can provide a reasonably good solution to an optimization problem. Popular heuristic/meta-heuristic algorithms are Tabu Search, Simulated Annealing and Genetic [
27]. Variations of the VRP problem arise by considering different constraints taken into account and involving information on the characteristics of customers, vehicles, routes, delivered products, and drivers, as well as by considering different optimization objectives expressed by the appropriate objective functions.
The mathematical formulation of the classical Capacitated Vehicle Routing Problem (CVRP) concerns a fleet of K identical vehicles (of the same capacity C) making deliveries to customers from a central depot. CVRP can be described as the following graph theoretic problem. Let G=(V,A) be a complete graph, where V={0,1,…,n} is the set of vertices and A is the set of edges. Nodes i=1,…,n correspond to the customers, while node 0 corresponds to the depot. A non-negative cost, cij, is associated with each arc (i,j)∈A and represents the travel cost spent to go from node i to node j. We consider a directed graph, therefore cij≠cji.
Each customer i (i=1,…,n) is associated with a known non-negative demand, di, to be delivered and the depot has a fictitious demand d0=0. Given a set of nodes S ⊆V, let denote the total demand of the subset of customers. From the vehicle routing problem, K vehicle routes should be generated, where each route will start and end at the depot and each vehicle will visit a subset of customers. Each vehicle will perform only one route, while all vehicles have the same capacity. Each customer must be visited by only one vehicle, while the total demands of customers visiting a vehicle on a route must not exceed its capacity. The specific routes will be chosen so as to minimize distribution costs.
Therefore, from the above results the mathematical formulation of the problem, as presented as an extension of the TSP problem formulation by Dantzig, Fulkerson and Johnson to create a two-index vehicle flow formulation in VRP:
In this formulation cij represents the cost of going from node i to node j, xij is a binary variable that has a value of 1 if the arc going from i to j is considered part of the solution and a value of 0 otherwise, K is the number of available vehicles and r(S) corresponds to the minimum number of vehicles required to serve (in terms of its demands) the set S. We also assume that 0 is the depot node.
Constraints 1.1 and 1.2 state that exactly one arc enters and exactly one exits each vertex associated with a customer, respectively. Constraints 1.3 and 1.4 say that the number of vehicles leaving the depot is the same as the number entering. Constraints 1.5 are Capacity-Cut Constraints (CCCs), which enforce that the routes must be connected and that the demand on each route must not exceed the vehicle's capacity. The capacity cut constraints remain correct if r(S) is replaced by the lower bound where C is the capacity of each vehicle and d(S) is the total customer demands. Finally, constraints 1.6 are the integrity constraints. In the formulation it has been assumed that the demands of any customer do not exceed the capacity of the vehicle.
The mathematical formulation of the problem has been used extensively to model the basic VRP (CVRP) and VRPB (VRP with Backhauls is an extension that includes both a set of customers to whom products are to be delivered, and a set of vendors whose goods need to be transported back to the distribution center). However, it is considered suitable for these simple problems. It can be used only when the cost of the solution can be expressed as the sum of the costs of the arcs. We also cannot know which vehicle crosses each arc. Therefore, we cannot use it for more complex models, where the cost or even the feasibility of the solution depends on the customer order, or the vehicles used.
We appropriately formulate the mathematical formulation of the classical VRP problem as we presented it, in order to express the case where we have a single vehicle that has the ability to meet the demands of all n customers, while it starts its route from a warehouse 0 and necessarily ends at a second warehouse n+1 optimally visiting all n customers/locations. Essentially in this version of the problem we are describing, the problem is that of the TSP traveling salesman, with the variation that he does not return to the point of departure but terminates the route at some other given point.
Figure 4 graphically illustrates the solution to the VRP variant we described without specifying the values of the problem parameters.
Figure 4.
Illustration of the solution of the variant of the classical VRP problem with one vehicle and different arrival warehouse.
Figure 4.
Illustration of the solution of the variant of the classical VRP problem with one vehicle and different arrival warehouse.
We set the number of available vehicles K=1, the minimum number of vehicles to serve customers' demands , the 2nd depot where the vehicle must end its route as depot n+1 and modify condition 1.2 to express that the vehicle will terminate at depot n+1 and not at depot 0 from which it departed.
This results in the following mathematical formulation expressing the variant of the classic VRP we described:
This variation of the classic VRP problem finds an exact correspondence with the optimization problem we are asked to address in OPTORER if we consider the departure depot as the START point (or ISTART internally), the route ending depot as the END point ((or IEND indoors) and customer locations as POIs or STOPs ((or IPOIs or ISTOPS internally). Figure 5 graphically illustrates the solution to an OPTORER service routing problem.
Figure 6.
Illustration of the solution of the variant of the classic VRP problem with one vehicle and a different arrival depot with a direct mapping to the optimization problem we are asked to solve in the OPTORER service.
Figure 6.
Illustration of the solution of the variant of the classic VRP problem with one vehicle and a different arrival depot with a direct mapping to the optimization problem we are asked to solve in the OPTORER service.
In the case that the sequence of visits is initially predetermined in whole or in part (e.g., the visit to POIx must be preceded by a visit to POIy), then the solution in whole or in part is known to the static problem. Thus, part of the solution as expressed by the parameters is known and is introduced as a constraint in the problem formulation by setting the parameter if the visit to node i must necessarily be followed by visiting node j.
Input to the problem should be the costs of the individual paths between all the nodes of the graph. Deriving the cost of a route from one node to another node depends on what it represents, as well as whether or not the means of transportation are used. Illustratively, the cost may express the distance (depending on the MoT) between the nodes and/or the travel time (depending on traffic or other factors) and/or the user experience (based on an assessment of inconvenience or pleasure in a nice ride).
The derivation of the cost and the selection of the individual path from one point to another is also a subproblem that must be solved before the optimization problem we are considering. Algorithms commonly used by services such as Google Maps to choose a suitable route on the map and based on other factors such as traffic are Dijkstra's [
29] and A* [
30] for finding the minimum path in a graph where the edges have weights.
The navigation of the user from one point to another on the path that has resulted from solving the optimization problem is a different function of the OPTORER system, however the navigation should be done on the individual path that has been chosen based on cost.
In OPTORER service, the problem is not considered as static but as dynamic, where visiting points can be changed along the route according to the traveler's desire, the MoT (e.g., a part of the route can be done by car and then the browser continues on foot), some event triggers a change to the route or changes the costs of specific routes, or the tour from an outdoor area is continued in an indoor area that supports the technology introduced by OPTORER. The obvious thing is that any change triggers the system to re-solve the problem with the entry of the new data. However, given the complexity of the problem, techniques to partially solve it are considered with the goal of near-real-time decision making.
Considering the OPTORER service optimization problem as a variant of the VRP problem, rather than a variant of the TSP problem, in the first place is a tactical choice, as future extensions of the service will be able to rely on an extension of the modeling and implementation to be done. Possible extensions include adopting time windows, supporting mass transit of travelers, controlling the attendance of travelers using the service at points of interest such as museums based on capacity, etc..
Optimization Engine Implementation: OptaPlanner [
31] is the choice for implementing the optimization engine of the OPTORER service. Apart from being a free software solution, OptaPlanner also provides excellent possibilities for solving optimization problems with heuristic algorithms (such as tabu search, simulated annealing), while enabling the solution to be easily integrated with a number of other modern technologies required to implement an optimization engine in the context of a high-scale service (e.g., openshift, quarkus, spring boot), while accepting input and providing output via APIs REST APIs in JSON format, which further facilitates its integration as a module of a system like OPTORER. In addition, it supports a number of techniques that facilitate solving dynamic problems in near real time (e.g., real time planning).
The process of solving a problem with OptaPlanner consists of modeling the problem as a set of classes, appropriately annotated based on their role (PlanningSolution, PlanningEntity etc.), defining constraints (as mandatory - Hard and flexible – Soft), the definition of the function to be optimized (score function as it is called), the selection and configuration of the algorithm that will solve the problem, the loading of the input data to the problem and finally the execution of its solution.
OptaPlanner integrates well, as demonstrated in various demo applications, with open-source routing engines such as GraphHopper [
32] (but also Google Maps), which is a map-optimized route engine using OpenStreetMap mapping [
33], which provides open mapping data. GraphHopper uses efficient algorithms to decide the route on a road network, such as Dijkstra and A* algorithm, and it can be configured and modified appropriately so that the individual route decision is according to the intended goals. Also, excellent integration has been demonstrated for visualization of results using Leaflet.js [
34] and also Google Maps. For our solution we adopt Timefold [
35] which is a latest different path to the implementation of Optaplanner with exceptional refined characteristics while we integrate it with Graphhopper.
Figure 7 illustrates an indicative tour on the map as a visual representation of the solution to an optimization problem we consider in OPTORER; the Start point is the first on the right on the map, the Arrival point is the last on the left on the map, the intermediate points are visited in a sequential manner as defined by the numbers that signify them).
Figure 7.
Indicative tour and road route.
Figure 7.
Indicative tour and road route.