University of Birmingham Hybrid railway vehicle trajectory optimisation using a non‐convex function and evolutionary hybrid forecast algorithm

This paper introduces a novel optimisation algorithm for hybrid railway vehicles, combining a non-linear programming solver with the highly efﬁcient “Mayﬂy Algorithm” to address a non-convex optimisation problem. The primary objective is to generate efﬁcient trajectories that enable effective power distribution, optimal energy consumption, and economical use of multiple onboard power sources. By reducing unnecessary load stress on power sources during peak time, the algorithm contributes to lower maintenance costs, reduced downtime, and extended operational life of these sources. The algorithm’s design considers various operational parameters, such as power demand, regenerative braking, velocity and additional power requirements, enabling it to optimise the energy consumption proﬁle throughout the journey. Its adaptability to the unique characteristics of hybrid railway vehicles allows for efﬁcient energy management by leveraging its hybrid powertrain capabilities.


INTRODUCTION
Over the past several decades, railway transport systems have predominantly relied on conventional fuel sources, such as diesel and electricity, to power their operations [1]. However, recent legislation targeting carbon dioxide emissions has increasingly challenged the use of gasoline as a fuel source for railway vehicles. To address this issue, railway operators and governments have attempted to electrify railway tracks, only to face significant obstacles like exorbitant costs and grid stability concerns, particularly in urban areas [2]. As renewable energy systems rapidly expand and political focus shifts towards clean energy, the railway industry has turned to hybrid propulsion systems that harness renewable energy sources for powering railway vehicles [3]. In the context of sustainable travel models, Transit-Oriented Development (TOD) has emerged as a key strategy for encouraging environmentally friendly and efficient transportation systems. The existing literature highlights the importance of TOD in sustainable urban planning and its role in promoting the use of energy-efficient public transportation solutions [4,5]. Unlike conventional railway vehicles, hybrid trains are inherently complex in terms of design and operation. The combination of hydrogen fuel cells and batteries in hybrid propulsion systems is gaining popularity as a means of decarbonising railway operations, particularly on less densely trafficked routes where electrification is not economically viable [6].
The challenges of hybrid transportation systems are multifaceted and include aspects such as hydrogen production, refuelling station infrastructure, propulsion system topology, power source sizing, and control mechanisms. A thorough evaluation and optimisation of these aspects are crucial for facilitating the adoption and commercialisation of hybrid railway vehicles [7,8]. Optimisation in energy systems typically involves identifying a single optimal solution to minimise or maximise an objective function [6], which is the process of determining the conditions or variable values that result in the minimum or maximum of the function [9]. It is important to note that 'optimisation' and 'improvement' are not synonymous and should be used judiciously [10]. The general optimisation problem seeks to find the minima and maxima of an objective function subject to specified constraints. Advancements in hybrid railway system technology have spurred significant research on optimising hybrid trains, such as developing energy management strategies for balancing battery charge and discharge rates, minimising hydrogen consumption and reducing fuel ageing costs. These strategies are scalable and adaptive for conventional and bi-mode trains [11][12][13]. However, despite the extensive research on trajectory optimisation for conventional trains, there is a gap in the literature concerning hybrid railway vehicles. Existing methods and algorithms may not be directly applicable to hybrid trains due to the complexity and unique characteristics of their propulsion systems. Hybrid railway vehicles involve the integration of multiple power sources, such as batteries and hydrogen fuel cells, which present additional challenges in optimising energy management and train dynamics.
In addressing the research gap, this study proposes a hybrid optimisation algorithm that utilises a non-convex objective function and considers both linear and non-linear constraints, ultimately offering a more tailored and efficient solution for the hybrid railway vehicles co-optimisation problem. The algorithm focuses on identifying the best dataset, considering variables such as time, distance, energy consumption, power distribution, traction forces, acceleration, and velocity. By employing non-convex optimisation techniques, the need to convert nonlinear datasets into linear datasets is circumvented, avoiding unnecessary noise and computational stress that often arise from such conversions. Consequently, the proposed method aims to maximise algorithm efficiency and deliver more accurate results for hybrid railway vehicle optimisation. This innovative approach holds the potential to contribute significantly to the development of sustainable and efficient hybrid railway systems, paving the way for further advancements in the field of green transportation technologies.
The research presented in this paper offers several notable contributions to hybrid railway vehicle optimisation and energy management. These contributions can be summarised as follows: • The development of a hybrid optimisation algorithm tailored specifically for hybrid railway vehicles, employing a non-convex objective function. This algorithm is capable of improving the efficiency of energy management systems in hybrid trains while simultaneously optimising their trajectories. • The proposed hybrid optimisation algorithm has implications for the advancement of driving profile and guidance systems, paving the way for more efficient and sustainable hybrid railway traction systems. • The study also contributes to the broader field of evolutionary optimisation processes for hybrid railway traction systems, providing a solid foundation for future research and development in this area.
The structure of this paper is as follows. Section 2 presents the literature review along with a brief introduction to the hybrid railway systems. Section 3 proposes the mathematical model of a hybrid railway vehicle in detail, including the proposed optimisa-tion algorithm model. Section 4 presents a case study employing the proposed hybrid optimisation algorithm for hybrid railway vehicles, where the existing hybrid train configuration is optimised. Finally, Section 5 provides a conclusion for the study presented in this paper and discusses future research directions.

Hybrid railway system
A hybrid railway vehicle can generally be described as a railway vehicle equipped with two or more onboard power sources [14]. Hybrid propulsion traction systems come in various configurations, including a fuel cell combined with battery storage or supercapacitors, a diesel engine with battery storage, or a conventional bi-mode design featuring a pantograph and diesel engine onboard [15]. Modern railway systems have increasingly embraced hybrid traction systems due to their advantages over conventional traction systems and governmental legislation driving railway manufacturers to prioritise hybrid traction systems. Figure 1 provides a graphical illustration of the hybrid railway vehicle used in this study.

Optimisation problem identification
A hybrid train's journey, encompassing either a return or one-way trip, is referred to as a hybrid train trajectory. Like conventional railway vehicles, modern hybrid trains also face certain deficiencies. The hybrid railway system is presently grappling with the challenge of efficiently integrating multiple power sources on board while concurrently optimising the energy management system, taking into account the ergonomic utilisation of these power sources. By effectively addressing these concerns, a hybrid train can attain optimal energy consumption, efficient power distribution, and economical use of power sources. Trajectory optimisation for railway vehicles has garnered significant attention in the literature, particularly concerning conventional trains. In a study conducted by [16], the authors formulated an optimal control problem aimed at minimising the energy consumption of a train travelling between two stations. They employed a continuous-time optimal control approach and resolved the problem using a direct transcription method in conjunction with non-linear programming. Similarly, in a study by [17], the authors proposed an optimisation approach based on dynamic programming for train trajectory optimisation in the context of energy conservation. They examined the influence of various factors, including train mass, traction resistance, and track gradient, on the optimised trajectory.
In recent years, numerous optimisation techniques have been deployed to tackle the train trajectory optimisation problem. For instance, [18]  Hybrid railway vehicle equipped with hydrogen fuel cell and battery propulsion system. consumption and travel time of high-speed trains. Another study by [19] implemented a genetic algorithm to optimise the train speed profile and minimise energy consumption for regional trains subject to a fixed travel time constraint. A variety of energy management optimisation methods have been proposed and explored, including state machine strategies, fuzzy logic control, equivalent consumption minimization strategies, and more [20,21]. Contemporary research predominantly focuses on fixed power demand [22]. One study [12] leverages the convexity of the specific consumption curve to enhance fuel economy and designs a scalable energy management strategy based on a suggested power-demand curve. Another study [23] employs an online extremum-seeking method to estimate the maximum efficiency and power points of a fuel cell.
In the context of fixed-speed trajectories for fuel cell hybrid trains (FCHTs) [24], researchers have divided the trajectory into four states: traction, braking, coasting, and station parking. They then distribute power between the fuel cell and supercapacitor (SC) using a multi-mode equivalent energy consumption method. Building on this work [25], researchers have extended the approach to multiple fuel cells, splitting power among them through an equivalent fitting circle method and optimizing SC power output via an equivalent energy consumption method.
Yan et al. [26] optimised the speed trajectory to minimise energy consumption and determined a hybrid system control strategy based on minimum hydrogen consumption. Another study [27] proposed a rule-based energy management strategy to maximise regenerative braking energy recovery. A different method [28] used the motor characteristic curve, supercapacitor capacity, maximum acceleration, and other information to obtain the braking process speed trajectory, ensuring that the supercapacitor captures more regenerative braking energy. However, this method does not account for fuel cell efficiency. Sequential optimisation was applied in [29] to enhance fuel efficiency potential, developing a speed-smoothing strategy first, followed by battery charge optimisation based on the smoothed speed profile. Yet, train control strategies that directly impact traction energy demand are not included in the energy manage-ment process during the sequential optimisation process. This exclusion may compromise the effectiveness of the optimisation methods. Genetic algorithms have demonstrated success in optimising single-train trajectories for DC traction systems in the context of solving linear optimisation problems [30][31][32][33][34][35][36]. In comparison, dynamic programming has exhibited superior performance over genetic and ant colony optimisation algorithms, particularly when the solution space converges during the process of finding a solution [37]. On the other hand, brute force [38,39] and direct search optimisation methods [40,41] have proven to be inefficient, slow, and non-constructive in contrast to metaheuristic techniques. Predominantly, optimisation techniques employ a convex linear cost function. Although convex optimisation is time-efficient and relatively straightforward to implement, it provides a single optimal global solution with the potential uncertainty of a feasible solution to the problem [42][43][44][45][46]. In contrast to convex optimisation, non-convex optimisation functions examine multiple locally optimal solutions in order to explore a viable global solution to the problem. While non-convex optimisation is comparatively slower, it is highly efficient and offers a guaranteed optimal solution [47][48][49][50][51].
In the field of hydrogen & energy reduction for hybrid trains, recent research has explored various methods for co-optimizing train control strategies and onboard energy management simultaneously. In studies [52,53], Pontryagin's Maximum Principle (PMP) and Dynamic Programming (DP) were integrated to address this issue by using the Hamiltonian as the objective function for DP. However, this approach was inherently limited by the "curse of dimensionality" and boundary-value problems. Peng et al. [54] proposed dynamic programming for co-optimising train driving cycles and energy management in fuel cell trains. They suggested parallelising DP to reduce computation time. Nonetheless, as the dimension of state variables in the dynamic programming model increases, the algorithm's calculation time also rises significantly due to its inherent characteristics. Jibrin et al. [55] tackled the cooptimisation of energy management and speed trajectory by formulating a convex optimisation model, employing convexity relaxation techniques to significantly improve calculation efficiency. However, convex optimisation necessitates that every constraint in the model is convex, which can limit the model's flexibility. In summary, current state-of-the-art studies have utilized Dynamic Programming and convex programming to address co-optimisation, highlighting the benefits of applying co-optimisation to hybrid trains. However, these methods still face limitations and challenges that need to be addressed.
In the above-mentioned research, co-optimisation primarily employs dynamic programming [52][53][54] and convex optimisation [55]. However, this paper proposes a new method to address the co-optimisation problem, investigating the energysaving mechanism of hybrid trains using the co-optimisation model based on Mixed Integer Non-Linear Programming (MINLP). Furthermore, there is a need for further exploration into the energy-saving potential of the regenerative braking process and the enhancement of fuel cell efficiency during application by leveraging the hybridisation of both fuel cells and onboard energy storage devices. Although optimisation algorithms have been successfully applied in the railway industry for conventional railway vehicles, a gap remains in the literature regarding hybrid railway vehicles, whose propulsion systems' complexity and unique characteristics present additional challenges in optimising energy management and train dynamics. Consequently, there is a growing demand for innovative optimisation algorithms tailored to hybrid railway systems.
Existing research predominantly concentrates on optimisation techniques for conventional railway vehicles, leaving a noticeable gap in the application of these methods to hybrid railway systems. Hybrid railway vehicles possess unique propulsion system topologies compared to conventional trains, necessitating the development of advanced optimisation algorithms to effectively address their distinct challenges. These challenges include linear and non-linear constraints associated with hybrid railway vehicles, such as power source sizing, energy management, and train dynamics. To address this research gap, this study proposes a novel approach that utilises non-convex optimisation techniques, allowing for the optimisation of non-linear variables without conditioning while remodelling them as a linear dataset. This method aims to reduce the noise in the dataset for optimisation caused by conditioning the benchmark dataset, thereby enhancing the results and efficiency of the optimisation process.
The proposed optimisation technique is based on numerical and metaheuristic algorithms to address the optimisation problem in hybrid railway vehicle traction systems by developing a time-based MINLP co-optimisation model. The optimisation method employs a non-linear programming solver to solve the problem, interpreting it through a non-convex, improved Rosenbrock function combined with a highly efficient, improvised "Mayfly Algorithm." The Mayfly Optimisation Algorithm (MOA) has emerged as a promising technique inspired by mayflies' unique behaviour and short lifespan [56]. MOA mimics the swarming and mating behaviours of mayflies, where the algorithm represents each mayfly as a candidate solution searching for the global optimum in the problem's search space. The short lifespan of mayflies encourages rapid exploration and exploitation of the search space, leading to faster convergence and improved results [57,58]. The Rosenbrock function is a non-linear, non-convex, and continuous function that poses a significant challenge for optimisation algorithms due to its narrow and curved valley containing the global minimum [59]. By employing the MOA to optimise the Rosenbrock function, researchers can assess the algorithm's accuracy, precision, and efficiency in handling complex optimisation problems with intricate landscapes.
Several studies have reported the successful application of the MOA to various optimisation problems, including those involving the Rosenbrock function [60][61][62][63]. These studies have demonstrated that MOA can provide accurate and precise solutions for complex optimisation problems. Moreover, the algorithm has proven to be efficient in terms of convergence speed and computational complexity when compared to other metaheuristic algorithms [64,65]. This study focuses on determining an optimal hybrid train trajectory for a mid-range light hybrid rail vehicle on typical British crosscountry and intercity railway routes. The hybrid train simulator [66] is used for benchmark simulation, and the proposed algorithm can simultaneously optimise multiple hybrid train trajectories.

Hybrid railway vehicle modelling
In general, distance-based mixed-integer linear programming (MILP) models are employed to identify the optimal speed trajectory for railway vehicles, where distance represents known parameters and time serves as variable parameters. However, the substantial computational effort is necessary when determining the power from onboard power sources, typically calculated using the formula P i = E i ∕ t t . It is essential to recognise that both energy and time are variables, and the linearisation of the ratio in the MILP model leads to computational complexity due to the significant magnitude difference and non-linear relationship between energy consumption and the corresponding time in the i th distance step.
As an alternative, this study proposes a time-based mixedinteger non-linear programming (MINLP) model to circumvent this non-linear relationship, where time is a known parameter, and distance is a variable parameter. The hybrid train's speed at each time step is determined by the MINLP model, assuming that the train accelerates and decelerates uniformly in each time step. The speed trajectory is divided into n time steps, and the train travels through each step within a fixed time period, the length of which is set to 1 s per step in this case study. The distance travelled in the i th step is denoted by Δd i .
The vehicle dynamics of the hybrid train were developed by using the Lomonosff equation based on Newton's second law of motion, as shown in Equation (1): It is assumed that the train maintains a steady rate of acceleration or deceleration in each time interval. As a result, the change in distance Δd i can be computed by using Equation (2).
where v i is the hybrid train velocity in the i th time step calculated by Equation (3).
In order to determine the number of steps needed for the simulation, the total running time T and travel distance D are considered. Which allows us to calculate the number of steps by n = T∕Δt . As a result, the overall distance covered by the train must adhere to the imposed constraint as given by Equation (4).
The traction forces exerted on the hybrid train are described by Davis's equation presented in Equation (5).
where A, B and C are empirical constants representing the rolling resistance of a hybrid train, and R i represents the drag resistance in the i th step. The acceleration and deceleration values, which are calculated using Equation (6), are set to ensure the safe operation of the hybrid train without exceeding their maximum values.
where A acc,max is maximum acceleration and A dec,max is the maximum deceleration rate of the hybrid train. The speed limit on the train is imposed by using Equation (7).
The traction energy of the hybrid train is calculated by using Equation (8).
where M is the total weight of the hybrid train, g is the acceleration due to gravity, Δh i is the difference between the route's gradient. The traction power of the hybrid train is calculated by using Equation (9).
P Total = F t v i + P aux + P loss (9) where F t are traction forces, v i is the velocity of the hybrid train, P aux is the auxiliary power used onboard and P loss presents the power losses along the drive train. The state of charge of the hybrid train is calculated by using Equation (10). (10) where E initial is the initial available charge in the battery. E capacity is the total capacity of battery. E j ,charg is the charging energy at i th step. E j , disch is the discharging energy at i th step. The output power of the fuel cell should not exceed the rated power, and the charging and discharging power of the battery should be within the rated charging and discharging power limits. These constraints are established based on the following conditions.
where P FC , max is the fuel cell's maximum output power. P d , max is discharging power of the battery and P c, max is charging power of the battery.

Proposed hybrid optimisation model
The authors propose a novel hybrid optimisation algorithm, grounded in sequential hybrid optimisation techniques, to achieve optimised energy consumption for hybrid railway vehicles by focusing on train trajectory and energy efficiency. This hybrid optimisation algorithm is developed in MATLAB, which employs a numerical programming solver, 'fmincon', to tackle the non-convex optimisation problem and optimise the test function subject to non-convex constraints. The proposed hybrid algorithm follows a sequential optimisation method, considering both global and local search to ensure convergence speed and optimisation accuracy based on Speed Trajectory Optimisation and Energy Management Optimisation. Several techniques are incorporated to compensate for the limitations of one method with others, ultimately achieving an optimal solution. A numerical approach using MINLP and Piecewise Non-Linearisation (PWNL) is employed to execute complex mathematical operations. The Speed Trajectory and Energy Management Optimisation functions are subject to non-linear "convex and non-convex" constraints, with the forecast function performing non-convex optimisation. The hybrid railway vehicle dataset utilised in this study encompasses train and route specifications, gradient, distance, energy consumption, power demand, traction forces, velocity, and acceleration. The entire optimisation objective is to optimise the energy management of the hybrid train, which depends on speed trajectory and energy efficiency. Consequently, the process is divided into two steps: Speed Trajectory and Energy Management Optimisation. The Speed Trajectory Optimisation utilises the hybrid train's position data, including distance, speed, and acceleration components, from the benchmark dataset, generating trajectory points for Energy Management Optimisation. The latter uses the remaining benchmark dataset elements, which include power, energy, and traction forces. The mathematical model of the proposed optimisation algorithm is discussed in the following section. Figure 2 shows the framework schematic of the hybrid railway vehicle trajectory optimisation by utilising the proposed optimisation algorithm.

Speed profile related variables
In the Mixed-Integer Non-Linear Programming (MINLP) model, a range of variables associated with speed is incorporated, exhibiting a non-linear relationship between them.
To manage these non-linear relationships, Piecewise Non-Linearisation (PWNL) is employed. PWNL enables the representation of a non-linear function through a series of non-negative variables. Initially, variables such as distance, velocity, and acceleration of the train at the i th step is utilised to indicate the train's position and is expressed by Equations (12)- (14).
where t represents the constraints on speed and acceleration, which are based on the distance, while x i denotes the variables of a special order set. The hybrid train's inequality constraints for the Speed Trajectory subset, derived from the benchmark dataset, are modelled using Equation (15): In Equation (15), minimum limits for the distance, velocity, and acceleration vectors are represented by d min , v min and a min , respectively. Conversely, d max , v max and a max signify the maximum limits for distance, velocity, and acceleration. The instantaneous rates of the distance, velocity, and acceleration vectors are denoted by d Inst , v Inst and a Inst , respectively. The scalar value of the iterative time counter for the distance data from the benchmark trajectory is equal to d current . Furthermore, d (x i ), v(x i ) and a(x i ) represent the instantaneous points at a specific iterative time counter i.

Energy management related variables
In this model, the final energy consumption of the hybrid train is calculated using traction power and tractive forces. The energy consumption rate for a hybrid train is closely associated with its output power and is typically represented in relation to normalised power. Consequently, within this proposed method, the energy consumption rate can be modelled by using Equations (16)- (18): In this model, N denotes the constraints on Power, Energy, and Tractive Forces, while S represents the limits on the number of stations encountered during each route journey. Additionally, t ′ signifies the constraints on the time required for the route journey in order to consume the total Power and Energy. This approach ensures a comprehensive and structured representation of the various factors influencing the hybrid train's energy consumption. The hybrid train inequality constraints of the energy consumption model are represented by Equation (19).
where P min i, j , P inst i, j and P max i, j are the minimum instantaneous and maximum power values of the traction power subset. E min i, j , E inst i, j and E max i, j are the minimum, instantaneous and maximum values of the energy subset. F min i, j , F inst i, j and F max i, j are the minimum, instantaneous and maximum power values of the traction forces subset. P (x i, j ), E (x i, j ) and F (x i, j ) represent the instantaneous points of power, energy and traction forces at the instantaneous time i, which is an iterative counter.

Forecast function (non-convex constraints)
The forecast function, incorporated from the Mayfly algorithm, serves as an equality constraint representing the hybrid train's journey time by analysing the route's total distance and energy consumption. Equation (20) presents the forecast equation, which analyses the speed profile variables, including velocity, acceleration, and distance, in order to determine the duration of the journey successfully. This method allows for a thorough evaluation of the hybrid train's performance, ensuring that the optimisation process takes into account all relevant factors.
wheret denotes the forecasted journey time while G best (x i ) and 2G best (x i ) represent the instantaneous route gradient rates at the i th iterative time counter from the forecast trajectory. (G (x i − 1) corresponds to the distinct set of gradient values from the starting point of the route journey. Additionally, G best (x i − 1) is associated with the forecast value of the starting time for the route journey. Meanwhile, G best (x i + 1) signifies the forecast value of the journey time at the next point along the route. This comprehensive approach ensures that all relevant factors are taken into consideration when predicting the hybrid train's performance and journey time.
The forecasted journey consumption of power, traction forces, and energy subsets from the energy management optimisation set are derived from the forecasting executed in Equation (21). The forecast equation serves to estimate the total energy needed to complete the journey time by predicting the energy and power sets of the forecast trajectory. This method enables a comprehensive understanding of fuel requirements, allowing for more accurate and efficient energy management throughout the journey. Here, t ′ denotes the forecasted journey time. G ′ best (x ′ i, j ) and 2G ′ best (x ′ i, j )represent the unique instantaneous points of the energy management-related vector at the respective time, station, and vector counters from the forecast trajectory, as evaluated using Equation (21). G ′ (x ′ , i, j − 1) corresponds to the unique point at the first time-step backward journey time counter, originating from the instantaneous time iterative counter of the Energy Management vector within the benchmark trajectory.
Meanwhile, G ′ best (x ′ i j − 1) signifies the unique point at the first time-step backward journey time iterative counter from the instantaneous journey time iterative counter of the Energy Consumption vector within the optimised trajectory. Lastly, G ′ best (x ′ i j + 1) corresponds to the unique point at the initial time-step forward journey time iterative counter from the instantaneous time iterative counter of the core vector in the optimised trajectory. The forecast Equation (22) evaluates the first iteration of the optimisation process to the final time of the benchmark trajectory.
where G ′ (x ′ i j − 2) corresponds to the unique point of the 2 (s) time-step backward journey time counter from the instantaneous time iterative counter of the energy consumption vector of the benchmark trajectory.

Test function
The evaluation of the speed profile-related variables of the hybrid train from the benchmark trajectory is conducted by using a single non-convex test function. The proposed objective function employed for the benchmark dataset is as follows: In the proposed objective function, G (x i + 1) represents the scalar distance value of the distance variable for a one-second time-step forward from the instantaneous journey time iterative counter within the benchmark trajectory. The function f (x i ) has a mean of zero and a variance of one. Additionally, m is a design constant with a set value of 3 for the distance vector in the benchmark journey.
Conversely, the performance evaluation of the energy management-related variables subset, which represents the traction power, energy, and traction forces subset model, is assessed through an alternative approach and presented in Equation 24. This method takes into account the unique characteristics and requirements of the energy management subset within the hybrid train trajectory optimisation process.
In the above equation, f ′ (x ′ i, j ) evaluates the data from the initial to the final time of the iterative station and subset counter while also considering the sum of the differences from the scalar value of the instant journey time, station, and subset iterative counters, respectively. The term x ′ i, j + 1 denotes a one-second time step forward in the journey from the instant iterative time counter of the iterative station and subset counter of the benchmark subset. G (x i + 1) signifies the unique value of a single subset of the forward journey time iterative counter of the iterative station and subset counter within the benchmark subset.
The test function has a mean of zero and a variance of one, with m ′ representing the design constant with values ranging from 0 to 24 for the core journey dataset. The design parameters for the cost function were established as follows: 14

Optimisation function (non-convex constraints)
The optimisation function aims to minimise the isolated performance value of the test function and returns the optimised performance point from the core set of the journey's current time counter. Equation (26) calculates the optimised speed trajectory at the optimised journey time for speed profile and position-related variables. At each iteration from the initial time to the benchmark journey time, f (x i ) evaluates and returns a scalar performance value, which is then passed to the optimisation function as depicted in Equation (26). This optimisation function aims to minimise the scalar performance value of the test function. As a result, it yields the optimised unique performance point and the isolated distance value for the current journey time counter from the distance vector of the optimised trajectory, as demonstrated in Equation (26).
The instantaneous optimised performance function, denoted as f best (x i ) corresponds to the instant time ranging from 1 s to the benchmark journey time and is subject to the non-linear inequality constraints of the hybrid train, as mentioned in Equation (15). G best (x i ) represents the instantaneous optimised value of the distance and time non-linear dataset for the optimised performance function. The time of the optimised reference journey, G best (x i ) coincides with the benchmark reference journey time, (x i ) t . The journey time of the optimised trajectory, G best (x i ), is replaced with the best journey time. By minimising the instantaneous value of the performance function at each iteration from the starting time to the benchmark journey time, the optimised distance vector is determined.
The f ′ (x ′ i, j ) from Equation (24) returns the optimised energy management-related variables and passes them to the optimisation function in Equation (27). This optimisation function denoted as [ G ′ best (x ′ i j ), f ′ best (x ′ i j )] minimises the instantaneous performance value at each iteration of the time and station counter. As a result, the function returns the optimised performance value and the optimised energy consumption dataset for the hybrid train trajectory.
where f ′ best (x ′ i j ) represents the instantaneous optimised performance function with respect to the instantaneous time counter iterating from the initial time of the benchmark trajectory and the instantaneous station counter iterating from the initial station to the final station of the benchmark trajectory. These iterations are subject to the inequality constraints of the hybrid railway vehicle stated in Equation (19). G ′ best (x ′ i j ) is the instantaneous value of the energy management-related variables of the optimised performance function. The optimised distance variable is evaluated by minimising the immediate value of the

Function Equation Source
Sphere Ackley (1) [ 72] performance function at each iteration of the time, station and vector counter.

Hybrid optimisation algorithm calibration
The hybrid optimisation algorithm underwent a calibration process using various test functions to ensure a robust and efficient cost function. These test functions comprised benchmark data, which was then evaluated by the optimisation and forecast functions. The calibration process employed a combination of typical non-convex and convex objective functions to fine-tune the algorithm's performance. The specific test functions utilised for calibrating the hybrid optimisation algorithm are detailed below (Table 1).
In above equation G (x) 2 represents the unique data subset of speed profile and energy management-related variables. The function is evaluated on the hypercube x i . t represents the dimension of the solution space of each function.

3.9
Hybrid algorithm performance validation Parameter settings A series of experiments were conducted on the hybrid optimisation algorithm to assess its performance. The non-negative constant, k, was utilised in this study to evaluate the convex and non-convex sets and was initially introduced in the forecast Equation (22). The hybrid optimisation algorithm was tested with various values of k, including k = {1, 2, 3, … , 8}. The dimensions tested within the vector space of the hybrid algorithm were chosen based on the route journey time, t , which was approximately 35 min. This selection ensured a comprehensive assessment of the algorithm's effectiveness across different

Experimental results
The validation results for the Rastrigin, Ackley, Griewank, Schaffer, Rosenbrock, and Sphere functions, as discussed in Section 3.8, are presented in Tables 2 and 3. The parameter k in the hybrid algorithm sets the optimisation parameters by manipulating key aspects of the optimisation function, which subsequently results in the exploration and exploitation of the optimised dataset. As the k value in optimisation iterates from zero to a random value, there is an observed increase in the exploitation and a decrease in the exploration of the hybrid algorithm. The experimental results suggest that, for each test function optimisation, the best mean value of the optimised function initially decreases, thereby improving the solution. However, as the value of k increases, the solution deteriorates at specific points in certain cases, two of which are illustrated in Figure 3.

CASE STUDY
In this research, the case study is conducted by employing a comprehensive simulation of benchmark trajectories for the hybrid railway vehicle, utilising the hybrid train simulator developed by the author in a previous study [66]. The simulation results derived from these benchmark trajectories are subsequently fed into the novel hybrid optimisation algorithm, specifically designed to optimise the single train trajectory of the hybrid railway vehicle. The case study aims to demonstrate the significant improvements achieved through the application of the proposed hybrid optimisation algorithm, such as a substantial reduction in energy consumption and more efficient utilisation of power sources throughout the journey. Moreover, the study will examine the delicate balance between energy and time trade-offs, which is critical in real-world applications of hybrid railway systems. A detailed block diagram illustrating the various stages and components of the optimisation operation is presented in Figure 4. This graphical representation offers further insights into the intricacies of the proposed algorithm, thus facilitating a deeper understanding of the underlying optimisation process and its implications for hybrid railway vehicle trajectory optimisation.

Route selection
In this case study, the author has undertaken a detailed analysis of four distinct routes, each chosen for its representation of British cross-country and intercity travel. Spanning a range of distances from 22 to 200 km, these routes were carefully selected to provide a comprehensive and representative overview of rail travel within the UK. Each route is subject to a unique speed limit, as mandated by the regulations of Network Rail. While the speed limits of each route were not included in Table 4 due to the complexity of multiple speed limits across longer routes, they were taken into consideration in the analysis. Table 4 provides an overview of the name and distance of each route, which is instrumental in understanding the scope and scale of this case study. The diverse selection of routes ensures that the findings of this analysis can be applied to a broad range of travel scenarios, thus contributing to the development of more effective and efficient rail travel in the UK.

Vehicle selection
In this case study, a heavily modified British Class 150 rail vehicle equipped with a hybrid propulsion system has been chosen as the subject of analysis. Originally, the British Class 150 diesel train was fitted with a pair of 213 kW Cummins engines, delivering a combined output power of 426 kW. For this investigation, the diesel engine was replaced with a 300 kW hydrogen fuel cell system and a 120.24 kWh battery pack, capable of providing 120 kW of power at a 1C discharge rate. It should be noted that the author's previous research has utilised a different variant of the same vehicle and route [4]. The specifications of the hybrid British Class 150 train under investigation, are presented in Table 5.

4.3
Trajectories simulation Table 6 presents benchmark and optimised trajectories of a hybrid train for four different routes, comparing various power, energy, performance, and range parameters. A detailed technical analysis of the table enables us to derive key insights and assess the consistency of optimised values percentage for essential parameters, such as total energy at wheels, total energy at traction motor, the total energy required for a return journey, journey time, average traction power at wheels, and range.

Total energy at wheels
The optimised trajectories consistently demonstrate a reduction in energy consumption at wheels for all routes. The reduction percentages are 10.91% (Route 1), 12.04% (Route 2), 10.26% (Route 3), and 10.61% (Route 4). This consistency highlights the algorithm's ability to optimise energy consumption for diverse route profiles effectively.

Total energy at traction motor
The optimised trajectories display reduced energy consumption at the traction motor for all routes: 12.07% (Route 1), 12.78% (Route 2), 11.46% (Route 3), and 11.99% (Route 4). These results indicate that the optimisation algorithm consistently improves energy efficiency at the traction motor.

Total energy required for a return journey
A comparison between the benchmark and optimised trajectories reveals a decline in energy consumption for all routes. The reduction percentages are 17.78% (Route 1), 16.29% (Route 2), 16.75% (Route 3), and 16.54% (Route 4). These findings suggest the optimisation algorithm's effectiveness in improving energy efficiency.

Journey time
The optimised trajectories across all routes feature a slight increase in journey time compared to the benchmark values. The differences range from 0.12 min (Route 1) to 0.48 min (Route 4). This trend suggests that the optimisation algorithm prioritises energy efficiency over minimising journey duration, which may be an essential consideration for real-world applications. This increase in journey time can be seen as an energytime trade-off, where the algorithm accepts slightly longer journey times in exchange for significant reductions in energy consumption. This trade-off is particularly relevant in the context of hybrid railway systems as it balances operational efficiency with environmental and economic concerns. By reducing energy consumption, the hybrid train lowers its operational costs. It contributes to reducing greenhouse gas emissions and overall environmental impact. Therefore, the energy-time trade-off achieved by the optimisation algorithm demonstrates its value in addressing critical aspects of sustainable transportation, making it a viable solution for enhancing the performance and efficiency of hybrid railway vehicles. 4.3.5 Average traction power at wheels Average traction power at wheels: The optimised trajectories show a reduction in average traction power at wheels across all routes. The reduction percentages are 18.06% (Route 1), 14.36% (Route 2), 14.14% (Route 3), and 14.10% (Route 4). This consistency indicates the algorithm's effectiveness in optimising traction power for improved efficiency. By reducing stress on traction power, the optimised trajectories not only contribute to energy efficiency but also have the potential to decrease maintenance requirements and increase the life of power sources. Lower average traction power at wheels means reduced wear and tear on mechanical components, such as motors and gearboxes, as well as decreased thermal stress on the electrical systems. As a result, maintenance costs can be lowered, and the service life of critical components can be extended, which ultimately leads to higher overall system reliability and cost-effectiveness.

Energy and power distribution
The optimised trajectories showcase the hybrid optimisation algorithm's effectiveness in reducing the fuel cell power at wheels for all routes. This results in a more efficient energy distribution between the fuel cell and battery systems. This translates to decreased hydrogen consumption for one return journey across all routes, with savings varying from 0.42 kg (Route 1) to 2.89 kg (Route 4). The optimisation algorithm thus demonstrates its capability to optimise energy sources for hybrid railway vehicles.

Performance metrics and journey characteristics
The optimised trajectories indicate improvements in several performance metrics. The maximum acceleration reached remains constant between the benchmark and optimised trajectories across all routes, indicating that the optimisation process does not compromise acceleration performance. The total distance travelled remains the same for both benchmark and optimised trajectories, highlighting the algorithm's ability to achieve energy efficiency without altering the route's overall distance.
For brevity, the author focuses solely on Route 1, "Camphill-Birmingham New Street," for a visual presentation in this paper. The benchmark trajectory results indicate an energy consumption of 90 kWh, utilising a maximum traction power at wheels of 342 kW. The benchmark trajectory was com-pleted in 34.80 min, with an average traction power at wheels of 155 kW.
In this configuration, 28 kW of fuel cell power was allocated exclusively for auxiliary systems, reducing the load stress on the battery. Table 6 reveals that, during the benchmark trajectory simulation, the fuel cell provided 33 kWh of traction energy at the wheels, while the battery pack contributed an additional 22 kWh. The braking system regenerated 35 kWh of energy stored in the battery pack. The hybrid train consumed 2.85 kg of hydrogen for a return journey, enabling a range of 25 journeys limited by battery charge depletion. Figure 5 shows the benchmark trajectory simulation's traction power and energy consumption profiles.
In contrast, the optimised trajectory results showcase an energy consumption of 74 kWh, utilising 285 kW of power. The optimised trajectory was completed in 34.92 minutes, with an average traction power at wheels of 127 kW. Similar to the benchmark trajectory simulation, 28 kW of fuel cell power was dedicated exclusively to auxiliary systems in the optimised trajectory, thus reducing the load stress on the battery. As shown in Table 6, the fuel cell supplied 27 kWh of traction energy at the wheels during the optimised trajectory simulation, while the battery pack contributed an additional 22 kWh. The braking system regenerated 38 kWh of energy stored in the battery pack.
The hybrid train consumed 2.43 kg of hydrogen for a return journey, enabling a range of 29 journeys limited by battery charge depletion. Figure 6 illustrates the optimised trajectory simulation's traction power and energy consumption profiles.

Analysis of benchmark and optimised results
The hybrid optimisation algorithm developed by the author focuses on the optimal control strategy for hybrid railway vehicles, aiming to improve operational design parameters such as energy consumption, journey time restrictions, and meeting power demand during operation. The case study presented in Section 4 serves as an application for the hybrid optimisation algorithm and focuses on typical UK routes used for crosscountry and intercity traffic with varying lengths. This approach ensures the integrity and consistency of the algorithm across diverse scenarios.
Comparative analysis of the benchmark and optimised trajectories demonstrates the algorithm's effectiveness in optimising energy consumption, power source utilisation, and regenerative braking power. The consistency observed in the reduction of average traction power at wheels, the total energy required for a return journey, and hydrogen consumption across all routes indicates the algorithm's efficiency. The optimised trajectories exhibit a minor increase in journey times, indicating that the algorithm prioritises energy efficiency over journey duration minimisation. This optimal energy-time trade-off results in a slight extension of journey times while significantly reducing energy consumption. This trade-off showcases the algorithm's capacity to focus on energy efficiency, a critical aspect of sustainable transportation systems. Despite the initial perception of  increased journey times as a drawback, the considerable reduction in energy consumption compensates for the minimal time increase. This balance promotes both economic and environmental sustainability for hybrid railway vehicles while achieving the most effective energy-time trade-off possible through the algorithm.
The case study results reveal that the hybrid train is equipped with a sufficiently sized battery pack and fuel cell. Due to multiple stops on each route, the hybrid train generates ample regenerative energy, which is utilised to recharge the batteries during the journey. The battery pack is depleted consistently in benchmark and optimised trajectory simulations for all routes, contributing to a more extensive range of journeys in the optimised trajectories. The optimal use of power sources directly impacts the economic life of fuel cells and batteries, as they experience less stress during the journey. This reduction in stress on traction power sources results in decreased maintenance requirements and increased life expectancy for the power sources.
Additionally, a graphical comparison of benchmark and optimised trajectories is presented in Figures 7 and 8. It is evident from Figure 6 that the benchmark trajectory utilised a maximum traction power of 342 kW, whereas the optimised trajectory utilised a maximum power of 285 kW for the hybrid train. Additionally, the benchmark trajectory consumed 90 kWh of energy, whereas the optimised trajectory consumed only 74 kWh of energy. Figure 8 depicts the disparity between the speed profile and state of charge of the battery for the hybrid trains in both benchmark and optimised trajectories of route 1.
Prior research on railway vehicle optimisation [37,38,66] has indicated that there is often a significant trade-off between energy consumption and journey time during the optimisation process. Nevertheless, the author's proposed hybrid optimisation algorithm for hybrid railway vehicles effectively minimises the utilisation of power sources without compromising journey time constraints. The optimised trajectories reveal an average decrease of 15.18% in traction power at wheels, signifying the algorithm's proficiency in enhancing traction power efficiency  across all routes. Furthermore, the optimised trajectories display an average reduction of 16.85% in total energy consumption, emphasising the algorithm's ability to decrease energy consumption under diverse route lengths and conditions. With an average increase in journey times of only 0.40%, the optimised trajectories showcase the algorithm's capacity to achieve a wellbalanced energy-time trade-off, prioritising energy efficiency without significantly compromising journey duration. This seamless integration of priorities underscores the effectiveness of the algorithm and its potential to contribute substantially to the development of more sustainable and efficient railway transportation systems.

Main findings and contributions
The research has led to several key findings, which have contributed to the development of a more comprehensive and robust framework for optimising the energy consumption and operational performance of hybrid railway vehicles.

Development of a novel optimisation algorithm
This research introduces a new hybrid optimisation algorithm that combines a non-linear programming solver with the highly efficient "Mayfly Algorithm" to address the complex optimisation problem associated with hybrid railway vehicles.

Adaptability to hybrid railway vehicles
The proposed algorithm is specifically designed to adapt to the unique characteristics of hybrid railway vehicles, leveraging their hybrid powertrain capabilities for efficient energy management.

Optimal energy-time trade-off
The algorithm effectively balances energy efficiency and journey time across various routes and conditions, demonstrating its ability to optimise the energy consumption profile throughout the journey.

Improved energy efficiency
The optimised trajectories display an average reduction of 16.85% in total energy consumption and a 15.18% reduction in traction power, emphasising the algorithm's potential for lowering energy % power consumption in real-world scenarios.

Minimised journey time impact
With an average increase in journey times of only 0.40%, the algorithm achieves a well-balanced energy-time trade-off, prioritising energy efficiency without significantly compromising journey duration.

Enhanced sustainability and operational performance
The proposed hybrid optimisation algorithm has the potential to contribute substantially to the development of more sustainable and efficient railway transportation systems by optimising the energy consumption and operational performance of hybrid railway vehicles.

Developed framework
Following the research and analysis of the data, a developed framework has been created, which combines the theoretical and practical contributions. This framework emphasises the importance of optimising energy consumption and operational performance in hybrid railway vehicles while maintaining a balance between energy efficiency and journey time. The framework also highlights the need for adaptive algorithms to address hybrid railway vehicles' unique characteristics, ensuring effective energy management and sustainable transportation systems.

CONCLUSION
This paper presents the development of a novel optimisation algorithm for hybrid railway vehicles by utilisation of MILNP & PWNL models. The objective is to generate efficient trajectories that enable effective power distribution, optimal energy consumption, and economical use of multiple onboard power sources, leading to reduced maintenance costs, time, and extended operational life of these sources. The algorithm's superior performance is attributed to its adaptability to the unique characteristics of hybrid railway vehicles, leveraging their hybrid powertrain capabilities for efficient energy management. It considers various operational parameters, such as traction power. speed profile, route's gradient, journey time, traction forces, regenerative braking, and auxil-iary power requirements, to optimise the energy consumption profile throughout the journey.
The optimised trajectories exhibit an average reduction of 16.85% in total energy consumption, with an average increase in journey times of only 0.40% and a 15.18% reduction in traction power. The algorithm achieves a well-balanced energy-time trade-off, prioritising energy efficiency without significantly compromising journey duration. This balance is crucial in sustainable transportation systems, where reducing energy consumption and emissions is vital without severely impacting service quality and travel times.
In conclusion, the proposed hybrid optimisation algorithm demonstrates an exceptional ability to optimise energy consumption and operational performance of hybrid railway vehicles, contributing significantly to the ongoing efforts towards more sustainable and efficient railway transportation systems. This study's contributions advance the hybrid railway vehicle optimisation field and provide valuable insights for future research and practical applications in developing sustainable and efficient railway transportation systems.
The current study provides a solid foundation for further research in the hybrid railway vehicle optimisation field. Future works could explore the following directions:

Integration of machine learning techniques
Developing advanced algorithms incorporating machine learning techniques, such as deep learning or reinforcement learning, to enhance the adaptability and performance of the optimisation algorithm.

Real-time optimisation
Investigating the feasibility of implementing the proposed optimisation algorithm in real-time, enabling dynamic trajectory adjustments based on real-time data, such as traffic conditions, weather, or system malfunctions.

Multi-objective optimisation
Expanding the optimisation framework to consider multiple objectives simultaneously, such as energy efficiency, journey time, passenger comfort, and system reliability, to achieve a more comprehensive optimisation solution.

Large-scale applications
Evaluating the proposed algorithm's performance on large-scale railway networks, assessing its scalability and efficiency in more complex and interconnected transportation systems. By addressing these potential future works, researchers can continue to refine and expand upon the current study,