Optimizing travel routes using temporal networks constructed from global positioning system data in kyoto tourism

Owing to the complexity of urban transportation networks and temporal changes in traffic conditions, the assessment of real-time traffic situations is a challenge. However, the development of mobile information devices using the global positioning system (GPS) has made it easier to obtain personal mobility information. In this study, we developed a method for evaluating the mobility of people in a city using GPS data. We applied two methods: evaluating human mobility using temporal networks constructed from GPS data, and searching for the shortest path by constructing and solving the time-dependent traveling salesman problem (TDTSP). The estimation is expected to be more realistic if transportation delays from congestion are considered. This study makes two major contributions. First, we propose a new method for estimating the time weights of edges in temporal networks using probability density functions for the travel time. Second, to apply ant colony optimization to the TDTSP, we propose a new method for estimating the congestion level from GPS data and calculating the transition probability using the estimated congestion level. As a case study, we conducted a human mobility analysis in Kyoto City.


Introduction
Transportation planning is a significant issue in urban areas [1]. Although smooth transportation contributes significantly to satisfaction in the daily lives of residents, transportation planning is becoming more difficult to achieve owing to the global population growth occurring in urban areas. In addition, the development of tourism has increased the number of visitors to these areas and a known tourism problem has emerged [2], negatively affecting both visitors and residents [2][3][4].
Three factors complicate urban transportation [5]. First, cities are often densely populated with tunnels and elevated structures that form complex transportation networks with numerous roads. Second, travelers may be heading toward different destinations. This creates significant uncertainty in transportation planning as the number of travelers increases. Third, the road traffic changes over time. Depending on the traffic congestion, travelers may change their mode of transportation and travel route, and travel times for the same traveling route can vary significantly.
However, owing to the recent development of mobile information devices, it has become easier to obtain and provide mobility information to individuals. Mobile devices such as smartphones are now widely used and carried by most individuals. It has therefore become possible to compose big data from the global positioning system (GPS) measured using such devices and to apply the data in analyzing human mobility [6].
Network science is a useful approach in this regard [7,8]. Networks whose connection status changes over time, i.e., temporal networks [9], are more difficult to evaluate than static networks because of their time-varying nature; however, because they represent real-world problems well, they have been used in various fields such as interpersonal communication [10][11][12][13], transmission to an unspecified number of people using Social networking service (SNS) and the web [14][15][16][17], physical contact [18][19][20][21], and cytology [22][23][24][25]. Temporal networks are also preferred for representing movement and capturing changes in traffic conditions over time. Kujala et al. used temporal networks to evaluate a public transportation system in Helsinki [26]. They constructed networks from timetables and open map information and evaluated the public transportation system by focusing on the travel time and number of transfers.
In addition, the shortest-path problem can be used to determine an efficient travel route and in recent years has become a real-world problem with a time component [27]. Heuristic solutions to such problems, including the timedependent traveling salesman problem (TDTSP), have been devised [28][29][30][31].
In this study, we applied two methods: evaluating human mobility using temporal networks constructed from GPS data, and searching for the shortest path by constructing and solving the TDTSP. With both methods, the location information measured from mobile devices is converted into a timetable of location transitions, called "transfer connections," from which an optimal set of paths to the destination is obtained for constructing a mobility network. By improving the existing methods used in constructing temporal networks developed for an evaluation of public transportation [32], we created temporal networks using the GPS data from mobile devices. We estimated the time weights of the edges in the TDTSP from the GPS data based on a method used to create a temporal network [32]. In evaluating movement using temporal networks, networks are visualized and compared according to seasons, time slots, and whether the person moving is a resident or a visitor. With the methodology applied in finding the shortest path, the time weights of the TDTSP are determined from the set of optimal paths, and the ant colony optimization (ACO) method is used to solve the problem. When applying the ACO method, the congestion level is separated from the GPS and used in calculating the optimization.
The estimation is expected to be more realistic if transportation delays from congestion are considered. The main contributions of this study are as follows: We propose a new method for estimating the time weights of the edges in temporal networks using probability density functions for the travel time. In addition, to apply ACO method to the TDTSP, we propose a new method for estimating the congestion level from GPS data and calculating the transition probability using the estimated congestion level.
The remainder of the paper is organized as follows. We introduce the primary methodology in Section 2. In Section 3, we discuss improvements to the basic methodology. In Section 4, the proposed method is described. Next, we discuss the results of a case study in Section 5. Finally, we provide some concluding remarks in Section 6.
2 Basic methodology

Temporal network configuration method
Although the static network theory is used in various fields, several real-world networks have changed over time. Networks in which edge connections change over time are called temporal networks [9]. Temporal networks are often more realistic than static networks, and have been used in road traffic analyses. Kujala et al. [26] constructed a temporal network using public transport timetables to model the movement of people. To construct the network, the authors used the multi-criteria profile connection scan algorithm (mcpCSA) [32], which is an extension of the profile connection scan algorithm (pCSA). The mcpCSA extends the Pareto-optimal (departure time and arrival time) treated in the pCSA to the multi-criteria Pareto-optimal (departure time, arrival time, and number of transfers). This algorithm is used to compute the optimal travel time in a dynamic public transportation network, which can represent many events occurring between nodes as a temporal network.

Connection scan algorithm
The connection scan algorithm (CSA) is the original form of many different derived algorithms. The CSA can calculate the fastest time to reach each stop from a given starting node. Denote each stop by p. Let P be the set of stops, and let p ∈ P. Connection information c consists of the departure stop, arrival stop, departure time, and arrival time. Let C be the set of information, and let c ∈ C. Instead of using a graph, such as with Dijkstra's algorithm, this algorithm uses an array C of timetable connections sorted by the departure time. Upon receiving the origin ps and departure time τ of ps as inputs, labels τ(p) representing the shortest arrival time at each stop are initialized to infinity. Subsequently, c ∈ C is scanned to determine whether it is reachable. A connection c is considered reachable if either the traveler is already traveling on a primary connection of the same trip or standing at the departure stop of the connection at departure time. Here, p arr (c) denotes the arrival stop of the connection information c. If it is reachable, the arrival time of c improves the label τ(p arr (c)) of the destination and updates the label. The process is repeated until all C have been scanned.

Profile connection scan algorithm
An extension of the CSA for more complex scenarios is the profile CSA (pCSA). This algorithm returns a set of Paretooptimal paths (departure and arrival times) from each stop to a particular destination. Here, Pareto-optimal means that the departure time is optimized to be slower, and the arrival time is optimized to be faster. This algorithm uses array C of timetable connections sorted in descending order of the departure time. When destination p t is given as an input, it creates an empty set of Pareto-optimal paths for each stop, c ∈ C is scanned in turn, and pt is checked to determine if it is reachable. If it is reachable, and if (τ dep (c), τ*) is Pareto-optimal compared with the set of paths held by the starting node of c, it is added to the set. Here, τ dep (c) represents the departure time of c, and τ* represents the arrival time to p t . This is conducted until all of C has been scanned.

Time dependent traveling salesman problem
To avoid traffic congestion, it is essential to determine the efficient travel routes and thereby facilitate movement. We formulate and solve the TDTSP to determine the travel route.

Problem formulation
The TDTSP is the shortest path problem on a timedependent network represented by a directed graph G = (V, E, W, T). Here, V represents the set of nodes, E represents the set of edges, W represents the set of time weights, and T represents the time interval. With the TDTSP, the weights on the graph change after a specific period. Interval T is the set of time periods for which the weights are constant. The weight w(i, j, τ) ∈ W depends on the starting node i ∈ V, ending node j ∈ V, and time τ ∈ T. In addition, Path[v 0 , v 1 , . . ., v n ] represents the transition permutation of the nodes from v 0 ∈ V to v n ∈ V. When the time starting from v 0 is τ 0 ∈ T, the sum of the time weights of Path , is calculated recursively as follows, ) . (2) The TDTSP is a combinatorial optimization problem for finding a path such that f τ0 (Path[v 0 , . . . , v n ]) is minimized.

Ant colony optimization
The ACO method [33] iterates the search by K agents S times to find a solution to the TDTSP, i.e., path Path[v 0 , . . ., v n ] with the minimum total time cost f τ0 (Path[v 0 , . . . , v n ]) [28][29][30][31]. With the ACO method, each edge e(v i , v j ) ∈ E has a pheromone σ i,j (τ) for each time τ ∈ T. Agent k at node i ∈ V at time τ calculates the transition probability p k i,j (τ) to the next node according to the pheromone, The next node can be randomly determined using a certain probability to avoid a local solution. Here, Ω is the set of nodes that agent k has not yet visited, and η ij (τ) is heuristic information. Parameters α and β are constants that control the relative importance of a pheromone versus heuristic information η ij . For α and β in Eq. 3, α = 2 and β = 3 were used throughout the study. For our problem, the results did not change significantly within the ranges of α and β = 2 through 4. Heuristic information η ij is calculated using the following equation: where Q = 50 is used throughout the study. The results did not depend on the value of Q. The transition path from v 0 to v n and the corresponding total time cost of agent k are defined as Path k [v 0 , . . ., v n ] and f k τ0 (Path k [v 0 , . . . , v n ]), respectively. If the paths Path k [v 0 , . . ., v n ] by agent k ∈ K and the total time cost f k τ0 (Path k [v 0 , . . . , v n ]) are better than the best solutions found thus far, they are stored as the new best solutions. After all agents have completed their search, we update the pheromone (see Eq. 7) and finish the process in step s ∈ S. This is repeated S times to obtain Path[v 0 , . . ., v n ] with the minimum total time cost f τ0 (Path[v 0 , . . . , v n ]).

Improvements
We improved the method described in Section 2 to suit our purposes. The novelty of our improved method is twofold: 1) the application of the pCSA to GPS data using a mesh transition, and 2) consideration of congestion in the ACO.

Improvement of profile connection scan algorithm
We used the pCSA to construct a temporal network. Because this study uses GPS data to calculate the optimal travel route, we Frontiers in Physics frontiersin.org must process the GPS data in such a way that they can be used by the pCSA. Transfer connections are formed from the GPS movements of the same mobile device. GPS data for personal mobility consist of the measured time and position information in latitude and longitude. However, the granularity is too fine; therefore, we need to divide the map into grids and create a timetable of transitions between the grid points. GPS data are converted into transfer connections that represent transitions between grid points. For example, suppose an individual is at a latitude and longitude of 52.0 and 13.0, respectively, at 6:00. The individual then moves to a latitude and longitude of 53.

Improvement of ant colony optimization
We estimate the congestion level and obtain the pheromone for each period. Pheromone σ i,j (τ) is expressed as follows: where σ 0(i,j) is defined in Eq. 7 as the pheromone of e(i, j), and θ j (τ) is defined as the congestion level of destination j at time τ.
Congestion is given as a number between zero and 1, and the more congested a location is, the more difficult it is to choose. The following equation expresses the congestion: We can detect the number of people at node j at each time point from the GPS data. Here, l j max is the number of people at node j per time when the number of people staying at node j is the highest, and l(τ) is the number of people at node j during time τ.
The following equation represents the update of the pheromone: where ρ is the rate at which the pheromone remains after evaporation. The closer the value is to 1, the smaller the amount of pheromone that is evaporated. To ensure that the pheromone effect is obtained correctly throughout the paper, ρ in Eq. 7 was set to 0.9. The increment in pheromone Δσ i,j is determined by agent k: Here, γ k is the total moving cost of agent k, and R is a constant. We used R = 50 throughout this paper. We confirmed that varying the value of R did not affect the results.

Proposed methodology
With the development of mobile information devices, tracking individual movements has become possible. Even mobile phones, including smartphones, can use GPS. With this trend, it is becoming possible to analyze big data on personal mobility. Individual mobility can be evaluated in greater detail, such as when and where people are more likely to move.
In this section, we propose methods for analyzing individual mobility using temporal networks and creating the TDTSP to search for the shortest path with meta-heuristics using the actual GPS data from individuals.

Global positioning system data
We used the GPS data provided by Agoop, Inc. These data were obtained from the users of a mobile device application who provided their consent. The data are linked to a daily ID that identifies the device and allows it to be tracked for a single day. Agoop, Inc. collects GPS data in real-time. The frequency of such data provisioning to the user (researcher) depends on the contract. If the proposed method is to be put into practical use, increasing the frequency of the data provided is necessary.
This study used 58 days of data collected in Kyoto during February and April 2019. In 2019, Kyoto had the fewest number of tourists in February, and Kyoto had the highest number of tourists in April. Table 1 shows the number of data measured during each month. Although the number of mobile devices used for the measurements was higher in April, the number of logs was lower. The GPS data used in this study were obtained when the user conducted an action after the application was launched. As the application runs in the background, it measures when a user moves a significant distance, remains in a facility, or after a certain amount of time, depending on the operating system. Because the number of logs depends on the user activity, it is difficult to determine the cause of the low number of logs in April.

FIGURE 1
Total number of data logs by time slot. Notably, the number of measurements is high during the daytime when people are actively moving and is low at night.

FIGURE 2
Estimated percentage of residential areas in all logs. Approximately 80% were Kyoto residents, and 1% were visitors from overseas.
Frontiers in Physics frontiersin.org 05 Figure 1 shows the number of logs measured based on the time zone for all data. This shows that the number of logs is low during late-night hours when people are immobile, and the number of logs increases as people become mobile at approximately 8:00.
These data are accompanied by an estimate of the residence location of the mobile device owner. The percentages of all logs classified based on the residential area are shown in Figure 2. A total of 20% of the visitors were from outside Kyoto Prefecture, and 1% of all logs were from overseas. The users of the travel route recommendation system are mainly travelers from overseas. Because they account for only 1% of the total number of travelers, changes in the behavior of overseas travelers will not significantly affect the amount of traffic.

Temporal network and movement analysis
We constructed a temporal network using GPS data and analyzed the movement of people. Figure 3 shows the research flow, the details of which are as follows: The first step is to sort the GPS data by mobile device. The second step is to transfer connections formed from the GPS data of the same mobile device, and array C is created by sorting them in descending order of departure time. The third step involves calculating sets of optimal paths to destination p t using the pCSA. Finally, the resulting set is analyzed.
To use the pCSA, GPS data are converted into transfer connections, as described above. In this study, we divided the study area into 50-m square grids and formed transfer connections between them. From these transfer connections, the pCSA is used to calculate the optimal path to the destination. The algorithm provides sets of optimized paths for the input p t . For the analysis, we compared the travel time by season and the time slot by creating a probability density function of the travel time to the destination, which is discussed in detail in the following section.

Travel route search using metaheuristics
The TDTSP from GPS data was used to calculate the shortest path. Figure 3 shows the research flow applied, the details of which are as follows. The first step is to calculate the optimal path from the GPS data in the same way as described above. The second step is to determine the travel time cost and the TDTSP from the obtained sets of optimal paths. Finally, meta-heuristics explore paths with low travel time costs around specified nodes.
Using the pCSA, we find the optimal set of paths to move the edges in the network. Subsequently, we must determine the time weight W of dynamic graph G. We now consider how to determine the time weight w(i, j, τ) from node i to j. We use the pCSA with j as the input and divide the optimal set obtained from the pCSA into subgroups according to time τ ∈ T when departing from node i. For this subgroup, we compute the time weight w(i, j, τ). Considering real-world scenarios, w(i, j, τ) should be close to the cost of moving directly from i to j during that period. Because many paths with long travel times are formed when connecting intermediate points using the pCSA, we adopt the shortest travel time within a lower probability of 5% of the probability density function of the travel time, described in Section 5.1.2, which is indicated as w(i, j, τ) in this study. The solution to the TDTSP is determined based on Eqs. 3, 9.

FIGURE 3
Research flow of mobility analysis using temporal networks (top) and a travel route search using meta-heuristics (bottom). The flow remains the same until the GPS data are preprocessed, and the optimal set of paths is formed using the pCSA. In the mobility analysis using temporal networks, a set of optimal paths is visualized in an analyzable form. In a travel route search using meta-heuristics, a set of optimal paths is used to determine the TDTSP.
Frontiers in Physics frontiersin.org We conducted a case study of mobility analysis based temporal networks using GPS data and the shortest travel route search using metaheuristics with location information observed in Kyoto City. Figure 4 shows a map of Kyoto City, with the locations (nodes) used in the case study indicated. The locations surrounded by the red frame represent the nodes used in the temporal network mobility analysis. Movement from Hyakumanben to Kyoto Station and from the Ennmachi intersection to Kyoto Station were compared and analyzed. The nodes surrounded by blue frames represent the points considered as the nodes for the TDTSP. To validate the method, it this case study, we selected six typical tourist spots in Kyoto as nodes. When the proposed method is put into practical use, nodes can be added without difficulty. The case study is described in detail.

Analysis by meantime of movement
We searched sets of optimal paths from GPS data using the pCSA. We obtained the travel time to the destination for each time slot from the set of paths. Here, the travel time includes the waiting time at a departure node until subsequent transportation is available. Suppose that a traveler at a node at time t 0 leaves the departure node at time t 1 and arrives at the destination node at time t 2 . Although the exact travel time is t 2 − t 1 , departure time t 1 is not recorded in the GPS data, and the travel time obtained from the GPS data is t 2 − t 1 + (t 1 − t 0 ) = t 2 − t 0 , including the waiting time t 1 − t 0 at the departure node. Figure 5 shows the average travel time from Hyakumanben to Kyoto Station during February and April. The locations of Hyakumanben and Kyoto Stations are shown in Figure 4. The stations are 6.1 km apart by road, and it is therefore expected that it will take approximately 20 min to arrive at the destination by car. The average travel time in this study was the monthly average hourly travel time for each day. Because it takes only approximately 30 min to travel from Hyakumanben to Kyoto Station by bus, any trip that takes more than 120 min is excluded as an outlier. The travel time in the morning is shorter in April, and remains almost the same from approximately 14:00 onward. The observed shorter travel time in April is counterintuitive to the fact that more people travel in April, as shown in Table 1. However, this result includes the waiting time for movement. If only a small number of movement data is measured, the waiting Frontiers in Physics frontiersin.org time will be much longer. Although the method for evaluating the travel time, including the waiting time, is also effective for evaluating public and other transportation types with a predetermined timetable, there was a concern that the results of this research would deviate from reality. Therefore, we considered an analysis method that is unaffected by the waiting time. We adopted the shortest travel time w(i, j, τ) within the lower probability of 5% of the probability density function of the described travel time.

Analysis using the probability density function of travel time
As a case study, we compared the travel time from the Hyakumanben and Ennmachi intersections to Kyoto Station. The locations of these points are shown in Figure 4. The distance from Ennmachi intersection to Kyoto Station is 5.9 km by road, which is almost the same as the distance from Hyakumanben to Kyoto Station. However, the trip from Ennmachi intersection to Kyoto Station can take approximately 10 min by train from Ennmachi intersection, which is 150 m away.
We can obtain the optimal set of paths to our destination using the pCSA with GPS data. Using the pCSA with Kyoto Station as the destination, we obtained the optimal set of paths from Hyakumanben and Ennmachi intersections. A comparative analysis was used to extract subgroups from those sets that matched the conditions and compare the density functions of the travel time of the paths included in the subgroups. Figure 6 shows the travel time from Hyakumanben to Kyoto Station, and Figure 7 shows the travel time from Ennmachi intersection to Kyoto Station. The density functions were created for (a) February and April, (b) Kyoto citizens and visitors, (c) weekdays and weekends, and (d) departure times at between 8: 00 and 13:00 and between 13:00 and 18:00.
In Figures 6A, 7, we compare the probability density functions of the travel times in February and April. Figure 6 shows that the peak of the probability density function formed at a shorter distance in February. Compared to Figure 5, which shows the same comparison within the same interval, the overall travel time was longer in February. In other words, in Figure 5, the waiting time for travel is considered a factor affecting the travel time.
In Figures 6B, 7, we compare the travel times of Kyoto citizens and visitors. Comparing the conditions in Figures 6B,  7, we found the following three major characteristics. First, both Hyakumanben and Ennmachi visitors tend to move quickly compared to the residents. Second, the movements of the residents from Hyakumanben and Ennmachi forms a peak at a much longer time than expected for travel by a passenger car or public transportation. Third, the probability density of visitor movement from Ennmachi intersection peaked at a location with a shorter travel time than the residents.
Focusing on the density function of the movement from Hyakumanben, the movements of both the residents and visitors peaked when the time exceeded 60 min. Empirically, we know that it takes approximately 20 min to reach Kyoto Station by car from Hyakumanben and approximately 30 min by public transportation; however, the observed 60 min peak is considerably longer. In this study, because the routes were calculated using the pCSA with GPS data, traffic congestion and other events that lengthen the travel time should be considered. The first is the lag between the start and end of a movement and the time at which a mobile device measures the location information. The second is the actual waiting time for the bus or train the traveler wants to take at the bus stop or station, and the third is the impact of detoured or heavily connected travel formed using the pCSA. Particular attention should be paid to the impact of longdistance or heavily connected movements. For trips with long distances or from places where few people head directly toward their destination, the set of optimal paths includes those formed by connecting many short and detouring paths. These effects are believed to have formed a peak with a travel time longer than the actual time. By contrast, the probability density of travel for visitors from Ennmachi intersection peaks at a short distance, which is thought to be because it is unaffected by detouring paths or paths with many connections. Considering the significant difference between travel from Hyakumanben and travel from Ennmachi intersection, visitors can travel from the nearest station in Ennmachi intersection to Kyoto Station on the same train line.
Because most visitors travel by train, we can assume that the peak travel time is approximately 20 min. According to the timetable, it takes 7-11 min to travel from Ennmachi Frontiers in Physics frontiersin.org intersection toKyoto Station. 2However, it is thought that the peak is formed by a discrepancy of a few minutes owing to the lag that occurs until a mobile device measures the location information while in transit and the effect of the waiting time.
Next, as shown in Figures 6C, 7, we compared the probability density function created from the weekday data with that created from the weekend data. The travel time from Hyakumanben tended to be shorter on the weekends. When we analyzed travel from Ennmachi intersection to Kyoto Station, we found a travel time of approximately 20 min, and when the peak of visitors shown in Figure 7B was formed, travel was more frequent on the weekdays. It can be inferred that visitors who use this route are mainly business people or commuters, rather than tourists. In addition, Figure 7A shows the same travel time of approximately 20 min in February and April, which confirms this assumption.
In Figures 6, 7D, the ability density function was created for departures from between 8:00 and 13:00 and 13:00 and 18:00. From Figure 1, we can see that the movement of people becomes active at 8:00. Both the Hyakumanben and Ennmachi intersection movements were shorter from 13:00 to 18:00. When we focus on the movement from Hyakumanben, we can see from Figures 6B,C that the weekday movements of residents tend to become longer. In other words, movement within this time slot is influenced by the morning commute to work and school, as well as daily life and business activities. Focusing on travel from Ennmachi intersection, a travel time of approximately 20 min is more common between 13:00 and 18:00.

FIGURE 6
A density function is formed for the travel time by classifying the sets of optimal paths for each condition for travel from Hyakumanben to Kyoto Station. The horizontal axis is the travel time, and the vertical axis is the density. In (A), the density function is formed for the February and April data. The density function is formed for Kyoto citizens and visitors in (B), for weekdays and weekends in (C), and for a departure time of 8:00 to 13:00 and 13:00 to 18:00 in (D). Note that because the data are from GPS, the travel time includes not only the effect of traffic congestion but also the lag between the start/end times of the trip, the time of the measurement, and the waiting time.

Frontiers in Physics frontiersin.org
In other words, it can be inferred that train travel by visitors, shown in Figure 7B, is the result of business visitors using the train on their way home. For all combinations of nodes, the probability density function of the travel time was computed using the pCSA, and the lower 5% point of the probability density function was set as the shortest travel time (time weight) w(i, j, τ). The proposed method is equally applicable to any order of nodes to be visited. Thus, a mobility analysis using temporal networks allowed us to compare the travel times under various conditions. Because of the complexity of road networks and changes in conditions depending on the time slot, the evaluation of urban road traffic is becoming increasingly challenging. It is therefore desirable to conduct traffic evaluations, such as that demonstrated in this study, under various conditions and to use a method that clarifies the traffic characteristics in various cities.

Creating the time-dependent traveling salesman problem
We set up the TDTSP to include visiting seven nodes in Kyoto City and derived the shortest path. The seven locations of the nodes are shown in Figure 4. The starting point v 0 is Shijo Kawaramachi, v 1 is Arashiyama, v 2 is Kinkakuji, v 3 is Kiyomizudera, v 4 is Kyotogosyo, v 5 is Nijyojyo, and v 6 is Yasakajinjya. Starting from v 0 at 8:00, the weights are updated every 120 min. Shijo Kawaramachi was chosen as departure node To obtain the Pareto-optimal sets of paths, we used the pCSA with each node as the input. Subsequently, subgroups of travel times were created for each time τ, and the lower 5% point of the probability density function for all transfers was assigned time weight w(i, j, τ) ∈ W. This is applied so that the sets of Paretooptimal paths are unaffected by the detours created by the pCSA or by the waiting time included in the GPS data. The weights are listed in Table 2. From front to back, the array shows the weights for the time slots: 8:00-10:00, 10:00-12:00, 12:00-14:00, 14: 00-16:00, and 16:00-18:00.
For example, it takes approximately 25 min to travel from v0 to v1 by car if there is no traffic congestion along the way. According to Table 2, the smallest weight is 28 min, which is close to the travel time in the absence of traffic congestion. In this case study, we assumed that the travel route between nodes was direct without any detours. Therefore, if we take the lower 5% of the probability density function, we can set the time weights close to the assumption.
We checked the number of people staying at each node for each time τ from the GPS data and calculated the degree of congestion according to Eq. 6. The calculation results are presented in Table 3.

Route search considering time spent
We set up the TDTSP to include traveling around Kyoto City; in reality, however, people often stay at each node. We therefore calculated the travel time by varying the time spent at each node. In a static network, the shortest path does not change even if the time spent is considered. However, in a temporal network, the shortest path may change if the time spent changes.
The maximum stay time used in this case study is shown in Table 4. We search for the shortest travel route by multiplying the same factor (multiplier) by the maximum stay time of all nodes.
We ran the ACO with K = 100 agents and S = 200 iterations to find the shortest path, the results of which are shown in    To avoid this, the travel route is changed when the time spent is short. Thus, it is possible to obtain sets of Pareto-optimal paths from GPS data, define the TDTSP from the sets, and use metaheuristics to then search for the shortest path.

Route search considering traffic condition
In urban areas, sudden changes in travel time owing to events such as accidents or traffic restrictions may prevent travel along a particular segment. Therefore, in the subsequent case study, we consider a case in which the time weights of specific edges connecting v 0 to v 6 are highly increased.
Although this is an extreme case, we will analyze how the travel route changes when the time weights w(i, j, τ) and w(j, i, τ)(i ∈ V, ∀j ∈ V, ∀τ ∈ T) of the edges connected to i are doubled owing to a large-scale traffic restriction or accident at point i. After setting the time spent in Table 4, we doubled the time weight for each node and applied the ACO with 100 agents and 200 iterations to determine the shortest path. Table 6 shows the results obtained for the change in travel route when only the time weight of the edge connected to v 3 is doubled; otherwise, the route remains the same as when some of the times are set as shown in Table 5. This is because the original route moves from v 1 to v 3 ; however, the change in route moves from v 3 to v 1 , and as shown in Table 2, the travel time can be reduced by choosing the right time to travel.
When deciding on a travel route, people may want to avoid visiting a specific location in a particular time slot because of congestion. By increasing the time weights w(i, j, τ), it is possible to select a route that avoids congestion when applying the proposed method. In addition to the assumption of travel routes, various restrictions and conditions are considered in transportation planning and route recommendations. Because the proposed method uses GPS data, the conditions of the nodes and edges used in the TDTSP can be tailored to preferred simulations of the users.

Conclusion
Owing to the complexity of urban transportation networks and temporal changes in traffic conditions, it is challenging to assess real-time traffic situations. However, the development of mobile information devices that use GPS has made it easier to obtain personal mobility information. In this study, we developed a method for evaluating the mobility of people in a city using GPS data. We applied two methods: one is to evaluate human mobility using temporal networks constructed from GPS data, and the other is to search for the shortest path by constructing and solving the TDTSP.
We contribute to improving the existing method of creating a network for public transportation using GPS data obtained from mobile devices. To apply the existing method to GPS data, we proposed dividing the map into 50-m square grids and creating a timetable of transitions between the grids. Using actual data, we can evaluate actual events, such as travel by nonpublic transportation and delays in transportation. To visualize and evaluate the network, we considered the average travel time. We created a probability density function of the travel time to compare the travel by season and time slot. We propose a new method for estimating the time weights of edges in temporal networks using probability density functions for the travel time.
We made another contribution to the method used to set the TDTSP to search for the shortest path. The weights of the TDTSP were determined from the sets of Pareto-optimal paths used to TABLE 6 Nodes i that double the time weights w(v i , v j , τ), w(v j , v i , τ)(8j ∈ V,8τ ∈ T) and the shortest route. i Route

Multiplier for spent time
Route Frontiers in Physics frontiersin.org create the temporal network. To apply the ACO to the TDTSP, we propose a new method for estimating the congestion level from GPS data and calculating the transition probability using the estimated congestion level. The congestion measured from GPS was used to calculate the transition probability of the ACO method used to solve the TDTSP. As a case study, we conducted a human mobility analysis in Kyoto City. In this case study, the validity of the proposed method was verified. We also evaluated the impact of the time the travelers spent at each node and the differences in congestion at each edge on the optimal route search.
With the recent development of mobile information devices, GPS data can be obtained more quickly; therefore, we can extend our method to other cities. The following are possible future extensions: 1) the formulation and post-implementation evaluation of transportation plans, 2) application to vehicle routing problems, and 3) extension to the TDTSP with time frames. Owing to the complexity of urban transportation, it is challenging to understand transportation planning; however, a temporal GPS network can clarify transportation planning issues. The method for finding the shortest path problem can be extended to vehicle routing problems. In addition, we set the congestion level in the calculation when applying the ACO method, which can be used to set a time frame such that if the congestion level exceeds a certain height, travel to that point will be restricted. Furthermore, there is a growing demand to avoid crowds as a countermeasure to future outbreaks of infectious diseases, and a system based on our methods can be expected to be expanded to address such issues.

Data availability statement
The data analyzed in this study is subject to the following licenses/restrictions: The authors do not own original data and do not have any special access privileges to the data that others would not have. Requests to access these datasets should be directed to https://www.agoop.co.jp/.