Introduction

With the rapid development of society, the tertiary sector has grown as a proportion of the economy. The increased demand for leisure, entertainment, shopping, catering, and other services has affected the consumption patterns and habits of consumers. In particular, nighttime consumption has increased and the nighttime economy has become an essential aspect of modern urban life. From a socioeconomic perspective, high-quality public transportation services are necessary to support the flourishing nighttime economy (Yang et al. 2022). Therefore, urban rail transit (URT) systems must adjust the operation times of some lines to adapt to passenger demand in nighttime operations.

In most cities, train services have a limited operation period from early morning to midnight. Consequently, the last train (Wang et al. 2023) is the last opportunity for passengers to reach their destinations via the URT system. The operation times of the last train for each line are usually determined based on their functional positions and passenger flow characteristics. Some cities have implemented the operation extension strategy (Chen and Wang 2022), where certain URT lines are selected to extend their operation times; that is, their last trains’ departure times are postponed. Operation extension can effectively stimulate passenger demand during nighttime hours.

Meanwhile, the extension of URT system operations comes with increased costs, including additional crews, higher energy consumption, and increased train mileage. Balancing service profitability with operation costs presents a challenge in optimizing train timetables, which URT managements must carefully consider. Consequently, developing an operation extension strategy for last train timetables that takes into account varying passenger demand, maintenance requirements, and cost constraints holds great practical significance.

Literature review

Existing studies on the collaborative optimization of last train timetables can be divided into two classes. The first class aims to optimize transfer accessibility, with the goal of increasing the proportion of successful passenger transfers at specific transfer stations. The second class aims to optimize origin–destination (OD) accessibility, aiming to increase the rate at which passengers successfully reach their destinations using train services. For example, Kang et al. (2015a) established a last train network transfer model to maximize the headways for passenger transfer connections, which reflected last train connections and transfer waiting times, and reduced the number of "just miss" cases to zero. Kang et al. (2015b) proposed a last train rescheduling model that considered train delays caused by incidents during operation. Chen et al. (2019a) focused on the transfer accessibility between the last trains, considering the heterogeneous transfer walking time. Chen et al. (2019b) proposed a last train network accessibility model to improve service accessibility based on the weighted sum of accessible OD pairs in a network. Moreover, Chen et al. (2020) designed a label-setting algorithm to calculate the latest possible departure times for OD pairs; that is, the latest departure time from the origin station that would allow passengers to reach their destinations. Yang et al. (2020) formulated two 0–1 integer linear programming models concerning different measures of accessibility: space–time and flow-based accessibility. Furthermore, Yao et al. (2019) proposed a last train timetable optimization model to maximize the number of passengers successfully reaching their destinations and minimize their transfer waiting times, while the OD-based passenger demand and detour routing strategy were mainly considered for particular services.

Many studies have explored the operation extension strategy to meet the demand for nighttime trains. Operation extension can better accommodate nighttime activities, as passengers expect the last train to operate as late as possible to ensure convenient travel. To achieve overall optimization, most studies consider all the lines in a network as the objects for optimization and adjustment. For example, Kang and Meng (2017) developed a global optimization method to solve the last train departure time choice problem for large-scale subway networks. Zhou et al. (2019) considered the departure, running, and dwell times of the last train from a terminal station as the objects for optimization and adjustment. However, in contrast to the desires of passengers, URT operators usually want train services to finish earlier to reduce operation costs, which are associated with operation extension and directly dependent on the operation time, such as equipment maintenance, crew, fuel and energy, and insurance costs (Guo et al. 2020). Kang et al. (2020) developed an integrated last train operational model to save energy and reduce transfer waiting and in-train travel times by adjusting the acceleration, cruising, coasting, and braking times on each rail segment. Wang et al. (2022) developed an integrated energy-efficient and transfer-accessible model to minimize tractive energy consumption and maximize the number of last train connections. Wang et al. (2023) considered the running mileage and operating costs and proposed an OD-accessible timetable to reflect the last successful departure time and expand the analysis dimensions.

Therefore, considering the opposing desires of passengers and operators, the last train operation extension problem is a multifaceted issue. Some studies have used the concept of Pareto optimality in optimizing train timetables. For example, Ibarra-Rojas et al. (2014) considered the trade-off between the level of service and operating costs by optimizing timetabling and vehicle scheduling decisions; they studied the compromise between the two criteria over the entire scheming process by finding the exact Pareto fronts. Xu et al. (2018) used the constraint method and linearization techniques to obtain approximate Pareto optimal solutions within a limited number of seconds, which allowed them to determine the trade-off, minimize the total transfer waiting time for all transfer passengers, and minimize the deviation from the scheduled timetable. Heidari et al. (2020) used ε-constraint method to solve a bi-objective multi-period planning model which aims to minimize the weighted transfer waiting time along with the operational costs of vehicles. Guo et al. (2020) formulated a mixed integer programming approach for last train scheduling, which provided smoother passenger transfers by maximizing transfer synchronization events and lower operating costs by minimizing the greatest differences between the last trains.

In conclusion, a few researchers have considered the last train operation extension optimization of passenger benefits in terms of general travel expenses, as well as the optimization of operator costs in terms of train energy consumption. It has also made significant progress in multi-objective optimization, providing great inspiration for this research. However, previous research has directly treated all last train timetables in the network as adjusted objectives. The gap between existing theoretical research and practical applications lies in the lack of decision-making for optimization targets prior to the optimization process. Precisely targeting adjusted lines may allow operators to bring significant benefits to passengers through small changes, enabling more passengers to reach their destinations via URT systems. Additionally, these small changes are expected to be meaningful for both passengers and operators. On one hand, passengers typically rely on the last train schedule information to determine their latest departure time, making long-term stable and reliable last train timetable information essential (Tseng et al. 2012). This means that from the perspective of passengers, there should not be an excessive number of adjusted lines, as it would disrupt daily planning. On the other hand, adjusting all lines may result in higher costs, including not only the explicit energy consumption but also factors such as the difficulty of public release and the level of public acceptance, making an overall adjustment potentially unnecessary. In other words, from the perspective of operators, it is essential to accurately determine the adjusted lines with the highest cost-effectiveness.

Focus of this research

This study aims to address the identified gap in the literature by proposing a new method of optimizing last train timetables in URT networks that maximizes the use of transportation resources to serve transfer passengers. An operation extension scheme for last train timetables is obtained by optimizing the transfer connections on a network to maximize the number of successfully transferred passengers while taking into consideration the minimal number of adjusted lines. The main contributions of this study are as follows:

  1. (a)

    An operation expansion optimization technique for last train timetables in URT systems is developed. In a pioneering approach, we begin by evaluating the feasibility and necessity of extending specific lines’ operation time before providing the optimized last train timetable. Objective functions for maximizing successful passenger transfers and minimizing the number of adjusted lines are simultaneously considered.

  2. (b)

    A novel MILP model is proposed that aims to optimize operation extension strategy for last train timetables. Pareto's principle is adopted to deal with two goals: maximizing the social benefits and minimizing the operation costs. Owing to the large scale of URT networks, a hybrid "Pareto + Cplex" solution algorithm is developed. The algorithm decomposes the integrated optimization problem into two subproblems: adjusted line identification, and last train timetable optimization. Therefore, high-quality solutions for large-scale cases with long timetabling horizons can be computed within reasonable computation times.

Problem statement

Studied object

In URT networks, passengers often rely on multiple lines to complete a trip. At the end of 2022, 26 cities in China had more than four URT lines in operation with three or more transfer stations. The arrival and departure times of trains on different lines at the transfer stations play a crucial role in the connections between different transfer arcs. In this study, a transfer arc is defined as a connection relationship between the up/down directions of any two lines at a transfer station. If there are \({N}_{t}\) and \({N}_{e}\) lines that pass through and terminate at a given transfer station, respectively, then there are \({(2{N}_{t}+{N}_{e})}^{2}-({4N}_{t}+{N}_{e})\) transfer arcs (Zeng et al. 2019). For example, at a transfer station where the two lines intersect, there are eight transfer arcs (as shown in Fig. 1). Each transfer arc represents a connection where outbound passengers from the train on the transfer-out line in the transfer-out direction walk toward the train on the transfer-in line in the transfer-in direction.

Fig. 1
figure 1

Example of transfer arcs at a transfer station

In URT systems, operation extension can effectively stimulate passenger demand and alleviate constraints on nighttime travel. However, in many cases, URT networks cannot operate continuously 24 h a day owing to factors such as security inspections, maintenance requirements, and low nighttime passenger volumes during nighttime. During the last train period (Wang et al. 2023), some transfer arcs may fail owing to factors such as the different suspension times of each line, limited dwell times for trains at each station, and dwell times that are often shorter than the transfer time. Consequently, some passengers are unable to complete their journey via the URT network and must adopt alternative modes of transportation, seriously impacting their travel experience. Hence, it is important to formulate a reasonable operation extension scheme that can improve the quality of the URT service.

The transfer passenger flows are not uniform across the different transfer arcs. Therefore, although it is impossible to successfully transfer all passengers during the last train period, the operation extension scheme can be optimized according to the relative transfer passenger flow, such that the maximum number of passengers can transfer successfully.

In large URT networks, a single line often has multiple transfer stations, and any adjustments made to the timetables at one station can have ripple effects on other transfer stations on the same line. The traditional approach (Wu et al. 2020) of solely adjusting transfer arcs with failed connections is counterproductive because it may lead to the failure of previously successful transfer arcs. Therefore, it is necessary to comprehensively consider all the connections at all the transfer stations at the same time.

Practical issues

The operation extension scheme can be evaluated in terms of the ratio of successfully transferred passengers (RSTP) to the total transfer passenger demand. In the URT network, the transfer connection mainly depends on the coordination of last trains' departure times at the first station for each line. If there are \(x\) lines in the network (divided into up and down directions) and the adjustable time range is \(y\) h (accurate to the order of seconds), then the number of possible combinations of last train connections on the network is \({(3600y)}^{2x}\). For example, if \(x=13\) and \(y=1\), then the number of possible combinations is \(2.9\times {10}^{92}\). Owing to the high order of magnitude, solving this large-scale combinatorial optimization problem manually becomes exceedingly challenging. Consequently, operators often experience difficulties because there is no clear adjustment direction or objective reference criteria. Hence, three key questions need be answered to facilitate the operation extension scheme optimization for last train timetables in practical scenarios.

  • Question 1: What is the highest RSTP for the operation extension scheme based on the transfer passenger flow data, in order to perform an objective scientific evaluation of the RSTP under the current schedule?

  • Question 2: What is the minimum number of lines that need be adjusted to achieve the target RSTP?

  • Question 3: Given the number of adjustable lines, which lines that can be adjusted to achieve the maximum RSTP and what is their last train timetables like?

This study aims to address the aforementioned three issues by proposing an optimization approach for the operation extension scheme. The objective is to enhance service quality through minor adjustments that strike a balance between passenger satisfaction and operating costs.

Model formulation

Notation

In this section, we establish an optimization model for the operation extension strategy on last train timetables in URT networks. The model-related symbols are listed in Table 1.

Table 1 Model-related symbols' descriptions

Assumption

Reasonable assumptions regarding the applicable scenarios are as follows.

  • Assumption 1: This research exclusively focuses on scenarios where all last trains run the entire journey, meaning that even if the depot is located midway, the train will complete the entire journey and then return to the depot empty, ensuring that once the passengers of the train are inbound, they can reach any station on that line without inconveniences, preserving their travel experience.

  • Assumption 2: For lines with branch lines, although it is the same train, the classification of whether it is the last train is different in the shared section and the non-shared section. This research only applies to scenarios where there are no branch lines in the network.

  • Assumption 3: The passenger numbers for each transfer arc can be calculated via the Automatic Fare Collection system and Clearing Center using passenger assignment model, as referred to Zhou and Xu 2012. The running time and dwell time data can be obtained from the train diagram (Wang et al. 2023), and the average transfer walking time can be derived from on-site surveys.

  • Assumption 4: To characterize the relative amount of transfer demand across transfer arcs, this research utilizes the historical transfer passenger data from the final hour before the last transfer record of each transfer arc to represent dynamic transfer demand \({p}_{j}\) during the last train period.

Objective function and evaluation indicator

Pareto optimal (Guo et al. 2020) is an ideal state of resource allocation that minimizes the utilization of human, material, and financial resources while optimizing allocation, efficiency and benefits. In this study, the Pareto optimal multi-objective optimization considered the number of adjustable lines and the RSTP to be the operation cost and social benefit, respectively. With a higher number of adjustable lines, costs associated with energy consumption, facility and equipment maintenance, ticketing, crew, passenger organization, external release, police support, and insurance increase, resulting in higher operation costs. On the other hand, a higher RSTP enables more passengers to reach their destinations via the URT network, leading to an increase in social benefits.

Therefore, the objective of the proposed model is to minimize the number of adjusted lines and maximize the number of successfully transferred passengers, which can be expressed as objective functions \(Y\) and \(Z\) in formula (1), respectively. Objective function \(Y\) calculates the number of all adjusted lines, which are included when \({\delta }_{i,u}\) equals 1, and not counted otherwise. Objective function \(Z\) calculates the number of successfully transferred passengers, which includes the quantity of \({p}_{j}\) on the transfer arc j when \({\pi }_{j}\) equals 1, and not counted otherwise.

$$\left\{\begin{array}{c}min Y=\sum_{i=1}^{{N}_{i}}\sum_{u=0}^{1}{\delta }_{i,u}\\ max Z=\sum_{j=1}^{{N}_{j}}{p}_{j}\cdot {\pi }_{j}\end{array}\right.$$
(1)

The \(\eta\) was used as an indicator to intuitively compare the relative quantity of successful transfer passengers under different schemes, that is, RSTP. It can be expressed as,

$$\eta =\frac{\sum_{j=1}^{{N}_{j}}({p}_{j}\cdot {\pi }_{j})}{\sum_{j=1}^{{N}_{j}}{p}_{j}}\times 100\mathrm{\%}$$
(2)

Constraints and decision variable

The value rule for the 0–1 variable \({\delta }_{i,u}\) in the objective function \(Y\) is given by formula (3). When \({t}_{i,u}\) is not equal to its lower bound \(\underset{\_}{{t}_{i,u}}\), the departure time of the last train from the first station in the direction \(u\) is adjusted. Thus, the value of \({\delta }_{i,u}\) is 1, and vice versa.

$${\delta }_{i,u}=\left\{\begin{array}{c}1, {t}_{i,u}\ne \underset{\_}{{t}_{i,u}}\\ 0, {t}_{i,u}=\underset{\_}{{t}_{i,u}}\end{array}, \forall i\in [1,{N}_{i}], u\in U\right.$$
(3)

The 0–1 variable \({\pi }_{j}\) in the objective function \(Z\) expresses whether the last train on transfer arc \(j\) is successfully connected, as shown in formula (4). When \({c}_{j}\) is greater than or equal to \({w}_{j}\), passengers can catch the next train and the transfer is successful. Thus, the value of \({\pi }_{j}\) is 1, and vice versa.

$${\pi }_{j}=\left\{\begin{array}{c}1, {c}_{j}\ge {w}_{j}\\ 0, {c}_{j}<{w}_{j}\end{array}, \forall j\in [1,{N}_{j}]\right.$$
(4)

The transfer connection time \({c}_{j}\) for transfer arc \(j\) in formula (4) is equal to the difference between the transfer-in time \({f}_{j}\) and the transfer-out time \({o}_{j}\). That is,

$${c}_{j}={f}_{j}-{o}_{j}, \forall j\in [1,{N}_{j}]$$
(5)

The transfer-in time \({f}_{j}\) for transfer arc \(j\) in formula (5) is equal to the time required for the train on the transfer-in line in the transfer-in direction of transfer arc \(j\) to depart from transfer station \(s\). The transfer-in time \({f}_{j}\) is equal to the sum of the departure time of the last train from the first station \({t}_{i,u}\) on line \(i\) in the up/down direction, the running time of the train from the first station to transfer station \(s\), that is, \({r}_{i,u,s}\), and the dwell time of the train at transfer station \(s\), that is, \({d}_{i,u,s}\). This can be expressed as

$${f}_{j}={t}_{i,u}+{r}_{i,u,s}+{d}_{i,u,s}, \forall j\in [1,{N}_{j}], i\in [1,{N}_{i}], u\in U, s\in [1,{N}_{s}]$$
(6)

The transfer-out time \({o}_{j}\) for transfer arc \(j\) in formula (5) is the time at which the train from the transfer-out line in the transfer-out direction of transfer arc \(j\) arrives at transfer station \(s\). The transfer-out time \({o}_{j}\) is equal to the departure time of the last train from the first station \({t}_{i,u}\) on line \(i\) in the up/down direction plus the running time of the train from the first station to the transfer station \(s\), that is, \({r}_{i,u,s}\). This can be expressed as

$${o}_{j}={t}_{i,u}+{r}_{i,u,s}, \forall j\in [1,{N}_{j}], i\in [1,{N}_{i}], u\in U, s\in [1,{N}_{s}]$$
(7)

Owing to the constraints of the running and dwell times in formula (6) and in formula (7), the arrival and departure times of a train at each transfer station are determined based on its departure time from the first station. Hence, optimizing last train transfer connections aims to determine the departure times from the first station. Therefore, the essential decision variable for the last train connection optimization model is the departure time of the last train from the first station \({t}_{i,u}\).

The relationships between variables in the model are illustrated in Fig. 2.

Fig. 2
figure 2

Illustration of variable relationship

Solution algorithm

This study aims to minimize the operation cost of the number of adjustable lines and to maximize the social benefit of successful passenger transfers on the last trains to find the Pareto frontier for URT operators to make decisions. This model is decomposed into two subproblems for solving according to two objective functions.

  • Subproblem 1 (adjusted line identification): How many lines should be adjusted and which ones? At this stage, it is needed to generate combinations that can be treated as optimization objects given the specified number of adjustable lines. These optimization objects are then passed to Subproblem 2 to calculate the highest RSTP achievable under the conditions of each combination. Subsequently, the task is to select the best combination results from the outputs of Subproblem 2, and evaluate whether they meet the targeted RSTP. From the modeling perspective, Subproblem 1 corresponds to the \(Y\) objective function in Section 3.3.

  • Subproblem 2 (last train timetable optimization): How can the maximum RSTP be achieved and what is the best last train timetable given the specific adjustable lines? At this stage, the process by which CPLEX is used to solve the linear programming problem can be divided into nine steps: model-by-row with CPLEX, setting the objective function to take the maximum value, generating variable names, adding objective function coefficients, adding lower bounds for each variable, adding upper bounds for each variable, adding variable types, adding constraints, and solving the optimization problem. From the modeling perspective, Subproblem 2 corresponds to the \(Z\) objective function in Section 3.3.

To sum up, the decision variables of Subproblem 1 are the input constraints of Subproblem 2, the output of Subproblem 2 serves as the optimal candidates for Subproblem 1. Once the highest RSTP for the adjusted lines' timetable is achieved under the given number of adjustable lines, the Pareto frontier for the last train connection optimization model will be obtained sequentially. The process of the solution algorithm is shown in Fig. 3.

Fig. 3
figure 3

Flow chart of last train connection optimization process

Note that the linearization method for formula (4) in Subproblem 2, which is related to the objective function \(Z\) and needs to be solved using CPLEX, is provided by formula (8).

$$\left\{\begin{array}{c}{\gamma }_{j}+{\lambda }_{j}=1\\ {\pi }_{j}={\gamma }_{j}\\ {c}_{j}<M\cdot {\gamma }_{j}+{w}_{j}\cdot {\lambda }_{j}\\ {c}_{j}\ge {w}_{j}\cdot {\gamma }_{j}-M\cdot {\lambda }_{j}\\ {\gamma }_{j}, {\lambda }_{j}\in \{0, 1\}\end{array}, \forall j\in [1, {N}_{j}]\right.$$
(8)

Case study

Case background

There are 56 transfer stations and 452 transfer arcs for the 13 lines of the Beijing subway network, as shown in Fig. 4.

Fig. 4
figure 4

Topological map of thirteen lines of Beijing subway

According to the statistical analysis, on specific working days, the average passenger flow across the 13 lines during the last train period was 26 066. Under the current timetables, 12 077 passengers transfer successfully during the last train period, and the RSTP is 46.33%. The current transfer information for the Beijing subway are presented in Table 2, sorted in descending order by the last column.

Table 2 Beijing subway transfer information

Table 2 shows that Lines 10, 2, and 4 have the most transfer arcs and transfer stations (in descending order); Lines 10, 4, and 5 have the highest passenger flow demands (in descending order); and Lines 10, 1, and 4 have the highest numbers of passengers who fail to transfer (in descending order). Therefore, if we follow an intuitive approach, Lines 10 and 4 will be adjusted to optimize the last train connection effect. The difference between the objective adjustment optimization results and the intuitive assumptions is discussed in the next section.

Optimization scheme results

The maximum duration is set to 1 h and the transfer walking time for all transfer arcs is uniformly set to 120 s for convenience in this case. The optimized adjustment scheme for the last train connections and RSTP is presented in Table 3. The lines greyed out in Table 3 are those where adjustment was allowed, but no adjustments were made. The rows where the number of adjustable lines is between 1 and 10 are the Pareto frontiers, and the values of the corresponding decision variables are presented in Appendix Table 4.

Table 3 Beijing subway last train connection optimization schemes

From Table 3, we can answer the three questions of concern for operators:

  • Answer to Question 1: Under the specific conditions for the Beijing subway, the RSTP for the last train connection in the network has a maximum value of 63.91%. Compared to the current 46.33%, there is a maximum improvement potential of 17.58%.

  • Answer to Question 2: Under the current timetable, the RSTP is 46.33%. When the RSTPs of 50%, 55%, and 60% are expected, the number of lines with adjusted last train timetable should be one, two, or five, respectively.

  • Answer to Question 3: When one line's last train time is adjustable, the effect of adjusting Line 2 is the best. Adjusting Lines 2 and 14 works best when two lines are adjustable. When it is allowed to adjust three lines, the effect of adjusting Lines 2, 9, and 14 is the best, and so on.

Furthermore, two unexpected phenomena are captured, which could not be realized artificially unless they are calculated objectively.

  1. 1)

    When eleven, twelve, or thirteen lines are allowed to be adjusted, the optimized times for Lines 4, 10, and 13 are the same as their current times, which means that there is no adjustment, so the RSTP is not improved. Therefore, it is unnecessary to adjust all the lines, and adjusting only ten lines will reach the capacity limit of the case subway network.

  2. 2)

    Combining the results in Table 2 and 3 shows that Lines 10 and 4, which had the most transfer arcs, most transfer stations, highest transfer passenger flow demand, and highest failed transfer passenger flow, are not adjusted, which is not intuitive. By contrast, most of the best schemes involve adjustments to Lines 2, 9, and 14, suggesting that transfer-related features cannot serve as indicators for selecting adjustment objects. On the other hand, line-related features also cannot serve as indicators for selecting adjustment objects. Firstly, Line 10, as a circular line, was not adjusted while Line 2 was. Secondly, Line 4, despite being comparatively short, was not adjusted while Line 9 was; the same situation arises between Lines 13 and 14. The selection of adjustment objects should depend on the distances between stations, i.e., the running time of trains between different sections. However, this feature is difficult to perceive manually. Therefore, there are no explicit indicators implying operators which lines should adjust before overall calculation.

Analysis of the optimization effects

The Pareto chart in Fig. 5 shows that the operators can significantly improve the connection effect of the last trains by paying attention to a crucial few lines, which have a practical reference value.

Fig. 5
figure 5

Pareto chart

The model was solved using a personal computer with an Intel Core i7 3.40 GHz CPU and 32.0 GB of RAM, utilizing Python programming language. The successfully transferred passenger flows and calculation times when different numbers of adjustable lines are shown in Fig. 6. To facilitate the discussion of the problem, the solution process for the 13 optimal adjustment methods was divided into three stages according to the number of adjustable lines. Stages I, II, and III corresponded to the adjustment of less than four, between four and eight, and more than eight lines, respectively.

Fig. 6
figure 6

Evaluation of the optimization schemes

Figure 6 shows two clear trends:

  1. 1)

    As the number of adjustable lines increased, the successfully transferred passenger flow gradually increased. In Stage I, there was a rapid increase in the number of successfully transferred passengers and a noticeable optimization effect. In Stage II, there was only a small increase in the number of successfully transferred passengers and the optimization effect was not prominent. In Stage III, there was hardly any increase in the number of successfully transferred passengers with no apparent optimization effect.

  2. 2)

    As the number of adjustable lines increased, the calculation time initially increased and then decreased, in line with the variation trend in the number of combinations of Table 3. The program calculation time exhibits a roughly symmetrical pattern around the number of adjustable lines equal to 7. However, it is evident that the calculation time is longer when the number of adjustable lines exceeds 7, compared to when it is less than 7. This is because the program calculation time is influenced not only by the number of combinations but also by the number of variables, which increases with a higher number of adjustable lines. In Stage I, the program calculation time was less than 3 h, which is within an acceptable range for practical operations. In Stage II, the program calculation time was considerably longer, up to 15 h. In Stage III, the program calculation time decreased and was less than 10 h.

In summary, when the number of adjustable lines is small, the schemes can be applied individually for greater benefits with fewer adjustments. By contrast, when the number of adjustable lines is large, it is better to set the program to adjust all the lines. In the latter case, comparing the optimized last train timetable with the current timetable shows that some lines were not adjusted, which essentially covers over schemes. Moreover, the solution time is short, which satisfies the requirements for practical applications.

Conclusion

Considering the context of a prosperous nighttime economy, this study focused on three practical issues that occur when connecting the last train in a URT network: identifying the optimal RSTP for the network, minimizing number of lines that must be adjusted to achieve the expected goal, and determining the best combination of adjustments for the number of adjustable lines. A Pareto optimal model was constructed considering the number of adjustable lines as the operation cost and the number of successful passenger transfers as the social benefit. The number of successfully transferred passengers across the network was calculated by taking the departure time of the last train from the first station on each line in each direction as a direct decision-making variable and judging whether each transfer arc was successfully connected. A hybrid "Pareto + Cplex" solution algorithm was used to solve the multi-objective MILP model.

The proposed methodology was validated using the Beijing subway as an example. The results indicate that a significant connection effect can be achieved by adjusting a few lines and that not all lines must be adjusted to achieve the highest RSTP. The selection of adjustable lines to achieve the optimum results was counterintuitive. Finally, the practical rationality and necessity of the optimization conditions used to determine the number of adjustable lines were analyzed to facilitate the implementation of the proposed optimization method.

Future research can be conducted in the following four aspects. Firstly, there should be a coordinated optimization of the last train timetable for all passenger flows passing through this line, rather than solely focusing on transfer passenger demand. Secondly, the more complex operational environment should be considered, such as whether the lines have branch lines or if trains run the entire route. Additionally, robust optimization should be achieved by considering various transfer walking times and the uncertainty of passenger flows. Lastly, more efficient algorithms should be designed to reduce calculation time for practical application.