ISIEA Oct10 Penang Proceedings

35 downloads 2402 Views 627KB Size Report
system, we used the Hypertext Preprocessor (PHP) webpage descriptor language to implement the interface which includes six tasks as follows. 1. Taking the ...
2010 IEEE Symposium on Industrial Electronics and Applications (ISIEA 2010), October 3-5, 2010, Penang, Malaysia

Schedule Arrangement on Mobile Devices in a GIS Environment Yin-Fu Huang and Kun-Ye Zheng Graduate School of Computer Science and Information Engineering National Yunlin University of Science and Technology Touliu, Yunlin, Taiwan 640, R.O.C. Email:[email protected], [email protected] Abstract—In this paper, we combined Geographic Information System (GIS), Global Positioning System (GPS), and wireless networks in mobile devices to develop a new Tour Arrangement System for users, and also amended the drawbacks of traditional navigation systems. Two major algorithms were proposed to generate an efficient tour path by computing real road distances in the system. Besides, we also implemented three interfaces for users to use the system. Finally, we took an example to demonstrate the effectiveness of the system in a real map and verified the generated tour path is efficient. KeywordsüGIS; GPS; Mobile Device Application; Spatial Database; Schedule Arrangement; Navigation System

I. INTRODUCTION With the considerable advances in wireless networks and GPS, a number of researches on mobile device applications were actively pursued in recent years. In a mobile environment, the common combinations with mobile devices are wireless networks, GIS, and GPS, and we can use different techniques for different requirements; for example, context-aware techniques were combined to provide different automatic services according to user locations and other basic information [3-5] or integration blogs were combined with mobile devices, GPS, and networks to record people travel diaries, and shared with everyone through the internet [1, 6]. Among them, the most popular application in numerous researches is with the route arrangement. In recent decades, navigation systems have become popular commodities; users can use the system not only to browse maps, but also to get routing paths by marking interesting spots for visiting. Nevertheless, traditional navigation systems have some drawbacks: namely 1) users have to select precise spots (i.e., not generic ones) to be visited, 2) users can only select one type at a time if systems allow spot types to be specified, and 3) users must determine the sequence of spots in advance. Therefore, in the paper, we proposed a client-server architecture to realize the tour arrangement system and solve these drawbacks. In the tour arrangement system, users can select layer objects, rather than object instances, as visited spots. In this way, users can save a lot of time instead of browsing the map to find and mark interesting spots for visiting. The remainder of the paper is organized as follows. First, the system architecture and source spatial database of the tour arrangement system are described in Section II. Two major algorithms within the system (i.e., the spatial clustering algorithm and routing algorithm) are discussed

in Section III. Then, the implementation is presented in Section IV. Finally, we make conclusions in Section V. II. SYSTEM ARCHITECTURE The tour arrangement problem defined in the paper is similar to the traveling salesperson problem. For the latter, a salesperson must visit all cities in the map, but no cities are visited more than once and the tour should be the shortest. For the tour arrangement problem, a layer object is analogous to a city and each layer object specified by users must be visited, but the difference from the traveling salesperson problem is that along the shortest path, the layer objects in the map can be visited more than once. In the proposed system, users can select the layer objects in which they are interested, and specify the diameter of a cluster. Then, the system would find the shortest path that includes exactly one object instance for each layer object, and all the object instances are within a cluster. With the automatic tour arrangement, it would be convenient to users when they use mobile devices to locate spots and arrange tours. A. System Components In the section, we described each component in the tour arrangement system, respectively in the offline and online phases as shown in Fig. 1. A client-server architecture was proposed to realize the tour arrangement system. In the system, the client software installed on user mobile devices is called client-end, whereas the engine to find the route results for user requests is called server-end. A.1 Spatial Databases and Data Preprocessing (Offline) In the paper, the source spatial database as shown in Fig. 1 consists of three types of data tables; i.e., Spatial Road Network, Road Intersection, and Points of Intersection (POI). Both the spatial road network and road intersection represent the road map, and the POI

Figure 1. Tour arrangement system

978-1-4244-7646-6/10/$26.00 ©2010 IEEE

322

represents buildings, scenery spots or specific points in the map. In the spatial road network, a road is represented with a line. The road table stores all road information such as road id, road full name, road length, start node, and end node et al. In the road intersection, an intersection is represented with a point. The intersection table stores the information of all intersected roads. In the POI, sites such as building, scenery spots or specific points are represented with points. The site table stores the site information. Although the source spatial database provides complete information, we need to do data preprocessing in the offline phase since some data in the database are not relevant to finding the route. Here, during the data processing, we used the source spatial database to create new data tables useful and efficient for the arrangement engine accessing. Data processing consists of two parts: Spatial Data Categorization and Route Map Generator. A.2 Client-end and Data Transfer Interface (Online) On the client-end, a user coordinate can be located by the GPS receiver in his/her mobile device, which acts as the query point in the system. The client-end provides two service functions for users; i.e., 1) browsing the map using mobile devices, and 2) selecting interesting layers and getting back the tour arrangement from the server. Data Transfer Interface plays an intermediate role between clients and the server. All information and control interchanges are through the interface. In the system, we used the Hypertext Preprocessor (PHP) webpage descriptor language to implement the interface which includes six tasks as follows. 1. Taking the coordinate where users are located 2. Offering an interface for users to specify the layers and diameter 3. Integrating all information into a txt file 4. Sending a route request to the server 5. Receiving route results from the server 6. Requesting the user interface to download the result file A.3 Server-end (Online) The server-end receives a route request and provides users the tour arrangement. Three tasks are included in the server; i.e., 1) spatial clustering, 2) routing, and 3) presentation. For the spatial clustering, the server creates a few clusters in the map according to the user coordinate, the selected layers, and the specified diameter. Taking the user coordinate as the start node, the server retrieves the objects from the spatial layer database based on the selected layers. Then, it searches and creates several clusters using the specified diameter. In other words, each of these clusters consists of all the selected layer objects. For the routing, the server tries to find the minimumdistance path from these clusters. Here, we proposed an Efficient Tour Arrangement Path (ETAP) algorithm derived from the ECT algorithm [2] to obtain the minimum-distance path in every cluster. Then, the server selects the minimum-distance path among all clusters as the result path, and stores it into the database. Presentation is the last step in the server. The server sends a request to users for downloading the route result

323

from the database, and then the route path would be shown in user mobile devices. III. TOUR ARRANGEMENT ENGINE This section is dedicated to the details of the tour arrangement engine. The engine is involved with two major algorithms; i.e., the spatial clustering algorithm and routing algorithm. A. Spatial Clustering Algorithm The spatial clustering algorithm has three parts for finding spatial clusters; i.e., deciding moving step, defining stopping threshold, and finding clusters. The detailed steps of the spatial clustering algorithm are given as follows. Spatial Clustering Algorithm (user coordinate, selected objects, diameter) Step1. Decide moving step md. Step2. Initialize stopping threshold td as Ќ. Step3. With step md, find clusters in a spiral search manner. Step4. Update td if įc < įmin where įc is the distance from the user coordinate to the nearest object instance in current cluster c, and įmin is the minimum one among all precedent įi. Step5. Repeat Step3 and 4 until įc > td. In the algorithm, we used a spiral search method to find spatial clusters step by step, and each cluster has to conform to two conditions. One condition is a cluster must consist of at least one object instance for each specified layer object. The other condition is the distance from the user coordinate to the nearest object instance in a cluster must be less than or equal to a stopping threshold. In the algorithm, we first used a quad-tree strategy to decide the moving step. Then, finding spatial clusters would not terminate unless the stopping condition is met. A.1 Deciding Moving Step Here, deciding moving step requires computing the minimum distance between layer objects. Definitely, the minimum distance between layer objects is the optimal one to be used in the algorithm, if possible. However, finding the minimum distance between layer objects requires the whole objects in the map, and this would take us enormous execution time when the amount of object instances is huge. Therefore, we used a quad tree strategy to divide the map, then computed the amounts of object instances in four regions, and finally selected the region with the most object instances as the one to be divided in the next iteration. The reason is, we though, that the minimum distance between layer objects probably exists in the densest region. Thus, we repeated the process until each of four regions contains the same layer object. The procedure in deciding moving step is as follows. Step1. Quarter the whole map. Step2. Compute the amounts of object instances in the regions with at least two layer objects. Step3. Select the region with the most object instances and quarter it. Step4. Repeat Step2 till each of four regions contains the same layer object. Step5. Return to the precedent level and find the minimum distance between layer objects.

Figure 2. Example of POI layers

Figure 3. Dividing the map

Figure 8. Grids where the star represents the user coordinate and green circles represent the center of clusters

Figure 4. Dividing region 4

Figure 5. Dividing next region 4

For the example as shown in Fig. 2, we want to find the minimum distance between convenience stores (denoted by yellow nodes) and post offices (denoted by blue nodes). After dividing the original map as shown in Fig. 3, we compute the amounts of convenience stores and post offices in four regions (e.g., the amount of convenience stores 7 and post offices 3). Then, we select region 4 and divide it once more as shown in Fig. 4. Next, we still select region 4 and divide it once more as shown in Fig. 5. Finally, after the last dividing (not shown here), we return to region 2 as shown in Fig. 5, and find the minimum distance md. A.2 Defining Stopping Threshold In the spatial clustering algorithm, a stopping threshold determines whether the algorithm terminates or not. When a new cluster c is found, we compute the distance įc from the user coordinate to the nearest object instance in the cluster, and then use the stopping threshold to determine whether the algorithm should terminate as follows. Case 1: td=įc + (n-1)D if įc < įmin, and find the next spatial cluster Case 2: terminate the algorithm if įc > td where įc and įmin are defined in Section III.A, n is the number of specified layer objects, and D is the specified diameter. For the example as shown in Fig. 6, we have three clusters 1, 2, and 3 with į1, į2, and į3 from the user coordinate to them, respectively, and the minimum one įmin is į2. For another example as shown in Fig. 7, we have four layer objects within a cluster, and the route length is at most 3*D in the worst case.

Figure 6. įi from the user coordinate to different clusters

Figure 7. Route length in the worst case

324

Figure 9. Finding clusters with moving step md

A.3 Finding Clusters As mentioned in Section III.A, we used a spiral search method to find spatial clusters step by step. As shown in Fig. 8, on the grids with each length md, the star represents the user coordinate and green circles labeled in a spiral sequence represent the center of clusters. As shown in Fig. 9, we move the circle center where the yellow circle represents a cluster range with diameter D, and check all layer objects and distances; i.e., 1) at least one object instance for each specified layer object is within this cluster, and 2) the distance from the user coordinate to the nearest object instance should be less than or equal to td. The procedure in finding clusters is as follows. Step1. Get the current cluster center and D. Step2. Get all object instances within the cluster. Step3. Check whether at least one object instance for each specified layer object is within the cluster. If not, find the next cluster. B. Routing Algorithm In the section, we described the routing algorithm containing three parts; i.e., graph transferring, kernel routing, and route presentation. B.1 Graph Transferring As shown in Fig. 10, although the city map of a cluster is convenient for users to locate some place, it cannot be directly used in the routing algorithm since more information such as road lengths, road intersections, road start nodes, and road end nodes are still required in the algorithm. Therefore, we proposed a method for transferring the city map of a cluster to a routing graph as shown in Fig. 13. The transferring method consists of two parts; i.e., the preliminary routing graph generator and the object instance projection.

Figure 10. City map of a cluster

Figure 11. Preliminary routing graph

Figure 12. Object instance projection

Figure 13. Routing graph

specified objects are with triangles, circles, and diamonds corresponding to 7-11, Post offices, and Banks in the routing graph. The procedure of the ETAP algorithm is as follows. For each combination of specified layer objects, we would execute the following steps to find out an efficient path to visit all of them in the routing graph. First, we find all shortest paths from the star to each object instance in an indicated combination. Second, we filter out useless paths; i.e., 1) it is a sub-path of any other paths or 2) all nodes in the path have been found in the precedent iterations. Thirdly, we choose an efficient path with the minimum average cost from the remaining paths. Fourthly, we mark the specified layer objects on the efficient path as found. Fifthly, we take the last node in the efficient path as a new start node. Finally, we repeat the procedure till all specified layer objects are included in the concatenated path. For the efficient paths from all combinations, we would select the ones with the minimum distance as the final routes. For Step3, the average cost of a shortest path is defined as follows: average cost(shortest path) =

the cost of a shortest path the number of specified layer objects new-included

The detailed algorithm of ETAP is formally given as follows: Figure 14. Projection method

For the preliminary routing graph generator, we use the route database as mentioned in Section II.A.1 to generate a preliminary routing graph as shown in Fig. 11. In the preliminary routing graph, a yellow node represents a road intersection, whereas a blue line means a connect relation between two road intersections. Here, instead of using the Euclidean distance, we used a real road distance to represent a road length. Next, for the object instance projection, we would project specified object instances to the preliminary routing graph and then shift these object instances onto road intersections, thereby generating the routing graph. As shown in Fig. 12, triangles, circles, and diamonds corresponding to 7-11, Post offices, and Banks are projected to the preliminary routing graph. Next, we shift these object instances onto road intersections, as shown in Fig. 13. For the projection and shifting of an object instance, we could explain the method using the example as shown in Fig. 14. Given road nodes A and B, and an object instance C, first we can get the line L1: Y=X on which A and B are located. Then, based on L1 and C, we can get the perpendicular line L2: 4X+4Y=16. Next, we solve the simultaneous equations L1 and L2 to get D which is the projection node of C in L1. Finally, we find that road node B closer to D would be designated as what D is shifted onto. B.2 Kernel Routing In the section, we proposed an Efficient Tour Arrangement Path (ETAP) algorithm derived from the Efficient City Tour (ECT) algorithm [2] to find out an efficient path in a routing graph, according to the layer objects specified by users. The efficient path is defined as the one with the minimum distance to visit all specified layer objects in a cluster. For the example as shown in Fig. 11, a user coordinate is represented with the star, and three

325

ETAP (user coordinate, cluster) /* Parameter definition Start_n: the start node, End_n: the set of selected object instances, T: the set of selected object instances not included yet, S: the set of all shortest paths from Start_n to the object instances in End_n, Eff_path: a close-to-minimum path including all selected object instances, Eff_subp: sub-path of a close-to-minimum path, selected from S */ For each combination of specified layer objects Eff_path = ø; Eff_subp = ø; S = ø; Do { Step1. Find all shortest paths from Start_n to each object instance in End_n using Dijkstra algorithm, and add them to S. Step2. Filter out all useless paths from S. Step3. Choose an efficient sub-path Eff_subp with the minimum average cost in S. Step4. Delete the object instances on Eff_subp from T. Eff_path = Eff_path Eff_subp; Step 5. Start_n = the last node in Eff_path; End_n = End_n – Start_n; Eff_subp = ø; S = ø; } While (T is not empty); Endfor;

From all combinations, select the ones with the minimum distance as the final routes.

same distance 282.918 meters, which are marked with the green lines labeled with the route sequence, as shown in Fig. 15.

Here, we take the routing graph as shown in Fig. 13 as an example, where three layer objects A, B, and C are selected by users and the star is the start node. The partial results for each round are as follows: Initial: the number of combinations as shown in Table I = |A|*|B|*|C| = 5*1*2 = 10

B.3 Route Presentation After finding the final routes as shown in Fig. 15, we observed they always pass road intersections. However, the object instances are actually on road sides, but not at road intersections. Therefore, we proposed a presentation method to recover an actual route by shifting the object instances back to their original locations and extending the route to the object instances.

TABLE I. ALL COMBINATIONS

ID 1 2 3 4 5

Combinations a1,b1,c1 a1,b1,c2 a2,b1,c1 a2,b1,c2 a3,b1,c1

ID 6 7 8 9 10

Combinations a3,b1,c2 a4,b1,c1 a4,b1,c2 a5,b1,c1 a5,b1,c2

IV.

For the combination {a1,b1,c1} Round 1 Start_n=the star, End_n={a1,b1,c1}, T={a1,b1,c1} S Average cost discarded star ĺ a1 93.891 /2 = 46.9455 star ĺ a1 ĺ n7 ĺ b1 210.422 / 2 = 105.211 star ĺ a1 ĺ n7 ĺ n8 ĺ c1 (star Ш a1 Ш n7 Ш b1) is an efficient sub-path with the minimum average cost Eff_path= (star Ш a1 Ш n7 Ш b1) Round 2 Start_n= b1, End_n={a1,c1}, T={c1} S Average cost discarded b1 ĺ n7 ĺ a1 189.027 / 1 = 189.027 b1 ĺ n7 ĺ n8 ĺ c1 (b1 Ш n7 Ш n8 Ш c1) is an efficient sub-path with the minimum average cost Eff_path= (star Ш a1 Ш n7 Ш b1)Ж(b1 Ш n7 Ш n8 Ш c1)= (star Ш a1 Ш n7 Ш b1 Ш n7 Ш n8 Ш c1) T= ø, so stop the process. The route result is star Ш a1 Ш n7 Ш b1 Ш n7 Ш n8 Ш c1 with distance 282.918 meters. For the combination {a1,b1,c2}: The route result is star Ш a1 Ш n7 Ш b1 Ш n7 Ш n13 Ш n14 Ш n20 Ш n21 Ш n22 Ш c2 with distance 573.692 meters. After finishing the computations for all combinations, we find two final routes (i.e., star ė a1 ė n7 ė b1 ė n7ė n8 ė c1 and star ė n7 ė b1 ė n7 ė a2 ė c1) with the

A. The Developing Environment For the tour arrangement system, the server platform is equipped with 2.13GHz Core 2 CPU, 2G main memory, and running Windows XP sp3, whereas the client platform is furnished with 400MHz CPU, 512M ROM/64M RAM, and running Windows Mobile 6.0 Standard. The functions within the system were implemented using VBscript and Hypertext Preprocessor, and two databases (i.e., MySQL and spatial databases) were used to store different types of data. B. Function Design and Visual User Interface There are three user interfaces in the system; i.e., 1) the interface for user mobile devices provides a control platform for users, 2) the interface for managing tour arrangement provides webpages for users to specify layer objects, and 3) the interface for tour arrangement results displays routing paths on mobile devices. B.1 Interface for User Mobile Devices As shown in Fig. 16, the main control interface provides a menu with four buttons; i.e., 1) GPS control panel, 2) map control panel, 3) connecting server, and 4) routing presentation. The GPS control panel as shown in Fig. 17 includes two functions; one is to activate the GPS and another is to show the GPS status. Next, the map control panel as shown in Fig. 18 includes four operations to view the map. The last two buttons would be explained in the following sections. B.2 Interface for Managing Tour Arrangement The interface for managing tour arrangement is activated by the connecting server button stated in Section IV.B.1. The interface was designed using the dynamic HTML syntax, and implemented by Hypertext Preprocessor and the MySQL database system. Here, four types of webpages are provided as follows: 1. Start location page: users can select a start location when the system cannot get their GPS coordinates, as shown in Fig. 19.

Figure 16. Main interface Figure 15. Final routes

326

IMPLEMENTATION

Figure 17. GPS control panel

Figure 18. Map control panel

2. Layer object page: all objects are spread into a threelayer hierarchy, and users can select objects at will, as shown in Fig. 20. 3. Object checking page: Uses can check specified objects, as shown in Fig. 21. In the page, they can have three choices; i.e., 1) re-selecting objects, 2) deciding a sequence as shown in Fig. 22, and 3) going down to the diameter setting page as shown in Fig. 23. 4. Route waiting page: after a diameter is set, the routing request would be sent to the server. Then, users wait for the reply as shown in Fig. 24 till they can download the route as shown in Fig. 25.

[3]

[4]

[5]

[6]

B.3 Interface for Tour Arrangement Results The interface for tour arrangement results is activated by the routing presentation button stated in Section IV.B.1. After users download the routing results from the server, they can press the routing presentation button and the routing path would be displayed on mobile devices as shown in Fig. 26. V. CONCLUSIONS In general, a huge number of spatial objects and a complicated spatial network exist in a Geographic Information System (GIS). It is not difficult to find an efficient or shortest route in the geographic information system if users have given explicit object instances (i.e., with precise locations) to be visited no matter what sequence of these object instances has been assigned or not. In the paper, with the automatic tour arrangement provided by our system, users can use mobile devices to specify layer objects to be visited of which each may have multiple instances in the spatial network. To reach the goal, two major algorithms (i.e., the spatial clustering algorithm and routing algorithm) were proposed to provide the services of efficient tour arrangement. The new techniques proposed here not only improved the drawbacks of existing GIS technique for finding a routing path, but also provided more generic views of schedule arrangement problems.

of Information Science and Engineering, Vol. 22, No. 1, pp. 123146, 2006. Bratislav Predic, Dragan Stojanovic, Slobodanka DjordjevicKajan, “Developing context aware support in mobile GIS framework,” Proc. the 9th AGILE Conference on Geographic Information Science, pp. 90-97, 2006. Gustavo Rossi, Silvia Gordillo, Cecilia Challiol, Andrés Fortier, “Context-aware services for physical hypermedia application,” OTM Workshop, pp. 1914-1923, 2006. M. Sheleiby, M.R. Malek, A. Alesheikh, P. Amirian, “Automatic map scaling in car navigation systems using context-aware computing,” World Applied Sciences Journal, Vol. 3 (Supple 1), pp. 101-106, 2008. Kharsim Yousef, Eamonn O'Neill, “Sunrise: towards location based clustering for assisted photo management,” Proc. the ICMI Workshop on Tagging, Mining and Retrieval of Human Related Activity Information, pp. 47-54, 2007.

Figure 21. Object checking page

Figure 19. Start location page

Figure 20. Layer object page

Figure 22. Deciding a sequence

Figure 23. Diameter setting page

Figure 24. Route waiting page

Figure 25. Downloading the route

ACKNOWLEDGMENT This work was supported by National Science Council of R.O.C under Grant NSC99-2220-E-224-005. REFERENCES [1]

[2]

Will Bamford, Paul Coulton, Reuben Edwards, “Space-time travel blogging using a mobile phone,” Proc. ACM International Conference on Advances in Computer Entertainment Technology, pp. 1-8, 2007. Yin-Fu Huang, Chao-Nan Chen, “Implementation for the arrangement and mining analysis of traveling schedules,” Journal

327

Figure 26. Routing paths