## 1 Introduction
Substantial research efforts have been dedicated in the aforementioned studies to parking trajectory optimization methodologies, with their systematic classification and comparative analysis comprehensively summarized in Table 1.  
To address the issue of potential unnecessary shifting behavior caused by the decoupling of path and speed from the hybrid A* algorithm, a parking trajectory tracking control method coupled with non-linear model predictive control (NMPC) was developed in [11]. A parking trajectory tracking controller utilizing non-linear model predictive control, which takes into account vehicle dynamics constraints, was introduced in [12]. Geometric programming methods, hp-pseudospectral methods, gradient descent methods, and dynamic optimization approaches [13; 14; 15; 16] are limited by poor flexibility, challenges in programming implementation, and a heavy dependence on constraint restrictions. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Method** & **Reference** & **Advantages** & **Limitations** \\ \hline Geometric method & [6] & Fast computation speed & Utilize partial capabilities \\ Sampling-based method & [7] & Dimension-free solution space & Stochastic results \\ Search-based method & [8] & Obstacle avoidance capability & Grid resolution determines accuracy \\ Numerical optimization & [9; 10] & Intuitive modeling & Poor computational timeliness \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of parking trajectory optimization methods. However, these approaches exhibit evident limitations, including poor flexibility, difficulty in programming implementation, and an over-reliance on constraints. To generate a smooth, collision-avoidance parking trajectory for four-wheel steering vehicles, the integration of cubic splines with solving of the optimal control problem was presented in [17]. To generate a smooth, constraint-satisfying parking trajectory for vehicles in confined parking scenes, the integration of B-spline curves and the gradient descent algorithm was employed to achieve continuous curvature variation and adherence to the vehicle's minimum turning radius [18]. Given the high utilization rate of vertical parking garages, the design of a parking garage mostly adopts vertical parking space, and generally utilizes the way of reversing into the vertical parking space. Combining cubic spline interpolation with the intelligent optimization algorithm (IOA), a high-quality algorithm for optimizing automatic parking trajectories can be developed. To address the challenge of automatic parking in vertical parking garage environments, an immune moth-flame optimization algorithm for generating parking trajectories using cubic spline was introduced in [19]. However, it did not address the handling of infeasible solutions during the parking process, which consequently impacted the overall optimization effectiveness of the parking trajectory. An improved directional mutation moth-flame optimization algorithm via gene modification (IDMMFO-GM) is proposed in this study. Based on the parking experience and cubic spline interpolation, this study develops a reference trajectory optimization model according to the framework of a standardized parking plane coordinate system. On this basis, this study not only introduces a gene modification method to effectively address infeasible solutions but also proposes an enhanced moth-flame optimization algorithm that incorporates the non-linear decreasing weight coefficient and directional mutation strategy, to significantly enhance the trajectory optimization performance for garage parking. The organization in this study is as follows: Section 1 provides the introduction. Section 2 proposes a reference trajectory optimization model for ARP according to cubic spline theory. Section 3 details the gene modification mechanism. Section 4 shows the description of the IDMMFO-GM design. Section 5 presents the test validation of ARP using an actual vehicle. Section 6 concludes this study.