Introduction

Chinese cities have experienced a transformative economic boom and urban development in the last two decades. The rapid urbanization comes at the expense of population growth, fostering over 1.35 billion people with more than half of them living in cities (CSY 2014). The inexorable urban growth is coupled with the needs for low-cost and accessible transportation. Western countries like the US fulfill the needs with private automobiles, giving rise to patterns of exurban settlement and thus relieving urban traffic burdens (Clark et al. 2009). In China, the limited per capita resources and the centralized landscape planning have prompted the national strategy of mass transit-oriented development, whereas the rail transit or metro systems play a pivotal role in serving the urban ridership (Banerjee et al. 2012; Loo and Li 2006; Zhang 2007). By the end of 2015, metro systems had covered twenty-one Chinese cities, most of them being economically affluent municipalities and provincial capitals (Shen et al. 2015).

In addition to issues of affordability, safety, and intermodal connectivity, a critical aspect to enhance metro riders’ experience is through non-travel related in-station facilities, such as food vendors, seating areas, elevators, handicap equipment, and public toilets (Norén 2010; Peek and van Hagen 2002). Among these issues, the shortage of public toilets in China’s metro systems has been largely understated in the expansion and development of the systems. The issue was sparked by an incident where a child was found defecating in a subway cabin in Guangzhou, raising public concerns of the Guangzhou Metro with only sixteen public toilets out of a hundred stations (Xu and Zheng 2012). Providing sanitary services at every metro station is nearly impossible, as the construction of toilets and the maintenance of sanitary facilities are spatially constrained as well as financially restrictive. To provide the best possible sanitary services to metro riders, a careful assessment of the needs and the efficient relocation of the resources become a pressing concern. Although the lack of public toilets in metro systems has become an elevated concern in many world cities (Norén 2010), little has been done to address their location issue when in-station space and planning budgets are limited.

To this end, the study proposes three scenarios in which the public toilets of the Shanghai Metro in China are explored for the best placement. There is a pressing need to solve this unique location problem as the metro ridership is growing at an unprecedented speed and the current sanitary resources are not allocated and managed in an efficient manner. To derive and evaluate the optimal solution, the paper is organized as follows. The second section reviews the policy and planning issues in public toilets and the connection with the facility location problem. The third section introduces the background of the case study and formulates the problem within the framework of the k-covering problem. The fourth section proposes the three planning scenarios and derives their optimal results by implementing the proposed model. The last section summarizes the study with major policy implications, methodological limitations, and directions for future research.

Public Toilets and Facility Location Problem

Public toilets have always been an afterthought in urban planning and public policy (Afacan and Gurel 2015). In cities, the insufficient coverage of public toilets is not only a lack of access but also seen as the inequality between genders and among age groups (Knight and Bichard 2011). The limited availability of public toilets causes problems for women in particular, as it is not uncommon to see lines considerably longer for the women’s restrooms as opposed to the men’s (Anthony and Dufresne 2007; Greed 2009). In addition to gender issues, the lack of accessible toilets becomes further exacerbated in locations with large populations of aging people (Burton and Mitchell 2006).

To address these issues, public policy has made great strides in catching up to the needs of equality concerning accessible public toilets. For example, in 2005 New York City passed the Restroom Equity Bill to ensure that new business establishments (e.g., movie theaters, bars) to have women’s stalls twice as many as men’s (Anderson 2005). Soon after the legislation, Honolulu approved a similar “potty parity law” to ensure the equal access to public toilets for women (Bradley 2006). To the authors’ knowledge, such policy remedies have never been in place in the building code of Chinese subways. Before any equity measure can be implemented, the first step in metro planning is to ensure the sufficient public toilet amenities around and within the system. Thus, the location accessibility of the public toilets becomes a major concern of this paper.

Methodologically, this unique location problem is a natural extension of the classic facility location problem (FLP) (Owen and Daskin 1998). The FLP is a location-allocation problem that aims to identify discrete facility locations from finite candidate sites. With an overarching goal of improving the efficient use of resources, the FLP is proposed by achieving different planning objectives, such as minimizing total travel cost (in terms of travel distance or time) or maximizing service areas. The FLP assumes the need for service originates from a set of demand points which have to be covered by the service radius of the facility. With modifications to the objective, the FLP can be further divided into various categories, including the p-center problem (Suzuki and Drezner 1996), the location set covering problem (ReVelle et al. 1976), and the maximal covering location problem (Church and Velle 1974). These models and their variations have been employed in a wide range of urban planning scenarios including retail stores (Ghosh and Craig 1984), fire stations (Badri et al. 1998), hospitals (Başar et al. 2011), and emergency shelters (Chen et al. 2013; Current and O’Kelly 1992).

The first step to apply the FLP is to abstract transportation infrastructure into basic graph elements such as nodes and arcs. The abstraction allows the intricacy of transportation systems to be quantified, measured, and compared in a mathematical manner. Based on graph theory and computational algorithms, the planning result can then be derived by various optimization methods such as enumeration algorithms (e.g., the brute-force search), integer programming, and heuristic algorithms (Daskin 2011; Melo et al. 2009). Hakimi (1965) was among the earliest to apply graph theory to the FLP by seeking the best placement of patrols on a highway network. The scenario, as one of the very first attempts of the location set covering problem, was solved by enumerating all feasible solutions using a Boolean function (Hakimi 1965). One unavoidable flaw of the enumeration algorithm is that the complexity of the problem grows exponentially as the network expands and traversing all possibilities becomes computationally intractable. Toregas et al. (1971) then proposed the alternative method of the integer programming to efficiently derive the solution for moderate-sized networks. More recently, several heuristic methods were proposed to reduce the computational intensity by achieving an acceptable solution at the cost of possibly overlooking the optimal solution (Caprara et al. 1999; Daskin 2011; Jacobs and Brusco 1995).

An extension of the FLP is the k-covering problem (Meir and Moon 1975). The k-covering problem is regarded as a network-based location set covering problem. This problem is defined as finding the smallest subset D (or service nodes) of graph G that satisfies the following condition: for every node x in G there is at least one node y in D such that the distance between x and y is equal to or less than k. Figure 1 shows an example of the k-covering problem with k = 3. In this example, a feasible solution requires that every node in the graph is three steps or less from its nearest service node. As such, Fig. 1a is not a solution as the two end nodes are beyond the service range of k = 3. On the other hand, Fig. 1b is viable as every node is covered within three steps from the service node.

Fig. 1
figure 1

The illustration of the k-covering problem (k = 3): a is not a feasible solution and b is a feasible solution where all nodes are within three steps from a service node

This problem is also termed the k-domination problem (Chang and Nemhauser 1984) or the k-distance domination problem (Zhao et al. 2014). In a real-world scenario, the identified subset could be a group of critical infrastructure (e.g., gas stations, police stations, fire hydrants) that caters to nearby locations within a finite network distance of k steps. For example, the k-covering problem was employed to identify the minimum number of locations for placing radio transmitter stations (Slater 1976). As an extension of the k-covering problem, the dominating set problem arises given the constraint of k = 1 (Ore 1962). In the realm of computer science, the dominating set (or 1-covering problem) was identified for the ad hoc wireless network to improve network connectivity and efficiency of message exchange (Cokuslu et al. 2006; Wu and Li 2001).

Methodology Development

Study Area

With a population of more than 20 million, Shanghai (31°12′ N, 120°30′ E) is the most populated city in China. Following Beijing and Tianjin, the Shanghai Metro became the third metro system in China’s history when operating its first line in 1993. Since then, the Shanghai Metro has been rapidly growing into a gigantic rail network, playing a pivotal role in serving needs of both intra-city and exurban travels. The Shanghai Metro had 14 lines, 289 stations, and a total route length of 538 km, making it the longest in the world (UITP 2014). However, with the boom of urban residents and the expansion of the city core, the coverage of the metro system can hardly meet the increasing travel demand. For example, in 2012 alone the Shanghai Metro carried a total of 2269 million passenger trips, which averaged nearly 6.2 million on a daily basis (UITP 2014). A historical record of 10.35 million riders was set on October 16, 2015, raising a series of debates and public concerns of strategic solutions to fulfill the unmatched transit needs (Sina Weibo 2015).

Aside from the needs for better coverage, more flexible operating hours, and more accessible intermodal transit options, rising concerns about the Shanghai Metro revolve around the limited and imbalanced sanitary services. Figure 2 is a photo showing the public toilet at the Nanjing East Road Station. Figure 3 is an abbreviated illustration of the metro network, where stations are abstracted into nodes with public toilet stations denoted by black nodes (Shanghai Metro 2016). A visual examination of the map reveals a distinct pattern that the public toilets (PT) are unevenly distributed over the network, aggregating on few sections. Of the 289 stations, only 100 stations (34.6 %) have usable toilets. A quantitative analysis by the histogram of the frequency distribution (Fig. 4) further exposes the shortage problem. According to Figs. 3 and 4, 50 stations (17.3 %) are three steps or farther away from the nearest PT. One terminal station, Meilan Lake (as marked by the asterisk in Fig. 3) has the longest travel distance (i.e., 17 steps or an estimated travel time of 1 hour) to the nearest PT station. It is expected that passengers departing from the Meilan Lake Station would have to withhold the need for toilets over a prolonged period, while potentially suffering the adverse health consequences from urinary retention (Nielsen and Walter 1993).

Fig. 2
figure 2

The public toilet at the Nanjing East Road Station of the Shanghai Metro

Fig. 3
figure 3

The network structure of the Shanghai Metro as of October 23 2015. In this map, stations are abstracted into four different types of nodes: transfer stations with public toilets (PT), transfer stations without PT, regular stations with PT, and regular stations without PT. The asterisked station, Meilan Lake, is 17 steps away from its closest PT station

Fig. 4
figure 4

Histogram of the Shanghai Metro stations based on the number of nodal steps to the nearest PT station

Formulation

The initial analysis gives a brief overview of the problem. It also provides evidence that a feasible placement strategy should allow passengers to access a PT station within a reasonable transit distance regardless of their origin or destination. In this respect, we consider a reasonable distance is three steps (or approximately 7–9 min) away from the nearest PT at any station. From a planning perspective, this requirement is also subject to financial restrictions as an effort to avoid squandering public resources. Considering each station as a demand point and each PT as a facility, the problem is restated as locating the minimum number of facilities so that every demand point is three steps or less away from the nearest facility. This statement is formulated as a 3-covering problem, as shown by Formulas (1) through (4).

$$ Min\kern1em {\displaystyle \sum_{j=1}^n{x}_j} $$
(1)
$$ \begin{array}{l}S.T.\\ {}{\displaystyle \sum_{j\in {N}_i}{x}_j}\ge 1\kern1em i=1,\dots, m\end{array} $$
(2)
$$ {x}_j=\left\{\begin{array}{cc}\hfill 1\hfill & \hfill if\ a\ facility\; is\; located\ at\ node\ j\hfill \\ {}\hfill 0\hfill & \hfill othewise\hfill \end{array}\right.j=1,....,n $$
(3)
$$ {N}_i=\left\{j|{d}_{ij}\le S\right\} $$
(4)
i :

Index of demand node

j :

Index of the facility

d ij :

Shortest distance between demand node i and facility j (in nodal steps)

N i :

Set of potential facilities

S :

Maximum service distance (S = 3 in this case)

x j :

Binary variable indicating whether a facility is located at node j

Formula (1) is the objective function that aims to minimize the total number of facilities. Formula (2) requires that at least one facility exists for each demand point. Formula (3) specifies if node j has a facility or not, while capturing the discrete nature of the solution. Formula (4) is the constraint on service distance so that each station is S steps or less away from the nearest facility.

As the solution set N i is composed of discrete locations, this problem is situated in the framework of the integer programming problem, known as NP-hard in computational complexity (Charikar et al. 2001). This problem was implemented in the context of R program and was solved with two external R packages: igraph and lp_solve (Ihaka and Gentleman 1996). The igraph package was employed to construct the graph from the metro network and identify up to the 3rd neighborhood of a node (Csardi and Nepusz 2006; ​Dragan et al. 2006). The lp_solve then derived the solution using the branch-and-bound method, which was regarded as the most effective approach to the location problem (Berkelaar et al. 2004; Caprara et al. 2000). The lp_solve also verified that the solution was optimal rather than heuristic.

Results

A location problem is likely to generate multiple solutions that satisfy the conditions (Bell et al. 2011). A test run of the model in the R program derived thousands of solutions. These solutions were equal in number of PT (N = 34) that were able to cover all the stations within three steps or less. To prioritize these solutions, a scrutiny of the problem should account for not only the best service coverage but also other practical planning variables (Love et al. 1988), such as planning budgets, travel distance between stations, and alternative PT in the vicinity. We then applied three scenarios and additional constraints to eliminate suboptimal solutions.

The scenario planning method (Peterson et al. 2003), known as the method predicting different outcomes in decision making based on proactive scenarios, was employed to analyze this location problem. The scenario planning was widely used for location analysis across different disciplines, such as business planning (Ghosh and Craig 1984) and emergency management (Chen et al. 2013; Current and O’Kelly 1992; Xu et al. 2015). For this particular location problem, we further developed three scenarios under which different planning objectives need to be satisfied. These scenarios provide alternatives for decision makers to prioritize the plans based on available resources and areas where the need for improvement is the most urgent. In the case that multiple solutions are derived under one scenario, we applied additional constraints in a successive manner to identify the optimal solution. These constraints are as follows.

  1. 1)

    Max alternatives: It is very likely that one station has several alternative PT stations in its near vicinity. When multiple solutions are acquired, we select the one that maximizes the total number of alternative PT for all stations. This criterion allows more flexibility for passengers to use the toilet.

  2. 2)

    Min distance: We sum up the number of steps taken to the nearest PT station for all stations. In the case of identical solutions derived under a scenario, the one with the least total number of steps is chosen. This criterion allows the least travel distance for all passengers to reach a toilet station.

  3. 3)

    Max overlaps: When multiple solutions are acquired under a scenario, we choose the one that maximizes the total number of overlaps with existing PT stations. This criterion makes the best use of existing facilities and avoids the effort of relocating existing PT to the largest extent possible.

Scenario #1: Retaining Existing PT while Minimizing New PT Locations

This scenario considers in the case of budget constraints, renovating and making the best use of existing PT becomes a necessity. In this respect, all existing PT are fully utilized to supply the demand nodes. By running the model, 1000 solutions were initially derived. After applying the additional constraints of Max alternativesMin distance, the best solution with 113 PT was derived under this scenario, as shown in Fig. 5.

Fig. 5
figure 5

Planning results for Scenario #1 (retaining existing PT while minimizing new PT locations)

Scenario #2: Reassigning PT and Minimizing Total PT Locations

This scenario considers that existing PT could be torn down and relocated. This condition indicates every station serves as a potential candidate site for the new PT construction. By running the model, 1000 solutions were initially derived. After applying the additional constraints of Max overlapsMax alternativesMin distance, the best solution with 34 PT was derived, as shown in Fig. 6.

Fig. 6
figure 6

Planning results for Scenario #2 (reassigning PT and minimizing the total PT locations)

Scenario #3: Locating PT to Transfer Stations and Minimizing Other PT Locations

Transfer stations are the hubs for connecting multiple lines and directing passenger flows (see Fig. 3). In addition to connectivity, transfer stations carry additional burdens for the entire subway network by serving waiting passengers (Iseki and Taylor 2009). This scenario considers the major transfer stations are of the greatest importance in accommodating the sanitary needs. In this respect, this planning scenario requires the transfer stations to have a PT. By running the model, 1000 solutions were initially derived. Then after applying the additional constraints of Max alternativesMin distance, the best solution with 64 PT was derived under this scenario, as shown in Fig. 7.

Fig. 7
figure 7

Planning results for Scenario #3 (locating PT to transfer stations and minimizing other PT locations)

Table 1 is a statistical summary of the optimal results under the three different planning scenarios.

Table 1 Summary of the original network and the three scenario planning results

Following this output, the results suggest that the original placement of PT is adequate in total number (N = 100) but is relatively limited in coverage and therefore insufficient in serving the ridership. As shown in Table 1, the three planning results show marked improvements over the current system with respect to two metrics: total distance needed to reach PT (D o = 581, D 1 = 270, D 2 = 516, D 3 = 358) and alternatives within three steps or less (A o = 296, A 1 = 352, A 2 = 309, A 3 = 324).

As Fig. 5 demonstrates, Scenario #1 requires the least level of adjustment by retaining all current PT and adding 13 extra ones. Noticeably, these added PT are all located in the periphery of the system or the suburban areas, indicating the uneven distribution of sanitary resources that mainly service the urban core. This plan not only fulfills the needs of the uncovered suburbs but also yields the most alternatives (A 1 = 352) and least overall transfer distance for passengers (D 1 = 270), indicating the best system performance at the minimum initial cost. This plan is most suitable for the situation of restricted construction costs but may not be optimal for the long-term development where the costs for maintenance and operations become necessary. Therefore, Scenario #1 is recommended for planning initiatives that require the least modification to the current system and avoid contingencies arising from the renovation, such as station closure and reduced service time.

Both Scenarios #2 and #3 require considerable adjustment but have very different implications. Scenario #2 adds 20 new PT while removing 86 old ones. As illustrated in Fig. 6, the plan makes a drastic change to the network, leaving limited PT options in the central part of the system. This result is introduced by the effect of the network topology with better connectivity in the center. As this planning scenario does not account for the flow or the demand of passengers, it is very likely that the limited sanitary service in the center would be insufficient. The added costs for installation and removing old facilities are another significant concern for the implementation. However, this plan may benefit financially in the long term by reducing maintenance cost and releasing in-station space that can be reutilized for business purposes, such as food vendors and bookstands.

Scenario #3 introduces an added constraint to Scenario #2 that each transfer station has a PT. This plan results in adding 30 new PT and removing 66 existing ones. As Fig. 7 illustrates, the new placement is more even and emphasizes the functionality of transfer stations. Although this plan also involves a considerable investment in the forefront, it may be compensated by the reduced maintenance cost when the facilities are employed on a daily basis. Also, by locating the PT at the transfer stations, passengers do not need to make long transfers between subway lines to utilize the service. The increased accessibility from minimizing transfers is a significant concern in large-scale transit network planning (Zhao and Ubaka 2004). Therefore, if planning budgets are sufficient, Scenario #3 will be most practical for the sustainable development of the system.

Conclusions: A Healthy Ride for the Future

Research on metro systems has been a multi-faceted field ranging from the study of systems per se to passengers’ utilities gained from their riding experience. The majority of research is focused on the analysis of the connectivity, accessibility, and vulnerability of the networks and how they can be modified to improve functionality (Murray et al. 2008). Research on methods of ameliorating subway travel environments, in aspects of safety (Kenney 1987), cleanness (Stuart et al. 2000), food access (Bassett et al. 2008), and signage (Denis and Pontille 2014), have played an equally important role in ensuring the riders’ satisfaction. The paper proposes a location model that aims to improve sanitary services in a large transit network, the Shanghai Metro. Although the formulation of the problem is not new, the unique application to the placement of public toilets provides a practical example to address a real-world concern and offer scenario-based solutions.

To the authors’ knowledge, the paper is among the first attempts to consider the placement of public toilets in transport planning. It adds a new perspective to addressing key planning issues where the overall objective is more than place-based measures, such as network accessibility. Public transit planning and development should account for human factors with an overarching goal of increasing individual mobility, benefiting public health, and reducing insecurity (Litman 2010). Additional to improving travelers’ mobility, it is of significance to ameliorate services that come with the travel, such as the public toilet as discussed in the paper. By considering this unique location problem in a large metro system, this paper demonstrates a valuable example of developing transportation systems to fulfill previously understated travelers’ needs from a pragmatic perspective. This consideration is of great significance to inform city planners and stakeholders of necessitating sanitary services in sustainable mass transit development.

Methodologically, the implementation of the location model in a large network has always been computationally challenging and massively difficult to solve. The emergence of commercial operations research software (e.g., SAS) and open-source programming environment (e.g., R) provide custom and effective solutions to a complex location problem that could not be tackled by traditional mathematical methods. This paper applies the R-based network analysis and optimization packages to derive the results. The different planning themes provide alternatives for further scrutiny depending on the constraints posed on and resources available to the planning. This combined effort can justify effective strategies to fill service gaps in the metro system where the need for improvement is the greatest.

The research has several limitations that must be fully considered before its actual implementation. First, modeling the problem employs the nodal distance instead of the actual network distance. This assumption stems from the observation that in the Shanghai Metro, the distance between neighboring stations does not significantly vary. Formulating the problem by the network distance or the travel time between stations would be a more practical solution. Second, the model considers the network topology per se without the inclusion of passenger flows. It is likely that the higher density of passengers in the central region would introduce a higher demand for toilet usage and eventually change the planning results. How to assess the demand and incorporate it into the model is an area in need of future exploration.

As a concluding remark, to implement the method and remedy the design issue, public toilet policies are of critical importance. Planning for new toilets is dependent upon codes and standards related to the use of public space. In looking at the Shanghai Metro, perhaps a partnership approach could be considered by urban planners, such as the coordination between in-station toilets and those provided by ground transportations or connected business complex (Anthony and Dufresne 2007; Greed 2009). Alternative solutions to improve the inclusive design include the adoption of unisex toilets as an effort to equalize the usage between genders (Braverman 2004; Burton and Mitchell 2006). To identify these solutions, a strategic plan to assess the service gaps, the needs, and the available resources is a necessity to a healthy ride for the future.