A new energy truck battery replacement scheduling method based on improved fireworks algorithm

By improving the fireworks algorithm and combining it with the Levy flight strategy and a combination of elite selection and roulette, the scheduling model of new energy trucks was optimized. This solved the problems of path optimization and resource allocation in the scheduling of new energy trucks, and achieved more efficient vehicle scheduling and resource utilization.

CN119962872BActive Publication Date: 2026-03-27NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing new energy truck scheduling models are unable to effectively optimize vehicle routes and battery resource allocation, resulting in long vehicle waiting times and low efficiency. Furthermore, existing algorithms are not adaptable enough to handle nonlinear and dynamic scenarios.

Method used

An improved fireworks algorithm is adopted, which combines Levy flight strategy and a combination of elite selection and roulette wheel to optimize the scheduling model of new energy trucks. By adjusting the fireworks explosion radius and the number of sparks, mutated sparks are generated, and the search process is optimized to obtain the optimal scheduling scheme.

Benefits of technology

It improved the dispatching efficiency of new energy trucks, reduced vehicle waiting time, enhanced the algorithm's global search capability and local convergence performance, and met actual production needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119962872B_ABST
    Figure CN119962872B_ABST
Patent Text Reader

Abstract

The application discloses a new energy truck battery replacement scheduling method based on an improved fireworks algorithm and belongs to the technical field of new energy truck scheduling optimization. First, a data set is constructed by acquiring new energy truck working area and truck data, and then an initial solution is determined by calculating a fitness value based on initial positions and reverse positions. By adjusting the explosion radius and the number of sparks of fireworks, a mutated spark is generated in combination with a Levy flight strategy to optimize the search process. Finally, the next generation solution is screened by combining elite selection and roulette gambling, and the optimization is gradually performed until the iteration is completed, so that the optimal scheduling scheme is obtained. The application optimizes the problems of easy falling into local optimization and slow convergence speed of the standard fireworks algorithm, optimizes the initialization step by using the reverse fireworks position, increases the same nature, introduces the Levy flight strategy to generate the mutated spark, and screens the next generation solution by combining the elite selection and the roulette gambling, so that the global search ability and the local convergence performance of the algorithm are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a new energy truck battery replacement scheduling method based on an improved firework algorithm and belongs to the technical field of new energy truck scheduling optimization. BACKGROUND

[0002] As a clean and environmentally friendly transportation tool, new energy trucks are gradually replacing traditional fuel trucks and becoming an important role in transportation due to their low carbon and energy-saving characteristics. Unlike traditional trucks that are driven by diesel, new energy trucks mainly rely on electric power and have significant environmental advantages. At the same time, the continuous development of intelligent and automated technologies has significantly improved the transportation efficiency and safety of new energy trucks, providing a solid guarantee for the digitization and intelligentization of the new energy truck field. The promotion of new energy trucks faces technical and operational challenges. Limited by battery technology, the range is limited and frequent charging or battery replacement is required, which affects the continuity of high-intensity transportation tasks. In addition, the changing environment puts higher requirements on the stability and reliability of the truck. Optimizing the scheduling scheme, improving the endurance, and reducing the efficiency loss become key issues, and these challenges also drive the development of related technologies, providing the possibility for the low-carbonization and intelligentization of transportation.

[0003] New energy truck scheduling is a complex system engineering problem. Most existing scheduling models are based on the operation mode of fuel trucks, and there is less research on new energy trucks. Due to the introduction of battery replacement stations, the scheduling mode of new energy trucks has expanded from the traditional truck back and forth between the loading area and the unloading area to a multi-point scheduling problem including the loading area, the unloading area and the battery replacement station. New energy truck scheduling optimization methods mainly include precise algorithms, heuristic algorithms and intelligent optimization algorithms. Precise algorithms need to convert the problem into a mathematical optimization model (such as a linear model or an integer model), but it is difficult to model in the presence of nonlinearity and uncertainty in reality, and it is not adaptive to dynamic scenarios. Heuristic algorithms can only obtain local optimal solutions and may not meet the global optimal requirements. Intelligent optimization algorithms are widely used in new energy truck scheduling, but basic heuristic methods have limited effect in dealing with new energy truck scheduling models and may have slow convergence speed or fall into local optimum. The application proposes a new energy truck battery replacement scheduling method based on an improved firework algorithm for the scheduling needs of new energy trucks. By establishing a scheduling model with the shortest queuing time as the target and combining the improved firework algorithm for solving, the transportation path of new energy trucks is optimized to meet the actual production needs and help the development of new energy truck intelligent scheduling technology. SUMMARY

[0004] In order to solve the defects and deficiencies of the prior art, the present application proposes a new energy truck battery replacement scheduling method based on improved fireworks algorithm, the main idea of which is: taking the minimization of new energy truck waiting time as the target, a scheduling model is constructed which comprehensively considers the truck area environment, truck running characteristics and resource constraints of the battery replacement station. First, the new energy truck working area and truck data are obtained to construct a data set, and then the initial position and reverse position are used as the basis to calculate the fitness value to determine the initial solution. By adjusting the explosion radius and the number of sparks of the fireworks, combined with the Levy flight strategy to generate mutant sparks, the search process is optimized. Finally, the method of combining elite selection and roulette is used to select the next generation solution, which is gradually optimized until the iteration is completed, and the optimal scheduling scheme is obtained.

[0005] The technical scheme of the present application is: a new energy truck battery replacement scheduling method based on improved fireworks algorithm, the main steps of which are as follows:

[0006] Step 1: Obtain the new energy truck working area environment data and the new energy truck data to construct a data set DataSet, DataSet contains n loading areas i, m unloading areas j, k new energy trucks r of the same model, h battery replacement stations e, and the number of available battery replacement batteries for each battery replacement station e is h; the distance from each loading area to each unloading area is d ij , the distance from each unloading area to each battery replacement station is d je , the distance from each battery replacement station to each loading area is d ei ; the battery capacity of the rth new energy truck is E r , the unit is kWh, the full load power consumption is E 1r , the empty load power consumption is E 2r , the unit is kWh / km.

[0007] Step 2: Initialize the parameters related to the fireworks algorithm, including the number of fireworks E, which is set to 10, the number of mutant sparks M, which is set to 10, and the number of iterations N, which is set to 300. Initialize the position of each firework X={x r1 ,x r2 ,…,x ri ,…x rn}, x ri ∈[a,b], r∈[0,k], a,b are the minimum and maximum values of x ri , x ri is a position of the rth new energy truck in a single scheduling time in a single scheduling, and the corresponding reverse firework position X' is obtained according to the following formula.

[0008]

[0009] Step 3: Calculate the fitness value according to the firework position, the calculation formula is as follows:

[0010]

[0011] where T limit is the working time of each shift, T rij is the time of the rth new energy truck from loading area i to unloading area j, x rij is the number of times of the rth new energy truck from loading area i to unloading area j, T rji is the time of the rth new energy truck from unloading area j to loading area i, y rij is the number of times of the rth new energy truck from unloading area j to loading area, T je is the time of unloading area j to the battery swap station, z rje is the number of times of the rth new energy truck from unloading area j to the battery swap station e, T ei is the time of the battery swap station to loading area i.

[0012] Step 4: Calculate the explosion radius R i and the number of sparks S i

[0013]

[0014]

[0015] where R i is the explosion radius of firework i, S i is the number of sparks generated by firework i, and m is a constant to control the size of the explosion radius and the number, Y min , Y max represent the minimum and maximum fitness values of the fireworks, f(i) is the fitness of firework i, and ε is a very small constant to prevent the denominator from being zero.

[0016] Step 5: Set an upper and lower boundary for the number of sparks S i

[0017]

[0018] where S min and S max are the maximum and minimum explosion spark numbers set in advance, generally set to 5 and 50.

[0019] Step 6: For each firework x i , generate sparks within its explosion radius R i according to the following formula.

[0020] x ik ​=x ik +R i ×U(-1,1)#(6)

[0021] Where U(-1,1) is a uniform distribution in the interval [-1,1].

[0022] Step 7: Generate mutated sparks using the Levy flight strategy, with the following formula:

[0023] z k =x i +α×Levy(β)#(7)

[0024] The formula for calculating Levy(β) is as follows:

[0025]

[0026] In the formula, Levy(β) is a Levy distribution that follows the parameter β, 0 < β < 2, and μ follows a distribution that is (0, σ). 2 ), ν follows a (0, 1) distribution, and σ can be calculated using the following formula:

[0027]

[0028] Where Γ represents the gamma distribution function, and the value of β is 1.5.

[0029] Step 8: Combine the individual x obtained in Steps 6 and 7 ik and z k Calculate the fitness value f(x) according to formula (2). i Sort by low to high, and keep only the top few. A certain number of elite individuals are added to the next generation, where α is the elite proportion parameter, typically α is 0.5, and n is the number of individuals. For the remaining... The probability P(x) of an individual being selected is calculated using formula (10). i )

[0030]

[0031] Among them, f min β is the minimum fitness value; β is the minimum parameter, and γ is the weight adjustment parameter used to control the influence of fitness differences. The cumulative probability is calculated according to formula (11), resulting in a cumulative probability list C = {C1, C2, ..., C...}. n}, where C n =1

[0032]

[0033] Step 9: Generate a random number r∈[0,1), and find the first number that satisfies r <C i individual xi If the current selected number of individuals k is equal to The elite selection of Individuals are combined with the roulette selection of Individuals to form the next generation population X, otherwise jump to step 9.

[0034] Step 10: If the current iteration number is equal to the maximum iteration number N, get the solution with the minimum fitness value as the optimal solution and output, otherwise jump to step 4.

[0035] Compared with the prior art, the present application has the following beneficial effects:

[0036] The present application combines the battery supply capacity of the battery swap station and the power constraint of the battery swap trigger to establish a model. The running time of the new energy truck in the working area of the new energy truck, the charging scheduling and the charging capacity of the battery swap station are deeply integrated, and a multi-dimensional constraint model based on vehicle trip, battery swap process and battery allocation is proposed, covering three key problems of vehicle path planning, time optimization and resource allocation. In the process of finding the optimal scheduling scheme, the optimization standard fireworks algorithm is easy to fall into local optimum and slow convergence speed, the reverse fireworks position optimization initialization step is used to increase the same sex, and the Levy flight strategy is introduced to generate variation sparks, and the next generation solution is screened by the method of combining elite selection and roulette, which enhances the global search ability and local convergence performance of the algorithm. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 is the flowchart of the present application; DETAILED DESCRIPTION

[0038] The present application will be further explained below in conjunction with the drawings and specific embodiments of the present application.

[0039] Collect the new energy truck working area environment data and new energy truck running data, construct a data set containing new energy truck working area terrain, truck path, battery state and other information, and perform standardization processing. Based on the objective of minimizing the truck waiting time, considering the constraints such as the number of batteries in the battery swap station and the battery swap trigger condition, a scheduling optimization model is constructed, the objective function and the constraint condition are defined, and the task path time and the dynamic adjustment of the battery swap behavior are calculated. Details see steps 1, 3.

[0040] Random initialization and reverse initialization are used to generate initial solutions, and the fitness value is calculated to screen the optimal solution. Combined with the fireworks algorithm, the explosion radius and the number of sparks are dynamically adjusted, and the Levy flight strategy is introduced to generate mutant sparks to enhance the global search ability. The next generation solution is screened by the method of elite selection combined with roulette, and the iteration optimization is carried out until convergence, and finally the optimal scheduling scheme is output. See steps 2, 4, 5, 6, 7, 8, 9, 10.

[0041] As shown in Figure 1 , a new energy truck battery replacement scheduling method based on improved fireworks algorithm, the main steps of the method are as follows:

[0042] Step 1: Obtain the working area environment data of new energy trucks and the data of new energy trucks, and construct the data set DataSet, DataSet contains n loading areas i, m unloading areas j, k new energy trucks of the same model r, h battery replacement stations e, the number of available battery replacement batteries for each battery replacement station e is h; The distance from each loading area to each unloading area is d ij , the distance from each unloading area to each battery replacement station is d je , the distance from each battery replacement station to each loading area is d ei ; The battery capacity of the rth new energy truck is E r , the unit is kWh, the full load power consumption is E 1r , the empty load power consumption is E 2r , the unit is kWh / km.

[0043] Step 2: Initialize the parameters related to the fireworks algorithm, including the number of fireworks E, set to 10, the number of mutant sparks M, set to 10, the number of iterations N, set to 300. Initialize the position of each firework X = {x r1 ,x r2 ,…,x ri ,…x rn}, x ri ∈[a,b], r∈[0,k], a,b are the minimum and maximum values of x ri , x ri is a position in the running track of the rth new energy truck in a single shift within a single shift, and the corresponding reverse firework position X' is obtained according to the following formula.

[0044]

[0045] Step 3: Calculate the fitness value according to the firework position, the calculation formula is as follows:

[0046]

[0047] In the formula, T limit is the working time of each shift, Trij is the time for the rth new energy truck from loading area i to unloading area j, x rij is the number of times for the rth new energy truck from loading area i to unloading area j, T rji is the time for the rth new energy truck from unloading area j to loading area i, y rij is the number of times for the rth new energy truck from unloading area j to loading area, T je is the time for unloading area j to battery swap station, z rje is the number of times for the rth new energy truck from unloading area j to battery swap station e, T ei is the time for battery swap station to loading area i.

[0048] Step 4: Calculate the explosion radius R i and the number of sparks S i

[0049]

[0050] where R i is the explosion radius of firework i, S i is the number of sparks produced by firework i, and m is a constant to control the size of the explosion radius and the number, Y min , Y max represent the minimum and maximum fitness values of the firework, f(i) is the fitness of firework i, and ε is a very small constant to prevent the denominator from being zero.

[0051] Step 5: Set an upper and lower boundary for the number of sparks S i

[0052]

[0053] where S min and S max are the maximum and minimum explosion spark numbers set in advance.

[0054] Step 6: For each firework x i , within its explosion radius R i , generate sparks according to the following formula.

[0055] x ik = x ik + R i × U(-1, 1) #(6)

[0056] where U(-1, 1) is a uniform distribution between [-1, 1].

[0057] ​Step 7: Generate a mutation spark using Levy flight strategy, whose formula is as follows:

[0058] z k = x i + a x Levy (β) # (7)

[0059] The formula of Levy (β) is as follows:

[0060]

[0061] In the formula, Levy (β) is Levy distribution with parameter β, 0 < β < 2, μ is subject to (0, σ 2 ) distribution, and v is subject to (0, 1) distribution. σ can be calculated by the following formula:

[0062]

[0063] Where Γ represents the gamma distribution function, and the value of β is 1.5.

[0064] Step 8: Select the individual x ik and z k from step 6 and step 7 according to formula (2) to calculate the fitness value f(x i ) and sort from low to high, directly reserve the top elite individuals to join the next generation, where α is the elite proportion parameter, usually α is 0.5, and n is the number of individuals. For the remaining individuals, calculate their selection probability P(x i )

[0065]

[0066] Where f min is the minimum fitness value; β is the minimum parameter, and γ is the weight adjustment parameter, which is used to control the influence of fitness difference. Calculate the cumulative probability according to formula (11) to get the cumulative probability list C = {C1, C2, …, C n}, where C n = 1

[0067]

[0068] Step 9: Generate a random number r ∈ [0, 1), find the first individual x i that satisfies r < C i , select it as the next generation individual. If the current selected individual number k is equal to , then combine the elite individuals selected and the individuals selected by roulette to form the next generation population X, otherwise jump to step 9.

[0069] Step 10: If the current iteration number is equal to the maximum iteration number N, the solution with the minimum fitness value is obtained as the optimal solution and output, otherwise jump to step 4.

[0070] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A new energy truck battery swapping scheduling method based on an improved fireworks algorithm, characterized in that, Includes the following steps: Step 1: Obtain environmental data of the working area of ​​new energy trucks, as well as data on new energy trucks, and construct a dataset (DataSet); Step 2: Initialize the relevant parameters for the fireworks algorithm; Step 3: Calculate the fitness value based on the location of the fireworks; The calculation formula is as follows: In the formula, T limit Work hours per shift, T rij x is the time it takes for the r-th new energy truck to travel from loading area i to unloading area j. rij T represents the number of times the r-th new energy truck travels from loading area i to unloading area j. rji Let y be the time it takes for the r-th new energy truck to travel from unloading area j to loading area i. rij T represents the number of times the r-th new energy truck travels from the unloading area j to the loading area. je For the time from the unloading area j to the battery swapping station, z rje T represents the number of times the r-th new energy truck travels from the unloading area j to the battery swapping station e. ei The time from the battery swapping station to the loading area i; Step 4: Calculate the explosion radius R respectively i and the number of sparks generated S i Step 5: Set the number of sparks S i Set the upper and lower boundaries; Step 6: For each firework x i In its blast radius R i Generate within range A spark; Step 7: Generate mutated sparks using the Levy flight strategy, as shown in the following formula: z k =x i +α×Levy(β) (7) The formula for calculating Levy(β) is as follows: In the formula, Levy(β) is a Levy distribution that follows the parameter β, 0 < β < 2, and μ follows a distribution that is (0, σ). 2 ), ν follows a (0, 1) distribution, and σ can be calculated using the following formula: Where Γ represents the gamma distribution function, and the value of β is 1.5; Step 8: Combine the individual x obtained in Steps 6 and 7 ik and z k Calculate the fitness value f(x) according to formula (2). i Sort by low to high, and keep only the top few. A number of elite individuals are added to the next generation, where α is the elite proportion parameter, usually α is 0.5, and n is the number of individuals. The probability P(x) of an individual being selected is calculated using formula (10). i ) Among them, f min It is the minimum fitness value; β is the minimum parameter, and γ is the weight adjustment parameter used to control the influence of fitness differences; according to formula (11), the cumulative probability is calculated to obtain the cumulative probability list C = {C1, C2, ..., C...} n }, where C n =1 Step 9: Generate a random number r∈[0,1), and find the first number that satisfies r <C i individual x i Select it as the next generation individual if the number of individuals already selected, k, is equal to Then the elite will choose Individuals and those chosen through roulette Individuals are merged to form the next generation group X; otherwise, proceed to step 9. Step 10: If the current iteration count is equal to the maximum iteration count N, obtain the solution with the smallest fitness value as the optimal solution and output it; otherwise, jump to step 4.

2. The new energy truck battery swapping scheduling method based on the improved fireworks algorithm according to claim 1, characterized in that, The dataset DataSet in step 1 includes: n loading areas i, m unloading areas j, k new energy trucks r of the same model, and h battery swapping stations e, with h available batteries at each station e; the distance d between each loading area and each unloading area is d. ij The distance from each unloading area to each battery swapping station is d. je The distance from each battery swapping station to each loading area is d. ei The battery capacity of the rth new energy truck is E. r The unit is kWh, and the full-load power consumption is E. 1r The no-load power consumption is E 2r The unit is kWh / km.

3. The new energy truck battery swapping scheduling method based on the improved fireworks algorithm according to claim 1, characterized in that, Step 2 specifically includes: the number of fireworks E, set to 10; the number of mutated sparks M, set to 10; the number of iterations N, set to 300; and initializing the position of each firework X = {x r1 ,x r2 ,…,x ri ,…x rn },x ri ∈[a,b], r∈[0,k], a,b are x ri The minimum and maximum values ​​of x ri Let X' be a position on the trajectory of the r-th new energy truck during a single shift, and calculate the corresponding reverse firework position X′ using the following formula:

4. A new energy truck battery swapping scheduling method based on an improved fireworks algorithm according to claim 1, characterized in that, The explosion radius R in step 4 i and the number of sparks generated S i The calculation formula is as follows: Where Ri is the explosion radius of firework i, and Si is the number of sparks produced by firework i. m and y are constants used to control the size of the explosion radius and number of explosions. Ymin and Ymax represent the minimum and maximum fitness values ​​of the fireworks. f(i) is the fitness of fireworks i. ε is a very small constant to prevent the denominator from being zero.

5. A new energy truck battery swapping scheduling method based on an improved fireworks algorithm according to claim 1, characterized in that, The number of sparks S in step 5 i The formulas for calculating the upper and lower boundaries are as follows: In the formula, Smin and Smax are the maximum and minimum number of explosion sparks preset, which are generally set to 5 and 50 respectively.

6. A new energy truck battery swapping scheduling method based on an improved fireworks algorithm according to claim 1, characterized in that, The calculation formula for step 6 is as follows: xik=xik+Ri×U(-1,1) (6) where, U(-1,1) is a uniform distribution in the interval [-1,1].

Citation Information

Patent Citations

  • Logistics transportation scheduling method, system and device

    CN110503234A

  • Logistics vehicle low-carbon route planning method based on multi-target firework algorithm

    CN113673937A