• Nie Znaleziono Wyników

Index of /rozprawy2/10196

N/A
N/A
Protected

Academic year: 2021

Share "Index of /rozprawy2/10196"

Copied!
135
0
0

Pełen tekst

(1)AGH UNIVERSITY OF SCIENCE AND TECHNOLOGY Faculty of Electrical Engineering, Automatics, Computer Science and Electronics Department of Automatics. Artificial Intelligence Techniques in Real-Time Robust Route Planning Sebastian Ernst, M.Sc.. Ph.D. dissertation under the supervision of Prof. Antoni Ligęza, Ph.D.. Kraków, 2009.

(2) AKADEMIA GÓRNICZO-HUTNICZA IM. STANISŁAWA STASZICA W KRAKOWIE. Wydział Elektrotechniki, Automatyki, Informatyki i Elektroniki Katedra Automatyki. Metody sztucznej inteligencji dla planowania odpornych tras w czasie rzeczywistym mgr inż. Sebastian Ernst. Rozprawa doktorska przygotowana pod kierunkiem Prof. dr hab. inż. Antoniego Ligęzy. Kraków, 2009.

(3) Streszczenie Problem wytyczania trasy przejazdu jest praktycznym zagadnieniem, znajdującym zastosowanie od czasów pierwszych podróży dokonywanych przez człowieka. Przed epoką komputerów, do ręcznego rozwiązywania tego problemu służyły mapy; rozwiązania informatyczne pozwoliły na automatyzację tego procesu. Pierwotne aplikacje wspierające planowania trasy używane były przed rozpoczęciem podróży. Osiągnięcia ostatnich lat, dzięki rozwojowi technologii mobilnych i udostępnieniu systemu pozycjonowania GPS, pozwoliły na bardziej czynne wspieranie nawigacji. Urządzenia i aplikacje służące do tzw. nawigacji satelitarnej są szeroko dostępne i stały się bardzo popularne. Użyteczność takich urządzeń spada drastycznie gdy kierowca napotyka na przeszkodę w wykonaniu planu lub popełnia błąd. Dzieje się tak, gdyż aplikacje stosowane do nawigacji projektowane są jako systemy podejmujące decyzje, a nie jako systemy wspierające podejmowanie decyzji przez kierowcę. Jest to uwarunkowane stosowaniem klasycznego podejścia do planowania trasy, polegającego na wytyczaniu ścieżki w grafie reprezentującym sieć dróg. W przypadku zaburzenia podczas wykonywania planu wytyczonego przez urządzenie, wymagane jest ponowne przeprowadzenie procedury wytyczania ścieżki dla nowych ograniczeń. Niestety, stosowane urządzenia posiadają ograniczoną moc obliczeniową. Dodatkowe utrudnienie stanowi fakt, że sygnał o zaburzenia dociera do urządzenia z opóźnieniem spowodowanym długim (1-2 sek.) okresem odnawiania informacji o położeniu i dużym błędem, którym jest ona obarczona. Aby wspomóc podejmowanie decyzji przez kierowcę i zapewnić mu wolny wybór spośród dostępnych opcji, wytyczanie trasy powinno przebiegać wielotorowo. Złożoność takiego problemu jest jednakże jeszcze większa niż złożoność problemu wytyczania ścieżki. Jest to widoczne szczególnie w przypadku wytyczania trasy w dużych miastach, o skomplikowanej strukturze sieci ulic – kierowca może wykorzystać obserwacje sytuacji drogowej i świadomie wybrać rozwiązanie alternatywne. Dostarczenie instrukcji do kierowcy podlega ograniczeniom czasu rzeczywistego – instrukcje dotyczące manewru na określonym skrzyżowaniu, a dostarczone po jego przejechaniu, stają się bezużyteczne. Charakterystyka ruchu ulicznego często nie pozwala przy tym na zatrzymanie się i poczekanie na zakończenie obliczeń. Niniejsza praca rozwiązuje problem efektywnego generowania, reprezentacji i wykonywania planów przejazdu w środowisku dynamicznym poprzez wprowadzenie paradygmatu odpornego planowania tras (ang. robust route planning ). Proponowane podejście pozwala na efektywne generowanie wielowariantowych planów a priori oraz elastyczną nawigację w trudnych do przewidzenia środowiskach. Wykorzystane zostały techniki sztucznej inteligencji, takie jak algorytmy wyszukiwania, kompilacja wiedzy i granularyzacja. Pozwoliło to na wytyczanie i reprezentację planów odpornych, przystosowanych do wykonania pod ograniczeniami czasu rzeczywistego..

(4) Acknowledgements The author would like to express his thanks and gratitude to Professor Antoni Ligęza for his support, advice and suggestions. The following people provided invaluable help and recommendations by reviewing preliminary versions of the manuscript: Stefan Ernst, Grzegorz J. Nalepa, Sławomir Nowaczyk, Marcin Szpyrka and Igor Wojnicki. This work is supported by the MNiSW research grant N N516 228635: “Metody sztucznej inteligencji dla planowania odpornych tras w czasie rzeczywistym” Praca naukowa finansowana ze środków na naukę w latach 2008-2009 jako projekt badawczy..

(5) Contents 1. Introduction 1.1. Route Planning: Theory and Tools 1.2. Contemporary Challenges: a Critical 1.3. Brief History of the Research . . . 1.4. Outline of the Thesis . . . . . . . .. . . . . . . Overview . . . . . . . . . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. . . . .. 2 3 4 8 10. 2. State-of-the-Art in Automated Route Planning and Motivation for the Research 2.1. Satellite Navigation: Practical Tools and Practical Problems . . . . . . 2.2. Motivation for the Research . . . . . . . . . . . . . . . . . . . . . . . 2.3. Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1. Path Search in Graphs . . . . . . . . . . . . . . . . . . . . . . 2.3.2. Characteristics of the Search Domain . . . . . . . . . . . . . . 2.3.3. Goals of the Research . . . . . . . . . . . . . . . . . . . . . . 2.4. Algorithms Used for Path Search in Graphs . . . . . . . . . . . . . . . 2.4.1. Uninformed Algorithms . . . . . . . . . . . . . . . . . . . . . 2.4.2. Artificial Intelligence Algorithms . . . . . . . . . . . . . . . . . 2.5. Thesis and Contributions of This Work . . . . . . . . . . . . . . . . .. 11 11 13 14 14 15 16 19 19 21 24. 3. Generation, Representation and Execution of Robust 3.1. Motivation: An Intuitive Example . . . . . . . . . . . 3.2. Related Work . . . . . . . . . . . . . . . . . . . . . . 3.3. Formal Framework for Robust Plan Generation . . . . 3.3.1. Linear Plans . . . . . . . . . . . . . . . . . . 3.3.2. Robust Plans . . . . . . . . . . . . . . . . . . 3.4. Knowledge Representation for Generic Robust Plans .. 26 26 30 32 41 41 43. i. Plans . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . .. . . . . . .. . . . . . .. . . . . . .. . . . . . ..

(6) Contents 3.5. Methodology for Generation of Generic Robust Plans . . . . . . . . . . 43 3.6. Execution and Evaluation of Robust Plans . . . . . . . . . . . . . . . 46 3.7. Limitations of Generic Robust Planning . . . . . . . . . . . . . . . . . 48 4. Knowledge Compilation for a Single Granule 4.1. Granules: Introduction and Motivation . . . . . . . . 4.2. Automated and User-Supported Definition of Granules 4.2.1. Map-Specific Methods . . . . . . . . . . . . . 4.2.2. Domain-Independent Methods . . . . . . . . . 4.3. Granule Knowledge Compilation . . . . . . . . . . . . 4.4. Model of Navigation Within a Granule . . . . . . . . 4.4.1. Granule Traversal . . . . . . . . . . . . . . . 4.4.2. Navigation to the Destination Node . . . . . .. . . . . . . . .. 50 50 53 57 59 62 62 63 63. 5. Robust Granular Planning 5.1. Multi-Granule Search Spaces . . . . . . . . . . . . . . . . . . . . . . 5.2. Granular Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3. Plan Generation and Navigation . . . . . . . . . . . . . . . . . . . . .. 69 69 71 75. 6. Experiments, Example Plans and Evaluation 6.1. Examples of Single Granules . . . . . . . . . . 6.1.1. Kraków – Półwsie Zwierzynieckie . . . 6.1.2. Kraków – Kazimierz . . . . . . . . . . 6.1.3. Kraków – Dębniki . . . . . . . . . . . 6.2. Real-Life Example of a Planning Domain . . . 6.3. Evaluation . . . . . . . . . . . . . . . . . . . 6.3.1. Granular Navigation . . . . . . . . . . 6.3.2. Reaction to Unforeseen Circumstances. . . . . . . . .. 76 76 77 78 79 80 80 81 82. . . . .. 94 94 95 95 101. 7. Implementation and Tools 7.1. Map Data Sources and Preparation . . . . . . 7.1.1. Data Exchange System Architecture . 7.1.2. Open Map Sources, Formats and Tools 7.1.3. Intermediate Map Data Storage . . . .. ii. . . . . . . . .. . . . .. . . . . . . . .. . . . .. . . . . . . . .. . . . .. . . . . . . . .. . . . .. . . . . . . . .. . . . . . . . .. . . . .. . . . . . . . .. . . . . . . . .. . . . .. . . . . . . . .. . . . . . . . .. . . . .. . . . . . . . .. . . . . . . . .. . . . .. . . . . . . . .. . . . . . . . .. . . . .. . . . . . . . .. . . . . . . . .. . . . .. . . . . . . . .. . . . . . . . .. . . . .. . . . . . . . .. . . . . . . . .. . . . ..

(7) Contents 7.1.4. Map Visualisation Solutions . . . . . . 7.2. Implemented Tools and Data Storage Facilities 7.2.1. Command-Line Tools . . . . . . . . . 7.2.2. RobustPlanner application . . . . . . . 7.2.3. Planning Engine . . . . . . . . . . . . 7.2.4. Database . . . . . . . . . . . . . . . . 7.2.5. Prolog Map Data Storage . . . . . . . 8. Concluding Remarks and Further 8.1. Summary of the Research . . . 8.2. Main Contribution of the Thesis 8.3. Directions for Future Work . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. 105 107 107 108 109 109 110. Research 111 . . . . . . . . . . . . . . . . . . . . . 111 . . . . . . . . . . . . . . . . . . . . . 112 . . . . . . . . . . . . . . . . . . . . . 113. A. Software Used for Modelling and Experiments. iii. 124.

(8) List of Figures 1.1. AutoRoute Express for DOS, one of the first commercially-available route planning programs. . . . . . . . . . . . . . . . . . . . . . . . . 1.2. A modern web-based route planner (http://maps.google.com). . . . . 1.3. A modern in-car satellite navigation device (http://www.tomtom.com). 1.4. The number of cars registered in Poland by year (http://pl.wikipedia.org).. 6 7 7 8. 2.1. Overview of the proposed architecture for the planning system. . . . . 18 2.2. The 8-puzzle, unordered (left) and ordered (right), used as an example for heuristic function quality [43]. . . . . . . . . . . . . . . . . . . . . 20 2.3. Schematic presentation of the static and planning paradigms. [43] . . . 23 3.1. 3.2. 3.3. 3.4. 3.5. 3.6. 3.7.. A simple graph with indicated start node nS and goal node nG . . . . . A schematic presentation of issues concerning optimal vs. robust planning. Real-life example of optimal vs. robust planning. . . . . . . . . . . . . A simple graph with a two-path plan leading from nS to nG . . . . . . . A simple graph, with optimal path from nS to nG indicated. . . . . . . An incomplete robust plan from node s to node g. . . . . . . . . . . . Visualisation of a theoretic satellite navigation device utilising robust planning techniques. . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8. A simple graph with a very large number of plans leading from nS to nG . 4.1. Example of a real-life granule. . . . . . . . . . . . . . . . . . . . . . . 4.2. Graph representation of the granule shown in Figure 4.1(b). . . . . . . 4.3. Difference of structure of typical American and European cities (the scale of both maps is equal). . . . . . . . . . . . . . . . . . . . . . . 4.4. Screenshot of the RobustPlanner editor, showing natural boundaries to aid the granule definition process. . . . . . . . . . . . . . . . . . . . .. iv. 27 28 31 37 40 42 47 49 52 54 55 58.

(9) List of Figures 4.5. Effects of 30 iterations of the Chinese Whispers in the RobustPlanner editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6. The number of clusters left in subsequent iterations of the Chinese Whispers algorithm on the map of Kraków. . . . . . . . . . . . . . . . 4.7. Definition of a granule using the RobustPlanner editor GUI, with the aid of hard boundaries. . . . . . . . . . . . . . . . . . . . . . . . . . . 4.8. Map representation of the route shown in Figure 4.9. . . . . . . . . . . 4.9. Graph representation of the granule shown in Figure 4.1(b), with route from n26 to n7 marked. . . . . . . . . . . . . . . . . . . . . . . . . .. 59 60 61 65 66. 5.1. Schematic presentation of a simple multi-granule planning environment. 70 5.2. An optimal path in a multi-granule environment, along with an alternative path marked with the dashed line. . . . . . . . . . . . . . . . . 75 6.1. 6.2. 6.3. 6.4. 6.5. 6.6. 6.7.. Boundaries, link nodes and core of granule Półwsie Zwierzynieckie. . Graph representation of granule Półwsie Zwierzynieckie. . . . . . . . Boundaries, link nodes and core of granule Kazimierz. . . . . . . . . Graph representation of granule Kazimierz. . . . . . . . . . . . . . . Boundaries, link nodes and core of granule Dębniki. . . . . . . . . . Graph representation of granule Dębniki. . . . . . . . . . . . . . . . Part of the map of Kraków, presenting the start and goal for the example task described in Section 6.2. . . . . . . . . . . . . . . . . . . . . . 6.8. Part of the map of Kraków, presenting the granules and links for the example task described in Section 6.2. . . . . . . . . . . . . . . . . 6.9. Graph representing the planning task task described in Section 6.2. . 6.10. Example navigation task, described in Section 6.3.2 . . . . . . . . .. . . . . . .. . 90 . 91 . 92 . 93. 7.1. The proposed architecture of the data exchange system. . . . . . . . . 7.2. User interface of the main OpenStreetMap website, showing the map of Kraków at two zoom levels. . . . . . . . . . . . . . . . . . . . . . . 7.3. Example of a OSM XML file. . . . . . . . . . . . . . . . . . . . . . . 7.4. Fragment of an example Polish Format map file. . . . . . . . . . . . . 7.5. Example display of the granule editor in the RobustPlanner application.. v. 84 85 86 87 88 89. 95 97 99 100 108.

(10) List of Tables 2.1. The search cost in the eight-puzzle problem for iterative deepening search and A* with heuristic functions h1 and h2 [43]. . . . . . . . . . 22 3.1. A linear plan, represented as a decision table. . . . . . . . . . . . . . . 40 3.2. Decision table for a complete robust plan from node s to node g in the graph presented in Figure 3.6. . . . . . . . . . . . . . . . . . . . . . . 44 4.1. Set of decision tables for traversing the example granule from n26 to n7. To save space, decisions have been represented by the next node nnext only. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4.2. Decisions presented to the driver when following the alternative route from n35 to n7 through n41. . . . . . . . . . . . . . . . . . . . . . . 68 4.3. Decisions presented to the driver when following the alternative route from n35 to n7 through n37. . . . . . . . . . . . . . . . . . . . . . . 68 6.1. Decision tables for some nodes shown in Figures 6.8 and 6.9. . . . . . 81 7.1. Tables created by the osm2pgsql utility. . . . . . . . . . . . . . . . . . 104 7.2. Tables created by the osm2pgsql utility. . . . . . . . . . . . . . . . . . 109. 1.

(11) 1. Introduction. Navigare necesse est; vivere non est necesse.1. Travelling became an intrinsic and omnipresent part of human life. It is hard to imagine a single activity which would not require, at some stage, moving to a different location. Be it a different continent or a building nearby, the need to migrate is shared among everyone. Obviously, travel can take place for various reasons. People change location because they have to or because they like to. Tourism, for instance, could be defined as travelling for leisure. Even more travelling is done for work-related reasons. Not counting the business trips, the daily commute to work and back alone constitutes a significant part of the travel done by human beings. A recent study [49] shows that in Canada, the average time spent on the daily commute has grown from 54 minutes in 1992 to 63 minutes in 2005 – that is 12 full days of travelling per year. The increase is visible both for people using public transportation and for those using their own cars – sometimes, even for cyclists. However, while the cyclists tend to enjoy their daily travel, the drivers are not as enthusiastic. The reason for this is rather obvious. Streets in most cities – especially those with historic layouts of the centres – become congested very easily. Traffic jams became an inherent feature of urban travel. Commuters with a lot of experience in a given city or district often know some “secret” shortcuts and tips to bypass the jammed main 1. Attributed by Plutarch to Gnaeus Pompeius, who, during a severe storm, commanded sailors to bring food from Africa to Rome (http://en.wikipedia.org).. 2.

(12) CHAPTER 1. INTRODUCTION arteries. On the other hand, visitors trying to drive in a foreign city are confined to using maps, satellite navigation devices and route planners, which tend to push the traffic through the main streets. Such navigation tools are useful as long as the conditions for travel are favourable, i.e. when the plan can be executed without problems. The following sections present the basics of route planning, as well as the challenges faced by the designers and users of navigation devices.. 1.1. Route Planning: Theory and Tools Several disciplines propose methods for route planning, which generally involve graph path search. Research presented in this thesis entailed review of algorithms from operational research [28, 11], graph theory [17] and artificial intelligence [39, 43]. Basically, the problem of route planning can be divided into two phases. Plan generation is performed before the travel begins, and involves preparation of route directions for the driver. Plan execution is when the travel actually happens; it involves verification whether the execution proceeds as expected, and detection of circumstances, under which the initial plan cannot be followed. In such case, a new plan has to be computed.2 This thesis concerns the development of a new approach for practical real-life route planning and plan execution by intelligent agents, such as human beings. Users of route planners face rely on user interfaces of tiny satellite navigation devices. Artificial intelligence techniques, including graph search algorithms, knowledge compilation, and knowledge granularisation, allow for efficient generation and representation of robust plans and real-time execution, which can be smoothly performed under hard real-time constraints.3 The route planning process is based on a two-dimensional map represented as a graph. However, the desired solution does not take the form of a single path. Instead, alternative solutions are stored for efficient execution of the derived plan. 2. This scheme is not limited to vehicle route planning; e.g. the issues of plan execution in the field of manufacturing have been discussed in [50]. 3 Real-time constraints concern the delivery of instructions; e.g. in case of satellite navigation, late delivery of an instruction usually results in the necessity to derive a new plan, which takes the new situation into account.. 3.

(13) CHAPTER 1. INTRODUCTION Knowledge compilation [13, 24] is used to ensure effective transformation of the input knowledge into ready-to-use instructions. Moreover, an intelligent graph abstraction method is used to introduce knowledge granularity in order to limit combinatorial explosion and facilitate scalability. Route planning software has been used for decades; the first commercially-available route planners emerged as standalone applications in the early 1990s. One of the most popular programs at the time was AutoRoute Express, a DOS application developed by the UK-based company NextBase. Figure 1.1 presents the simple user interface of this application. Standalone route planning applications have several disadvantages; the main one is the difficult map update procedure. This problem is easily solved in modern web-based planning applications, such as Google Maps shown in Figure 1.2. Both standalone and web-hosted route planners share the disadvantage that the planning is only performed a priori – before the travel begins. That means that they are not able to assist the driver during the travel itself, in case a significant modification of the route becomes necessary. The development of mobile technologies and popularisation of GPS receivers resulted in the increased popularity of satellite navigation devices. Figure 1.3 shows a modern satellite navigation, installed in the car. The satellite navigation technology keeps evolving, but the currently available solutions are still far from being perfect.. 1.2. Contemporary Challenges: a Critical Overview As described in the previous section, standalone and web-based route planners are pure planning applications; satellite navigation devices add the plan execution component. However, while classical AI planning techniques, broadly presented in [43] and [27], offer high performance and applicability, they do not fully fit the realistic route planning problem. The following characteristics of route planning show the most bothersome limitations.. 4.

(14) CHAPTER 1. INTRODUCTION. Unpredictability. The plan execution environment is highly unpredictable. While some estimations are possible in well-developed highway networks during low-traffic hours, classical means of optimality such as predicted travel time are practically useless in large cities during the rush hours. Figure 1.4 shows how the number of cars registered in Poland changed over the years. Intelligent execution. The plan is being executed by an intelligent entity – a human being. Therefore, the plan executor has their own immediate observations and may infer knowledge to aid more efficient and flexible execution of a plan. Furthermore, these observations allow the plan executor to react according to the true conditions. Limited executor feedback. The plan executor is not able to explicitly inform the planning application about their observations or decisions – in other words, it is not technically feasible (or legal) for the driver to operate a device when driving. No recognition of intentions. As the plan executor has limited possibility of providing feedback to the device, the planning application can only recognise the driver’s intentions implicitly. However, the alternative solutions are calculated on demand only after detecting a deviation, and the detection itself is delayed, as the GPS receiver is polled only every 1-2 seconds, and the positioning precision is very unstable. The need for immediate actions. Plan execution is performed under hard realtime constraints. The time the plan executor has to react varies from parts of seconds to around half a minute.4 Such a short period of time does not allow for restating of the planning problem or, in fact, any interaction with the navigation device – not to mention time-intensive re-planning. The limitations specific to current satellite navigation systems have been discussed in more detail in Section 2.1.. 4. The time to react depends on the distance to the next junction and the travel speed.. 5.

(15) CHAPTER 1. INTRODUCTION. (a) Route calculation screen in AutoRoute Express for DOS.. (b) Map view in AutoRoute Express for DOS.. Figure 1.1.: AutoRoute Express for DOS, one of the first commercially-available route planning programs. 6.

(16) CHAPTER 1. INTRODUCTION. Figure 1.2.: A modern web-based route planner (http://maps.google.com).. Figure 1.3.: A modern in-car satellite navigation device (http://www.tomtom.com).. 7.

(17) !"##$% CHAPTER 1. INTRODUCTION %2////// %.////// %1////// %0////// %/////// 2////// .////// 1////// 0////// / %*+,. %*-.. %*,/. %*,.. %**/. 0///. 0//.. 0//*. Figure 1.4.: The number of cars registered in Poland by year (http://pl.wikipedia.org).. 1.3. Brief History of the Research The first ideas for this research have emerged as observations when travelling within the city of Kraków. Discussions with other frequent Kraków commuters have shown that practically every driver had their own strategies for traversing various parts of the town. Most of these strategies involved using less occupied residential and local roads, instead of the usually jammed main arteries. Therefore, preliminary experiments have been conducted using existing satellite navigation solutions. It turned out that in most of the cases, the directions led through the most congested streets, which turned theoretically optimal routes into very long and slow journeys. The phenomenon, to be called optimal solution trap, occurs when a driver, especially one with no knowledge of the area he or she is travelling through, follows the instructions of the navigation device, even though he can see that it leads towards a traffic jam. Meanwhile, drivers who have knowledge about a certain area can use it to plan their route and are aware of alternative manoeuvres they can take in order to avoid the traffic jam.. 8. optimal solution trap.

(18) CHAPTER 1. INTRODUCTION. Additional problems have been identified during this phase as well. For instance, if the driver leaves the original route, the route re-calculation process usually starts rather late and the amount of calculations lead to the so-called re-planning loop. This occurs when the vehicle had reached another junction (e.g. a node in the graph representing the planning domain) before the new route was ready. Therefore, the calculations have to be started again, with the driver unaware of whether the direction of travel was actually right. Another kind of loop occurred as a result of map inaccuracies, including: • streets marked as linked, when traversal was actually impossible, • one-way streets, when the actual direction was opposite from that represented by the map, • illegal manoeuvres, e.g. when it is impossible to make a left turn or to turn back. In all of the aforementioned cases, the driver was being left with no clues or directions. Therefore, the following aims have been set forth for the research: 1. Develop a planning scheme aimed at generating plans feasible for execution by an intelligent being. 2. Establish a knowledge representation for multi-variant plans derived from a graph search space. 3. Design an intelligent scheme to ensure scalability of the proposed solution in real-life planning environments. Moreover, as a principal constraint, it was assured that the alternative decision should be made available under real-time constraints, with no interaction with the navigation device required.. 9. re-planning loop.

(19) CHAPTER 1. INTRODUCTION. 1.4. Outline of the Thesis The thesis is structured into eight sections. The outline of the thesis is as follows. Section 2 presents the state-of-the-art of route planning applications and provides a discussion of the problems of current satellite navigation solutions and provides the motivation for the research. The formulation of the thesis and detailed goals have also been presented in this section, on page 24. Section 3 introduces the concept of robust planning, as a means of providing multivariant directions to the plan executor, and discusses the limitation of this generic approach. Section 4 introduces the concept of granules – relatively dense, distinct areas of the graph – and presents an algorithm for knowledge compilation within a granule. Section 5 attempts to merge the robust planning approach with granules, by introducing granular graphs and describing the strategies for navigation within such environments. Section 6 provides more examples for the proposed approach as well as a discussion of its feasibility. Section 7 addresses technical issues regarding planning in real-life environments and describes the web-based application developed for data preparation and testing. Finally, Section 8 provides some concluding remarks, discusses the completion of the assumed aims and outlines the future work.. 10.

(20) 2. State-of-the-Art in Automated Route Planning and Motivation for the Research This section presents the state-of-the-art in the domain of automated route planning. Special attention is paid to the underlying theory, algorithms and tools used in plan generation. A critical analysis of available solutions is carried out and certain drawbacks of planning techniques and tools are examined in details. As a consequence, motivation for the research is outlined and aims of the work are explained.. 2.1. Satellite Navigation: Practical Tools and Practical Problems One of numerous applications of AI path planning techniques is route planning for vehicles. Early planners were usually available as standalone applications used to plan the route before the travel actually began. This application can be referred to as a priori planning. Such instructions could be printed and used for further reference on the road. Obviously, it was impossible to alter the route or to provide any feedback to the planner; therefore, such planners were examples of the static planning paradigm, as shown in Figure 2.3(a). The problem of route planning has been addressed in numerous publications including Ph.D. theses [25, 45]. Some overview and historical context has been presented in [39, 43].. 11. static planning.

(21) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION. The increasing popularity of mobile devices, equipped with GPS (Global Positioning System) receivers, led to creation of a new class of software, often referred to as satellite navigation. Such applications provide real-time instructions for drivers and try to adapt to conditions. The initial plan is derived using classical methods as described in sections 2.4.1 and 2.4.2. Recent developments led to inclusion of real-time, albeit sparse and general, traffic information (distributed using technologies like Traffic Message Channel based on FM broadcasting) and collaborative travel time statistics. As the travel progresses, the application updates instructions for the driver – according to the dynamic planning paradigm, as shown in Figure 2.3(b). If the driver does not follow the instructions provided by the application, due to human error or unforeseen circumstances (e.g. a blocked road), re-planning has to be performed. Unfortunately, the current position is only updated once at 1-2 second intervals, and temporary losses of precision are not uncommon. Therefore, it can take a significant amount of time before the application recognises that the original solution is no longer being followed and initialises the re-planning procedure. The calculations can also take some time, which means the plan executor may be left with no instructions for a relatively long period of time. Furthermore, even though the executor may have observations and more knowledge regarding the planning environment than the planning application, he or she is neither capable of communicating that knowledge to the application, nor gets any help in utilising that knowledge by choosing an alternative solution in an informed way. The basic problem of almost all techniques currently used for AI planning is that they remain oblivious to the fact that the plan is actually being executed by an intelligent being – a person, instead of a robot or an Unmanned Autonomous Vehicle (UAV). Essentially, the role of a planning application has been inaccurately shifted from a Decision-Support System to a Decision-Making System, leaving no margin for flexible plan execution. One inherent characteristic of planning systems is that the maps are, to some extent, inaccurate or not up-to-date. This problem can hardly be avoided, as temporary changes in the street network are being introduced all the time. For instance, let us imagine that the direction of a one-way street has been recently reversed. The planning application, unaware of the change, instructs the driver to. 12. dynamic planning.

(22) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION enter that street, even though it is the wrong way. The driver has to choose one of the alternative routes. However, the application provides no clues on which of these solutions is the best. Moreover, classical solutions will often direct the driver back to the same point, resulting in an infinite loop. Another example is the case of a blocked road or a traffic jam. The driver sees it and turns back. However, the application does not recognise the driver’s intentions and instructs him to turn back again. Those examples show the deficiencies of current satellite navigation applications. The following sections present the proposed methods of fixing these drawbacks.. 2.2. Motivation for the Research This research is focused on improving the quality of planning performed for intelligent or human executors. In the example of satellite navigation, the planner should be able to continuously present answers to questions such as: • “For some reason, I cannot follow the original plan; what alternative plans are available?” • “There is a traffic jam in front of me; if I try to avoid it by escaping left/right, how will it influence the length (cost, time) of my itinerary?” • “In case of expected traffic jams, which journey option will give me the best chances (maximum flexibility, reliability, etc.) to arrive in time?” At the same time, the planner should anticipate the actions of the executor and quickly recognise them, as well as their semantics or the intentions of the executor. This should be performed without direct interaction of the plan executor (the driver) with the user interface of the device. The concept presented in this work is aimed at making use of human intelligence, instead of neglecting it. Limited computing power of mobile devices is another issue to be taken into account. Re-planning often leads to time-consuming calculations1 , while the car is making constant progress. If another node (junction) is reached before the new plan is ready, the processing has to be restarted and results in a so-called “re-planning loop”. 1. Graph search procedures are of high computational complexity [11, 43].. 13.

(23) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION The issues caused by limited processing power can be avoided by either compiling the input data into an easily-processable form, or by providing incomplete or suboptimal solutions. Currently used systems are known to utilise approximate strategies to calculate the solution. For instance, several methods aim at reaching a higher-grade road as quickly as possible – according to that approach, as much of the travel as possible should be performed using highways. This works well with long journeys, but leads to problems in dense urban environments.. 2.3. Problem Statement 2.3.1. Path Search in Graphs The search domain is assumed to be a graph – a formal definition shall be provided in Section 3. For intuition, a graph contains nodes and weighted edges. Depending on characteristics of the environment being modelled, the edges can either be directed or undirected. The edges can also be assigned a cost or length. The goal is to find a path leading from some specified start node to the goal node. Various algorithms have been developed to accomplish that basic task; they shall be described in more detail in Section 2.4.1. Formally, a path search problem consists of: • definition of the search space – either explicit (a map) or implicit (when the planning environment has to be discovered), • the initial state, • the goal state, • a set of admissible actions,2 • a cost function. A solution to a path search problem consists of a sequence of edges to be followed in order to get from the initial state to the goal state. 2. For route planning, actions are defined as manoeuvres at decision points (junctions).. 14.

(24) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION. 2.3.2. Characteristics of the Search Domain Route planning is a well-defined task; however, it can take place in environments of very different characteristics. Currently available route planners use universal (generic) methods, regardless of whether the search domain is a highly-developed motorway network or a historic city centre. This lack of flexibility is especially visible e.g. in small cities, where the accuracy and expressiveness of satellite navigation devices are often insufficient to provide satisfactory guidance. This thesis concerns environments which exhibit the following characteristics: • Vehicle-unfriendly layout. Cities built before the era of heavy road traffic were designed with pedestrian, horse and rail transport in mind. Therefore, the streets are narrow and it is impossible to create an appropriate road network. • Non-traversable obstacles. Rivers, railways and parks are obstacles which cannot be traversed without special means, e.g. bridges or crossings. • Defensive design. The tendency to surround cities with defensive structures make it difficult to adapt for heavy car traffic. • Non-homogeneous structure. Navigation is an easy task in cities with a regular structure, such as Manhattan in New York. However, European cities being developed for centuries feature regions of various street density, often with limited means of transfer. • Uncertain traffic conditions. Overloaded streets form a network that is very prone to suffer from bottlenecks. As a result, traffic jams occur irregularly; it is difficult to predict their location and extent. • Ability to observe the plan execution environment by the executor. The additional knowledge provided to the plan executor is only useful if the plan executor is able to observe the environment, e.g. can notice a traffic jam from a distance. Route planning in dense urban environments, in difficult traffic conditions and tight temporal constraints is the primary application of the methods developed through this research.. 15.

(25) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION. 2.3.3. Goals of the Research The goal of the research is to adapt and extend AI techniques to allow for delivery of useful instructions in time to drivers travelling through areas exhibiting the characteristics presented in Section 2.3.2. The temporal constraint is especially important. Failure to deliver instructions to the driver may result in serious deterioration of the optimality criterion, e.g. the time of arrival. The accuracy of GPS positioning is likely to drop in low-signal areas, e.g. in the vicinity of buildings [2, 40]. In addition, the GPS receiver is polled for updates every 1-2 seconds, during which the vehicle can travel as much as 30 meters at a typical urban pace. Therefore, a classic satellite navigation device needs to assume that the calculated route is being followed by the driver. After each waypoint, the device displays instructions and visualisation as if the actions of the driver were in accordance to the plan. However, if something unexpected happens, the following sequence of events occurs: 1. The device instructs the driver to turn into street A. 2. The driver leaves the original route and turns into street B, either by mistake or due to unforeseen circumstances (e.g. a traffic jam, a blocked road or recently changed one-way street directions). In the latter case, the choice made by the driver is often random – no a priori knowledge about the alternatives is supplied — and therefore a random turn may lead to severe problems. 3. On the next poll, the device receives the position in street B. However, it assumes it is a random positioning error and assumes the driver follows street A. 4. Only after the vehicle has reached a certain distance from the junction (and street A), the device understands that a detour has occurred. 5. The device starts calculating the alternative route in order to supply the driver with updated instructions.. 16. GPS.

(26) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION. In a worst-case scenario, by the time the device has calculated the route, the driver might have reached another junction, forcing the device to restart the calculations with the updated constraints. On the other hand, if the planning device was able to anticipate all feasible actions, the assumption that the original solution is being followed would not be enforced, and the system would have become more reactive. The goals for the planning scheme being researched are as follows: 1. Provide full information: the driver should be presented with the “big picture”, including the crucial decision points at different levels of abstraction. 2. Do not interfere: the driver should have the freedom to choose the solution; the system is there merely to let him know about the possibilities (and their optimality). 3. Require no input: the driver’s intentions should be manifested by actions, rather than by explicit UI interaction. 4. Expect the unexpected: the system should anticipate deviations from the original plan and recognise the driver’s decisions. 5. Be on time: delivery of instructions is subject to hard temporal constraints. Figure 2.1 presents an overview of the proposed architecture of a planning system following the above guidelines.. 17.

(27) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION. !"#$%"& ;"&$*"+". ;"&$*"+". '("&)$%"&. '("012-$*"+". !',$-*.+/(. '("&)$*"+". '("012-$ 3/10*"(.-4. ,(/2/5$-05.0-. ;12+.<="(."0+$*.(-7+./04 6/%&.2-*$*.(-7+./04 >7+./04 6/%&.2-* 80/#2-*5-. ,2"0$-9-71+./0 "1&&/(+$"&&:. ,2"0$-9-71+/(. Figure 2.1.: Overview of the proposed architecture for the planning system.. 18.

(28) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION. 2.4. Algorithms Used for Path Search in Graphs As outlined in Section 2.3.1, path search in graphs remains the foundation of all route planning systems; the differences emerge from the search strategy and further processing of data. The following criteria can be used to evaluate search algorithms [43]: • time (computational) complexity: what is the relation between the size of the search domain and the processing time? • space complexity: what is the relation between the size of the search domain and the temporary storage space required by the algorithm? • completeness: will the solution always be found if it exists? • optimality: is the resulting solution the optimal one? A very general classification of search algorithms divides them into two groups: uninformed (or blind ) and informed (utilising AI methods).. 2.4.1. Uninformed Algorithms Basic algorithms used to find paths within a graph do not utilise knowledge about the search domain (environment). Such algorithms are often called uninformed or blind search methods. The only “intelligence” they possess is the ability to distinguish between goal and non-goal states. The pessimistic search scenario for uninformed search algorithms requires full review of possible states (nodes). Uninformed search algorithms for deterministic and completely observable problems can be divided into the following classes [43]: • breadth-first search – the shallowest unexpanded node is chosen for expansion; complete and optimal; time and space complexity of O(bd+1 ) where b is the branching factor and d is the solution depth, • uniform-cost search – the node with the lowest cost is expanded first; complete and optimal,. 19. uninformed search blind search.

(29) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION     2 8 3 1 2 3 1 6 4 8 ✷ 4 7 ✷ 5 7 6 5 Figure 2.2.: The 8-puzzle, unordered (left) and ordered (right), used as an example for heuristic function quality [43].. • depth-first search – the deepest unexpanded node in the search tree is chosen for expansion; neither complete nor optimal; time complexity O(bm ), space complexity O(bm) where m is the maximum depth of the search tree, • depth-limited search – imposes a depth limit upon depth-first search algorithms; not complete, not optimal, • iterative deepening search – like depth-limited search, but the limit is increased in each iteration until a solution is found, • dynamic programming – solutions for all subproblems are buffered, with the shortest subproblems first. Problems where the search environment is nondeterministic or not fully observable can be classified as: • sensorless problems – when the search agent does not have any sensors and must “guess” which initial state it is in or generate a plan which is operational regardless of the initial state, • contingency problems – when the search agent learns new facts after some actions are performed, • exploration problems – when the search agent does not initially possess knowledge about the states and actions. On the conceptual level, the optimality criterion can be defined as maximising (or minimising) the total path cost. This cost can reflect various real-world criteria, such as route length or travel time; therefore, it shall be referred to as cost in the following sections.. 20.

(30) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION. 2.4.2. Artificial Intelligence Algorithms Section 2.4.1 describes the basic, uninformed algorithms and search strategies used to find the path between two states (graph nodes). In this section, we shall describe another group of algorithms – informed search methods. Informed search methods utilise knowledge about the search environment to increase the efficiency of the search process [43]. The basic concept for informed search algorithms is the evaluation function, often referred to as f (n). The evaluation function assigns values to nodes; traditionally, the node with the lowest value of f (n) is chosen for expansion first. The main component of f (n) is the heuristic3 function h(n), representing the estimated path cost from node n to the goal node4 . Greedy algorithms evaluate nodes using h(n) only. Such algorithms may not find optimal solutions, as they tend to enter ‘dead ends’ as a result of using ‘naive’ evaluation functions. One of the most commonly used informed search algorithm is called A*. The evaluation function is of the form f (n) = g(n) + h(n), where g(n) is the cost from the start node to node n. A* is complete and optimal as long as h(n) is admissible, i.e., if it does not overestimate the cost of getting from n to the goal node. If space complexity is a concern, one can use memory-bounded search methods. IDA* adapts the concept of iterative deepening to the A* search algorithm. However, f (n) is used as the cut-off value instead of the depth. Recursive best-first search (RBFS) maintains linear space complexity by removing already expanded but abandoned nodes from memory. Both IDA* and RBFS can suffer when searching in graphs, as they can only avoid repeated expansion of the nodes which are within the current solution. If all of the available memory can be used, it is possible to use MA* (memory-bounded A*) and SMA* (simplified MA*) algorithms. The basic 3 4. The word heuristic comes from the Greek word heuriskein for “find” or “discover”. The value of h(n) for the goal node is assumed to be zero.. 21. informed search. greedy search. A* search. IDA*. recursive best-first search. MA* SMA*.

(31) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION. Table 2.1.: The search cost in the eight-puzzle problem for iterative deepening search and A* with heuristic functions h1 and h2 [43]. d IDS A*(h1 ) A*(h2 ) 2 10 6 6 4 112 13 12 6 680 20 18 8 6384 39 25 10 47127 93 39 12 3644035 227 73 14 539 113 16 1301 211 18 3056 363 20 7276 676 22 18094 1219 24 39135 1641. strategy is to apply A* until the memory is full, when the worst node is removed from memory to make space for further expansion. To illustrate the effect of the quality of the heuristic function h(n) on the efficiency of the search process, an example from [43] from shall be used. The example concerns an 8-puzzle, as shown on Figure 2.2. Two heuristic functions are proposed. Function h1 is the number of misplaced tiles – it is admissible, since all misplaced tiles have to be moved at least once. Function h2 is is the sum of distances of tiles from their positions – it is admissible and more accurate than h1 , since it provides an estimate of the number of moves necessary to put each node in place. Table 2.1 presents the search cost for iterative deepening search and A* with these heuristic functions [43]. Planning in uncertain environments has been discussed in literature, e.g. in [3]. Work [4] addresses the problem of route planning using a novel approach, using highway hierarchies; however, it is focused on efficient generation of a single plan, rather than on a set of alternative plans, and is therefore aimed at solving a different problem. Search can either be performed in a forward or backward direction. The difference is insignificant for path search in graphs; however, it becomes significant in more complex search domains.. 22.

(32) 23. Objectives. Plans. (b) Dynamic planning. Events. SYSTEM. Actions. EXECUTOR. Status. PLANNER. Observations. Initial state. Objectives. Description. Figure 2.3.: Schematic presentation of the static and planning paradigms. [43]. (a) Static planning. Events. SYSTEM. Actions. EXECUTOR. Plans. PLANNER. Observations. Initial state. Description. CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION.

(33) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION. 2.5. Thesis and Contributions of This Work Modern achievements in the field of Artificial Intelligence enable a broader, more consistent outlook on the problem of planning. The pre-compiled knowledge base can be used to generate the initial solution more quickly and efficiently. By introducing intelligent and application-oriented methods of map abstraction, it is possible to extract the characteristics of solutions useful for intelligent (human) executors – characteristics which would otherwise get lost in the process. The presented research should contribute to the field of automated route planning, by improving the usability for applications where the plan is executed by an intelligent being. The thesis of this work can be formulated as follows.. The proposed paradigm named Robust Route Planning constitutes a useful, a priori approach to practical development of multi-branch plans allowing for flexible navigation in realistic, partially unpredictable environments. Artificial Intelligence techniques, including AI graph search algorithms, knowledge compilation and knowledge granularisation, allow for generation and representation of robust plans which can be smoothly executed under hard real-time constraints imposed by traffic flow.. In fact, the proposed solution introduces a new quality into planning and plan execution; instead of searching for a single-path optimal route, the focus is on development of sets of multi-variant suboptimal paths with the ultimate goal of assuring maximum execution reliability under unpredictable conditions of the planning environment. The real-time constraints refer to the time in which the planning device has to deliver instructions to the plan executor. In classical planning paradigms, the plan executor can usually wait for the instructions to be delivered; a delay may reduce the performance of the system. In case of vehicle navigation, such a delay would be unacceptable, as the moving traffic forces the vehicle to make steady progress. If the instructions are not delivered before the car reaches the junction to which they pertain, they become practically useless.. 24.

(34) CHAPTER 2. STATE-OF-THE-ART AND MOTIVATION This thesis is proved by development of concepts and tools and verification by experiments. These can be divided into the following stages: 1. Development of a concept of a multi-variant plan which allows for flexible execution. 2. Development of an efficient plan representation method by means of knowledge compilation and generation of in-node decision tables. 3. Design of a planning scheme, operating at various levels of abstraction, to ensure scalability and satisfactory performance of the planning procedures. 4. Introduction of knowledge granularisation and granular knowledge representation. 5. Evaluation of the proposed techniques using real-life street map data. Apart from theoretical developments, the concepts were implemented and tested using complex, real-life map data with a high level of details. The principal testing environment was based on the city of Kraków.56. 5. All maps presented in this thesis have been acquired from the OpenStreetMap community mapping service (http://www.openstreetmap.org); corrections and additions found necessary during the testing phase have been contributed back to the OpenStreetMap repository. 6 The data for Kraków consisted of 6 844 nodes and 8 813 edges.. 25.

(35) 3. Generation, Representation and Execution of Robust Plans This section presents the basic concepts behind robust planning. We start with a simple motivational example. Following it, a more formal statement of the problem is given. An algorithm for off-line generation of robust plans is presented. Knowledge representation of a robust plan is discussed. Finally, the execution stage is presented and some examples are analysed. Our approach to the concept robust planning has been described for the first time in [21] and further developed in [23]. This section presents a refined version of the original concept.. 3.1. Motivation: An Intuitive Example Let there be given a connected graph constituting a model of the search space. Such a graph is composed of a certain number of nodes (vertices) and links (edges). Any link has an associated value representing its length (or traversal cost/time). The length is a positive real number. The graph is a simple model of a real search space, representing a road network in a certain area. An example graph is presented in Figure 3.1. The problem statement for a plan generation task is typically as follows. Let there be given a single initial node nS , defining the starting point, and a single goal node nG , defining the goal or destination. The problem is to find a path representing a route from the initial node to the goal node. For obvious reasons, an admissible route should not contain cycles, i.e. any node should be visited at most once. Typically, one looks for an optimal route, i.e. a path with the lowest length (or cost).. 26. robust planning.

(36) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS nS. 5 n1. 7. 5 n3. 4 4. 3. 3. n2. n4. n6. 6 n5. 2. 7 n7. 2 nG. 5. Figure 3.1.: A simple graph with indicated start node nS and goal node nG .. The optimality criterion can be any straightforward, single-value performance metric; most often, typical criteria are defined as: • shortest path – the plan with the minimal length is to be found, • minimal cost – the plan with the minimal total cost is to be found, • time-optimal – the plan assuring the minimal time of transfer. All such plans are referred to as optimal ones. Preferring such plans seems rational, until one comes to execution of such an optimal plan and encounters some prohibitive and unexpected difficulties along the way.. 27. optimality criteria.

(37) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS n5. n3. n2. n1. n4. nS. X. n6. X. nG. Figure 3.2.: A schematic presentation of issues concerning optimal vs. robust planning.. To understand this, notice that the entire task is performed in two stages: • plan generation, performed off-line, and • plan execution, performed on-line. The meaning of these stages seems to be obvious: a plan generated a priori (off-line) is later put into practice: the agent follows the plan (on-line) trying to move along the calculated path. The main problem – usually not taken into account – concerning the application of the classical, optimal planning approach is that failed execution of an initially developed optimal plan frequently leads to drastic deterioration of the performance index. Let us consider the following intuitive example, presented in Figure 3.2. In order to go from the node nS to node nG , the initially rational choice is to select the optimal route (the bottom one in Figure 3.2). However, this is a single line (with no branching on the way). If it turns out that after some time following the plan becomes impossible (at the black cross), the agent has to perform re-planning. The only possible action is to turn back (if turning back is at all possible; note that on a highway or on a narrow street it may become infeasible), go back to node nS , and follow one of the admissible plans, e.g. nS − n1 − n4 − n6 − nG . On the other hand, assuming that the priority is to ensure arrival at node nG within some reasonable interval of time (or other performance index), i.e. that the priority is the reliability of the plan, while length, cost or time are of secondary importance, it. 28.

(38) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. seems reasonable to follow one of the plans located in the upper section of Figure 3.2 and incorporating nodes n1 − n6 . Note that if some unexpected obstacle occurs during execution of the suboptimal plan nS − n1 − n4 − n6 − nG , (the black-cross on the link n4 − n6), it is possible to go back to n4 , and follow an alternative plan through n5 and n6 to the goal node nG . Furthermore, it may be the case that the knowledge about the obstacle comes to the agent before he arrives at node n4 (he might see it in the distance or learn about it from a radio broadcast), so no turning back is necessary; then, the issue is solved by an appropriate decision undertaken on-line, during the execution phase; the obvious decision is to go through n5 , and the decision is taken at n4 . In such a way the initial linear plan is updated. A real-life example for optimal vs. robust planning is shown in Figure 3.3. Let us consider the task of getting from the start (marked with the green arrow in the lower part of the map) to the goal (marked with the chequered arrow in the upper part of the map). Figure 3.3(a) shows the optimal solution. Note however, that there are no other bridges near the one used to cross the river. If something went wrong in the vicinity of the bridge, the driver would be forced to turn back, return to the beginning of the route and continue west. Figure 3.3(b) shows a suboptimal solution, with a slightly higher cost than the optimal one. However, if a similar problem occurs when executing this plan, being forced to choose an alternative solution would not impose such drastic deterioration of quality, since another bridge is available nearby (see Figure 3.3(b)). Therefore, the solution shown in Figure 3.3(b) is more robust than the optimal solution. Here, we come to the point of Robust Planning. For intuition, a robust plan is one composed of a set of plans (rather than a single, linear plan), interleaving at some intersection points and possibly overlapping at some links. Such points will be called switch points. Instead of a single-path plan, we have to consider a set of paths – in Figure 3.2, passing through nodes n1 − n6. In this simple example one has in fact as many as 24 different admissible plans (no node is traversed twice in any single plan; for details see Section 3.5). One of the key proposals of this thesis is to consider a Robust Plan instead of a singlepath plan. Such a robust plan is basically composed of a set of labelled, interleaving. 29. robust planning.

(39) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. paths (in Fig.3.2, 24 pieces), each of them incorporating at least one switch-point to another linear plan. Each linear plan is associated with some optimality measure. Any robust plan Π (a set of linear plans) as such can be hence associated with an interval ∆Π = [costmin (Π), costmax (Π)], providing a rough estimation of the range of quality of the solution. Note that by introducing a parameter δ, intended as the maximal admissible cost of the plan, one can obtain a restricted set of linear plans, to be called a δ-cut of the initial robust plan Π, and denoted Πδ . In fact, Πδ ⊆ Π, and if δ < costmax (Π), then Πδ ⊂ Π. Section 3.3 provides a formal definition of a robust plan. Section 3.4 presents an idea for efficient representation of robust plans especially convenient for smart execution. A modified robust plan generation algorithm, covering knowledge compilation is presented in Section 3.5.. 3.2. Related Work Similar approaches have been presented in literature. Work [20] presents an algorithm, Anytime synthetic projection, based on the beam search approach [41]. However, the complexity and unpredictability of real-life domains make such approaches ineffective; additionally, the hard time constraints described in Section 1.2 and the limited capabilities of mobile devices make it advantageous to pre-compile the input data. Work [5] defines strong cyclic planning, where the effects of actions are indeterministic and some states are indistinguishable. This could be related to the uncertainty regarding traffic in dense urban environments and limited GPS positioning precision; however, a specialised approach seems to be better suited to this application. Real-time dynamic programming (RTDP) is effective when dealing with uncertain domains, e.g. when the cost of individual steps might vary within a given range [7, 33].. 30. δ-cut.

(40) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. (a) A non-robust, optimal route. (b) A suboptimal, robust route. (c) An alternative to the suboptimal route. Figure 3.3.: Real-life example of optimal vs. robust planning. 31.

(41) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. 3.3. Formal Framework for Robust Plan Generation In this section the background for robust plan generation is presented in a formal way. Let V denote a finite set of nodes, V = {n1 , n2 , . . . , nn }. Further, let E denote a finite set of edges (or links). Hence, the set E is a binary relation, defined as a subset of the Cartesian Product of the set of vertices, i.e. E ⊆ V × V,. (3.1). where the links are represented as pairs of the form (ni , nj ), ni , nj ∈ V . One typical definition of a graph is that a graph G is a pair of the form G = (V, E). However, note that in realistic cases there may be more than one link connecting some two nodes. Therefore, it is necessary to consider the possibility that several edges are linking the same pair of nodes. Such edges are called multiple edges [17]; if their directions are the same, they are called parallel [17]. In order to distinguish among them, each link should have a unique label (name). Each link should also have a starting point (beginning) and an end point (its end), both located within the set of vertices V . Definition 1 (Directed Graph) A directed graph G is any four-tuple G = (V, E, α, ω). directed graph. (3.2). where α : E → V is a function defining the starting point of an edge, and ω is a function ω : E → V defining the end point of an edge. A directed graph is also called a digraph. In case all the edges are bidirectional – both ends can serve as a start point as well as the end point – we have an undirected graph. A formal definition follows.. 32.

(42) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. Definition 2 (Undirected Graph) An undirected graph G is any triple G = (V, E, λ). undirected graph. (3.3). where λ is a function of the form λ : E → V 2, V 2 = {{ni , nj } : ni , nj ∈ V } defining the endpoints for an edge.1 Note that an undirected graph can be induced from a directed one, based on the assumption that each directed edge is turned into an undirected edge. A straightforward recipe for such formal manipulation may consists in defining function λ as one based on direct output of α and ω – any two-element value of λ is composed of the vertices defined by α and ω for the same edge. Both of the above definitions are elegant, but a bit far from road map practice. In reality, links model street parts, which can be directed (one-way streets) or undirected (two-way streets). Hence, the following definition of a mixed graph is necessary. Definition 3 (Mixed Graph) A mixed graph G is any five-tuple G = (V, E1 , E2 , α, ω, λ). mixed graph. (3.4). where E1 is a set of directed links, E2 is a set of undirected links; sets E1 and E2 are disjoint (E1 ∩ E2 = ∅). Further λ, α and ω are functions defined as in Definition 1 and Definition 2 respectively, provided that α and ω are defined over E1 and λ is defined over E2 . Note that edges which start and end in the same node are insignificant for the planning process. Therefore, they shall be excluded from the definition of the graph. This can be achieved by assuring that ∀e ∈ E1 : α(e) �= ω(e). (3.5). ∀e ∈ E2 : λ(e) �= {ni }. (3.6). and that 1. An alternative definition is also possible, e.g. G = (V, E, λ), λ : E− > V 2 ; however, the definition used is more appropriate for further statements.. 33.

(43) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. For intuition, a mixed graph represents a simple model of a realistic road system; most of the roads are bi-directional, and some of them are one-way. To simplify notation, the following definitions shall rely on the G = (V, E) notation, assuming that E = E1 ∪ E2 (see definition (Definition 3)), i.e. that the graph contains both directed and undirected edges and that their endpoints are given. A weighted graph is a pair (G, γ) (3.7). weighted graph. where G is a graph according to Definitions 1, 2 or 3, and γ is a cost function γ : E1 ∪ E2 → R+ \{0} or γ : E → R+ \{0} assigning a positive non-zero real number (weight) to every edge. Furthermore, it shall be assumed that the graph representing the search domain is connected. Definition 4 (Connected Graph) A graph G = (V, E) is connected, if there is a path (see def. Definition 5) between each pair of vertices (ni , nj ) ∈ V . In practice, the requirement for the graph to be connected ensures that it is possible to travel between any pair of nodes and is almost universally fulfilled in road networks. Typically, a single solution for planning problems with graph search domains is a path. Remark 1 To avoid ambiguity, the following notation will be used for the following definitions: • sets will be denoted with capital letters, e.g. X = {x1 , x2 , . . . , xn }, • sequences will be denoted with a vector arrow over the symbol, i.e. Y� = (y1 , y2 , . . . , ym ), � = (z1 , z2 , . . . , zq ) is a sequence, [Z] � = {z1 , z2 , . . . , zq } is a set of all its • if Z members.. 34. connected graph. path.

(44) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. Remark 2 The following notation is used to indicate edge e, where α(e) = ni and ω(e) = nj : e ni → nj . If only one edge e exists with α(e) = ni and ω(e) = nj , the following simplified notation may be used: ni → nj . Definition 5 (Path) A path of length n in a graph G = (V, E) is a graph P = (V�P , E�P ), [V�P ] ⊆ V, [E�P ] ⊆ E, where V�P = (n1 , n2 , . . . , nn ), i = 1, 2, . . . , n, where en−1 e1 e2 E�P = (n1 → n 2 , n2 → n3 , . . . , nn−1 → nn ).. (3.8). Vertices n1 and nn are called the start and the end of the path. The length of a path P = (V�P , E�P ), denoted |P |, is the number of all its edges: |P | = |[E�P ]|. path length. (3.9). The shortest path between two vertices nS and nG is the path linking these two vertices, which contains the lowest number of edges (|P |). The cost of a path P = (V�P , E�P ), denoted ||P ||, is the sum of all the weights of its edges: � ||P || = γ(e) (3.10). shortest path. The minimum-cost path between two vertices nS and nG is the path linking these two vertices, which has the lowest sum of edge weights. For planning purposes, we shall only consider admissible paths. An admissible path is a path (see Definition 5), which contains no cycles, thus we extend Definition 5 in the following manner.. minimumcost path. path cost. e∈[E�P ]. 35. admissible path.

(45) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. Definition 6 (Admissible Path) An admissible path is a path where: ∀i, j ∈ [1, n] : i �= j ⇒ ni �= nj .. (3.11). Definition 7 (Path Generation Problem) Let G = (V, E) be a graph. A Path Generation Problem is a triple P GP = (G, nS , nG ). path generation problem. (3.12). where nS , nG ∈ V . The solution to a Path generation problem P GP = (G, nS , nG ) is any admissible path P = (V�P , E�P ) such that en−1 e1 E�P = (nS → n2 , . . . , nn−1 → nG ).. Definition 8 (Plan Generation Problem) A Plan Generation Problem is a Path Generation Problem as defined by Definition 7, with auxiliary constraints on plan length, cost, etc. The solution to a Plan Generation Problem is a set of paths, each of them satisfying the given constraints. A canonical robust plan is a set of paths, each one having the same start and goal nodes, which may interleave at some other nodes. Figure 3.4 presents a simple graph with a plan leading from nS to nG , consisting of two paths. A formal definition follows.. 36. canonical robust plan.

(46) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS n3. nS. n2 nG. n1 Figure 3.4.: A simple graph with a two-path plan leading from nS to nG .. Definition 9 (Canonical Robust Plan) A canonical robust plan (plan) is a nonempty set of paths: P(nS , nG ) = {P1 , P2 , . . . , Pn } (3.13) where �i) ∀i = 1, 2, . . . , n : Pi = (V�i , E. (3.14). and every path is a solution to the given Plan Generation Problem, e.g.: ∀i = 1, 2, . . . , n : V�i = (nS , . . . , nG ).. A canonical representation of the plan shown in Figure 3.4 is as follows:. where. � � P = (V�1 , E�1 ), (V�2 , E�2 ) �1 = (nS , n1 , n2 , nG ) N E�1 = (nS → n1 , n1 → n2 , n2 → nG ) �2 = (nS , n1 , nG ) N E�2 = (nS → n3 , n3 → nG ). 37. (3.15). canonical plan.

(47) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. For dynamic execution purposes, it is often useful to represent the plan as a sequence of admissible decisions, rather than a set of paths, each one associated to a given node (state). Definition 10 (Plan Execution Decision) A plan execution decision (or short: decision) is a designated link pair e. (ncurrent → nnext ). (3.16). representing a possible action to be undertaken by the plan executor in node ncurrent , leading to the desired solution. In fact, a decision consists in following the link e towards the goal. Definition 11 (Operational Robust Plan) An operational robust plan based on a � i ), i = 1, 2, . . . , n is a set of all decisions canonical plan P(nS , nG ) = {Pi }, Pi = (V�i , E Π(nS , nG ) = {(ncurrent → nnext )}. e. (3.17). �. � i ]. [E. (3.18). such that e∈. i=1,2,...,n. As can be seen in the definition above, the operational plan is generated by creating a set of all edges from all graphs representing paths in the canonical plan. The operational representation of plans has the following properties: 1. It can allow for reduction of the amount of information, because edges repeating in more than one path are used only once. 2. It can be used to reconstruct all paths originally contained in plan P. 3. In fact, a superset of P can be generated, e.g. it is possible to generate paths not originally contained in plan P (see Example 1). 4. It is possible to count the repetitions for individual edges, which allows for comparison of edge significance in plans and identification of possible ‘bottlenecks’.. 38. decision.

(48) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. Example 1 Consider a plan2 P(nS , nG ) = {(V�1 , E�1 ), (V�2 , E�2 )} generated for the graph shown in Figure 3.5, where V1 = (nS , n1 , n4 , n6 , nG ), V2 = (nS , n2 , n4 , n7 , nG ). The resulting operational plan is Π(nS , nG ) = {(nS → n1 ), (nS → n2 ), (n1 → n4 ), (n2 → n4 ), (n4 → n6 ), (n4 → n7 ), (n6 → nG ), (n7 → nG )}. Regeneration of a canonical plan from Π(nS , nG ) would result in two additional paths being generated, namely (nS , n1 , n4 , n7 , nG ) and (nS , n2 , n4 , n6 , nG ). A plan for given start and end nodes (nS and nG , respectively) is complete if it covers all possible paths between these two nodes, i.e. if every path leading from nS to nG is a part of the plan. The introduction of the operational plan representation makes it possible to define switch nodes. Definition 12 (Switch Node) A switch node of degree k is a node v ∈ P, such that there are k decisions in node n leading to the goal node nG (i.e., k different pairs (n, n1 ), . . . , (n, nk )), denoted: ψ(n) = k. (ψ : V → N∗ ).. (3.19). Remark 3 According to Definition 12, every node is a switch node; nodes where no branches exist are switch nodes of degree k = 1. From now on, if the term switch node is used, it refers to switch nodes of degree k ≥ 2. For example, in Figure 3.4, the start node nS is in fact a switch node of degree k = 2. Also note that nS is the only switch node. 2. This example is due to Marcin Szpyrka.. 39. complete plan.

(49) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. nS. 5 n1. 7. 5 n3. 4 4. 3. 3. n2. n4. n6. 6 n5. 2. 7 n7. 2 nG. 5. Figure 3.5.: A simple graph, with optimal path from nS to nG indicated.. nC nS n1 n4 n6. d nS → n1 n1 → n4 n4 → n6 n6 → nG. g 14 9 5 2. Table 3.1.: A linear plan, represented as a decision table.. 40.

(50) CHAPTER 3. GENERATION AND EXECUTION OF ROBUST PLANS. 3.3.1. Linear Plans If the solution is in the form of a single path, the plan is a linear sequence of decisions. Such a plan shall be called a linear plan.. linear plan. Definition 13 (Linear Plan) A linear plan is a plan as defined by Definition 11, where only one decision exists for a given node and goal, i.e. every node n ∈ P is a switch node of degree k = 1. To clarify these concepts, we shall introduce a simple example. Figure 3.5 shows a simple graph. Obviously, the shortest (optimal) path from the start node nS to the goal node nG is the sequence nS → n1 → n4 → n6 → nG , marked using a thick line. The unsophisticated nature of linear plans (e.g. sequences of decisions with no branches) makes it possible to simplify their representation. However, having in mind robust plans which will be discussed further in this section, we still represent the linear plan as a decision table, shown in Table 3.1. Each decision is composed of four values: ncurrent – the current node, nnext – the next node to visit, nG – the ultimate goal node and g – the predicted cost of reaching the goal node if the decision is selected. Obviously, a linear plan can be generated using any graph search method and is equivalent to shortest path calculation.. 3.3.2. Robust Plans Section 3.1 described the idea behind robust planning. A robust plan is a set of interleaving linear plans providing a number of feasible solutions for getting from the start node to the goal node. Definition 14 (Robust Plan) A robust plan is a plan as defined by Definition 11, where multiple decisions exist in at least one node for the desired goal, e.g: ∃n ∈ P : ψ(n) ≥ 2.. (3.20). According to Definition 14, it is enough for the plan to have one switch node of degree greater than 1 in order for it to be called a robust plan. In the simplest case,. 41. robust plan.

Cytaty

Powiązane dokumenty

The main elements of the study consist of the development of a simplified probabilistic model to characterize the hydraulic effects of hurricanes on the open coast and within the

Wyznacznikiem tych warunków była gęstość zaludnienia, koncentracja zabudowy mieszkaniowej oraz skupienie usług, które posłużyły do przeprowadzenia szczegółowej

Liczba patentów przy- znanych przez krajowe urzędy patentowe w wyniku działań innowacyjnych po- dejmowanych w okresach ożywienia jest nieznacznie większa niż za aktywność

W wariantach angielskich tłumacze zdecydowali się udomowić obco brzmiące pojęcia, również w doborze ekwiwalentów wykazali się zgodnością.. Zapewne niemożność

The ear lier in ter pre ta tions are shown as lead ing to in ad e quately doc u mented and ques tion able age as sign ments for the sep a rate bone-bear ing frag

Ciekawie przedstawia się również oferta książek z literatury obcej, dzięki której czytelnicy mogli zapoznać się ze współczesną literaturą angiel- ską (Ch..

zespół kompetencji informacyjnych obejmujących umiejętności wyszukiwania infor- macji, rozumienia jej, a także oceny jej wiarygodności i przydatności oraz kompetencji

The article is based on the fieldwork conducted in Altai Krai in 2013 when qualitative data (informal interviews, group discussions, observations) were collected by the author and