Two algorithms for reconstructing vertical alignments exploring the neural dynamics model of Adeli and Park

Vertical alignment reconstruction obtains alignment parameters by fitting geometric components to a set of measured points representing the profile of an existing road or railroad, which is essential in alignment consistency analysis and maintenance to ensure safety and comfort. The neural dynamics model of Adeli and Park is explored and improved for reconstructing vertical alignments with constraints. The structure of the dynamics model is modified to include three layers: parameter layer, intermediate layer, and energy layer. The number of nodes in the parameter or intermediate layers corresponds to the number of independent parameters defining a vertical alignment. The number of nodes in the energy layer is the sum of the number of deviations and the number of constraints in the alignment reconstruction problem. The coefficients connecting nodes between the parameter layer and the intermediate layer determine the integral operations, which define the Levenberg–Marquardt algorithm of the dynamics model (LMADM) and the steepest descent algorithm of the dynamics model (SDADM). Both the LMADM and SDADM methods satisfy the Lyapunov stability theorem, but the LMADM method outperforms the SDADM method in its objective function value and computation time. Experiment results demonstrate that there are multiple local optima for a vertical alignment reconstruction, and the solutions obtained by the LMADM method are the best obtained so far, compared with those reported in the literature, with 57.1% and 23.4% decreases of the mean squared error for the highway and the railroad examples, respectively.


INTRODUCTION
The geometric parameter identification from data obtained by surveying, also known as alignment reconstruction or re-creation, plays an important role in analyzing the smoothness and consistency of an alignment (horizontal and vertical), which are essential for riding comfort and operational safety on existing roads and railroads (Bosurgi & D'Andrea, 2012;Camacho-Torregrosa et al., 2015).Transportation agencies need to identify the geometry features F I G U R E 1 Geometric components and their characteristics.
existing road or railroad.This process involves two stages: 1. Segment geometric components and identify their parameters from obtained data.2. Reconstruct an alignment while satisfying constraints.
Geometric components of an alignment, as shown in Figure 1a, have distinguishing characteristics, and hence can be identified.Geometric components of an alignment can be identified by the different curvatures between tangents and curves as shown in Figure 1b.Curvatures can be computed by iterative circular fitting to a number of neighboring points (Ai & Tsai, 2015;Pu et al., 2019;Tsai et al., 2010).Curvatures can also be approximated by a spline through surveyed points (Ben-Arieh et al., 2004;Castro et al., 2006;Garach et al., 2014aGarach et al., , 2014b)).However, curvatures are susceptible to location errors, which may hinder the recognition of the geometric elements (Camacho-Torregrosa et al., 2015).The segmentation of horizontal alignments is possible based on the heading direction profile where tangents correspond to horizontal lines and circular arcs correspond to inclined straight lines (Holgado-Barco et al., 2015).A vertical alignment has similar features in the grade profile where tangents correspond to horizontal lines and vertical curves correspond to inclined straight lines as shown in Figure 1c.
Higuera de Frutos and Castro (2017) used those features to obtain geometric components of the vertical alignment.Camacho-Torregrosa et al. (2015) verified that the heading profile is less noisy, compared to the curvature profile, and even small changes in the headings can be detected.Shi et al. (2022) used the versine to preliminarily identify alignment components.Song et al. (2021) proposed a statistical deflection angle method to segment data points into their geometric components in a vertical alignment as shown in Figure 1d.
After segmentation, geometric parameters can be obtained by separately fitting geometric components, such as tangents and curves, to the data points along them.The separate fitting method can be used to identify the geometry features of existing roads.However, these geometry features cannot form an optimal alignment with the least squares of deviations from points to the alignment (Song et al., 2021).Spline techniques can be used to approximately determine alignments of existing roads (Garach et al., 2014a(Garach et al., , 2014b)).This approximation may be accepted in recreating road alignments for smoothness and consistency evaluation.However, the accuracy is insufficient for railway reconstruction, which aims at track calibrations in millimeter-sized precision (Li et al., 2019(Li et al., , 2022;;Pu et al., 2019).
In recent years, many approaches have appeared for reconstructing an optimal alignment while satisfying constraints according to the least-squares criterion.Cellmer et al. (2016) proposed an approach for arc fitting between fixed adjacent tangents.Easa and Wang (2010) proposed fitting curve sections of an alignment sequentially, where the latter tangent of the current section was fixed for the subsequent section.Li et al. (2019) presented a swing algorithm that satisfied the requirement of points-alignment consistency.Further, an overall swing iteration method integrated with mesh adaptive direct search was proposed to fit all shared tangents and then fit curved segments with the tangents fixed, repeating the process until satisfying points-alignment consistency (Li et al., 2022).The common point of these methods is to reconstruct an alignment through each successive section but not as a whole.Song et al. (2021) first defined vertical alignments by independent parameters and proposed an optimization model with an oriented search algorithm (OMOSA), the direct Levenberg-Marquardt algorithm that integrates the Gauss-Newton and the steepest descent search directions, to reconstruct a vertical alignment with external constraints.The OMOSA method must locate a provisionally optimal solution to determine the unsatisfied constraints of the optimal solution and then search for an optimum by setting the unsatisfied constraints as binding constraints.It cannot dynamically deal with constraints.Further, the different units (meters and radians) of independent parameters may affect the search results (Song et al., 2022).Adeli and Park (1995a) first proposed a neural dynamics model for structural optimization and applied it to linearly optimal plastic design of steel structures in a companion paper (Park & Adeli, 1995).The neural dynamics model was also applied to the nonlinear optimization of structures (Adeli & Karim, 1997a;Adeli & Park, 1995b, 1996;Tashakori & Adeli, 2002) and nonlinear cost optimization in construction (Adeli & Karim, 1997b;Aldwaik & Adeli, 2016).The neural dynamics model, as a heuristic and nature-inspired optimization technique, is highly robust for large-scale structural optimization problems (Aldwaik & Adeli, 2014).Further, it is employed to solve the many-objective optimization problem (Soto & Adeli, 2017).
Inspired by the power of the patented neural dynamics model (Patent Number: 5,815,394), the article explores the dynamics model for reconstructing a vertical alignment from a set of data points.To the best of the authors' knowledge, no research has been reported in the literature on the application of dynamics-based optimization algorithms to alignment reconstruction problems.A dynamic system, whose state changes with time, is defined by where  () = [ 1 (),  2 (), … ,   ()]  denotes a vector of  parameters, and   () does not explicitly rely on .The movement of solution trajectories defines the autonomous dynamic system.Each location of a trajectory is specified by the values of all the parameters at any time step (Adeli & Park, 1995a).
If   ( θ1 , θ2 , … , θ ) = 0, denoting that the change of Θ with time is zero, then Θ is an equilibrium location (Adeli & Park, 1995b).Let ( 1 ,  2 , … ,   ) be an energy functional of the parameter vector  with () > 0.Then, if the vector  satisfies the Equations (1), the chain rule gives: The vector  determines the change of  with time.The Lyapunov stability theorem states that if Ė ≤ 0, then the values of the energy function do not increase and the location Θ is stable (Adeli & Park, 1995b).
The organization of this article is as follows.The second section formulates a Lyapunov function for reconstructing vertical alignments in terms of an exterior penalty function method.The third section establishes a topology of the dynamics system for vertical alignment reconstruction.The fourth provides example studies including a highway case for elaboration and a railroad example for verifying the capability of the proposed methodology to deal with large-scale problems.Finally, conclusions and future research are presented in the fifth section.

Objective function
A vertical alignment consists of consecutive tangents and parabolas.Adjacent tangents intersect at a point of intersection (PI) while the start and the end of a vertical curve are specified by tangency points as shown by the hollow circles in Figure 2. Vertical alignment reconstruction is intended to optimize an alignment that has the least sum of squared deviations from measured points shown as solid circles in Figure 2 while satisfying constraints.The objective of squared deviations has the following form: subject to constraints that where , containing all the deviations from measured points to the reconstructed alignment; the symbol ‖ ⋅ ‖ represents Euclidean norm, and b represents the number of inequality constraints.
The mean squared error (MSE), a common index for fitting accuracy evaluation, can be obtained as where n represents the number of measured points.

Parameters
The parameter vector  contains the minimum number of parameters, called independent parameters, defining a vertical alignment.Any other parameters of a vertical alignment can be determined from the independent parameters.For a vertical alignment with  parabolas and  + 1 tangents, the number of independent parameters is (Song et al., 2021): and the parameter vector  is: where (  ,   ) represents the coordinates of the th intersection and   the length of the th vertical curve for   = 1 to ;  s and  e , as shown in Figure 2, denote the intercepts of the start and end tangents, respectively.Other parameters can be determined from the independent parameters, such as the gradient of a tangent where ( 0 ,  0 ) = (0,  s ) and ( +1 ,  +1 ) = (0,  e ).
The relation between vertical curve radius (R j ) and the independent parameters is

Deviations
The functions for tangents of a vertical alignment are: (10) A parabolic curve is specified to connect tangents due to its basic properties, one of which is that the vertical acceleration is constant for a vehicle traveling on the curve at a constant horizontal speed.The functions for parabolic curves of a vertical alignment are: where the coefficients can be denoted by independent paraments as The deviation of the point i within the tangent j is The deviation of the point i within the parabolic j is The stations of the tangency points of vertical curves, which vary with different values of , determine the ascription of measured points to a tangent or a parabolic curve.
, point  on the ( + 1) th tangent Points-alignment consistency should be maintained using Equation (17) at each iteration (time step).The measured points adjacent to the bounds of vertical curves may change their ascriptions during iterations, and hence the computations of their deviations should also be changed.

Constraints
Several types of inequality constraints are applicable in reconstructing a vertical alignment.These constraints include: The minimum tangent length T min The tangent length between curves must exceed T min determined by specifications.
This constraint is imposed to satisfy line maintenance requirement.

The minimum slope length S min
The slope length between adjacent PIs must exceed the S min value determined by specifications.
This constraint is imposed for vehicle driving smoothness, ensuring no superposition of vehicle vibration from adjacent vertical curves.

The maximum gradient G max
The gradient should not exceed G max to satisfy the capability of vehicles.

The maximum gradient difference
The algebraic difference between adjacent gradients should not exceed the allowed value of Δ max .
This constraint is specified for limiting the longitudinal force and thereby avoiding coupler fracture.

The minimum curve length or radius
or The minimum vertical curve length corresponds to the minimum radius, to which it is mathematically related by Equation ( 9).A highway usually uses the minimum vertical curve length  min , whereas a railway uses the minimum radius  min as the constraint in China.
This constraint is imposed mainly for the riding comfort.
The deviation constraints where  max is the maximum drop.This constraint is imposed for safety, by maintaining the thickness of the ballast bed.
where  max is the maximum rise.This constraint is also imposed for a safety purpose, by maintaining sufficient clearances above the alignment.

Energy functional
The constrained optimization problem denoted by Equations ( 3) and ( 4) can be established as an energy functional combining the penalty function: where () is a penalty function;  +  () = max{0,   ()}, and   is the variable determining the magnitude of the penalty.
The smaller the values for   , the greater the constraint violations may be.On the other hand, a large value of   will ensure near satisfaction of all constraints but will create a poorly conditioned optimization problem.To avoid ill-conditioning, only a moderate penalty is provided in the initial optimization states, and the penalty is increased as the optimization progresses (Adeli & Park, 1995a).The penalty variable is defined as where N denotes the step number,  0 is an initial value, and the scale factor  is 10 in the given examples.The energy functional (,   ) can be treated as a Lyapunov function and its derivative with respect to time should be less than or equal to zero according to the Lyapunov stability theorem, which yields (28) where Θ indicates the change of  with time t; ∇(), ∇  (), and ∇  () are the gradient vectors of the energy functional, ith deviation function, and ith inequality function, respectively.
When the direction of Θ forms an acute angle  with −∇(), the Lyapunov stability theorem is guaranteed by The parameter values of the Nth iteration are fed forward to the energy layer, and hence deviations of points and violations of reconstruction constraints are evaluated.Let O j be the output of node j in the energy layer.The outputs are the values of deviations and the values of constraint violations multiplied by the penalty variable: The weight of the connection from node j in the energy layer to node i in the intermediate layer is given by: F I G U R E 3 Topology of the dynamics model for alignment reconstruction. or ,  = 1, … ,  and  =  + 1, … ,  +  (34) where   represents the differential of the jth function in the energy layer with respect to the ith parameter in the intermediate layer.
The computation of   requires   from the pipeline, whereas the values of most weights are zeros because   () or   () only involves several specific parameters.When some point becomes inconsistent with the current Nth alignment defined by   , the weights connecting to the corresponding node in the energy layer are changed to preserve points-alignment consistency.
The input to node i in the intermediate layer is the negative sum of the outputs of the nodes in the energy layer multiplied by their weights connected to node i.
Generally, the value of each parameter can be obtained by separate integration, represented by: where    and  +1  are the input from the pipeline and output to the pipeline of the node i in the parameter layer, respectively; ∫ θ  is the integral operation between the parameter layer and the intermediate layer as shown in Figure 3.
The Runge-Kutta method is commonly applied for a fixed-sized integral operation as (Aldwaik & Adeli, 2016) 37) where h = 0.01, and The fixed-sized integration results will diverge for the alignment reconstruction problem due not only to the high nonlinearity of parameters in the elements of the energy functional but also to the inapplicability of the scaling of parameters.The dynamic system is of high dimension determined by the number of independent parameters.It is impossible to illustrate solution trajectories in a high-dimension space.To illustrate solution trajectories of algorithms, the lowest values of the energy functional can be obtained for the fixed positions of any pair of parameters, and the isolines can be formulated in the plane of the parameter pair.For an problem, the isolines are almost parallel with a narrow basin of attraction in which there is a star representing the minimum as shown in

Two algorithms for the dynamics model
The total integration of parameters is represented by: The integral of each parameter, as the output of the parameter layer, utilizes not only all the outputs of the intermediate layer but also the coefficients connecting the nodes in the intermediate layer.
Different values of the coefficients lead to different changes of parameters in each time step.The solution trajectories satisfying the Lyapunov stability theorem are infinite.Equation ( 37) is a special case of Equation ( 40) with v ij = 0 when  ≠ .
The computation of v ij using the weights between the intermediate layer and the energy layer will be critical for finding the equilibrium point Θ. Let and A steepest descent algorithm of the dynamics model (SDADM) with optimal step length in the gradient direction of the energy functional is established by setting   in Equation ( 37) as (Song et al. 2022) The solution trajectory of SDADM will zigzag as illustrated by the zigzag lines toward the star in Figure 4.
Any of the following four criteria can be used to terminate the iterative process.
1.When an equilibrium location Θ is located: 2. When the change in the parameter vector in two consecutive iterations is small: (45) 3. When the change in the objective function value in two consecutive iterations is small: 4. When the iteration number N exceeds a specified threshold  4 .This indicates a failure to converge.
A Levenberg-Marquardt algorithm of the dynamics model (LMADM) is established by setting the coefficients in Equation ( 40) as where  is an identity matrix, and   is a variable indicating the closeness of the current location to the optimum.
The value of   can be computed as (Song et al., 2021) where the coefficient   is updated as follows: The ratio   is given by: (50) The solution  +1 will be accepted if   > 0. Otherwise, the output from the parameter layer is still   .
The angle between the integral operation direction of the LMADM method and the negative gradient direction of the energy functional is: The solution trajectory of LMADM illustrates the advantages of an adaptive acute angle  with adaptive length in locating the minimum, as shown by the solid lines connecting the star in Figure 4.
Figure 5 shows the flowchart for the vertical alignment reconstruction using the LMADM method.The value of  0 and  are empirically specified to increase the penalty value gradually from a small initial value.A small penalty value results in an easy minimization of the energy functional but may yield major constraint violations.On the other hand, a large penalty value will ensure near satisfaction of all constraints.The first three thresholds for termination are specified to be small enough to ensure that a minimum is located, while the last threshold is specified to be large enough to indicate failure to converge.

Checking the minimum
Since the equilibrium point Θ = [ θ1 , θ2 , … , θ ]  corresponds to the minimum value of the energy functional, Θ is perturbed by changing each of the parameters, one at a time, by a small amount, which can be denoted as

EXAMPLES
In this section, a highway case and a railroad example, the same as those in Song et al. (2021), are used to com-pare results between the LMADM, SDADM, and OMOSA methods as well as to verify the effectiveness of using the dynamics model.The segmentation method (Song et al., 2021) is also applied to the two examples.The verification is performed on a computer with Intel Core i5-10400F Central processing unit (CPU), 16 Gigabyte (GB) of RAM.

Highway example
The classical highway example, an alignment 400-m long with 21 evenly distributed points whose data have been published in the literature, is used to detail the performance of the three methods.The rationale for selecting the case is that the reconstruction results can be verified and compared by different methods.The first 14 points were used by Hu et al. (2004) to reconstruct an optimal vertical curve using a spreadsheet method after 40,000 searches.The OMOSA method shows a better performance, compared with the spreadsheet method not only because of many fewer searches but also due to the better results for the same least squares criterion.Hence, the OMOSA method is used for comparison with the two dynamics-based methods, LMADM and SDADM.The deviation constraint is set as 0.3 m.The solution trajectory of the LMADM method is shown in Table 1.At time step 0, the energy value of the dynamic system is as high as 19,154.5 cm 2 and the mileage of E 1 (the end of the first curve) exceeds that of S 2 (the start of the second curve), indicating that  0 is far from the optimum.After one step, the LMADM method has reached a location where E = 4048.0cm 2 while satisfying constraints (due to E = F), much below the 6622.3cm 2 optimal solution obtained by the OMOSA method.The number of inconsistent points (NOIP) is 4, which can be identified by the mileages of the critical points of the two curves between steps 0 and 1.After nine steps consuming 0.3 s of clock time, an optimum location where E = 2842.1 cm 2 has been reached.The MSE decreases by 57.1% from 315.35 to 135.34 cm 2 , compared with the OMOSA method.Compared with the initial alignment, the MSE of the optimum decreases by 83.1% from 799.67 to 135.34 cm 2 .The angle  of each step is less than 90 • , thus satisfying the Lyapunov stability theorem.However, the angle  of each step is almost 90 • indicating that the vertical alignment reconstruction problem is severely ill-conditioned even for a simple alignment with eight parameters.
It takes 2976 steps with 2.8 s of clock time, 330 times the steps of the LMADM, for the SDADM method from the same  0 to reach an optimum where E = 4570.3cm 2 .Both methods are terminated due to Criterion 2. The MSE decreases by 31.0%from 315.35 to 217.63 cm 2 , compared with the OMOSA method.Compared with the initial state, TA B L E 1 Solution trajectory of Levenberg-Marquardt algorithm of the dynamics model (LMADM) for reconstructing a highway vertical alignment with constraints.
Step  the MSE of the optimum decreases by 72.8% from 799.67 to 217.63 cm 2 .Figure 6a,b shows the changes of E (the value of the energy functional) and the changes of F (the value of the objective function) by line charts, respectively.To distinctly show the changes, the step axis is logarithmic.The trends of line charts in Figure 6 show that the changes are great during the first 100 steps and flatten thereafter.However, there are several sharp pulses in Figure 6a, especially the one at the 94th step.
To reveal the performance shown in Figure 6, Table 2 details the data of the first five steps, the 94th step, and the last one, from which it is found that the mileages of the critical points of the two curves have slight changes and NOIP = 0 for all the steps.This indicates that the SDADM method is more restricted by the initial location than the LMADM method.During the early steps, the penalty variable   is small, which allows trying new locations while violating the constraints.
As   becomes large, the violation of constraints is heavily penalized.This is why the sharp pulse is formed at step 94 in Figure 6a.
As shown in Figure 7, the black, blue, and green alignments are the optimized alignments obtained TA B L E 2 Solution trajectory of steepest descent algorithm of the dynamics model (SDADM) for reconstructing a highway vertical alignment with constraints.
Step  by the LMADM, SDADM, and OMOSA methods, respectively.The red curve represents the initial alignment whose two adjacent vertical curves overlap, indicating a violation of Equation ( 18) with T min = 0.
To verify that the location ( Θ) reached by the LMADM method is a local optimum, Θ is perturbed by slightly changing the eight parameters, one at a time.The results are shown in Table 3, which indicate that  ( Θ) = 2842.1 cm 2 , listed in the last row in Table 1, is the local minimum.
To verify that the location ( Θ) reached by the SDADM method is a local optimum, Θ is perturbed as well.The results are shown in Table 4, from which it is found that  ( Θ) = 4570.3cm 2 , listed in the last row in Table 2, is the local minimum.Tables 3 and 4 also show that the changes of parameters in the elevation direction lead to greater increases in E than those in the station direction and indicate that there are multiple local optima for a vertical alignment reconstruction.

Railway example
A railway located in Hunan province, China, is 17.6 km long.To maintain the railway's smoothness, a total of 492 points are obtained through precise measurement along the centerline of the railroad.The rationale for selecting the railway case is to verify the capabilities of the LMADM and SADADM methods in dealing with large datasets and to compare the reconstruction result obtained by the OMOSA method, the best in the previous literature so far for vertical alignment reconstruction.The number of curves is 22 after segmentation, and hence the number of independent parameters is 68 according to Equation ( 6).The constraints for alignment reconstruction, which are required by China's code for the design of railway lines (China National Railway Administration, 2017), are presented in Table 5.
After separate fitting, an initial alignment is obtained whose MSE is 5536.21mm 2 .The deviation constraint is set as 0.15 m, and there are 15 deviations violating the constraint, among which the maximum deviation is 0.924 m.The value of the energy functional of the system is as high as 29,318.2cm 2 at the initial state.
The LMADM method takes 24 steps with 0.7 s of clock time to reach an optimum location where E = 3654.2cm 2 from the initial state.The process is terminated due to Criterion 2. Compared with the initial state, the MSE of the optimum decreases by 86.6% from 5536.21 to 742.73 mm 2 .The changes of E and F are shown in Figure 8 by line charts, from which it is notable that the first step has the greatest improvement, and the constraints are all satisfied after Step 5. Column 3 of Table 6 shows the corresponding values of the optimum obtained by the LMADM method while satisfying constraints.
The SDADM method takes 11,068 steps with 104.5 s of clock time, 461 times more steps than LMADM, to reach an optimum location where E = 5992.2cm 2 from the initial state.The process is terminated due to Criterion 3. Compared with the initial state, the MSE of the optimum decreases by 77.0% from 5536.21 to 1217.92 mm 2 .The changes of E and F are shown in Figure 9 by line charts, from which it is notable that the first step also has the greatest improvement, and the constraints are all satisfied after it.Column 4 of Table 5 shows the corresponding values of the constrained optimum obtained by the SDADM method.
Figure 10 shows the deviations of the 492 points from the optimized alignments reconstructed by the LMADM and SDADM methods, which are represented by the solid and dashed lines, respectively.It is apparent that the dashed line chart has larger fluctuations than the solid one.Figure 11a,b is obtained by the LMADM and SDADM methods, respectively.For the LMADM method, the most biased mean value is −13 mm in the second box, and the most biased deviation value is 90 mm in the 21st box, as shown in Figure 11a.For the SDADM, the most biased average value is 13 mm in the 12th box, and the most biased deviation value is minus 116 mm in the 10th box, as shown in Figure 11b.The dashed lines in Figure 11a are closer to zero than those in Figure 11b.
Figure 12 shows the distribution of deviations from the LMADM, SDADM, and OMOSA methods.The LMADM and SDADM methods are all based on the proposed dynamics model but have different integral operations.The OMOSA method serves as a contrast to the other two methods.The LMADM method outperforms the OMOSA method.In comparison to OMOSA, LMADM takes a similar number of steps, while its MSE value decreases by 23.4% from 970.23 to 742.73 mm 2 , and the mean absolute deviation is reduced from 24 to 21 mm.Further, the numbers of absolute deviations within 4 cm are 423 and 397, accounting for 86.0% and 80.7%, for the LMADM and OMOSA methods, respectively.However, the SDADM method underperforms the OMOSA method.Compared with the OMOSA method, the SDADM method not only takes more steps but yields inferior evaluation indexes.

CONCLUSION
Reconstruction problems in industries generally can be modeled as systems characterized by independent parameters.The neural dynamics model of Adeli and Park can be explored to obtain solutions for the systems due to its integration of a penalty function method, Lyapunov stability theorem, Kuhn-Tucker conditions, and neural dynamic concepts (Aldwaik & Adeli, 2014) 1.The highway example verifies that there are multiple local optima even for the simple highway alignment reconstruction with constraints.The parameters governing alignment changes in the elevation direction have larger impacts on the value of energy functional than those governing alignment changes in the station direction.Either the LMADM or SDADM method can arrive at a local optimum with a great decrease of MSE by 83.1% or 72.8%, respectively, from the same initial location.To reach a local optimum, LMADM took 330 times fewer steps than SDADM.LMADM was integrated along a direction almost perpendicular to the negative gradient of the energy functional and had the capability to search a wider range of locations than SDADM.2. The railway example verifies that both the LMADM and SDADM methods are capable of reconstructing largescale vertical alignments.Either LMADM or SDADM can arrive at an equilibrium location with a great decrease of MSE by 86.6% or 77.0%, respectively, from the same initial location, and LMADM used 461 times fewer steps than SDADM.3.Among the LMADM, SDADM, and OMOSA methods, the LMADM had the best performance.In comparison to the OMOSA, the MSE decreased by 57.1% and 23.4% for the highway and railroad, respectively.The statistics also showed the best deviation distribution for the LMADM method.The SDADM method had lower MSE when using the small-scale highway example but higher MSE when using the large-scale railway example, compared with the OMOSA method.The SDADM took many more time steps to reach an optimum than the other two methods.This indicated that integral operations between the parameter layer and the intermediate layer were critical to the performance of an alignment reconstruction method based on the dynamics model.
Although the effectiveness and efficiency of the dynamics model have been verified for vertical alignment reconstruction, there still is room for further research in the following aspects: 1.The horizontal alignment reconstruction and even the three-dimensional alignment reconstruction of highways or railways are more complex than vertical alignment reconstruction due to more types of geometric elements and constraints.Thus, the extendability of the dynamics model to them should be explored.2. The network architecture can include a memory mechanism for retrieving information on previous time steps to incorporate the quasi-Newton methods, such as the DFP (Davidon, Fletcher, and Powell) and BFGS (Broy-den, Fletcher, Goldforb, and Shanno) algorithms, into the dynamics model and compare them with the LMADM in alignment reconstruction.3. Since there are multiple local optima for a vertical alignment reconstruction, which depend on the location of the starting point, Bayesian theory can be explored to search for the optimum incorporating a priori information obtained by fitting curve sections of an alignment sequentially.

A C K N O W L E D G M E N T S
This work is based on the patented neural dynamics model of Adeli and Park (Patent Number: 5,815,394) and supported by the National Key Research and Development Program of China (Grant/Award Number: 2021YFB2600403).The authors would like to thank the editor and the anonymous reviewers for their constructive comments and valuable suggestions for improving the quality of the article.

F
Relations of a reconstructed vertical alignment and measured points.PI, point of intersection.
The dynamics model for reconstructing vertical alignments has the following two parts: (1) an initialization part for segmenting data points and obtaining  0 , the initial values of independent parameters; and (2) a network topology of the dynamics model for the vertical alignment reconstruction.The network consists of three layers: parameter layer, intermediate layer, and energy layer.The number of nodes in the parameter layer or the intermediate layer corresponds to the number of independent parameters in the alignment reconstruction.The node number in the energy layer equates to the sum of the number of deviations and the number of constraints exerted on the alignment reconstruction.Figure 3 denotes the topology of the dynamics model for the alignment reconstruction.The originality of our dynamics model lies in the structure enabling integral operation along any specified direction with adaptive length instead of along the only negative gradient direction with fixed length provided by the neural dynamics model of Adeli and Park.The pipeline conveys   , the parameter values of the Nth iteration, to nodes in the energy layer, to weight connections between the energy layer and the intermediate layer, as well as to nodes in the parameter layer.

Figure 4 .
From the same location A, three trajectories are illustrated in Figure 4 representing the characteristics of three algorithms.The dotted lines in Figure 4 illustrate the solution trajectory of the integral operation along the negative gradient direction with a fixed size.For this reason, an intermediate layer is added to the neural dynamics model of Adeli and Park between the parameter layer and the energy layer.The specific connection values between the parameter layer and the intermediate layer enable integral operation along any specified direction with adaptive length.This extends the adaptability of the dynamics model by designing different algorithms for vertical alignment reconstruction.

F
I G U R E 4 Solution trajectory illustration in an isogram.
Changes of E and F by LMADM and steepest descent algorithm of the dynamics model (SDADM).
Reconstructed vertical alignments.OMOSA, oriented search algorithm.TA B L E 3 Checking the minimum obtained by Levenberg-Marquardt algorithm of the dynamics model (LMADM).

I G U E 8
Changes of E and F with steps by LMADM.F I G U R E 9Changes of E and F with steps by SDADM.
Deviation statistics are shown by boxes along stations in Figure 11.The width of each box represents the station range for the performed statistics.The station ranges of the first 22 boxes are from the start of a tangent to that of the next one, whereas the range of the last box is from the start to the end of the last tangent.The height of each box represents the difference between the maximum and the TA B L E 5 Constraint values and results of the two methods.Comparison of deviation statistics along the station.minimum deviations in it.The top line and bottom line of a box denote the values of the maximum and the minimum deviations in the box, respectively, as well as the middle line denotes the average value of deviations.The figure over or under the middle line represents the number of deviations whose values are larger or smaller than the average.The figure outside a box represents the number of deviations whose values exceed the average addition or subtraction twice their standard deviation.
. A dynamics model for reconstructing vertical alignments was first developed by exploring the neural dynamics model of Adeli and Park.The innovation of the proposed dynamics model lies in adding an intermediate layer to the neural dynamics model of Adeli and Park between the parameter layer and the energy layer, enabling integral operation along any specified direction, with adaptive length.This extends the adaptability of the dynamics model by designing different algorithms for vertical alignment reconstruction.Due to the highly nonlinear and ill-conditioned nature of the alignment reconstruction problem, the traditional integral operation diverges with a fixed step length along the negative gradient of the energy functional.Based on the dynamics model, the LMADM and SDADM methods, named for their integral operations, were proposed and compared with the OMOSA method through the highway and railway examples.The main findings include:

TA B L E 4
Checking the minimum obtained by steepest descent algorithm of the dynamics model (SDADM).