An electric heavy truck battery replacement scheduling method based on non-cooperative game
By adopting a non-cooperative game-based scheduling method for battery swapping of electric heavy-duty trucks, combined with the Jacobi optimal response algorithm and deep neural networks, the problem of uneven utilization of resources in battery swapping stations for electric heavy-duty trucks is solved. This method achieves efficient resource allocation and Nash equilibrium in battery swapping stations, optimizes the competitive relationship between heavy-duty trucks, and shortens the strategy update time.
Patent Information
- Application Number
- CN202410952647.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2044-07-16
AI Technical Summary
Existing electric heavy-duty truck battery swapping scheduling methods have failed to effectively address the problem of uneven utilization of battery swapping station resources, leading to congestion and battery swapping failures. Furthermore, existing models have failed to effectively consider the competitive relationship between heavy-duty trucks, resulting in excessively long solution times.
A non-cooperative game-based scheduling method for battery swapping of electric heavy-duty trucks is adopted. Combining the Jacobi optimal response algorithm and deep neural networks, the optimal strategies among heavy-duty trucks are solved iteratively to establish a centralized scheduling model and a non-cooperative game model. The branch-cut method is used to accelerate the strategy solution and achieve Nash equilibrium.
It improved the efficiency of the battery swapping process, reduced driver waiting time, optimized the competitive relationship among heavy trucks, shortened the strategy update time, and achieved efficient allocation of battery swapping station resources.
Smart Images

Figure CN118798682B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of heavy truck battery replacement, and particularly relates to a heavy electric truck battery replacement scheduling method based on non-cooperative game. BACKGROUND
[0002] Compared with fuel heavy trucks, the endurance of electric heavy trucks is weaker, and the demand for energy supplement is strong. At present, the energy supplement modes of pure electric heavy trucks include charging and battery replacement. Battery replacement has the advantages of short energy supplement time and reduced purchase cost compared with charging, and can improve the operation efficiency of heavy trucks. However, with the wide promotion of battery replacement heavy trucks and battery replacement stations, if the electric heavy trucks are allowed to directly and disorderly go to the battery replacement stations, some battery replacement stations may be congested and queued, while other battery replacement stations may be idle. The uneven use of resources not only increases the waiting time of heavy trucks in the congested battery replacement stations, affects the operation efficiency, but also may force the drivers to drive to other battery replacement stations to try battery replacement when the battery supply is insufficient, thereby greatly reducing the battery replacement experience. Moreover, since the electric heavy trucks may belong to different operators, in order to reduce the congestion time of the battery replacement stations and the battery replacement cost of the heavy truck drivers, it is urgent to establish a non-cooperative game model among the heavy truck drivers.
[0003] At present, most of the existing researches are mainly aimed at the guidance of electric vehicle charging stations. However, the availability of the battery, i.e. the number of available batteries in the station, does not need to be considered in the charging station guidance model. If the same guidance method is directly used, the electric vehicles may be guided to the stations with insufficient batteries, resulting in battery replacement failure. A few researches on the guidance of electric vehicle battery replacement are mainly aimed at the centralized or distributed optimization from the perspective of the operators of the battery replacement stations, and do not consider the possible competitive relationship among the battery replacement vehicles.
[0004] On the one hand, in the non-cooperative game of the guidance of the electric vehicle battery replacement stations, each heavy truck (driver) tries to minimize the battery replacement cost, driving distance and waiting time by selecting the optimal strategy, and the selection of the strategies affects each other. Therefore, the strategies of the heavy trucks need to be iterated multiple times to reach the equilibrium state. On the other hand, in each iteration, the heavy trucks need to solve their own optimal strategies, and the corresponding relationship between the heavy trucks and the stations needs to be represented by 0-1 variables. Such a discrete strategy set may result in a long solving time. SUMMARY
[0005] The technical problem to be solved by the present application is to provide a heavy electric truck battery replacement scheduling method based on non-cooperative game. The Jacobi optimal response algorithm is used to iterate the optimal strategies among the heavy trucks to reach the Nash equilibrium, and the deep neural network is combined with the branch-and-cut method to accelerate the solving of the optimal strategies of the heavy electric trucks in each iteration, so as to realize the efficient operation of the battery replacement process and reduce the waiting time of the drivers for battery replacement.
[0006] To solve the above technical problems, the technical scheme adopted by the present application is: a non-cooperative game-based electric heavy truck battery replacement scheduling method, comprising the following steps:
[0007] S1, collect the battery replacement reservation information and the battery replacement station information by the cloud system, take the total driving distance of all electric heavy trucks as the objective function, establish a centralized scheduling model, and the result is used as the initial solution of the non-cooperative game model;
[0008] S2, taking each electric heavy truck as a game subject, taking its battery replacement price, driving distance and queuing time as the objective function, establishing a non-cooperative game model;
[0009] S3, establish a non-cooperative game solution framework based on Jacobi optimal response method.
[0010] S4, design and train a deep neural network based on historical data, and combine the branch-cut method to solve the optimal strategy of each electric heavy truck in each iteration.
[0011] Preferably, the step S1 is specifically as follows:
[0012] A centralized battery replacement scheduling model of electric heavy trucks is established, and the objective function is to minimize the driving distance of all vehicles:
[0013] ;(1)
[0014] In the formula, represents the driving distance of the electric heavy truck going to the battery replacement station.
[0015] The battery replacement station guidance constraints are as follows:
[0016] ;(2)
[0017] ;(3)
[0018] Formula (2) indicates that each electric heavy truck can only be guided to one battery replacement station for battery replacement. Formula (3) indicates that the number of heavy trucks guided to the battery replacement station cannot exceed the number of available batteries .
[0019] The battery replacement heavy truck requesting battery replacement generally will run out of power, and the driving distance is limited, so it is necessary to ensure that the assigned battery replacement station must be within the drivable mileage of the heavy truck. The maximum travel constraint of the heavy truck is as follows:
[0020] ;(4)
[0021] In the formula, represents the driving distance of the electric heavy truck The remaining battery power, This represents the conversion factor between battery power and driving distance.
[0022] Finally, the branch-cut method is used to solve the above integer programming problem, and the optimal solution obtained is used as the initial solution for iteratively solving the Nash equilibrium in step S3.
[0023] Preferably, in step S1, before establishing the centralized battery swapping scheduling model for electric heavy-duty trucks, the platform collects battery swapping request information of the electric heavy-duty trucks, including their location and remaining battery power. The platform calculates the travel distance and time to reach each battery swapping station. This represents the set of indexes of electric heavy-duty trucks that have submitted battery swapping requests. Describe the set of indices of battery swapping stations, and define a vector. Indicates electric heavy truck The relationship between battery swapping stations and decision variables The variable is 0-1, representing an electric heavy-duty truck. With battery swapping station The guiding relationship, 1 represents electric heavy truck. Guided to the battery swapping station When swapping batteries, 0 indicates that there is no guidance between the two.
[0024] Preferably, the centralized battery swapping scheduling model for electric heavy-duty trucks is updated once every time interval.
[0025] Preferably, step S2 is as follows:
[0026] Assuming all electric heavy-duty trucks are rational and will choose suitable battery swapping stations to minimize their overall battery swapping costs, a non-cooperative game will occur among the trucks; for electric heavy-duty trucks... Its decision-making model is as follows:
[0027] The objective function is to minimize the overall battery swapping cost, which includes driving distance, battery swapping price, and waiting time.
[0028] (5)
[0029] In the formula, Indicates battery swapping station The price of battery swapping Indicates heavy truck The waiting time and These are cost conversion factors for travel distance and waiting time, respectively. This indicates the battery level of the electric heavy-duty truck after a battery swap.
[0030] The guidance constraints for battery swapping stations are as follows:
[0031] ; (6)
[0032] ; (7)
[0033] The maximum travel constraint of the heavy truck is as follows:
[0034] ; (8)
[0035] Formula (6) and (2) are similar, indicating that the electric heavy truck a can only be guided to a battery swap station for battery swap, formula (7) and (3) are similar, indicating that in the case of considering other electric heavy trucks guided to the battery swap station , the decision of a guarantees that the total number of heavy trucks does not exceed the number of available batteries, formula (8) and (4) are similar, indicating that the guided battery swap station must be within the maximum travel range of the heavy truck ;
[0036] The heavy truck battery swap waiting time constraint is as follows:
[0037] ; (9)
[0038] ; (10)
[0039] ; (11)
[0040] Formula (9) indicates that the battery swap start time of the electric heavy truck at the battery swap station is not less than the arrival time, wherein represents the battery swap start time of the electric heavy truck , represents the arrival time of the electric heavy truck traveling to the battery swap station ; formula (10) indicates that the battery swap start time interval of each electric heavy truck at the battery swap station is greater than the normal battery swap time represents the time required for battery swap operation; formula (11) indicates that the waiting time of the electric heavy truck is equal to the difference between the battery swap start time and the arrival time, represents the queuing waiting time of the electric heavy truck ;
[0041] Formula (10) contains a logical or and is a nonlinear constraint, which is linearized using the big M method:
[0042] ; (12)
[0043] ; (13)
[0044] In the formula, For a sufficiently large positive number, For auxiliary 0-1 variables;
[0045] Based on the above constraints, for each electric heavy truck Its feasible region is as follows:
[0046] (14)
[0047] In the formula, Indicates electric heavy truck Similarly, the feasible region of a decision can be used... This represents the feasible domain for all electric heavy-duty truck decisions;
[0048] The total battery swapping cost for each electric heavy-duty truck depends not only on its own choice but also on the choices made by other electric heavy-duty trucks. To describe the non-cooperative game relationship among all electric heavy-duty trucks, the following game is constructed:
[0049] (15)
[0050] In the formula, The participants in the game are all electric heavy-duty trucks; Let be the set of strategies for each electric heavy-duty truck, which is non-empty and discrete; For electric heavy trucks The utility function (1), abbreviated as :
[0051] (16)
[0052] In the formula, In addition to electric heavy trucks Strategies of non-participants;
[0053] The goal of non-cooperative game theory is to find the Nash equilibrium, that is, to find a set of... This makes the following formula true:
[0054] (17)
[0055] ;(18).
[0056] In other words, our goal is to determine a set of strategies for all electric heavy-duty trucks, while ensuring that no participant has an incentive to unilaterally deviate from it. This completes the establishment of the non-cooperative game model.
[0057] Preferably, step S3 includes the following steps:
[0058] S31, use the optimal solution calculated in step 1 as the initial solution of the non-cooperative game model, and calculate the utility function value of each electric heavy truck at the initial solution. Set the number of iterations ;
[0059] S32, select a subset of game participants , i.e. a subset of electric heavy trucks, in each iteration, a part of participants are selected to update their strategies, mainly the participants with larger objective function values in the last iteration, the decisions of multiple participants in the process of updating strategies are independent of each other, so the parallel computing method can be used;
[0060] S33, calculate the optimal response, for the participant subset selected in step S32, calculate their optimal response under the condition that the strategies of other participants are fixed, find the strategy that minimizes the objective function of the participant, i.e. which battery swap station to go to for battery swap;
[0061] ; (19)
[0062] wherein, is the electric heavy truck the optimal decision in the first iteration;
[0063] S34, update the strategy, update the participant's own strategy to the optimal strategy calculated in step S33, and keep the strategies of the remaining participants unchanged, and then update the iteration period;
[0064] ; (20)
[0065] ; (21)
[0066] ; (22)
[0067] S35, check the Nash equilibrium, repeat steps S32 to S34 until the strategy in an iteration does not change, judge whether the current strategy is the Nash equilibrium solution of the non-cooperative game, i.e. judge whether formula (17) (18) is satisfied, if the Nash equilibrium is reached, terminate the iteration, otherwise go back to step S32.
[0068] For the Nash equilibrium problem with discrete strategy set in the application, the equilibrium decision of the electric heavy truck is calculated through multiple iterations, and the algorithm can quickly update the strategy and converge to a set of Nash equilibrium solutions.
[0069] Preferably, the step S4 comprises the following steps:
[0070] S41, the generation of data set, for each electric heavy truck, collect historical data, including the decision and arrival time of the remaining electric heavy trucks in the past, calculate the optimal decision of the electric heavy truck in each group of data by using branch-cut, then arrange it into a data set, and divide it into a training set and a test set;
[0071] S42, the offline training stage, based on the collected data, a fully connected deep neural network with three hidden layers is designed, the input of the network is the arrival time of all participants and the decision of the remaining electric heavy trucks except the target participant, and the output is the decision and waiting time of the target participant in the scheduling; a loss function considering the target value and constraint satisfaction is set, which includes two parts: the error part, that is, the weighted sum of variable errors; the regularization part, that is, the penalty term of violating the constraint; the expression of the loss function is as follows:
[0072]
[0073] In the formula, is the output value of the deep neural network, that is, the predicted value of the optimal decision of the electric heavy truck a; is the target value obtained from the solver in advance; the first item of the loss function is the mean square error, which is used to learn the target value of the variable; the second item is the regularization term for binary variables, since the predicted value obtained by the prediction model is a continuous real number between 0 and 1, when it is not 0 and 1, this item is introduced to adjust the prediction result to 0 or 1; the third item is the penalty term of violating the matching relationship between the electric heavy truck and the station; the fourth item and the fifth item are the penalty terms of violating the station capacity constraint and the maximum driving distance constraint respectively, the gradient of the loss function with respect to the neural network weight is calculated, and then the back propagation algorithm is used to update the weights;
[0074] S43, the real-time solving stage, in order to deal with the special case that the predicted value may not be feasible and improve the performance of the model, new data obtained in daily scheduling is used to supplement learning, when the model prediction is successful, the predicted value can be used as the learning target of online learning, and the gradient derived by the loss function is used to update the network model weight; when the prediction result is not feasible, the solver is called to solve the model, and the obtained result is used to update the model.
[0075] In step S32, the above deep neural network model is used to predict the decision of each electric heavy truck, the time of updating the decision in each iteration is shortened, and finally the Nash equilibrium is quickly solved.
[0076] The application provides an electric heavy truck battery replacement scheduling method based on non-cooperative game, which has the following beneficial effects:
[0077] 1. A non-cooperative game model for heavy-duty truck battery swapping scheduling is established considering the competitive relationship between each heavy-duty truck, and the battery swapping cost, driving distance and waiting time of each heavy-duty truck are comprehensively considered to improve the overall operation efficiency of the system;
[0078] 2. The non-cooperative game model is solved using Jacobi optimal response algorithm, and a subset of participants is selected for simultaneous optimization, and the strategies of each heavy-duty truck are converged to Nash equilibrium through iteration;
[0079] 3. A deep neural network model is used to learn and predict the battery swapping station selection of the electric heavy-duty truck, thereby simplifying the single electric heavy-duty truck battery swapping decision problem, and further shortening the time of strategy update in each iteration. BRIEF DESCRIPTION OF DRAWINGS
[0080] The present application will be further described below in conjunction with the drawings and examples:
[0081] Figure 1 is the overall schematic diagram of the electric heavy-duty truck battery swapping scheduling method based on non-cooperative game of the present application;
[0082] Figure 2 is the basic structure diagram of the guidance optimization model of the electric heavy-duty truck arriving at the battery swapping station;
[0083] Figure 3 is the flow chart of solving Nash equilibrium based on Jacobi optimal response algorithm of the present application;
[0084] Figure 4 is the schematic diagram of designing and training deep neural network based on historical data of the present application. DETAILED DESCRIPTION
[0085] As Figures 1-2 shown, an electric heavy-duty truck battery swapping scheduling method based on non-cooperative game. The specific steps are as follows:
[0086] S1: Construct a centralized scheduling model for electric heavy-duty trucks to generate an initial feasible solution for a set of non-cooperative game models.
[0087] Consider scheduling once every interval, for example, 10 minutes. Collect the battery swapping request information of the electric heavy-duty truck before the start of scheduling, including location and remaining battery capacity. The platform calculates the driving distance and time to each battery swapping station. Let denote the index set of electric heavy-duty trucks that submit battery swapping requests, denote the index set of battery swapping stations. Define the vector denote the battery swapping station guidance relationship of the electric heavy-duty truck , and the decision variable is a 0-1 variable, indicating that the electric heavy-duty truck is associated with the battery swapping station 1 represents the electric heavy truck being guided to the battery swap station carrying out battery swap, 0 represents that there is no guidance between the two.
[0088] When using the Jacobi optimal response algorithm, a set of initial solutions is needed to start iteration. In order to quickly obtain the initial solution while ensuring the quality of the initial solution, the present application establishes a centralized battery swap scheduling model for electric heavy trucks, and the objective function is to minimize the travel distance of all vehicles:
[0089] (1)
[0090] In the formula, representing the electric heavy truck traveling distance to the battery swap station.
[0091] The battery swap station guidance constraint is as follows:
[0092] (2)
[0093] (3)
[0094] Formula (2) represents that each electric heavy truck can only be guided to one battery swap station for battery swap. Formula (3) represents that the number of heavy trucks guided to the battery swap station cannot exceed the number of available batteries .
[0095] The battery swap heavy truck requesting battery swap generally has limited travel distance due to the depletion of electric energy, and it is necessary to ensure that the assigned battery swap station must be within the travel distance of the heavy truck. The maximum travel distance constraint of the heavy truck is as follows:
[0096] (4)
[0097] In the formula, representing the remaining electric quantity of the electric heavy truck , representing the conversion coefficient of electric quantity and travel distance.
[0098] Finally, the branch-cut method is used to solve the above integer programming problem, and the optimal solution obtained will be used as the initial solution for the iteration of step S3 to solve the Nash equilibrium.
[0099] S2: Constructing a non-cooperative game model for electric heavy trucks.
[0100] Assuming that all electric heavy trucks are rational and will choose appropriate battery swap stations to minimize their comprehensive battery swap cost, non-cooperative game is carried out among the heavy trucks. For the electric heavy truck , the decision model is as follows:
[0101] The objective function is to minimize the comprehensive battery swap cost, including driving distance, battery swap price and waiting time:
[0102] (5)
[0103] In the formula, represents the battery swap price of the battery swap station , represents the waiting time of the heavy truck , and are the cost conversion coefficients of the driving distance and the waiting time, respectively, represents the battery capacity of the electric heavy truck after battery swap.
[0104] The battery swap station guidance constraint is as follows:
[0105] (6)
[0106] (7)
[0107] The maximum driving distance constraint of the heavy truck is as follows:
[0108] (8)
[0109] Formula (6) and (2) are similar, indicating that the electric heavy truck a can only be guided to one battery swap station for battery swap. Formula (7) and (3) are similar, indicating that in the case of considering other electric heavy trucks guided to the battery swap station , the decision of a should ensure that the total number of heavy trucks does not exceed the available battery number. Formula (8) and (4) are similar, indicating that the guided battery swap station should be within the maximum driving range of the heavy truck .
[0110] The heavy truck battery swap waiting time constraint is as follows:
[0111] (9)
[0112] (10)
[0113] (11)
[0114] Formula (9) indicates that the battery swap start time of the electric heavy truck at the battery swap station is not less than the arrival time, in which, represents the battery swap start time of the electric heavy truck , represents the arrival time of the electric heavy truck Arrival time of the electric heavy truck at the battery swap station Formula (10) indicates that the interval of the battery swap start time of each electric heavy truck at the battery swap station is greater than the normal battery swap time represents the time required for the battery swap operation. Formula (11) indicates that the waiting time of the electric heavy truck is equal to the difference between the battery swap start time and the arrival time, represents the queuing waiting time of the electric heavy truck .
[0115] Formula (10) contains a logical OR and is a nonlinear constraint, which is linearized using the big M method:
[0116] ; (12)
[0117] ; (13)
[0118] wherein, is a sufficiently large positive number, is an auxiliary 0-1 variable.
[0119] According to the above constraint conditions, for each electric heavy truck , the feasible region is as follows:
[0120] ; (14)
[0121] wherein, represents the feasible region of the decision of the electric heavy truck , and similarly, we can use to represent the feasible region of the decision of all electric heavy trucks.
[0122] The total battery swap cost of each electric heavy truck depends not only on its own choice but also on the choices of other electric heavy trucks. In order to describe the non-cooperative game relationship between all electric heavy trucks, the following game is constructed:
[0123] ; (15)
[0124] wherein, is the participant of the game, i.e. all electric heavy trucks; is the strategy set of each electric heavy truck, which is non-empty and discrete; is the utility function (1) of the electric heavy truck , which is simply denoted as :
[0125] ; (16)
[0126] wherein, is the electric heavy truck The strategy of the other participants.
[0127] The goal of non-cooperative game is to find Nash equilibrium, that is, to find a set of strategies So that the following formula is established:
[0128] (17)
[0129] (18)
[0130] That is, our goal is to determine a set of strategies for all electric heavy trucks, and no participant has the motivation to deviate from it unilaterally. So far, the non-cooperative game model is established.
[0131] S3: Figure 3 The solving framework schematic diagram of the present application based on Jacobi optimal response algorithm is given, and the specific content is as follows:
[0132] S31: The optimal solution calculated in step 1 is used as the initial solution of the non-cooperative game model, and the utility function value of each electric heavy truck under the initial solution is calculated. Set the number of iterations .
[0133] S32: Select a subset of game participants That is, a subset of electric heavy trucks. In each iteration, a part of participants are selected to update their strategies. Mainly select the participants with larger objective function value in the last iteration. The decisions of multiple participants in the process of updating strategies are independent of each other, so the parallel computing method can be used.
[0134] S33: Calculate the optimal response, and the detailed calculation method will be given in step 4. For the participant subset selected in step S32, calculate their optimal response under the condition that the strategies of other participants are fixed. Find the strategy that minimizes the objective function of the participant, that is, which battery swap station to go to for battery swap.
[0135] (19)
[0136] In the formula, The optimal decision of the electric heavy truck In the first Iteration.
[0137] S34: Update the strategy. Update the participant's own strategy to the optimal strategy calculated in step S33, and the strategies of the remaining participants remain unchanged, and then update the iteration period.
[0138] (20)
[0139] (21)
[0140] (22)
[0141] S35: Check Nash equilibrium. Repeat steps S32-S34 until no change in strategy in one iteration, judge whether the current strategy is the Nash equilibrium solution of the non-cooperative game, that is, judge whether formula (17) (18) is satisfied. If the Nash equilibrium is reached, terminate the iteration, otherwise return to step S32.
[0142] For the Nash equilibrium problem with discrete strategy set in the application, the equilibrium decision of the electric heavy truck is calculated through multiple iterations, and the algorithm can quickly update the strategy and converge to a set of Nash equilibrium solutions.
[0143] S4: Figure 4 The schematic diagram of designing and training a deep neural network based on historical data is given, and the specific content is as follows:
[0144] S41: Generation of data set. For each electric heavy truck, collect historical data, including the decisions and arrival times of the remaining electric heavy trucks in the past. Use branch-cut to calculate the optimal decision of electric heavy trucks in each group of data, then organize it into a data set, and divide it into training set and test set.
[0145] S42: Offline training phase. Based on the collected data, a fully connected deep neural network with three hidden layers is designed. The input of this network is the arrival time of all participants and the decision of the remaining electric heavy trucks except the target participant, and the output is the decision and waiting time of the target participant in this dispatch. In addition, the application specially designs a loss function that considers both target value and constraint satisfaction. It includes two parts: error part, which is the weighted sum of variable errors; regularization part, which is the penalty term for violating constraints. The expression of the loss function is as follows:
[0146] (23)
[0147] In the formula, is the output value of the deep neural network, that is, the predicted value of the optimal decision of electric heavy truck a; is the target value obtained from the solver in advance. The first term of the loss function is the mean square error, which is used to learn the target value of the variable; the second term is the regularization term for binary variables, since the prediction value obtained by the prediction model is a continuous real number between 0 and 1, this term is introduced when it is not 0 and 1, to promote the prediction result to adjust to 0 or 1; the third term is the penalty term for violating the matching relationship between the electric heavy truck and the station; the fourth and fifth terms are the penalty terms for violating the station capacity constraint and the maximum driving distance constraint, respectively. The gradients of the loss function with respect to the weights of the neural network are calculated, and then the backpropagation algorithm is used to update these weights.
[0148] S43: Real-time solving stage. In order to deal with the special case that the prediction value may not be feasible and improve the performance of the model, new data obtained in the daily schedule is used to supplement learning. When the model prediction is successful, the prediction value can be used as the learning target of online learning, and the gradients derived by the loss function are used to update the network model weights; when the prediction result is not feasible, the solver is called to solve the model, and the obtained result is used to update the model.
[0149] In step S32, the above-mentioned deep neural network model is used to predict the battery swap station decision for each electric heavy truck, which shortens the time of updating the decision in each iteration, and finally realizes the fast solution of Nash equilibrium.
[0150] The above-mentioned embodiments are only preferred technical solutions of the present application, and should not be regarded as limitations of the present application. The protection scope of the present application should be based on the technical solutions recited in the claims, including the equivalent replacement solutions of the technical features recited in the claims. That is, the equivalent replacement improvements within this range are also within the protection scope of the present application.
Claims
1. A non-cooperative game-based electric heavy truck battery replacement scheduling method, characterized in that, The method comprises the following steps: S1, collecting the battery replacement reservation information and the battery replacement station information by the cloud system, taking the total driving distance of all electric heavy trucks as a target function, establishing a centralized scheduling model, and taking the result as an initial solution of a non-cooperative game model; S2, taking each electric heavy truck as a game subject, taking the battery replacement price, driving distance and queuing time of the electric heavy truck as a target function, and establishing a non-cooperative game model; S3, establishing a non-cooperative game solving framework based on the Jacobi optimal response method; S4, designing and training a deep neural network based on historical data, and combining a branch-cut method to solve the optimal strategy of each electric heavy truck in each iteration; The step S3 comprises the following steps: S31, use the optimal solution calculated in step 1 as the initial solution of the non-cooperative game model, and calculate the utility function value of each electric heavy truck at the initial solution; set the number of iterations ; S32, selecting a subset of game participants That is, the subset of electric heavy truck, in each iteration, a part of participants are selected to update their strategies, mainly selecting participants with larger objective function value in the last iteration, the decisions of multiple participants are independent in the process of updating strategies, so the parallel computing method can be used.
2. The electric heavy-duty truck battery swapping scheduling method based on non-cooperative game according to claim 1, characterized in that, The step S1 is specifically as follows: A centralized battery replacement scheduling model of the electric heavy truck is established, and a target function is to minimize the driving distance of all vehicles: ; (1) In the formula, representing an electric heavy truck to the battery swap station distance of travel; The battery replacement station guide constraint is as follows: ;(2) ;(3) Formula (2) represents the number of electric heavy trucks that can be guided to a battery swap station for battery swap; Formula (3) represents that the number of heavy trucks guided to the battery swap station cannot exceed the number of available batteries ; The battery replacement heavy truck that requests battery replacement generally will run out of power, and the driving distance is limited, and it is necessary to ensure that the assigned battery replacement station must be within the driving distance of the heavy truck, and the maximum driving distance constraint of the heavy truck is as follows: ; (4) In the formula, represents the remaining power of the electric heavy truck, represents the remaining power of the electric heavy truck, represents the conversion coefficient of the power and the driving distance; Finally, the branch-cut method is used to solve the above integer programming problem, and the optimal solution is taken as an initial solution of the iteration of the Nash equilibrium in the step S3.
3. The non-cooperative game-based electric heavy-duty truck battery swapping scheduling method according to claim 2, characterized in that, In step S1, before establishing the centralized battery swap scheduling model for electric heavy trucks, the battery swap request information of electric heavy trucks is collected, including location and remaining power, the platform calculates the driving distance and time to each battery swap station, and sets represents the index set of electric heavy trucks that propose battery swap requests, represents the index set of battery swap stations, and defines the vector represents the battery swap station guiding relationship of electric heavy trucks , and the decision variable is a 0-1 variable, representing the guiding relationship between electric heavy trucks and battery swap stations , and 1 indicates that the electric heavy truck is guided to the battery swap station for battery swap, and 0 indicates that there is no guiding relationship between the two.
4. The electric heavy-duty truck battery swapping scheduling method based on non-cooperative game according to claim 3, characterized in that, The scheduling is performed once every interval, and the centralized battery replacement scheduling model of the electric heavy truck is updated.
5. The non-cooperative game-based electric heavy-duty truck battery swapping scheduling method according to claim 1, characterized in that, The step S2 is specifically as follows: Assuming that all electric heavy trucks are rational, they will choose appropriate battery swap stations to minimize their overall battery swap costs, and each heavy truck will conduct a non-cooperative game with other heavy trucks. The decision model of the electric heavy truck is as follows: The target function is to minimize the comprehensive battery replacement cost, including the driving distance, the battery replacement price and the waiting time: ; (5) In the formula, represents the battery swap price of the battery swap station , represents the waiting time of the heavy truck , and are the cost conversion coefficients of the driving distance and the waiting time, respectively, represents the battery capacity of the electric heavy truck after battery swap; The battery replacement station guide constraint is as follows: ;(6) ;(7) The maximum driving distance constraint of the heavy truck is as follows: ; (8) Formula (6) indicates that the electric heavy truck a can only be guided to one battery swap station for battery swap, formula (7) indicates that in the case of considering other electric heavy trucks guided to the battery swap station , the decision of a guarantees that the total number of heavy trucks does not exceed the available number of batteries, and formula (8) indicates that the guided battery swap station must be within the maximum driving range of the heavy truck . The heavy truck battery replacement waiting time constraint is as follows: ;(9) ;(10) ;(11) Formula (9) represents the electric heavy truck The battery swap starting time at the battery swap station The battery swap starting time at the battery swap station The battery swap starting time at the battery swap station The battery swap starting time at the battery swap station The arrival time of the electric heavy truck The arrival time of the electric heavy truck The arrival time of the electric heavy truck The arrival time of the electric heavy truck The arrival time of the electric heavy truck The arrival time of the electric heavy truck Formula (10) contains a logical or, which is a nonlinear constraint, and the big M method is used to linearize it: ;(12) ; (13) wherein is a sufficiently large positive number; According to the above constraints, for each electric heavy truck its feasible region is as follows: ; (14) wherein denotes electric heavy-duty trucks the feasible region of decisions, with denotes the feasible region of decisions for all electric heavy-duty trucks The total battery replacement cost of each electric heavy truck depends not only on its own choice but also on the choice of other electric heavy trucks; in order to describe the non-cooperative game relationship between all electric heavy trucks, the following game is constructed: ; (15) wherein, is the set of all electric heavy-duty trucks, i.e. the players of the game; is the set of strategies of each electric heavy-duty truck, non-empty and discrete; is the electric heavy-duty truck is the utility function of the electric heavy-duty truck, simply denoted by : ; (16) In the formula, For the strategy of the participant other than the electric heavy truck other than the electric heavy truck The goal of non-cooperative game is to find a Nash equilibrium, i.e. to find a set of strategies such that the following equation holds: ;(17) ;(18)。 6. The non-cooperative game-based electric heavy-duty truck battery swapping scheduling method according to claim 5, characterized in that, The step S3 further comprises the following steps: S33, calculating the optimal response, for the participant subset selected in the step S32, calculating the optimal response of them under the condition that the strategies of other participants are fixed, finding the strategy that minimizes the target function of the participant, that is, going to which battery replacement station to replace the battery; ;(19) In the formula, Electric heavy truck In the first Optimal decision in the second iteration; S34, updating the strategy, updating the strategy of the participant to the optimal strategy calculated in the step S33, keeping the strategies of the remaining participants unchanged, and then updating the iteration period; ;(20) ;(21) ;(22) S35, check the Nash equilibrium, repeat steps S32 to S34 until the strategy in an iteration has no change, judge whether the current strategy is the Nash equilibrium solution of the non-cooperative game, that is, judge whether formula (17) (18) is satisfied, if the Nash equilibrium is reached, terminate the iteration, otherwise return to step S32. whether formula (17) (18) is satisfied, if the Nash equilibrium is reached, terminate the iteration, otherwise return to step S32.
7. The non-cooperative game-based electric heavy-duty truck battery swapping scheduling method according to claim 1, characterized in that, The step S4 comprises the following steps: S41, generation of a data set, for each electric heavy truck, historical data is collected, including the decisions and arrival times of the remaining electric heavy trucks in the past, the optimal decision of the electric heavy truck in each group of data is calculated by using the branch-cut, and then the data set is arranged and divided into a training set and a test set; S42, in the offline training phase, a fully connected deep neural network with three hidden layers is designed based on the collected data. The input of the network is the arrival time of all participants and the decision of the rest of the electric heavy trucks except the target participant. The output is the decision and waiting time of the target participant in this dispatch. A loss function is set which considers both the objective value and the constraint satisfaction. It includes two parts: the error part, which is the weighted sum of variable errors, and the regularization part, which is the penalty term for violating constraints. The expression of the loss function is as follows: ;(23) In the formula, is the output value of the deep neural network, i.e. the predicted value of the optimal decision of the electric heavy truck a; is the target value obtained from the solver in advance; the first item of the loss function is the mean square error, which is used to learn the target value of the variable; the second item is the regularization term for the binary variable, since the predicted value obtained by the prediction model is a continuous real number between 0 and 1, this item is introduced when it is not 0 and 1, so as to adjust the prediction result to 0 or 1; the third item is the penalty term for violating the matching relationship between the electric heavy truck and the station; the fourth item and the fifth item are respectively the penalty terms for violating the station capacity constraint and the maximum driving distance constraint, the gradients of the loss function with respect to the neural network weights are calculated, and then the back propagation algorithm is used to update these weights; S43, in the real-time solving phase, in order to deal with the special case that the predicted value may not be feasible and improve the performance of the model, new data obtained in daily dispatch is used to supplement learning. When the model prediction is successful, the predicted value can be used as the learning goal of online learning, and the gradient derived from the loss function is used to update the network model weight. When the predicted result is not feasible, the solver is called to solve the model, and the obtained result is used to update the model.