Abstract
Abstract
Earthwork Allocation and Transportation (EAT) significantly impacts construction cost in Railway Alignment (RA) optimization, but slight research has been devoted to this problem. To this end, an RA-EAT bi-level optimization framework is developed. A concurrent RA-EAT design model is formulated at the upper-level. At the lower level, the EAT system is modelled by incorporating earthwork allocation sections partition, soil waste/borrow pits selection and access roads generation. To solve this bi-level model, a tailored solution strategy is proposed. Specifically, a candidate pool for borrow/waste pits is established via a moving window method. Then, RA alternatives are generated using a Particle Swarm Optimization (PSO). Afterward, the EAT model is solved with a hierarchical approach, including determining EAT sections along an RA with a divide-and-conquer method and configuring access roads with a modified Dijkstra's algorithm. Thus, the total RA-EAT solution can be iteratively evolved through the PSO rationale. Finally, the proposed method is verified and analyzed in a real-world case via a sensitivity analysis and a comparative experiment.
Keywords
Introduction
Alignment design mainly aims to determine the railway locations, geometric characteristics and structure configurations, e.g., bridges, tunnels, fills, cuts, and auxiliary construction projects.1,2 It affects the costs (e.g., construction cost, operation and maintenance costs, right-of-way cost, user time cost), construction duration, 3 environmental impacts 4 and geological hazards 5 of an entire railway project. Therefore, alignment design is crucial for the overall railway project's design, construction and operation. However, Railway Alignment (RA) design faces many challenges such as large search spaces, complex coupled constraints, and many evaluation criteria, which makes manual alignment design exceptionally difficult and time-consuming. 6 Due to the limitation of time and resources, engineers may overlook some valuable RA alternatives.
To overcome the above difficulties, researchers have conducted many automated alignment optimization studies, which can be divided into two aspects, i.e., optimization model development and optimization algorithm design.
An optimization model serves as a mathematical abstraction of a complex real-world engineering problem, which is usually comprised of design variables, objective functions and constraints. In this field, most model-related studies focused on objective function assessment. Among them, many publications were devoted to cost-related single-objective optimization, such as earthwork costs, 7 bridge and tunnel construction costs, 8 and right-of-way costs.9,10 In addition, researchers have also proposed several multi-objective models for RA optimization. For instance, Zhang et al. 4 considered traffic-related safety performance and construction cost into their model for tunnel alignment optimization. Also, Song et al. developed a bi-objective RA optimization model integrating construction cost and geo-hazards posed by landslides. 11 Moreover, Gao et al. and Pu et al. considered the construction cost and carbon emission simultaneously in highway and railway alignment optimization, respectively.12,13 In recent years, a many-objective optimization model has also been proposed, which comprehensively considered six kinds of objectives representing different dimensions. 14
To solve the above optimization models, many optimization algorithms have been devised. Researchers at the University of Maryland designed a Highway Alignment Optimization (HAO) model, and then solved the HAO model with a Genetic Algorithm.15,16 In that method, the alignment control points (known as Points of Intersections, PIs) were defined as genes and located on a set of uniformly distributed cutting planes between the start and end points.17–19 Then, specific genetic operators were customized to optimize these PIs for finding a satisfactory alignment solution.20–22
Despite the successful application of GAs for alignment design in plain areas, they were inadequate in complex mountain areas because of the harsh topographic and geologic conditions. Therefore, a distance transform (DT) algorithm has been applied to the optimization of mountain RAs. Inspired by de Smith, 23 a bidirectional scanning strategy was devised for DT. 24 Furthermore, this method was enlarged to develop a three-dimensional DT (3D-DT) 10 and then parallelized by applying the CPU-based OpenMP library to expedite the optimization process. 11 Meanwhile, considering the application of alignment design experience, a knowledge hypergraph-driven DT method was proposed to address the challenge that manual experience is difficult to integrate directly into intelligent alignment optimization.25,26 Nevertheless, it is noteworthy that the DT-produced paths could be further refined to obtain smooth alignments. Thus, inspired by Jong and Schonfeld 15 as well as Shafahi and Bagherian, 27 specific genetic and particle swarm operators were proposed to adjust the DT path for more precise RA optimization. 28 Besides the above methods, many other algorithms have also been applied for alignment optimization, including deep learning, 29 simulated annealing 30 and sequential quadratic programming. 31
Considerable efforts have been invested into alignment optimization research and publications. In these publications, earthwork cost can be the major criterion in optimizing alignments. Unfortunately, while a few studies in highway alignment optimization32,33 have considered the Earthwork Allocation and Transportation (EAT) factors, most existing studies in RA optimization only consider the simple cut and fill volume of an alignment when computing the earthwork cost, which lead to inaccurate results for the total cost. A systematic mapping study on earthwork optimization also notes that most EAT-related studies lack post-construction validation and environmental factor integration.
34
In actuality, the EAT work significantly affects railway construction costs, duration, and solution feasibility.35–37 Moreover, the EAT is also a very difficult process: First, it involves the balance of railway earthwork along the alignment itself. That is, the earth from cut sections should be primarily transported to embankment sections in order to minimize the earthwork cost. Thus, cut-fill tradeoffs should be assessed during the EAT process. In addition, when excessive soil is excavated in cut sections or additional soil is needed in fill sections, it is necessary to select appropriate regions in the study area for obtaining or discarding soil volumes (known as borrow pits and waste pits, respectively), as shown in Figure 1. Complicating things further, during this process, the design factors of access roads from these pits to the main alignment should also be accounted for earth transportation. Moreover, there exist an astronomic number of possible alignment alternatives as well as numerous alignment-borrow/waste pit-access road combinations to consider during the RA-EAT design. Therefore, it is fairly challenging to jointly determine the best solutions of RAs and EAT schemes.

The coupling relation between the upper- and lower-level models.
In the literature, some scholars have recognized the importance of EAT design. Easa32,33 considered the variation of earthwork transportation cost and formulated a linear programming model for solving this problem. They first optimized the vertical alignment, and then developed the corresponding EAT alternatives based on this pre-optimized alignment. Burdett and Kozan 38 proposed a “block theoretic” model for formulating large-scale earthwork planning problems, which was improved in Burdett et al. 39 by reducing fuel consumption and construction costs. Güden and Süral 40 designed a minimum cost model for earthwork allocation and proposed a polynomial dynamic programming algorithm for solving it. Gwak et al. 36 designed a cut-fill pairing and sequencing optimization method to ensure precise earthwork allocation. Choi et al. 41 proposed a reinforcement learning model with an attention mechanism for EAT, which optimized truck travel time by learning dynamic terrain changes. Hare et al. 42 devised a mixed integer linear program, which can effectively reduce the computing times. However, in most of the above studies, the earthwork allocation was based on pre-determined and unchanging railway or road alignments.
Actually, there is a complex coupled relation between RA design and EAT. On one hand, among a large number of possible alignment alternatives, the distributions as well as volumes of fill and cut sections along these alignments are generally different for the numerous possible alignment alternatives. Thus, varied EAT programs, involving flexible borrow/waste pit location and access road design factors, are required. On the other hand, EAT significantly impacts the entire RA's quality by influencing the earthwork cost, construction accessibility and duration. Therefore, in real-life engineering, a concurrent optimization model is highly desirable for RA-EAT design.
Bi-level optimization is a hierarchical framework where the upper-level model sets core decision objectives, and its solutions are constrained by the optimal outcomes of the lower-level model. This structure excels at handling coupled systems with interdependent decision-making, which aligns appropriately with our study: RA-EAT optimization (upper level) dictates earthwork distribution, while EAT design (lower level) affects RA's cost and feasibility. In similar fields, Mondal et al. 43 proposed a bi-level model for horizontal highway alignment optimization in a specified corridor. Beyond transportation infrastructure, bi-level optimization has also achieved notable achievements in other engineering fields. Sarma and Adeli 44 proposed bilevel parallel genetic algorithms for large-scale steel structure optimization. Lin et al. 45 developed a bilevel dynamic continuum model for urban housing allocation and transportation emission reduction. These methods provide key references for our research.
Therefore, in this work, bi-level integrated optimization model and method for 3D-RA and the corresponding EAT schemes are constructed. The main contributions include: A bi-level optimization model for RA and EAT design is developed. At the upper level, a concurrent RA-EAT optimization model is devised. At the lower-level, the EAT problem is formulated. Specifically, the geometric characteristics of RA-EAT sections, borrow/waste pits, and access roads are analyzed and treated as design variables. Then, the costs for earth transportation, borrow/waste pit location as well as access road constructions are combined to evaluate the lower-level objective function. Besides, multiple constraints are comprehensively specified for earthwork allocation, pit location and access road design. To solve the optimization model, a divide-and-conquer approach
1
for RA-EAT concurrent optimization is devised. First, based on terrain characteristics, a moving window method is improved to construct a candidate pool for borrow/waste pit locations. Subsequently, a PSO is used to search for RA alternatives. During the PSO's iterative evolution, EAT schemes corresponding to each RA alternative is solved, specifically involving earthwork allocation sections partition, appropriate borrow/waste pit locations selection, and the generation of access roads via a modified Dijkstra's algorithm. Finally, a comprehensive RA-EAT solution is optimized. To demonstrate practical applicability, a large-scale actual railway case study is conducted to confirm the model and algorithm's effectiveness through comprehensive analysis of results.
The rest sections are structured systematically: Section 2 develops the bi-level optimization model, followed by the solution methodology in Section 3. Section 4 verifies the approach through a real-life case analysis, with concluding remarks presented in Section 5.
To address the problem of concurrent optimization of RA and EAT, a bi-level optimization model is constructed. The upper level focuses on the collaborative optimization of RA and EAT, while the lower level is dedicated to the detailed design of EAT. Notably, both the upper- and lower-level models serve the unified goal of optimizing the comprehensive cost of RA-EAT, without internal conflict between them. Specifically, the optimization results of the lower-level are fed into the iteratively optimization process of the upper level. Meanwhile, the upper-level model, in turn, constrains the feasible range of the lower level's optimization. The coupling relation between the two levels of this bi-level optimization model is illustrated in Figure 1.
Upper level: RA-EAT optimization model
Design variables
A 3-D RA's horizontal alignment is determined by a series of Horizontal Points of Intersection (
Objective function
The construction cost serves as the objective function for the upper-level RA-EAT optimization model, encompassing expenses of an RA's earthwork (Ce), right-of-way (Cr), bridges (Cb), tunnels (Ct), and length-related structures (Cl), as well as the cost of corresponding EAT configurations:
The computational expressions for these cost elements (except for cost of EAT, which will be detailed in the next section) are available in multiple published works. 1 Thus, they are not repeated here.
RA design must satisfy multiple constraints. First, it is necessary to consider geometric specifications, including the minimum circular curve radius and maximum gradient. Also, an alignment must satisfy structural constraints, mainly including the maximum height of bridges and the maximum length of tunnels. In addition, an alignment should also bypass forbidden zones, such as goafs and existing buildings. The above constraints are basic conditions that must be considered in every RA design. Their formulations have been comprehensively presented in existing literature
48
and are therefore not repeated here. All constraints pertaining to RAs are denoted by constraint set CRA(
Lower level: EAT design model
Design variables
Generally, for EAT problems, the allocation sections (which are comprised of several cut and fill sections within a specific RA segment range for earthwork balance, with more details provided in next section) should be first partitioned based on the RA. Then, the cut and fill volumes can be transported along the alignment. If there are excessive fill or cut earth volumes, corresponding borrow or waste pits must be selected for railway construction. Access roads that connect borrow (or waste) pits with an alignment's fill (or cut) sections should also be designed and their costs should be estimated. In the EAT system, the excavated earth is first allocated along the alignment to fill sections. At this time, fill sections are considered as “customers” and cut sections are considered as “suppliers”. When there is excessive cut or fill volumes, it is necessary to construct, respectively, waste or borrow pits. At that time, the borrow and waste pits can be considered as new “suppliers”. The waste pits must store the redundant cut volume and the borrow pit must supply filling material to the railway. The borrow/waste pits should not only satisfy their own capacity constraints, but also satisfy the earth needs of cut and fill construction of the railway. The model incorporates the following simplifying assumptions: There is no earth movement between different borrow and/or waste pits. Soils and rocks excavated from cut sections can be used for fill sections along the alignment after allocation. Moreover, soils may swell after being cut and shrink when compacted into fill sections. To consider these factors, specific calibration parameters are included in the proposed model, with details provided in the next section. Excavated materials from a tunnel are divided at the tunnel's midpoint and allocated to the earthwork allocation sections at both ends of the tunnel, where they are treated as part of the cut volumes for those respective sections.
Based on the above assumptions, the earthwork allocation sections should be determined first. In this work, the start and end stations of allocation sections along the alignment are deemed as corresponding design variables:
Ideally, a good alignment optimization model should seek to roughly equalize cut and fill volumes, not only over the entire alignment length but within relatively short sections. However, in actual projects, the cut and fill volumes along the alignment are usually unequal since there is often excessive cut and fill earth in a large engineering project. Particularly, when there are tunnels along the alignment, the great amount of excavated tunnel soil is usually excessive and must be transported to waste pits. Thus, it is necessary to determine borrow pits and waste pits for railway construction. In this paper, every borrow (or waste) pit is considered as a polygonal area specified by its vertexes:
Referring to Song et al.,
1
access roads are usually low-grade temporary projects for railway construction. Thus, it is assumed that HPIs and VPIs of an access road overlap, i.e., 3-D PI. Every PI's coordinates (XH_A, YH_A, ZH_A), and its horizontal and vertical radii (RH_A, RV_A) are treated as design variables for access road design, which are denoted as a set of
Therefore, the complete EAT design variables can be denoted as
The lower-level optimization model in this research adopts EAT system costs as its fundamental objective function, including the costs for earthwork allocation along the alignment (Cearthwork), soil borrow and waste pits construction (Cpit), access road construction (Croad) and vehicle operation (Cve), as detailed below. Earthwork allocation cost:
Pit preparation cost:
where h is the quantity of mixed fill and cut sections, with h
The pit's preparation cost is directly relied on its scale. In this study, the pit scale, specified by the volume of earth that it can accommodate, serves as a proxy for estimating the construction cost, which encompasses land acquisition, pit grading, and surface clearing operations. This cost is computed as:
Access road construction cost:
Vehicle operation cost:
where CEi_A, is the earthwork cost of the ith access road, with CEi_A
where cve is the unit truck cost for transporting earth, cve
Constraints for earth transportation:
Earth volume capacity:
The total earth volume that is transported from cut sections to a waste pit should not exceed the capacity of the waste pit. The total earth volume transported from a borrow pit to fill sections should not exceed the capacity of the borrow pit, as shown below:
Length constraint for earthwork allocation sections, expressed as:
Constraints for pit design: Pit undulation:
where LSi is the ith earthwork allocation section's length, with LSi
The elevation relief of borrow and waste pits must satisfy specific constraints. First, waste pits should be preferably located in concavely-shaped terrain to store earth and reduce man-made landslides. Conversely, the borrow pits should be ideally located in hill-shaped terrain. Taking the soil waste pits as an example, the corresponding constraints can be derived as:
Pit location:
In a grid-based Digital Elevation Model (DEM), all the grid cells in forbidden zones constitute a set UF. The cells covered by borrow and waste pits are included in a set US. To bypass the forbidden zones, the UF and US must satisfy:
Pit size:
The area of a pit cannot exceed the maximum allowable threshold Wmax (Wmax Distance-related restriction:
The distance between a borrow (or waste) pit and the RA should be limited based on Technical Specification for Earth Disposal pit Engineering.
50
If the distance is too short, it may affect the normal construction of the RA. Conversely, if the distance is too long, it is not conducive for EAT and increases construction costs of the railway project. Moreover, for construction feasibility and safety, a sufficient separation should be maintained between two adjacent borrow and/or waste pits:
Constraints for access roads:
Similarly to the requirements for an RA, the horizontal circular curve, transition curve, gradient, length of slope sections, and vertical curve of an access road should satisfy specific geometric constraints. The access roads’ bridge heights and lengths should satisfy the Technical Standard of Low Volume Rural Highway Engineering’ requirements. 51 Tunnels are generally not allowed for access roads. Besides, access roads should also bypass forbidden zones. Detailed formulations of these constraints have been previously specified in Song et al. 1 and Wang et al. 52 To avoid repetition, they are omitted from this paper.
All the above EAT-related constraints are integrated into the constraint set CEAT(
The aforementioned optimization model is a large-scale mixed-integer nonlinear program, whose size and complexity make solving it beyond the reach of standard commercial solvers. Thus, a divide-and-conquer strategy is proposed to solve this model. Specifically, a Particle Swarm Optimization (PSO)-based bi-level optimization method is devised, which includes searching for a candidate pool for borrow and waste pits, configuration of EAT projects, as well as the overall optimization of railway alignments and corresponding EAT projects. In particular, the proposed approach is embedded in a PSO method, which includes optimization of both the railway alignment and its EAT projects. However, the determination of potential borrow and waste pits in the study area is a one-time work, which can be performed in advance. Thus, all the potential borrow and waste pits are pre-determined as a candidate pool before searching for railway alignments. Then, the selected pits’ locations are decided during the integral evaluation of PSO. Finally, the best railway alignment and corresponding EAT projects are generated. More details about the proposed method will be provided in the following sections.
Candidate pool for borrow and waste pits
Alignment optimization is usually conducted in a large-scale space. To minimize repetitive and time-consuming operations during the PSO iterations, a global candidate pool of borrow/waste pits can be constructed first. During this process, a moving window method proposed by Berti et al. 53 is modified to scan the study area which is described with a gird-based digital elevation model (DEM) from the top to the bottom. Based on this, terrain information (e.g., elevation, gradient) is discretized into regular grid cells to enable quantitative analysis. The modified moving window method operates with a constrained rectangular window, which is designed based on the maximum width and length parameters in Eq. (18) (respectively denoted as lmax and hmax), to identify regions that satisfy design requirements. During scanning, a real-time pruning operator is developed based on the terrain conditions within the mask-scanned region. Specifically, taking the waste pit search as an example, every grid within the mask (i.e., the area covered by moving windows during scanning) is checked to determine whether it satisfies the pit design constraints in Eqs. (13)–(18). The grid cells violating constraints are then eliminated from the mask-covered area. In this way, the feasible irregular region of a waste pit in the window can be obtained, as shown in Figure 2. Eventually, after scanning the entire study area, the locations and boundaries of all feasible borrow and waste pits can be obtained.

Moving window scanning in the study area.
It is worth noting that this candidate pool represents the universal set of terrain-feasible pits. During the subsequent PSO iterations, for each RA, a unique and alignment-specific valid subset of candidate pits is dynamically identified from this global pool by applying the distance constraints (Eqs. 19–20). The final EAT scheme is then optimized with this dynamic valid subset.
After all the potential borrow and waste pits are determined, a search for the RA is conducted, which serves as the main part of upper-level optimization. PSO is a swarm intelligence algorithm based on the study of the regularity of bird and fish flocks. It uses massless particles to simulate birds (or fish), and starts from a group of random particle positions to iteratively seek the optimal position. In each iteration, the best individual value pBest and the best swarm value gBest are obtained by computing the fitness of particles. The particle updating process is following:
In this work, a modified PSO algorithm proposed by Pu et al. 28 is adopted to search the RA alternatives. This PSO algorithm is specifically-developed for RA optimization with, for example, alignment-related constraint-handling approaches and solution evolution operators. In this method, each alignment is abstracted as a particle and generated using a stepwise “horizontal-vertical-integration” search strategy. During optimization, the pBest and gBest alignment particles are selected based on the cost evaluation. Thus, the swarm can be evolved using the PSO rationale reflected in Eqs. (21) and (22). Further implementation specifics of this PSO algorithm are detailed in Pu et al. 28 This method has also been successively customized in several recent RA optimization studies.4,5,11 The modified PSO's effectiveness had been verified in several real-world railway alignment design projects in China.28,55,56
Based on the above PSO algorithm, a hierarchical approach is developed to address the lower-level earthwork allocation optimization model (see Figure 3), Further implementation details are provided in the following section.

Solution algorithm flow.
Partition earthwork allocation sections
The division of allocation sections is the premise for EAT system determination along an RA. Generally, earthwork allocation should not cross bridges or tunnels, because unfinished bridges/tunnels act as insurmountable physical barriers, and mountainous railways tend to lack existing facilities for cross-barrier transport, such as existing roads which can serve as access roads or assist in connecting access roads. Therefore, the start and end points of non-crossable bridges and tunnels are first taken as the demarcation points to segment the alignment into several rough sections. Then, according to the constraints of section spacing (Eq. (11)), the allocation segment ranges of cut and fill sections can be further obtained. Specifically, when a fill or cut rough section, whose start and end points are bridges or tunnels, is shorter than the minimum allowable length (LSmin, Eq. (12)), the section needs no further division. When a fill or cut section is longer than LSmin but shorter than the maximum allowable length (LSmax, Eq.12), whether this section needs to be further partitioned depends on volumes of borrow and waste pits in its neighborhood. That is, if the volumes of neighboring pits suffice for the filling and cutting requirements, there is no need to further partition this fill or cut section. Otherwise, additional division is necessary. When a fill or cut section is longer than LSmax, this section must be subdivided.
If a fill or cut section must be further partitioned, the selection of the final demarcation point is closely related to the location and volume of the nearby waste and borrow pits. Specifically, several alternative demarcation points are randomly partitioned within the above feasible segment ranges (between LSmin and LSmax). For each alternative demarcation point, the amount of earth from the start of this earthwork allocation section to the current location can be computed. According to the computed earthwork, every potential pit in the candidate pool is checked within the range of Dmin and Dmax (Eq. (19)), which is the valid subset mentioned above, to find whether it is suitable as a waste or borrow pit. If yes, the pit location is recorded. Afterward, access roads connecting borrow/waste pits to the RA in this section are generated (with more details in the next section). Among them, the alternative (i.e., the demarcation point, corresponding waste and borrow pits, as well as the generated access roads) with the lowest construction cost is selected.
It is notable that the earth can then be transported from a cut section to its neighboring fill section in the same allocation section. If excessive fill or cut volumes still exist, candidate pits and corresponding access roads are considered. The next demarcation point is searched based on this selected point by repeating the above procedures, as shown in Figure 4.

Diagram for earthwork allocation sections: (a) Vertical railway alignment section; (b) Record all possible solutions of EAT projects; (c) Determine the best EAT projects and obtain the next earthwork allocation section.
Based on satisfying the earth transportation constraints described above, the earth can then be transported from a cut section to its closest fill section in the same allocation section. Afterward, if excessive cut volumes still exist, farther fill sections will be iteratively considered until the boundary of the allocation section is reached.
The access roads are used to connect borrow/waste pits with the RA for EAT. The start points of access roads (e.g., borrow and waste pits) can be predetermined. They can be fixed in the landscape during the access road design. However, the end points of access roads (e.g., fill and cut sections as well as tunnel portals) can vary along the alignment. Hence, the access road design is a typical single source shortest path (SSSP) problem. Hitherto, scholars have solved the SSSP problem with many algorithms, among which Dijkstra's algorithm 57 is the most frequently used in the literature. In this study, a modified Dijkstra algorithm proposed by Song et al., 1 which had been verified effectively in real-world railway projects, is constructed to search for access roads. The devised method initializes by constructing a weighted directed graph. As shown in Figure 5, the start nodes are the candidate borrow/waste pits within a specified range adjacent to the main line (i.e., railway alignment). The end nodes (Pi) are determined through computation as the connection points between these pits and the main line. The edges of the graph are the local paths connecting the start and end nodes. Each edge is assigned a weight representing the total cost of local path. During each iteration of the path generation process, the algorithm systematically explores the nearest neighboring nodes relative to the source node to progressively identify the best shortest path, i.e., the local path with the lowest cost. Only nodes that satisfy the access road constraints described above are allowed to be added to the path tree. After the above process, every borrow (or waste) pit searched can be configured with the best access road. Then, the candidate pit with the lowest total cost (i.e., construction and access road costs) is selected and recorded together with its access road.

Generate access roads for each pit.
After the above steps, the generated RA and its corresponding EAT solution, including earthwork allocation sections, borrow/waste pit locations and access roads, are combined as a particle individual. Then, the overall iterative optimization is performed using the PSO algorithm, which has been illustrated above. The complete pseudocode of the above algorithm is provided in the Appendix.
Case overview
A real-world railway project is employed in this article to verify the performance of the aforementioned method. The case involves a railway section with a linear distance of 47.86 km between its start and end points. The railway mainly comprises cut and fill sections. Hence, the earthwork-related cost is the dominant component of the total railway investment. However, due to the complex terrain, it is difficult to balance cut and fill volumes along the railway. Thus, the EAT has a major effect during the RA design process. A time-varying c1/c2 per Equation (24) is employed in this study (see Figure 6). In early iterations, c1 decays slowly to fully explore the large solution space and avoid local optima. In later iterations, c2 accelerates in growth, which enables rapid convergence to the optimized solution. This parameter set has been verified to be superior to fixed values in previous studies.
1
In this work, all experiments are run on a personal computer (64 GB RAM, 2 T hard drive) with 24 cores and 32 logical processors (Intel Core i9-13900KF CPU at 3.00 GHz). For the PSO algorithm described above, a population size of 50 and maximum iteration count of 200 were established. The constraint conditions and unit cost parameters are respectively provided in Tables 1 and 2. The maximum and minimum lengths of the earthwork allocation section division will be determined by sensitivity analysis in the next section.
Specified constraints.
Unit costs.
When there are several candidate borrow/waste pits along a railway, the subdivision into earthwork allocation sections affects the selection of the final pit locations (according to Eq. (12)). For instance, if the fill volume in an earthwork allocation section is very large while the cut volume is small, it is necessary to arrange borrow pits to provide the earth. However, if the section is enlarged, the balance of fill and cut volumes may be achieved, and thus no additional borrow pits are required. To this end, several pairs of minimum and maximum lengths of earthwork allocation sections are compared in this experiment.

Time-varying acceleration coefficients.
Due to the randomness in the PSO algorithm, ten experiments were conducted on each pair of parameters (i.e., LSmin and LSmax, which is an experiment group). The experimental results demonstrate convergence, with all test groups showing coefficients of variation (standard deviation/mean) below 5%. As illustrated in Figure 7, the earthwork allocation sections significantly impact the total RA-EAT cost.
In this experiment, when LSmin = 1000 m, the variation in LSmax exerts little influence on the RA-EAT comprehensive cost. This is primarily because the algorithm's section allocation length range is excessively broad, encompassing numerous inefficient intervals (e.g., 1000–2000 m). This forces the algorithm to search more for “non-optimal section combinations” and even risks getting trapped in local optima, which may ultimately lead to higher global costs.
In contrast, when LSmin is set to 2000 m, 3000 m, or 4000 m, the alternative's total cost shows an obvious trough as LSmax increases. Specifically, alternatives with lower comprehensive costs rarely correspond to the minimum or maximum LSmax values tested (i.e., LSmax = 4000 or 7000 m); Instead, this trough usually appears near the larger end of the LSmax range. This occurs because a short earthwork allocation section is often dominated by a single type of volume, i.e., either fill or cut, which makes cut-fill balance difficult to achieve. In such cases, extra borrow/waste pits and their supporting access roads become necessary. As LSmax increases, the algorithm gains greater flexibility in adaptive partitioning of earthwork allocation sections and setting of corresponding pits. This enhanced flexibility can yield a sufficient volume of cut earthwork to meet the fill demand within the current section. Under this circumstance, costs associated with borrow pits and their access roads are eliminated, thereby reducing the RA-EAT comprehensive cost.

Results of the earthwork allocation sections experiments.
However, if LSmin is excessively large (i.e., 3000 m and 4000 m), some potential solutions may be overlooked. Therefore, according to the results and above analysis, the best parameter settings for this case are LSmin = 2000 m and LSmax = 6000 m. Then, the specific length of each earthwork allocation section will be automatically computed in RA-EAT optimization, as listed in the next section.
It is worth noting a premise for the above analysis: Earthwork allocation sections do not cross bridges or tunnels. Therefore, short earthwork sections between bridges/tunnels (typically less than 500 m), are treated as independent sections, and such sections are not subject to the LSmin and LSmax constraints defined in this section.
Based on the sensitivity analysis, the final input parameters are determined, as listed in Table 3.

Convergence curve of the PSO algorithm.
Relevant hyperparameters.
The entire computation process is divided into two stages. Stage I involves screening candidate borrow/waste pit sites, and the moving window method takes 32.24 s to complete this process in the case study. Stage II corresponds to the iterative evolution process of RA and EAT, with a computation time of 166.83 min. After 200 iterations, the program achieved natural convergence. The resulting convergence curve is illustrated in Figure 8, and the computer-generated RA with corresponding EAT solution is denoted as AC.
Then, AC is compared with the best manually-designed railway solution (AM) produced by the China Railway Eryuan Engineering Group Co. Ltd Meanwhile, AC is compared with the stepwise alternative (denoted as AP) that first optimizes the RA independently and then configures EAT based on the fixed RA, to further verify the value of bi-level optimization over a sequential approach.
Figures 9 and 10 illustrate the vertical and horizontal alignments of AM, AP and AC, respectively. Meanwhile, Figure 11 shows several representative borrow/waste pits and access roads. In addition, the engineering results are summarized in Tables 4 and 5. Moreover, Table 6 provides a cost comparison between AM, AP and AC.

The vertical alignment solutions of (a) AM, (b) AP and (c) AC.

Horizontal alignment comparison between AM, AP and AC.

Representative borrow/waste pits and access roads.
Engineering results comparison between AM, AP and AC.
EAT results for AM, AP and AC.
Cost comparison between AM, AP and AC (unit: 104¥).
In this case, there are 1897 candidate waste pits and about 891 candidate borrow pits generated. Among them, AC ultimately selects 36 waste pits and 11 borrow pits. For clarity of presentation, only the locations of some representative pits are shown in Figures 10 and 11. As listed in Table 4, it can be observed that the length proportions of fill and cut sections for AM, AP and AC are 49.84%, 33.16%, and 40.55% respectively, indicating that earthwork plays a crucial role in this railway project. Considering RA, the land use (right-of-way) and earthwork volumes of AC show a significant decrease compared with those of AM. Specifically, the land use area of AC is reduced by (1,389,834–1,241,282)/1,389,834 = 10.69%, and the earthwork volume of AC is decreased by (20,748,728.3–14,267,340.2)/20,748,728.3 = 31.24%. This directly leads to a 5.9% reduction in the RA cost of AC relative to AM. When considering EAT solution, access roads account for the largest share of EAT costs. For AC, the total length of construction access roads is reduced by (38,338.66–29,954.68)/38,338.66 = 21.87% compared to that of AM; the number of borrow/spoil pits is decreased by 7, and the total earthwork allocated volume is reduced by (185.93–145.70)/185.93 = 21.64%. All these factors result in both RA and EAT costs of AC being significantly below those of AM. The total cost of AC achieves a 14.75% reduction compared to AM, which verified that the proposed method could generate an RA-EAT optimization alternative superior to the manually designed alternative.
By further comparing the AP and AC, it is found that AP significantly reduces the RA cost relative to AC. Although varying terrain conditions along the alignment lead to different configurations of structures (such as bridges and tunnels) and EAT schemes, this outcome occurs mainly because AP is generated by a sequential process, which first optimizes the RA independently and then configures EAT based on the finalized alignment. While this sequential method lowers RA cost (i.e., the RA cost of AP is reduced by 12.27% compared with AC and 6.82% compared with AC), it results in a notably higher EAT cost (the EAT cost of AP is 32.04% above that of AC). Ultimately the total cost of AC is 6.57% below that of AP, which successfully demonstrates the advantages of the RA-EAT concurrent optimization approach proposed in this study.
It is notable that the RA-EAT bi-level optimization method is designed as a specialized solution for railway projects in complex terrain, where it addresses severely unbalanced earthwork and the challenge of selecting feasible borrow/waste pit locations and configuring construction access roads.
Alignment design is important work that determines railway earthwork cost, which generally requires the assessment of cut/fill volume and, more crucially, Earthwork Allocation and Transportation (EAT). However, although significant advances have been made in Railway Alignment (RA) optimization, few studies in this field consider EAT factors. To this end, an integrated optimization model for three-dimensional RA and the corresponding EAT is developed in this study. The key contributions include: An RA-EAT bi-level optimization model is proposed. At the upper level, a concurrent optimization model of RA and EAT is employed. Thus, the real-time EAT outcomes are fed into the iterative RA-EAT optimization to guide RA's adjustment. At the lower level, the EAT problem is formulated. Particularly, the geometric characteristics of allocation sections, borrow/waste pits and access roads are analyzed and integrated as design variables. The total EAT system cost is specified as the objective function and multiple EAT constraints are also considered. To solve the above optimization model, a divide-and-conquer strategy is proposed. For the upper-level optimization, a modified PSO is used to search RA solutions; In lower-level EAT optimization, a combination of moving window method and Dijkstra's algorithm is addressed. First, the moving window method scans candidate borrow/waste pits based on terrain. Then, allocation sections are dynamically partitioned to selected the best borrow/waste pits locations. After that, a modified Dijkstra algorithm is applied to generate access roads among pits and main alignment. Finally, the overall RA-EAT solution is generated and iteratively evolved based on the PSO. The devised method has been applied to a real-world railway project. A set of sensitivity experiments for the section length range of earthwork allocation are conducted to find the best parameter settings for the devised approach. The results indicate that the proposed method performs best when LSmin = 2000 m and LSmax = 6000 m. Then, the best computer-generated alternative (AC), including a railway alignment and its corresponding EAT projects, is compared with the best manually-designed solution (AM) and the alternative with separated first-RA-and-then-EAT optimization (AP), which shows that the proposed integrated RA-EAT framework achieves a comprehensive cost reduction of 14.75% compared with AM, and a further 6.57% cost reduction compared with the AP.
This work considers railway's large-scale auxiliary construction projects (i.e., access roads and borrow/waste pits) for RA optimization. To address this problem, a customized method is devised. Although this method has been effectively verified, it still has certain limitations that offer pathways for future research. Thus, since the verification is based on a single real-world case, more different types of cases can be analyzed in further work. Also, the model incorporates simplifying assumptions, such as no earth movement between tunnels or bridges, which may not capture all real-world construction complexities.
Future research might focus on several well-justified directions. Algorithmically, efforts might be focused on enhancing robustness and efficiency through well-verified advanced techniques, such as ant colony algorithms, simulated annealing, 58 distributed nonlinear neural dynamics algorithms, 59 discrete spider monkey optimization, 60 smart bacteria-foraging algorithms, 61 deep learning and reinforcement learning. For the optimization model, multi-objective optimization models incorporating life-cycle operating costs, geo-hazards, carbon emissions, and social impacts (e.g., resident resettlement, ecological protection) may further improve the model's practical and sustainable value. Moreover, more compact model formulations (e.g., quasi-network-flow) 62 may be adopted to improve computational scalability. Also, more precise optimization models, such as more accurate earthwork computation methods and more precise selection of abutments and portal locations 63 may also be constructed in future research. Furthermore, a framework based on this work may be extended to other infrastructure domains, such as highway and pipeline alignment design.
Footnotes
Acknowledgments
This work is partially funded by the Science and Technology Research and Development Program Project of China Railway Group Limited with award number 2022-Major-20 and Practical2023-Major-05; Fundamental Research Funds for the Central Universities of Central South University with award number 2025ZZTS0110; Research Funds for Hunan Province Postgraduate Research and Innovation Project with award number CX20250292.
Ethical approval
This article does not contain any studies with human or animal participants.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work is partially funded by the Science and Technology Research and Development Program Project of China Railway Group Limited with award number 2022-Major-20 and Practical2023-Major-05; Fundamental Research Funds for the Central Universities of Central South University with award number 2025ZZTS0110; Research Funds for Hunan Province Postgraduate Research and Innovation Project with award number CX20250292.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
