Optimizing train stopping patterns for congestion management

In this paper, we optimize train stopping patterns during the morning rush hour in Japan. Since trains are extremely crowded, we need to determine stopping patterns based not only on travel time but also on congestion rates of trains. We exploit a Wardrop equilibrium model to compute passenger flows subject to congestion phenomena and present an efficient local search algorithm to optimize stopping patterns which iteratively computes a Wardrop equilibrium. The framework of the proposed algorithm is extended to solve the problem of optimizing the number of services for each train type. We apply our algorithms to railway lines in Tokyo including the Keio Line with six types of trains and demonstrate that we succeed in relaxing congestion.


Introduction
In the Tokyo metropolitan area of Japan, about 7,000,000 people commute to office, school, or university by train every morning. During morning rush hour, trains are crammed with passengers and the congestion rate of the most crowded This work was supported in part by JST CREST, Grant Number JPMJCR14D2, Japan. The research of the second author was supported in part by JSPS KAKENHI Grant Number 16K16356. The research of the third author was supported in part by JSPS KAKENHI Grant Number 15H02969. A preliminary version appeared in Proceedings of the 17th Workshop on Algorithmic Approaches for Transportation Modeling, Optimization, and Systems (ATMOS 2017) (Yamauchi et al. 2017). 1 3 train exceeds 200%. A straight approach to reduce congestion is to increase the number of train services. However, the number of services seems to reach a limit, because most railway lines in Tokyo have over 25 services per hour during morning rush hour. Congestion during morning rush hour has been a social problem in Japan for a long time (Ieda 1995). Railway companies make efforts to relax congestion by changing timetables, train stopping patterns, and so on.
The aim of this paper is to relieve congestion during morning rush hour by changing train stopping patterns. To do that, we need to evaluate congestion by computing passenger flows. Since trains are extremely crowded in Tokyo, congestion strongly influences passenger behavior. Some passengers get on a crowded express train, because an express train has shorter travel time than a local train. Some passengers get on a local train at the expense of travel time to avoid congestion. Others may leave home early to avoid the rush hour. Taguchi (2005b) presents a practical model to compute passenger flows during the morning rush hour in Japan. In this model, we first construct an event-activity network, which is a large-scale network representing timetables of trains and the behavior of passengers. The travel cost is determined not only by travel time but also by congestion rates, which is given by the Bureau of Public Roads (BPR) function (1964). Then we compute a Wardrop equilibrium in the event-activity network. Taguchi (2005b) shows that the obtained passenger flows match the census data for commuter traffic published by the Ministry of Land, Infrastructure, Transport and Tourism of Japan. This indicates that a Wardrop equilibrium model with the BPR function is valid for computing passenger flows during the morning rush hour in Japan. We exploit this model to compute passenger flows.
Our contributions are to introduce functions to evaluate congestion during morning rush hour and to present efficient algorithms for finding train stopping patterns that minimize these functions. The key evaluation functions are defined by using the BPR function. Roughly speaking, our evaluation functions involve not only the maximum congestion rate but also travel time of all passengers and the congestion rate of each train, which are incorporated in values of the BPR function. By utilizing these evaluation functions, we find stopping patterns which decrease high congestion rates. We remark that the total amount of the passenger flows remains the same even if we change stopping patterns, and hence the decrease of a congestion rate of one train leads to an increase of the congestion rates of other trains. In the obtained stopping patterns, we succeed to decrease high congestion rates of trains with only a small negative effect on congestion rates of other trains and the travel time of passengers.
If we are given stopping patterns and timetables, we can compute passenger flows by finding a Wardrop equilibrium in the event-activity network to evaluate the stopping patterns and timetables (Taguchi 2005b). In optimizing stopping patterns, however, it is preferable to avoid computation on the event-activity network. One reason is that computing a Wardrop equilibrium in the event-activity network requires much time. This means that even evaluating stopping patterns is computationally expensive. Another reason is that if we change stopping patterns, we have to construct an event-activity network by solving the timetabling problem, which is a tough problem itself.

3
Optimizing train stopping patterns for congestion management In order to devise an efficient algorithm, we introduce a train type network, which simplifies the event-activity network. A train type network represents routes of trains of each type and transfer behavior of passengers including a transfer from a local train to an express train and a transfer from one line to another line. In the train type network, we can compute the number of total passengers in trains of each type instead of the number of passengers in each train. This information is adequate to evaluate given stopping patterns. Figure 1 compares our approach to evaluate stopping patterns with the standard approach in Japan (Taguchi 2005b). In the standard approach, we need timetables to construct an event-activity network. In our approach, introducing a train type network enables us to compute passenger flows without timetables. Moreover, our approach computes a Wardrop equilibrium in a train type network, which is much faster than the one the standard approach computes in an event-activity network.
In this paper, we present a local search algorithm to optimize stopping patterns which iteratively compute a Wardrop equilibrium in a train type network. We apply our algorithm to railway lines in Tokyo including the Keio Line with six types of trains.
In the real world, stopping patterns are subject to certain restrictions due to equipment in stations, which may make it difficult to change stopping patterns. The framework of our algorithm is also applicable with a slight modification to the problem of optimizing the number of services for each train type in a situation that the stopping patterns are fixed. Moreover, by combining the two algorithms, we optimize both stopping patterns and the number of services.
Organization: The organization of this paper is as follows. Section 2 describes related works. In Sect. 3, we explain a model to compute passenger flows in the event-activity network. In Sect. 4, we introduce the train type network and a model to compute passenger flows in the train type network. Section 5 presents a local search algorithm for optimizing stopping patterns. We apply our algorithm to railway lines in Tokyo in Sect. 6. In Sect. 7, we extend the framework of our algorithm to solve the problem of optimizing the number of train services and present numerical results. Finally, Sect. 8 concludes this paper.

Related works
To determine train stopping patterns is an important issue closely related to line planning (Schöbel 2012). The optimization of line planning has been studied under the assumption that passenger routes are fixed or that passengers choose a shortest path with respect to some link cost including travel time and the number of transfers (e.g., Bussieck et al. 1997;Goossens et al. 2004). Recently, models which integrate passenger routing into line planning are extensively studied in Borndörfer et al. (2007Borndörfer et al. ( , 2012 and Schöbel and Scholl (2006). In these papers, the optimization problem is formulated as a mixed integer programming problem (MIP), where the passengers' route choice is modeled by constraints. In many previous works including Borndörfer et al. (2007Borndörfer et al. ( , 2012 and Schöbel and Scholl (2006), congestion is modeled by simple capacity constraints. In Goerigk and Schmidt (2017), the authors present a more realistic model, where passengers choose a path to minimize their travel time.
Passenger routing has been integrated into other optimization problems. Kroon et al. (2015) focus on large-scale disruptions such as malfunctioning infrastructure and present a rolling stock rescheduling model. Borndörfer et al. (2017) investigate timetabling models with integrated passenger routing. Shang et al. (2018) tackle the optimization of stopping patterns.
Passengers' behavior may vary according to the situation as well as to the country. A variety of passenger assignment models has been studied (e.g., Fu et al. 2012). In a situation with large-scale disruptions assumed in Kroon et al. (2015), passengers need to find alternative routes to their destinations. The authors provide a model for simulating the passenger flows and combine it with an optimization model for rescheduling the rolling stock. In an oversaturated urban rail transit network in Beijing, Shang et al. (2018) adopt temporal and spatial FIFO rules in modeling passenger behavior, where passengers who arrive at a station early are more prioritized to board the train and those who wait at previous stations are also prioritized.
To model the passenger behavior during rush hour in Japan, we define a link cost function as a nonlinear function of the congestion rate of a train. Taguchi (2005b) experimentally demonstrates that Japanese commuters' behavior can be expressed by the Wardrop equilibrium model in an event-activity network. This model is useful for many applications, such as forecasting how many commuters would change their routes to use a newly opened railway line, calculating the change of the transportation capability by degrading express trains to local ones during morning rush hour, and estimating the effect of staggered departure of commuters to their offices in order to reduce congestion during morning rush hour (Taguchi 2005a;Taguchi et al. 2005). Recently, Taguchi (2017) exploits the model to predict passenger flows during the Tokyo 2020 Olympics. The Wardrop equilibrium model given in Taguchi (2005b) is commonly used to evaluate timetables and railway lines in the Tokyo metropolitan area, but has not been utilized for optimizing them.
For rural areas in Japan, Takamatsu and Taguchi (2020) present an optimization model for bus timetabling. In such areas, many people rely on private cars 1 3 Optimizing train stopping patterns for congestion management and rarely use buses. The optimization model given in Takamatsu and Taguchi (2020) aims at designing bus timetables that enable passengers to travel comfortably from any origin to any destination. This model is based on a different approach from this paper, because most buses in rural areas are not crowded.
The quality of transport services has a potential to improve by changing stopping patterns. The planning of stopping patterns has been studied (Chang et al. 2000;Fu et al. 2015;Jamili and Aghaee 2015). Some recent papers (Jiang et al. 2017;Niu et al. 2015;Wang et al. 2014;Yang et al. 2016;Yue et al. 2016) integrate the planning of stopping patterns and timetabling. Integrated models of the line planning and timetabling have also been developed (Burggraeve et al. 2017;Kaspi and Raviv 2013;Yan and Goverde 2019). In these papers, the objective functions involve passenger travel time, passenger waiting time, the number of empty seats, operation costs such as energy consumption, profits earned by railway companies, the number of scheduled trains, and so on. Our optimization model is different from previous works in that we focus on congestion during the morning rush hour and the passenger behavior is influenced by congestion rates of trains.

Passenger flows in an event-activity network
This section first recapitulates the Wardrop equilibrium model in Sect. 3.1 and the event-activity network in Sect. 3.2. In Sect. 3.3, we explain a model to compute passenger flows. This model combines the Wardrop equilibrium model and the event-activity network.

Wardrop equilibrium
Wardrop's first principle of route choice is the following (Cochran et al. 2011): The journey times in all routes actually used are equal and less than those which would be experienced by a single vehicle on any unused route.
According to Wardrop's first principle, each passenger chooses his or her route to minimize the route cost. Since Wardrop's first principle describes the spreading of trips over alternative routes due to congestion, Wardrop equilibrium models are commonly used to describe traffic patterns subject to congestion phenomena in road networks (Florian 1999).
Let G = (V, A) be a directed graph and C ⊆ V × V be a set of commodities represented by OD pairs. Given an OD pair k ∈ C , we denote by R k the set of routes in G which connect the origin and the destination. The set of all routes is represented by where d k is demand, t a (⋅) denotes a link cost function, and f = (f a ) a∈A is an arc flow determined by f a = ∑ r∋a h r . The first equation says that a route flow meets the demand, and the second one represents that each passenger travels along a path with the minimum cost. Beckmann et al. (1956) proved that we can find a Wardrop equilibrium by solving the following optimization problem, where X f denotes the set of feasible arc flows: This problem can be solved by the Frank-Wolfe method (Frank and Wolfe 1956;Patriksson 1994).

Event-activity network
Event-activity networks are widely used in the timetable design (Schmidt 2014;Schöbel 2006;Serafini and Ukovich 1989). Given a timetable , we construct an eventactivity network as follows. Let V be the set of stations and H be the set of trains. We also denote by V tran the set of stations shared by two or more lines, where passengers can transfer from one line to another. We define The sets E arr and E dep represent arrival events and departure events. Each i ∈ E arr ∪ E dep has the arrival or departure time in the timetable , denoted by i . Next, we define arc sets where L tran denotes the time needed for transfer. The sets A drive , A wait , and A tran represent driving activities, waiting activities, and transfer activities, respectively. We also define

3
Optimizing train stopping patterns for congestion management The set A tran expresses transfers between different lines, while A change deals with transfers between different types of trains in the same line 1 . In the event-activity network, the set of vertices and the set of arcs are given by E arr ∪ E dep and A drive ∪ A wait ∪ A tran ∪ A change ∪ A next , respectively. Figure 2 depicts an example of an event-activity network.
During morning rush hour, some passengers do not select the shortest route to avoid crowded trains. We can express all kinds of passengers by using A next and A change . Suppose that a passenger waits for train g of Line 2 at v in Fig. 2. If train g is very crowded, he or she has choices to get on g ′ or g ′′ instead of g. The corresponding route is expressed by a path with arcs of A next .
Next, let g ′ be an express train and g ′′ be a local train. Suppose that g ′ arrives at v after g ′′ arrives and departs from v before g ′′ departs. In this situation, we have four kinds of passengers moving along -((g � , v, arr), (g � , v, dep)) ∈ A wait : Passengers use only express train g ′ . -((g �� , v, arr), (g �� , v, dep)) ∈ A wait : Passengers use only local train g ′′ .
The combination of A change and A next enables to express them faithfully. Finally, for given OD pairs, we add source vertices and a sink vertex to the network. Each source vertex corresponds to an OD pair. We also add arcs connecting source vertices/a sink vertex and vertices in E arr ∪ E dep . The detailed definition of the network is given in Appendix A. We denote the resulting event-activity network by (E, A).

Fig. 2
An event-activity network, where the solid lines denote arcs of A drive and A wait , the dotted lines correspond to arcs of A next , the bold lines represent arcs of A tran , and the dashed lines indicate arcs of A change . White and gray vertices represent arrival and departure events, respectively

Wardrop equilibrium in event-activity network
We find passenger flows by computing a Wardrop equilibrium in the event-activity network (E, A) . As a cost function, we use the following BPR function (Bureau of Public Roads 1964; Lien et al. 2016): where L a denotes travel time of arc a, f a denotes a flow on arc a, and C a is the capacity of a train. The term f a ∕C a represents the congestion rate. We set parameters and by = 0.15 and = 4 . The costs of other arcs are determined based on travel time. The details are given in Appendix A. Figure 3 depicts a BPR function with L a = 1 , = 0.15 , and = 4 . In a case with f a ∕C a ≤ 1 , t a (f a ) is almost the same as L a . The value of t a (f a ) suddenly increases with f a ∕C a = 1.5 and reaches into 6.8L a when f a ∕C a = 2.5 . This function describes that passengers do not care for congestion if the congestion rate f a ∕C a is small but congestion effects have a bigger impact on passengers' behavior in trains with a higher congestion rate.

Train type network
Given stopping patterns and timetables, we can evaluate them with computational results for a Wardrop equilibrium in the event-activity network. A basic idea to find optimal stopping patterns is to update stopping patterns iteratively based on the obtained Wardrop equilibrium. In this approach, however, we need to find a Optimizing train stopping patterns for congestion management Wardrop equilibrium many times, which is computationally expensive. Moreover, if we update stopping patterns, we have to construct an event-activity network by solving the timetabling problem. In order to devise an efficient algorithm for optimizing stopping patterns, we introduce a small network model such that a Wardrop equilibrium in this network approximates it within the event-activity network.
Remember that V denotes the set of stations. Let T be the set of train types. In our case study given in Sect. 6, we set T = {0, 1, 2, 3, 4, 5} , where If a train of type stops at station v, then trains of inferior types 0, 1, … , − 1 also stop at v. 2 We express stopping patterns S as the set of pairs of a train type and a station where the train makes stops: We now introduce a train type network. Let L be the set of lines. In order to distin- ∈ S} for line . Next, we define 0: Local, 1: Rapid, 2: Semi-Express, 3: Express, 4: Semi-Special Express, 5: Special Express.  Figure 4 shows an example of the train type network We extend the definition of a train type network to represent transfers from one line to another line. In Sect. 3.2, we have defined by V tran the set of stations shared by two or more lines. In order to represent passengers' transfer, we define the arc set Let C be the set of OD pairs. In order to assign passengers to the train type network, we further define a source vertex corresponding to each OD pair k ∈ C , a new vertex s, and in a similar way to the event-activity network in Appendix A.

Passenger flows in train type network
In order to compute a Wardrop equilibrium in the train type network, we define a link cost function. For a ∈Ā drive , let (a) ∈ T be the train type of a and (a) be the line including a. We denote by N , the number of services of train type in line driving in the target period. A cost function in the train type network is defined by Travel time L a is set to be longer than that for superior trains based on the timetable. We remark that this function is obtained by adding N (a), (a) in the denominator to (2). For a ∈Ā change ∪Ā tran , we set t a (f a ) based on the time needed for transfer.
In the train type network, we can obtain the number of total passengers in trains of each type, but cannot obtain the number of passengers in each train. However, the former has enough information to evaluate stopping patterns. As will be discussed in Sect. 6.3, the train type network approximates the event-activity network only when the congestion rate of every train is high. If there are both crowded trains and empty trains, passenger flows in the train type network could be critically different from those in the event-activity network. In our case study given in Sect. 6, we focus on the morning rush hour (from 07:00 to 08:30), during which every train is crowded.

3
Optimizing train stopping patterns for congestion management

Local search algorithm to optimize stopping patterns
We evaluate given stopping patterns S by using a Wardrop equilibrium in the train type network G(S) as follows. Let f a be passenger flows obtained by computing a Wardrop equilibrium in G(S) . In optimizing stopping patterns, we make use of a function to evaluate S defined by where c v (S) denotes the number of train types except Local (train type = 0 ) which make a stop at v. The first term in eval 1 (S) is determined by congestion rates and travel time. Consider the train type network G(S) in Fig. 4 as an example. The second term c v (S) is given by Since the value of the first term is much larger than that of the second term, eval 1 (S) is affected by the first term in most cases. The second term is useful when there exist stopping patterns S and S ′ such that the values of the first term in eval 1 (S) and eval 1 (S � ) are exactly equal. In this case, we select the stopping patterns with smaller value of the second term, because superior trains are desirable to stop at fewer stations.
Even if the value of eval 1 (S) is small, the maximum congestion rate might be high. This means that a particular train is extremely crowded between particular stations, but such a situation is undesirable. We overcome this problem by using eval 1 (S) together with another evaluation function which represents the maximum congestion rate.
We find stopping patterns S by the following local search algorithm. Let S be the current solution. We repeat replacing S with a better solution in its neighborhood. If we cannot find a better solution, the algorithm outputs S and terminates.
In designing local search algorithms, an initial solution, a function to evaluate solutions, a move strategy, and a neighborhood are important ingredients. An initial solution S 0 is determined so that every train stops at terminal stations and local trains (train type = 0 ) stop at all stations. We use (5) and (6) as evaluation functions, and adopt the first admissible move strategy, i.e., when we find a better solution in its neighborhood, we move to the solution immediately.
For the current solution S , we use the following two kinds of neighborhoods, called N op (S) and N cl (S) . Let (v, � ) ∉ S . An opening operation is an operation which adds {(v, ) | ≤ � } to S . The neighborhood N op (S) is defined as the set of all solutions which can be obtained from S by an opening operation. For (v, � ) ∈ S ⧵ S 0 , we use a closing operation, which deletes {(v, ) | ≥ � } from S . The neighborhood N cl (S) is defined as the set obtained by a closing operation. We remark that these operations are defined so that if a train of type stops at v, then trains of inferior types also stop at v.
Since trains make few stops in the initial solution S 0 , we design an algorithm which emphasizes opening operations over closing operations. If we cannot find a better solution in N op (S) , we switch to closing operations. This approach leads to small neighborhoods in local search, which helps the algorithm to improve in efficiency.
The outline of our algorithm is as follows. In the algorithm, c denotes the number of fails to find a better solution than the current solution S.
We adopt N op (S) as a neighborhood in Steps 2-3 and N cl (S) in Steps 5-6. We try to find a better solution by an opening operation while c < , but switch to a closing operation if we fail times successively. The algorithm terminates when we fail times successively by an opening operation and times by a closing operation. It should be noted that we need to compute a Wardrop equilibrium in the train type network G(S � ) in Steps 3 and 6.

Case study: Keio railway lines
The experiments described in this section were conducted on a PC with an Intel Core i7 CPU at 4.0 GHz and 32 GB of RAM. All the algorithms are coded in Java 8.

Railway lines
We focus on five railway lines in Tokyo (the Keio Line, the Keio Takao Line, the Keio Sagamihara Line, the Keio Inokashira Line, and the Toei Shinjuku Line 3 ). We collectively call these five lines Keio Railway Lines. Figure 5 shows the railway map of Keio Railway Lines.
The Keio Line (the red line in Fig. 5) is a main line among the five lines. Stations along the Keio Line are numbered from "KO 01" (Shinjuku) to "KO 34" (Keiohachioji). During morning rush hour (07:00-08:30), the Keio Line has three types of eastbound trains (Local, Semi-Express, Express) and six types of westbound trains (Local, Rapid, Semi-Express, Express, Semi-Special Express, Special Express). Figure 6 shows the number of passengers getting on and off trains at each station in the Keio Line. Many passengers get on eastbound trains (the direction from KO 34 to KO 01), and most of them get off trains at Shinjuku (KO 01).

Passenger flows in the event-activity network
We first construct the event-activity network (E, A) in the way described in Sect. 3.2. This network has 25,746 vertices and 565,364 arcs. Next, we estimate OD pairs from the available data. By exploiting the commuter passengers' data in the report (Ministry of Land, Infrastructure, Transport and Tourism of Japan 2010), we compute passenger flows during morning rush hour from 04:30 to 09:30 for the 2016 timetable of Keio Railway Lines. In the way described in Appendix B, we obtain 9717 OD pairs and 805,344 passengers who get on Keio Railway Lines.
We implemented the Frank-Wolfe method to solve (1). In the Frank-Wolfe method, a search direction is determined based on the shortest path for each OD pair in the network with a certain link cost (Patriksson 1994). Figure 7 shows Fig. 6 The number of passengers getting on and off trains at each station; stations with a total number of passengers under 5000 are omitted computational results for a Wardrop equilibrium in the event-activity network. By comparing Figs. 5 and 7, we see that trains between 07:00 and 08:30 have especially high congestion rates in the section between Chofu (KO 18) and Shinjuku (KO 01). This matches the real situation in Keio Railway Lines. Table 1 shows the top five arcs in A drive with high congestion rates. The computational time for finding a Wardrop equilibrium is 277.08 s. Red, green, and blue arcs represent trains with a congestion rate more than 200%, between 100 and 150%, and less than 50%, respectively In optimizing stopping patterns, we focus on the morning rush hour (07:00-08:30), because the train type network approximates the eventactivity network only when the congestion rate of every train is high. We extract passengers who may board trains during morning rush hour (07:00-08:30) from the passenger flows (04:30-09:30). Table 2 compares the number of extracted trains to that from 04:30 to 09:30. The number of extracted passengers is 576,925, which accounts for about 72% of 805,344 passengers from 04:30 to 09:30.

Passenger flows in train type network
We construct a train type network for stopping patterns S determined from the 2016 timetable of Keio Railway Lines. The resulting network has 1552 vertices and 2050 arcs. The computational time of a Wardrop equilibrium in the train type network is 0.53 s. This is much faster than the computational time 277.08 in the event-activity network, and is fast enough to be used as an evaluation of stopping patterns in our optimization algorithm.
We now check the validity of passenger flows in the train type network. Figure 8 compares passengers in eastbound trains (Local, Semi-Express, Express) between 07:00 and 08:30 at stations from KO 18 (Chofu) to KO 04 (Sasazuka). At each station, the left bar shows the number of passengers obtained by finding a Wardrop equilibrium in the event-activity network, while the right bar denotes that in the train type network. We remark that due to the methods for extracting passengers, the number of the total extracted passengers in the train type network is a bit more than that in the event-activity network. Although there is a slight difference, we see that passenger flows in the train type network succeed in approximating passenger flows in the event-activity network. This is attributed to the fact that the congestion rate of every train is high between 07:00 and 08:30.

Optimization of stopping patterns
We apply Algorithm 1 to Keio Railway Lines in the time period from 07:00 to 08:30. The number of train services is determined by the 2016 timetables. We set an initial solution S 0 as follows. Let V leaf be the set of Shinjuku (the terminal station of the Keio Line) and terminal stations corresponding to leaves (vertices of degree one) of the network in Fig. 5. An initial solution S 0 is determined so that every train stops at stations in V leaf and local trains ( = 0 ) stop at the same stations as according to the 2016 timetable. We set = 50 in Algorithm 1 based on the number of stations in Keio Railway Lines.
We run Algorithm 1 fifty times and obtain fifty solutions. The average values are given in the first line in Table 3. We show two solutions in the second line and the third line. The former is a solution which has the minimum eval 1 (S) among fifty solutions, while the latter is a solution with the maximum eval 1 (S).
Algorithm 1 uses the first admissible move strategy. To compare solutions obtained with different move strategies, we consider a variant of Algorithm 1, which adopts the best admissible move strategy (BA). In this algorithm, we move to the best solution among all the solutions obtained by an opening operation if there exists a better solution than the current one. If not, the algorithm finds the best solution among all the solutions obtained by a closing operation. The obtained solution is given in the fourth line in Table 3.
The solution with the best eval 1 (S) obtained by Algorithm 1 has a better eval 1 (S) and a shorter computational time than the solution obtained by the algorithm with BA. Moreover, its evaluation values greatly improve both evaluation values for the stopping patterns of the 2016 timetable. We further analyze the solution with best eval 1 (S) . Figure 9 depicts the behavior of the evaluation values. The algorithm first adopts opening operations successively and then adopts both opening/closing operations. The number of iterations is 35, where we have 29 opening operations and 6 closing operations. The total computational time is 246.12 s. The computational time per iteration tends to become longer in the latter part of the algorithm, while the average time is 7.03 s. Figure 10 compares stopping patterns of the obtained solution and the 2016 timetable. Superior trains (Express, Semi-Special Express, Special Express) have

3
Optimizing train stopping patterns for congestion management fewer stops than in the 2016 timetable. The obtained stopping patterns emphasize a difference between superior trains and the other trains. Eastbound trains to Shinjuku (KO 01) are extremely crowded during morning rush hour. Let us compare congestion rates in Fig. 11. The maximum congestion rates for Express and Semi-Express are improved. That for local trains gets a bit worse, but this causes no problem because the rate is less than 200%. Although the obtained solution has fewer stops than in the 2016 timetable in Express and Semi-Express, we can make full use of these trains and the congestion rates of local trains suffer only a small negative effect.   Table 4 compares the top five arcs of Ā drive in the train type network. We see that all the congestion rates are improved. Moreover, we have only 2 arcs with a congestion rate higher than 200% in the obtained solution, while we have 4 arcs in the 2016 timetable.
We compare travel time for the obtained stopping patterns and those of the 2016 timetable by computing the shortest path in the two train type networks. Figure 12 shows the comparison of travel time. The obtained stopping patterns improve travel time ( Δt > 0 ) for 2645 OD pairs (27.22%), and travel time remains almost the same (Δt = −1, 0 ) for 6184 OD pairs (63.64%). This indicates that most passengers suffer no or only small negative effects in travel time.
Finally, we check the effect of using eval 2 (S) . If we adopt only eval 1 (S) , the algorithm finds a solution with eval 1 (S) being 13,083,582, which is better than the solution analyzed above. However, the maximum congestion rate is 213.93% . This value is substantially worse than both the obtained solutions (205.03% ) and the 2016 timetable (208.76% ). By combining eval 1 (S) and eval 2 (S) , we can find a better solution than the 2016 timetable, as shown in Table 4.

Pareto-optimal solutions
In Algorithm 1, we exploit the two evaluation functions eval 1 (S) and eval 2 (S) . We now consider a biobjective optimization problem with these functions, and find Pareto-optimal solutions. We remark that the following approach provides more information than Algorithm 1, but is computationally expensive.
In general, a biobjective optimization problem is formulated as where x is the vector of decision variables and X is a feasible region. A vector x * is said to be a Pareto-optimal solution if there exists no other feasible x satisfying min x∈X (f 1 (x), f 2 (x)),

Fig. 12
The number of OD pairs such that the travel time decreases by Δt minutes in the proposed stopping patterns 1 3 f 1 (x) ≤ f 1 (x * ) and f 2 (x) ≤ f 2 (x * ) . The -constraint method is a common approach to finding Pareto-optimal solutions (Chankong and Haimes 2008). In this method, we optimize one of the objective functions, while the other is incorporated in a constraint. We apply the -constraint method to the biobjective optimization problem with eval 1 (S) and eval 2 (S) . In real-world applications, not one optimal solution but several "good" solutions are needed for some situations. Since Pareto-optimal solutions provide useful information about the trade-off between eval 1 (S) and eval 2 (S) , we can select one solution among them by taking the trade-off into account.
In our approach, for a fixed , we optimize eval 1 (S) with a constraint eval 2 (S) ≤ . To solve this problem, we need to find an initial solution satisfying eval 2 (S) ≤ . This can be done by performing Algorithm 1 until we find a solution satisfying eval 2 (S) ≤ .
We run the algorithm five times for = 200, 201, … , 220 . The obtained solutions are shown in Fig. 13, together with the solutions in Table 3. The Pareto-optimal solutions are described in detail in Table 5, where only Solution 3 is better than the solution with best eval 1 (S) in Table 3. We can see that the solution with best eval 1 (S) obtained by Algorithm 1 is located near Pareto-optimal solutions.
Let us compare the number of iterations in the -constraint method to that in Algorithm 1. As shown in Table 3, the average number of iterations in Algorithm 1 is 29. This is much smaller than the number of iterations for Solutions 1-4 in Table 5. Algorithm 1 updates the current solution only when both the values of Fig. 13 Solutions of the problem for optimizing stopping patterns, where ( × ) represent solutions obtained by the -constraint method and filled circle ( • ) indicates the Pareto-optimal solutions. The three solutions in Table 3 are represented by star ( ⋆ ), while the values for the 2016 timetable are depicted by a filled square ( ▪) eval 1 (S) and eval 2 (S) are improved (or one of them remains the same and the other is improved). In contrast, the -constraint method updates the current solution whenever the value of eval 1 (S) is improved, even if eval 2 (S) becomes worse. In addition, the method needs to find an initial solution satisfying eval 2 (S) ≤ , which is not easy for a small . Thus, the -constraint method tends to update the current solution many times if is large, and it takes a long time to find an initial solution if is small. Algorithm 1 finds solutions near Pareto-optimal ones much more efficiently than the -constraint method.

Optimizing the number of train services
We consider the problem of optimizing the number of train services for the given stopping patterns. The framework of Algorithm 1 can be applied to this problem by changing the definitions of evaluation functions and neighborhoods.
Remember that (a) and (a) denote the train type of a and the line including a for a ∈Ā drive , respectively. In Sect. 4.2, we have also defined N , as the number of services of train type in line , where we distinguish two lines in opposite directions along the same route.
Let us define a vector N consisting of N , for all pairs of train type and line . Instead of eval 1 (S) in (5), we make use of a function given by We remark that N (a), (a) also appears in t a (f a ) defined by (4). The term 90 N (a), (a) corresponds to the average interval of train services from 07:00 to 08:30 (90 min). We add this term because changes in the number of train services directly affect the transfer time. Since stopping patterns S are fixed in this problem, the second term in (5) is omitted. We also define which is the same function as (6). (a) . Let ( i , j ) be a pair of train types of the same line. We consider an operation of increasing services of i by one and decreasing services of j by one, which preserves the total number of services in each line. The neighborhood N srv (N) is defined as the set of all solutions which can be obtained from N by such an operation. We adopt eval 1 (N) , eval 2 (N) , and N srv (N) in the local search algorithm for optimizing the number of services.
We optimize the number of services for the stopping patterns of the 2016 timetable. We make use of the number of services in the 2016 timetable shown in Table 6 as an initial solution. Here, we assume that the number of services remains to be zero for train types which are not operated in the 2016 timetable. Then, the algorithm terminates after only one iteration without updating the number of services. This means that Algorithm 1 determines that the number of services in the 2016 timetable is a locally optimal solution.
To find a better solution compared to the 2016 timetable, we apply the -constraint method described in Sect. 6.5. We run the algorithm five times for = 200, 201, … , 220 . The obtained solutions are given in Fig. 14. Table 7 shows the Pareto-optimal solutions. These Pareto-optimal solutions are found when is large, i.e., when a neighborhood is large.

Hybrid approach: optimizing both stopping patterns and the number of services
By combining Algorithm 1 and the algorithm described in Sect. 7.1, we optimize both stopping patterns S and the number of services N . Algorithm 2 is an outline of the algorithm to optimize S and N alternately. , and eval 2 (S) (= eval 2 (N)) in each step, where Si and Ni denote the i-th iteration of optimizing S and N , respectively. The function eval 1 (S) is used in Steps 1 and 3 as an evaluation function, while eval 1 (N) is used in Step 2. We remark that the value of eval 1 (N) can increase if we use eval 1 (S) as an evaluation function and vice versa, while the maximum congestion rate eval 2 (S) (= eval 2 (N)) decreases monotonically. Table 8 compares solutions obtained by Algorithm 2, where we run the algorithm fifty times. The solution (S, N) with the best eval 1 (S) has a better eval 1 (S) than the solution with the best eval 1 (S) in Table 3, while the maximum congestion rate eval 2 (S) becomes a bit worse. The solution (S, N) with the best eval 2 (S) has a better congestion rate than the solutions given in Table 3. Table 9 shows the top five arcs of Ā drive for the solution (S, N) with the best eval 2 (S) . The variance of congestion rates in Table 9 is smaller than that in the obtained solution in Table 4.
Finally, we discuss the congestion rates. For each arc a of Ā drive , we can compute the lower bound of the congestion rate by dividing the number of passengers passing through the arc a by the total capacities of trains passing through the arc a. Table 10 shows the top three lower bounds of the congestion rates. This indicates that the maximum congestion rate is never smaller than 201.33%.
The solution (S, N) with the best eval 2 (S) has the maximum congestion rate (201.37%) close to 201.33%. We remark that all of the top three arcs in Table 9 include "KO 07 → KO 06" and each congestion rate is close to the lower bound 201.33%. Thus, we can conclude that the solution (S, N) with the best eval 2 (S) is close to the best from a viewpoint of the maximum congestion rate.

Conclusion
We have presented a local search algorithm to optimize train stopping patterns with the evaluation functions determined by a Wardrop equilibrium. The framework of the proposed algorithm has been extended to solve the problem of optimizing the number of services for each train type. In the case study of the railway lines in Tokyo including the Keio Line, we have demonstrated that we succeed in relaxing congestion.
Our algorithm utilizes two evaluation functions. One is determined by congestion rates and travel time, and the other represents the maximum congestion rate. We have computed Pareto-optimal solutions by the -constraint method and analyzed them. An efficient algorithm for computing Pareto-optimal solutions is left for future research.
This paper focuses on the morning rush hour (from 07:00 to 08:30), because a Wardrop equilibrium in the train type network approximates it in the event-activity network only when the congestion rate of every train is high. Extending the train type network model to deal with morning commuting hours (from 04:30 to 09:30) will also be interesting.

A Computation of passenger flows
We explain the details of source vertices and a sink vertex described in the last paragraph of Sect. 3.2. Recall that C denotes the set of OD pairs. For an OD pair k ∈ C , we know the first station v dep k , the last station v arr k , the number of passengers n k , and rough departure time t dep k . We define E in = {k | k ∈ C} and a new vertex s. Let g • denote the first train which departs from v dep k after time t dep k . We define 1 3 Optimizing train stopping patterns for congestion management We need to extract passengers who get on Keio Railway Lines from 83,838 OD pairs. We first construct a railway network in the Tokyo metropolitan area given in Fig. 18. Next, we compute an optimal route for each OD pair with respect to distance and the number of transfers, and then extract OD pairs using Keio Railway Lines. Their routes are divided into four types: As a result, we obtain 9717 OD pairs and 805,344 passengers who get on Keio Railway Lines. Since information about the departure time is not available, we estimate it in the following way. Let C be the set of 9717 OD pairs. For an OD pair k ∈ C , we know the origin and destination station (not necessarily in Keio Railway Lines), the first station v dep k and last station v arr k in Keio Railway Lines, and the number of passengers n k . We denote by k [min] travel time from v dep k to the destination station, which can be computed by finding an optimal route in the railway network.
We assume that passengers are required to arrive at the destination station before 08:30, because most office workers start to work from 9 o'clock in Japan. Under this assumption, OD pair k departs from station v dep k around time t dep k ∶= 08∶30 − k . We use t dep k as the rough departure time needed for construction of the event-activity network explained in Appendix A. The accurate departure time is computed by finding a Wardrop equilibrium in the event-activity network.