A battery swap scheduling method and device for multiple vehicles and multiple stations
By screening the accessible sites of vehicles and determining available batteries, and combining genetic algorithms to construct optimization problems, the efficiency and accuracy problems in multi-vehicle and multi-station battery swap scheduling are solved, and efficient battery swap scheduling and operational efficiency are achieved.
Patent Information
- Application Number
- CN202411988102.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In the battery swap scheduling of multiple vehicles and multiple stations, it is difficult for the existing technology to achieve efficient and accurate battery swap scheduling, especially in closed scenarios, urban distribution scenarios and trunk logistics scenarios. The battery swap needs are diversified and high-intensity, resulting in huge scheduling challenges.
By screening the sites that the vehicle can reach, determining the available battery list for each vehicle, and using genetic algorithms to construct target optimization problems to maximize global fitness and recommending the optimal battery swap battery.
It realizes efficient and accurate battery swap dispatch in multiple vehicles and multiple station scenarios, improves the operational efficiency of electric vehicles, reduces queueing and waiting time, and improves user satisfaction.
Smart Images

Figure CN119378958B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of battery swapping scheduling, and in particular to a battery swapping scheduling method and device for multiple vehicles and multiple stations. Background Art
[0002] With the widespread use and popularity of electric vehicles, electric vehicle owners have an increasing demand for vehicle charging and endurance. As a fast and convenient way to replenish electricity, battery swapping technology has received more and more attention and recognition from the market. Through battery swapping stations, car owners can quickly replace batteries to ensure the endurance of electric vehicles. At the same time, compared with charging stations, battery swapping stations save charging time and significantly improve the convenience and efficiency of travel.
[0003] At present, electric vehicles have become the main means of transportation, but in closed scenarios, urban distribution scenarios, trunk logistics scenarios and other scenarios, the demand for battery swapping is diverse and high-intensity, which brings great challenges to battery swapping scheduling. Summary of the invention
[0004] In view of this, the present application provides a battery swap scheduling method and device for multiple vehicles and multiple stations, so as to achieve efficient and accurate battery swap scheduling and ensure the operating efficiency of electric vehicles in various scenarios.
[0005] Specifically, the present application is implemented through the following technical solutions:
[0006] In a first aspect, the present application provides a battery swap scheduling method for multiple vehicles and multiple stations, the method comprising:
[0007] For each vehicle in the dispatching domain, select the reachable sites of the vehicle from the sites in the dispatching domain;
[0008] For each accessible station of each first-category vehicle, determine the battery that the accessible station can provide for the first-category vehicle, and determine a list consisting of the identifiers of the batteries that can be provided for the first-category vehicle in all accessible stations of the first-category vehicle and preset identifiers as the available battery list of the first-category vehicle; wherein the first-category vehicle is a vehicle with multiple reachable stations; and the preset identifier is used to indicate that no battery option is allocated;
[0009] Based on a genetic algorithm, with the goal of maximizing global fitness, a target optimization problem is constructed with each first-class vehicle only being able to select one option from the list of available batteries for the first-class vehicle as the first constraint condition, and each first-class vehicle not being able to select the same battery as the second constraint condition; wherein, the target optimization problem stipulates the use of a set of arrays as an individual encoding method, each position of the set of arrays represents a first-class vehicle, and the value of each position represents the selection result of the vehicle; when the value of each position represents a real battery, the fitness value of the position is a fitness value that comprehensively considers the distance from the vehicle to the station, the battery replacement cost, and the travel time; when the value of each position is that no battery option is allocated, the fitness value of the position is equal to a preset value, and the preset value is a negative number; the fitness of each individual is equal to the sum of the fitness values of each position; the global fitness is equal to the maximum value of the fitness values of all individuals contained in the population;
[0010] The genetic algorithm is used to find the optimal solution to the target optimization problem, and a replacement battery is recommended for each first-class vehicle based on the optimal solution; wherein each position of the optimal solution represents a first-class vehicle, and the value of each position represents a replacement battery recommended for the first-class vehicle.
[0011] A second aspect of the present application provides a battery swap scheduling device for multiple vehicles and multiple stations, the battery swap scheduling device for multiple vehicles and multiple stations being applied to a server, the device comprising a screening module, a determination module and a recommendation module;
[0012] The screening module is used to screen, for each vehicle in the scheduling domain, the reachable sites of the vehicle from the sites in the scheduling domain;
[0013] The determination module is used to determine, for each reachable station of each first-category vehicle, the battery that the reachable station can provide for the first-category vehicle, and determine a list consisting of identifiers of batteries that can be provided for the first-category vehicle in all reachable stations of the first-category vehicle and preset identifiers as a list of available batteries for the first-category vehicle; wherein the first-category vehicle is a vehicle with multiple reachable stations; and the preset identifier is used to indicate that no battery option is allocated;
[0014] The recommendation module is used to construct a target optimization problem based on a genetic algorithm with the goal of maximizing global fitness, with each first-class vehicle only being able to select one option from the list of available batteries for the first-class vehicle as a first constraint, and each first-class vehicle not being able to select the same battery as a second constraint; wherein the target optimization problem stipulates the use of a set of arrays as an individual encoding method, each position of the set of arrays represents a first-class vehicle, and the value of each position represents the selection result of the vehicle; when the value of each position represents a real battery, the fitness value of the position is a fitness value that comprehensively considers the distance from the vehicle to the site, the battery replacement cost, and the travel time; when the value of each position is that no battery option is allocated, the fitness value of the position is equal to a preset value, and the preset value is a negative number; the fitness of each individual is equal to the sum of the fitness values of each position; the global fitness is equal to the maximum value of the fitness values of all individuals contained in the population;
[0015] The recommendation module is also used to use the genetic algorithm to solve the optimal solution of the target optimization problem, and recommend a replacement battery for each first-class vehicle based on the optimal solution; wherein each position of the optimal solution represents a first-class vehicle, and the value of each position represents a replacement battery recommended for the first-class vehicle.
[0016] The third aspect of the present application provides a server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods provided in the first aspect of the present application are implemented.
[0017] The battery swap scheduling method and device for multiple vehicles and multiple stations provided in the present application, for each vehicle in the scheduling domain, screens out the reachable stations of the vehicle from each station in the scheduling domain, and then for each reachable station of each first-class vehicle with multiple reachable stations, determines the battery that the reachable station can provide for the first-class vehicle, and determines a list consisting of the identifiers of the batteries that can be provided for the first-class vehicle in all reachable stations of the first-class vehicle and a preset identifier for characterizing the unallocated battery option as the list of available batteries for the first-class vehicle, thereby maximizing the global fitness based on the genetic algorithm, with the goal of maximizing the global fitness, and with the goal of each first-class vehicle can only be provided from the first-class vehicle. The target optimization problem is constructed by selecting an option from the list of available batteries for the vehicle as the first constraint condition and each first-class vehicle cannot select the same battery as the second constraint condition, and the genetic algorithm is used to solve the optimal solution of the target optimization problem, and then a replacement battery is recommended for each first-class vehicle according to the optimal solution; wherein, the target optimization problem stipulates the use of a set of arrays as an individual encoding method, each position of the set of arrays represents a first-class vehicle, and the value of each position represents the selection result of the vehicle; when the value of each position represents a real battery, the fitness value of the position is the fitness value that comprehensively considers the distance from the vehicle to the site, the battery replacement cost and the travel time value, when the value of each position is the non-allocated battery option, the fitness value of the position is equal to the preset value, and the preset value is a negative number; the fitness of each individual is equal to the sum of the fitness values of each position; the global fitness is equal to the maximum value of the fitness values of all individuals contained in the population. In this way, on the one hand, by determining the first type of vehicle and the list of available batteries for the first type of vehicle, and then searching for a scheduling solution based on a genetic algorithm, the optimal scheduling solution can be quickly found in a larger solution space; on the other hand, by adding a preset identifier for representing the non-allocated battery option in the list of available batteries, and setting it as When the preset mark is used, the fitness value of the position is set to a negative number. In this way, the server can adjust the scheduling strategy according to dynamic factors such as actual battery inventory, site busyness, vehicle demand, etc. to meet the actual conditions at different times and different sites, enhance adaptability, and ensure the smooth and efficient operation of the scheduling system. Thirdly, in the scheduling plan, multiple factors such as arrival distance, battery replacement cost and time are comprehensively considered, so that vehicles are no longer blind when choosing sites, and can complete battery replacement in the shortest time, reducing queuing and waiting time, and improving the operating efficiency of electric vehicles. In addition, an efficient battery replacement experience can further enhance user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of Embodiment 1 of the battery swap scheduling method for multiple vehicles and multiple stations provided in this application;
[0019] Figure 2 A schematic diagram of a battery swap scheduling system shown in an exemplary embodiment of the present application;
[0020] Figure 3 A flowchart of Embodiment 2 of the battery swap scheduling method for multiple vehicles and multiple stations provided in this application;
[0021] Figure 4 A flowchart of Embodiment 3 of the battery swap scheduling method for multiple vehicles and multiple stations provided in this application;
[0022] Figure 5 A flowchart of Embodiment 4 of the battery swap scheduling method for multiple vehicles and multiple stations provided in this application;
[0023] Figure 6 This is a hardware structure diagram of the server where the battery swap dispatching device for multiple vehicles and multiple stations of this application is located;
[0024] Figure 7 This is a structural diagram of the first embodiment of the battery swapping dispatching device for multiple vehicles and multiple stations provided in this application. DETAILED DESCRIPTION
[0025] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0026] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more associated listed items.
[0027] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0028] Specific embodiments are given below to introduce the technical solution of the present application in detail.
[0029] Figure 1 This is a flowchart of the first embodiment of the battery swap scheduling method for multiple vehicles and multiple stations provided in this application. Please refer to Figure 1The method provided in this embodiment, the battery swap scheduling method for multiple vehicles and multiple stations is applied to a server, and the method includes:
[0030] S101. For each vehicle in a scheduling domain, select reachable sites of the vehicle from various sites in the scheduling domain.
[0031] It should be noted that the battery swap scheduling method and device for multiple vehicles and multiple stations provided in this application are applied to the server in the battery swap scheduling system. Figure 2 This is a schematic diagram of a battery swap scheduling system shown in an exemplary embodiment of the present application. Figure 2 The battery swap dispatching system includes a server, multiple battery swap stations, all controlled vehicles under the control of the server, and a database. The database is used to store and maintain relevant data of the battery swap station and relevant data of the controlled vehicles.
[0032] Furthermore, the battery swap scheduling method and device for multiple vehicles and multiple stations provided in this application are applied to multiple vehicles and multiple stations to simultaneously recommend battery swaps for multiple vehicles from multiple battery swap stations. It should be noted that the multi-vehicle and multi-station scenarios can be closed scenarios (such as mining areas, factories, large logistics parks, etc.), urban distribution scenarios (such as urban express delivery, instant delivery lights) and trunk logistics scenarios.
[0033] It is understandable that different scenarios have different battery swapping requirements. For example, in closed scenarios, due to limited space and high vehicle operation density, the demand for battery swapping is concentrated and frequent, resulting in vehicle congestion and low battery swapping efficiency, which seriously affects operational efficiency and costs. In closed scenarios, users are more sensitive to battery swapping time. In urban distribution scenarios, urban traffic conditions are complex, and congestion often occurs during transportation and battery swapping, so the timeliness of transportation needs to be guaranteed. In trunk logistics scenarios, due to long-distance transportation, users often face "power anxiety" and worry that the vehicle will break down due to exhaustion. Therefore, the vehicle's endurance and the layout of battery swapping facilities are key considerations.
[0034] The method provided in this embodiment is introduced below:
[0035] Specifically, the server counts all vehicles in the scheduling domain based on the battery replacement request periodically triggered by the upper-level scheduling system, and for each vehicle in the scheduling domain, selects the reachable sites of the vehicle from various sites in the scheduling domain.
[0036] Among them, the scheduling domain of the server refers to the regional scope under the control of the server. It can be understood that different servers manage different scheduling domains. The regional scope involved in the scheduling domain is set according to actual needs. In this embodiment, it is not limited.
[0037] Optionally, in a possible implementation, the specific step of selecting the reachable sites of the vehicle from the sites in the scheduling domain may include:
[0038] (1) Calculate the distance between the vehicle and each station in the dispatching domain.
[0039] Specifically, the distance between the vehicle and each station can be obtained through the vehicle's onboard positioning device (such as GPS, etc.). For example, in a possible implementation, the API (Application Programming Interface) provided by the map software or navigation software can be called to obtain the current longitude and latitude coordinates of the vehicle and the longitude and latitude coordinates of each station in the dispatching domain through the API, and then the distance calculation formula is used to calculate the distance between the vehicle and each station.
[0040] It should be noted that the specific process of distance calculation can be found in the description of the relevant technology and will not be repeated here.
[0041] In addition, in a possible implementation, the longitude and latitude coordinates of all stations in the dispatch domain may be stored in a database in advance, and when calculating the distance between the vehicle and each station in the dispatch domain, the longitude and latitude coordinates of each station may be directly searched from the database.
[0042] (2) Determine the vehicle’s range at its current power level.
[0043] Specifically, the cruising range of the vehicle at the current power level refers to the maximum distance that the vehicle can travel at the current power level. Optionally, in a possible implementation, the current power level of the vehicle can be represented by the SOC (State of Charge) of the vehicle, where the SOC of the vehicle refers to the state of charge of the battery, that is, the percentage of the current remaining power of the battery to the total capacity of the battery.
[0044] In a specific implementation, in one possible implementation method, in this step, the driving data of the vehicle can be input into a pre-trained range prediction model, so that the range prediction model can output the vehicle's power consumption per kilometer. Furthermore, the product of the vehicle's current power and the total battery power is calculated to obtain the vehicle's current actual available power, thereby determining the ratio of the vehicle's actual available power to the power consumption per kilometer as the vehicle's range at the current power.
[0045] It should be noted that the range prediction model is pre-trained. For example, in one possible implementation, the driving data of all vehicles in the database is used as a training set to train the range prediction model so that the range prediction model learns the relationship between power consumption and driving mileage, and obtains a trained range prediction model, the input of which is the current power of the vehicle, and the output is the power consumption per kilometer of the vehicle.
[0046] (3) Based on the cruising range and the distance between the vehicle and each station, select the stations that the vehicle can reach before the battery is exhausted from the stations in the scheduling domain, and determine the selected stations as reachable stations for the vehicle.
[0047] Specifically, after determining the cruising range of the vehicle, the cruising range of the vehicle is compared with the distance between the vehicle and each station. If the cruising range of the vehicle is less than or equal to the distance between the vehicle and a station, it means that the vehicle can reach the station before the battery is exhausted, and the station is the reachable station of the vehicle. If the cruising range of the vehicle is greater than the distance between the vehicle and a station, it means that the vehicle cannot reach the station before the battery is exhausted, and the station is an unreachable station. In this way, the reachable station of the vehicle can be determined.
[0048] S102. For each reachable site of each first-category vehicle, determine the battery that the reachable site can provide for the first-category vehicle, and determine a list consisting of identifiers of batteries that can be provided for the first-category vehicle in all reachable sites of the first-category vehicle and preset identifiers as a list of available batteries for the first-category vehicle; wherein the first-category vehicle is a vehicle with multiple reachable sites; and the preset identifier is used to represent the option of not allocating a battery.
[0049] Specifically, for the convenience of distinction, vehicles with multiple reachable sites are recorded as first-category vehicles. In this step, for each reachable site of each first-category vehicle, the battery that the reachable site can provide for the first-category vehicle is determined, that is, the available battery that the reachable site can provide for the first-category vehicle.
[0050] It should be noted that the available battery refers to a battery that has been charged and can be used directly by the vehicle after the vehicle reaches a reachable site. It can be understood that the available batteries include the first type of batteries that are ready at each reachable site at the current moment and the second type of batteries that are not ready at the current moment but will be ready when the first type of vehicle arrives at the reachable site.
[0051] Furthermore, after determining the batteries that each reachable site can provide for the first category of vehicles, a list consisting of the identifiers of the batteries that can be provided for the first category of vehicles in all reachable sites of the first category of vehicles and preset identifiers can be determined as a list of available batteries for the first category of vehicles. It should be noted that the battery identifier is used to distinguish different batteries. The battery identifier can be a code, name, or number, etc. For example, in one possible implementation, identifiers such as "Battery_1" and "Battery_2" are used to represent different batteries. Furthermore, the preset identifier is used to represent the option of not allocating a battery. For example, in one possible implementation, the preset identifier can be represented by an identifier such as "N".
[0052] It should be noted that when constructing an available battery list for the first type of vehicle, if some of the reachable sites of all reachable sites of the first type of vehicle do not have available batteries, the reachable sites without available batteries will be deleted and will not appear in the available battery list.
[0053] For example, in one embodiment, a first-class vehicle, denoted as vehicle 1, has two reachable sites. For the convenience of explanation, these two reachable sites are respectively denoted as reachable site A and reachable site B. Among them, the batteries that reachable site A can provide for the first-class vehicle are: Battery_A1, Battery_A5, Battery_A9; the batteries that reachable site B can provide for the first-class vehicle are: Battery_B2, Battery_B4, Battery_B5, then the list of available batteries for the first-class vehicle is: [N, Battery_A1, Battery_A5, Battery_A9, Battery_B2, Battery_B4, Battery_B5].
[0054] S103. Based on a genetic algorithm, with the goal of maximizing global fitness, a target optimization problem is constructed with the first constraint that each first-class vehicle can only select one option from the list of available batteries for the first-class vehicle, and the second constraint that each first-class vehicle cannot select the same battery; wherein, the target optimization problem stipulates the use of a set of arrays as an individual encoding method, each position of the set of arrays represents a first-class vehicle, and the value of each position represents the selection result of the vehicle; when the value of each position represents a real battery, the fitness value of the position is a fitness value that comprehensively considers the distance from the vehicle to the site, the battery replacement cost, and the travel time; when the value of each position is that no battery option is allocated, the fitness value of the position is equal to a preset value, and the preset value is a negative number; the fitness of each individual is equal to the sum of the fitness values of each position; the global fitness is equal to the maximum value of the fitness values of all individuals contained in the population.
[0055] Specifically, the genetic algorithm is a random search algorithm that simulates the biological evolution process. It searches for the optimal solution in the solution space by simulating mechanisms such as natural selection and genetic variation. In this step, the target optimization problem is constructed with the goal of maximizing global fitness. The target optimization problem is solved based on the genetic algorithm, which can effectively find the optimal vehicle battery allocation plan (optimal solution) under given constraints.
[0056] For example, in one possible implementation, there are M vehicles (e.g., M=5), each vehicle has a list of available batteries, and the objective optimization problem constructed can be:
[0057] The first constraint is: each vehicle selects one battery from the list of available batteries;
[0058] The second constraint is that each vehicle cannot use the same battery;
[0059] The problem to be optimized is: find a set of options that optimally matches the battery and the vehicle.
[0060] It can be understood that by setting the first constraint and the second constraint, it can be ensured that the selection of the first type of vehicle is carried out within a reasonable range, avoiding the situation of selecting an unavailable battery or exceeding its selectable range. In addition, the second constraint ensures the reasonable allocation of battery resources, ensuring that each first type of vehicle has an independent battery selection, avoiding resource competition and conflict.
[0061] It is understandable that in the genetic algorithm, each individual represents a possible solution, that is, a set of vehicle-battery pairing solutions. In this embodiment, the target optimization problem stipulates the use of a set of arrays as the individual encoding method, each position in the array represents a first-class vehicle, and the value at each position represents the selection result of the vehicle.
[0062] For example, in one embodiment, assuming that there are 5 first-class cars, a certain individual is: [battery_1, battery_3, battery_2, battery_4, battery_5], which can mean that the first car selects battery_1, the second car selects battery_3, the third car selects battery_2, and so on. At this time, the encoding method of the individual can be: [0,1, 2, 1, 0]; the numbers in it represent the index position of the battery selected by each car in the list of available batteries.
[0063] It can be understood that the optimization goal of the target optimization problem is to maximize the global fitness, where the global fitness is the maximum value of the fitness of all individuals included in the population, and the individual refers to a vehicle battery allocation scheme represented by a set of arrays, that is, a solution in the target optimization problem.
[0064] The fitness of each individual is equal to the sum of the fitness values of each position in each individual. In this embodiment, when the value at each position is a real battery (battery identifier), the fitness value of the position is a fitness value that comprehensively considers the distance from the vehicle to the station, the battery replacement cost, and the travel time, and when the value at each position is no battery option (preset identifier), the fitness value of the position is equal to the preset value, which is a negative number.
[0065] It should be noted that in a possible implementation, when the fitness value is a fitness value that comprehensively considers the distance from the vehicle to the station, the battery replacement cost, and the travel time, the closer the distance from the vehicle to the accessible station, the higher the fitness value, the lower the battery replacement cost, the higher the fitness value, and the shorter the travel time, the higher the fitness value. For example, in a possible implementation, at this time, the fitness value of the location can be calculated according to the following formula:
[0066] ;
[0067] in, is the fitness value considering the distance from the vehicle to the site;
[0068] is the fitness value considering the cost of battery replacement;
[0069] is the fitness value considering the travel time.
[0070] It should be noted that the preset value is set according to actual needs and is not limited in this embodiment. For example, in one embodiment, the preset value is -1000.
[0071] Combined with the above description, for example, in a possible implementation, there are three first-category vehicles. For the convenience of description, the three first-category vehicles are respectively recorded as: vehicle 1, vehicle 2 and vehicle 3. Furthermore, the available battery lists of the three first-category vehicles are respectively:
[0072] Car 1: [N, Battery_A1, Battery_A5, Battery_A9, Battery_B2, Battery_B4, Battery_B5];
[0073] Car 2: [N, Battery_A3, Battery_A5, Battery_A7, Battery_B1, Battery_B3, Battery_B4];
[0074] Car 3: [N, Battery_A1, Battery_A3, Battery_A5, Battery_B1, Battery_B4, Battery_B6].
[0075] For the three first-category vehicles, batteries are selected from their corresponding available battery lists respectively. Different choices constitute different individuals. In a possible implementation, an individual is encoded as [0, 1, 3], which represents a selection result of the three first-category vehicles; wherein 0 indicates that the 0th index position (N) in its available battery list is selected for vehicle 1, that is, the vehicle chooses not to allocate a battery option; 1 indicates that the 1st index position (Battery_A3) in its available battery list is selected for vehicle 2, that is, Battery_A3 is allocated to vehicle 2; 2 indicates that the 2nd index position (Battery_A5) in its available battery list is selected for vehicle 3, that is, Battery_A5 is allocated to vehicle 3.
[0076] Furthermore, assuming that the fitness values corresponding to Battery_A3 and Battery_A5 are 3 and 4 respectively, then the fitness of the individual is -1000+3+4=-993.
[0077] It is understandable that in actual application scenarios, there is a situation where the battery supply is insufficient. In this scenario, no matter whether it is the optimal allocation scheme or not, there will always be vehicles that cannot get battery allocation. The method provided in this implementation adds an option of not allocating batteries to the list of available batteries, and when a position of an individual is an option of not allocating batteries, the fitness of the position is set to a negative number. In this way, it can be ensured that when an individual is fully paired (that is, the value at each position of the individual is a real battery), the fitness value of the individual is always positive, and when an individual includes an option of not allocating batteries, the fitness value of the individual is always negative. At this time, the individual will be quickly eliminated. At the same time, when all individuals include the option of not allocating batteries (corresponding to the scenario of insufficient battery supply), they can still be screened and evolved by comparing their fitness. In this way, regardless of whether the battery supply is sufficient, the optimal scheduling scheme can be obtained by the method provided in this embodiment.
[0078] S104. Utilize the genetic algorithm to find the optimal solution to the target optimization problem, and recommend a replacement battery for each first-class vehicle based on the optimal solution; wherein each position of the optimal solution represents a first-class vehicle, and the value of each position represents a replacement battery recommended for the first-class vehicle.
[0079] Specifically, in a possible implementation, using the genetic algorithm to solve the optimal solution of the target optimization problem specifically includes:
[0080] (1) In each round of iteration, after mutation, it is determined whether each mutated individual is a damaged individual that does not satisfy the second constraint condition.
[0081] Specifically, iteration refers to the process of a complete update and optimization operation of the genetic algorithm. Each round of iteration mainly includes: fitness evaluation, selection operation, crossover operation, mutation operation and population update. The following takes the initial population iteration as an example to illustrate the iterative process of the genetic algorithm:
[0082] First, an initial population needs to be generated, which includes multiple randomly generated individuals, each of which satisfies the first constraint and the second constraint. For the convenience of explanation, each individual in the initial population is recorded as a parent individual. In a possible implementation, the initial population contains K individuals, and these K individuals are recorded as parent individual 1, parent individual 2, ..., parent individual K respectively.
[0083] 1. Evaluate fitness: Perform fitness evaluation on each individual in the initial population, and calculate the fitness value of each individual based on the above description.
[0084] 2. Selection operation: select some parent individuals from the initial population according to the fitness value to generate the next generation of individuals. Commonly used selection methods include roulette selection, tournament selection, etc. The purpose of selection is to give individuals with higher fitness a greater chance of being selected to generate the next generation of individuals with higher fitness.
[0085] 3. Crossover operation: Perform a crossover operation on the selected parent individuals, and generate new offspring individuals by combining partial chromosomes of any two parent individuals among multiple parent individuals. It should be noted that the chromosome of an individual refers to the value of each position in the individual, and the value of one position corresponds to one chromosome.
[0086] In specific implementation, the crossover operation can be performed by single-point crossover, double-point crossover or uniform crossover. In one possible implementation, single-point crossover is used, parent individual 1 = [0, 1, 2, 3], parent individual 2 = [2, 3,1, 0], a position is randomly selected from the chromosome of the parent individual, the chromosome before the position is inherited from parent individual 1, and the chromosome after the position is inherited from parent individual 2. For example, crossover is performed at position 1, and the generated offspring individual is [0, 3,1, 0] or [2, 1, 2, 3].
[0087] 4. Mutation operation: Perform a mutation operation on the selected parent individual, randomly select one or more positions from the individual's chromosome sequence, and randomly change the values at these positions to generate new offspring individuals.
[0088] In specific implementation, mutation operations can be performed by single-point mutation, double-point mutation, or random reselection. For example, in one possible implementation, a single-point mutation is used to randomly select a position of the parent individual and change the battery at that position to another battery in the list of available batteries for the vehicle. For example, if the parent individual 1 = [0, 1, 2, 3], after single-point mutation, the child individuals that may be generated are [0, 1, 6, 3].
[0089] 5. Update the population: Replace some individuals in the initial population with newly generated offspring individuals to form a new population and prepare for the next round of iteration.
[0090] In this way, through rounds of iterations, the genetic algorithm continuously optimizes the individuals in the population, gradually improves the global fitness, and moves towards the goal of finding the optimal vehicle battery allocation solution. After the termination condition is met, the iteration stops. It should be noted that the termination condition is set according to actual needs and is not limited in this embodiment. For example, in one embodiment, the termination condition is to reach a preset number of iterations. For another example, in another embodiment, the termination condition is that the global fitness value is no longer significantly improved.
[0091] In this step, in each round of iteration, after the mutation operation, it is determined whether each mutated individual is an individual that does not satisfy the second constraint condition. For the convenience of distinction, the individuals that do not satisfy the second constraint condition are recorded as damaged individuals.
[0092] (2) If yes, for the damaged individual, traverse the chromosomes in the damaged individual in random order, and for the target chromosome currently traversed, determine whether the target chromosome conflicts with the traversed chromosome.
[0093] Specifically, if the mutated individual is a damaged individual, for the damaged individual, the chromosomes in the damaged individual are traversed in random order. When traversing to each chromosome, the target chromosome is compared with other chromosomes that have been traversed to determine whether there is a chromosome that is the same as the target chromosome. If so, it is determined that the two are in conflict. It should be noted that the chromosome refers to the selection result of each first-class vehicle. In addition, the purpose of traversing the chromosomes in the damaged individual in random order is to find the identification of the same battery selected by any two or more first-class vehicles in the damaged individual.
[0094] (3) If yes, for the target chromosome, select a battery from the available battery list corresponding to the target chromosome that does not conflict with the traversed chromosome as the mutated chromosome.
[0095] Specifically, if it is found that the target chromosome in the damaged individual conflicts with the traversed chromosome, a battery that does not conflict with the traversed chromosome is selected from the list of available batteries corresponding to the target chromosome as the mutated chromosome. It can be understood that after a conflicting chromosome appears in the damaged individual, the currently traversed chromosome is used as the target chromosome, and the target chromosome represents the battery selection result of a first-class vehicle. Therefore, when the battery selection of the first-class vehicle conflicts with the battery selection of other first-class vehicles, a battery that does not conflict with the traversed chromosome can be selected from the list of available batteries corresponding to the first-class vehicle as the battery selection result of the first-class vehicle, that is, the mutated chromosome.
[0096] The battery swap scheduling method for multiple vehicles and multiple stations provided in this embodiment, for each vehicle in the scheduling domain, screens out the reachable stations of the vehicle from each station in the scheduling domain, and then for each reachable station of each first-class vehicle with multiple reachable stations, determines the battery that the reachable station can provide for the first-class vehicle, and determines a list consisting of the identifiers of the batteries that can be provided for the first-class vehicle in all reachable stations of the first-class vehicle and a preset identifier for representing the option of not allocating batteries as the list of available batteries for the first-class vehicle, thereby maximizing the global fitness based on the genetic algorithm, with the goal of maximizing the global fitness, and with the goal of each first-class vehicle can only be provided from the The target optimization problem is constructed by selecting an option from the available battery list as the first constraint condition and each first-class vehicle cannot select the same battery as the second constraint condition, and the genetic algorithm is used to solve the optimal solution of the target optimization problem, and then a replacement battery is recommended for each first-class vehicle according to the optimal solution; wherein, the target optimization problem stipulates the use of a set of arrays as an individual encoding method, each position of the set of arrays represents a first-class vehicle, and the value of each position represents the selection result of the vehicle; when the value of each position represents a real battery, the fitness value of the position is a fitness value that comprehensively considers the distance from the vehicle to the site, the battery replacement cost, and the travel time , when the value of each position is the non-allocated battery option, the fitness value of the position is equal to the preset value, which is a negative number; the fitness of each individual is equal to the sum of the fitness values of each position; the global fitness is equal to the maximum value of the fitness values of all individuals contained in the population, so that, on the first hand, by determining the first type of vehicle and the list of available batteries for the first type of vehicle, and then searching for a scheduling solution based on a genetic algorithm, the optimal scheduling solution can be quickly found in a larger solution space; on the second hand, by adding a preset identifier for representing the non-allocated battery option in the available battery list, and assigning the preset identifier to the battery option at a certain position of a certain individual, When the mark is preset, the fitness value of the position is set to a negative number. In this way, the server can adjust the scheduling strategy according to dynamic factors such as actual battery inventory, site busyness, vehicle demand, etc. to meet the actual conditions at different times and different sites, enhance adaptability, and ensure the smooth and efficient operation of the scheduling system. Thirdly, in the scheduling plan, multiple factors such as arrival distance, battery replacement cost and time are comprehensively considered, so that vehicles are no longer blind when choosing sites, and can complete battery replacement in the shortest time, reducing queuing and waiting time, and improving the operating efficiency of electric vehicles. In addition, an efficient battery replacement experience can further enhance user satisfaction.
[0097] Figure 3 This is a flowchart of the second embodiment of the battery swap scheduling method for multiple vehicles and multiple stations provided in this application. Please refer to Figure 3 Based on the above embodiment, the step of recommending a replacement battery for each first-category vehicle according to the optimal solution includes:
[0098] S301. For each first-category vehicle, determine whether the target station where the battery replacement recommended for the first-category vehicle is located supports reservation.
[0099] S302. If so, generate a reservation order based on the identification of the first type of vehicle and the identification of the battery replacement battery, and send the reservation order to the first type of vehicle and the target site, so that when the target site receives the reservation order, it locks and reserves the battery replacement battery for the first type of vehicle, and allows the first type of vehicle to go to the target site to exchange the battery replacement battery.
[0100] S303. If not, send the identification of the battery replacement battery to the first type of vehicle, so that the first type of vehicle goes to the target site to replace the battery replacement battery.
[0101] It should be noted that whether the battery swap site supports reservation is set in advance by the battery swap site according to actual needs. For example, in one possible implementation, the battery swap site may only provide the reservation function if an agreement is reached in advance that the battery swap site allows the server to lock the battery.
[0102] Specifically, in step S301, it is determined whether the target site where the battery replacement recommended for each first-class vehicle is located supports reservations. If the target site supports reservations, a reservation order is generated based on the identification of each first-class vehicle and the identification of the corresponding battery replacement battery. For example, in one possible implementation, the reservation order may carry the identification of the first-class vehicle and the identification of the battery replacement battery. Of course, in a specific implementation, the reservation order may also carry the identification information of the target site.
[0103] It should be noted that the identification of the first type of vehicle can be a digital number, an alphabetical number or a mixed code, and the identification of the swap battery can be the model of the battery, the number of the swap battery in the swap station, etc., which is not limited in this embodiment.
[0104] In specific implementation, for example, in one possible implementation, the first type of vehicle is identified as S003B001, the battery swap battery is identified as Battery_A3, and the target site where the battery swap battery is located supports reservations. At this time, the generated reservation order can be: Please lock the Battery_A3 battery for vehicle S003B001, indicating that the first type of vehicle S003B001 will go to battery swap station A and use the battery numbered 3 in battery swap station A for battery swap.
[0105] Furthermore, after the reservation order is generated, the generated reservation order is sent to the first type of vehicle and the target site corresponding to the vehicle respectively. In this way, the owner of the first type of vehicle can obtain the location information of the target site based on the reservation order, and go to the target site to replace the battery of the vehicle. In addition, when the target site receives the reservation order, it can lock the battery replacement battery according to the identification of the battery replacement battery in the reservation order to reserve the battery for the first type of vehicle in the reservation order.
[0106] Further, in step S303, if the target site does not support reservation, then the identification of the battery replacement is directly sent to the first type of vehicle, so that the owner of the first type of vehicle can go to the target site for battery replacement according to the identification of the battery replacement.
[0107] The method provided in this embodiment recommends a battery replacement for each first-category vehicle according to the optimal solution. For each first-category vehicle, it is determined whether the target site where the battery replacement recommended for the first-category vehicle is located supports reservations. If reservations are supported, a reservation order is generated based on the identifier of the first-category vehicle and the identifier of the battery replacement battery, and the reservation order is sent to the first-category vehicle and the target site, so that when the target site receives the reservation order, it locks and reserves the battery replacement for the first-category vehicle, and enables the first-category vehicle to exchange the battery for the target site. If reservations are not supported, the identifier of the battery replacement battery is sent to the first-category vehicle, so that the first-category vehicle can exchange the battery for the target site. Replace the battery; in this way, when the target site supports reservations, by generating and sending a reservation order, the specified battery resources can be locked in advance for the vehicle to ensure that the battery can be quickly replaced when the vehicle arrives, which can reduce the time the vehicle waits for the battery and improve the vehicle's operating efficiency; in addition, the reservation mechanism can effectively reduce the competition for the same battery resources among vehicles during peak periods, reduce site resource conflicts, and ensure the orderliness of resource allocation; further, the introduction of the reservation mechanism can reduce vehicle uncertainty and ensure that users can obtain battery replacement services after arriving at the site without being forced to wait or find other sites due to insufficient resources. This can improve user satisfaction with the battery replacement service and enhance user trust in the system.
[0108] Figure 4 This is a flowchart of the third embodiment of the battery swap scheduling method for multiple vehicles and multiple stations provided in this application. Please refer to Figure 4 Based on the above embodiment, for each reachable site of each first-category vehicle, determining the battery that the reachable site can provide for the first-category vehicle includes:
[0109] S401, determining the travel time for the first type of vehicle to reach the accessible site.
[0110] Specifically, in a possible implementation method, the travel time can be calculated based on the distance between the first-class vehicle and the reachable site and the average driving speed of the first-class vehicle. In addition, map navigation software can be used to input the location of the first-class vehicle and the reachable site into the map navigation software to obtain the estimated travel time.
[0111] S402. Determine the ready time of each battery in the reachable site, and determine the readiness information of each battery in the reachable site when the first type of vehicle arrives based on the ready time of each battery in the reachable site and the travel time of the first type of vehicle to the reachable site; wherein the ready information includes ready and not ready.
[0112] Specifically, in a possible implementation, for each battery in the reachable site, the ready time of the battery may be determined according to the following method:
[0113] (1) For a first type of battery that is ready in the reachable site, the ready time of the first type of battery is determined as the current time.
[0114] (2) For the second type of battery that is not ready in the reachable site, a first function of the battery power changing with time during the charging process in the battery dimension and a second function of the battery power changing with time during the charging process in the site dimension are fitted according to the charging records of the second type of battery in the first specified time period before the current moment and the charging records of the reachable site in the second specified time period before the current moment.
[0115] (3) Determine a first charge amount per unit time in a battery dimension by using the first function, and determine a second charge amount per unit time in a site dimension by using the second function.
[0116] (4) Performing weighted processing on the first charge amount and the second charge amount according to the first weight of the second type of battery at the current moment and the second weight of the reachable site at the current moment to obtain a weighted charge amount per unit time.
[0117] (5) Determine the charging time of the second type of battery according to the weighted charge amount, the current charge of the second type of battery, and the preset ready charge, and determine the ready time of the second type of battery as the time reached after the charging time has elapsed from the current time.
[0118] Specifically, the ready moment of a battery refers to the time point when the battery has completed charging and reaches a usable state. It is understandable that for each reachable site, there are ready batteries and unready batteries, wherein a ready battery refers to a battery that meets a preset ready condition, and an unready battery refers to a battery that does not meet the preset ready condition. It should be noted that the preset ready condition is set according to actual needs and is not limited in this embodiment. For example, in one embodiment, the preset ready condition is that when the battery power reaches 95% of the total power, the battery is a ready battery.
[0119] Furthermore, for the first type of battery that is ready in the reachable site, the battery has met the preset readiness condition at the current moment and can be used. At this time, the current moment is determined as the ready moment of the first type of battery.
[0120] Furthermore, for the second type of battery that is not ready in the reachable site, the battery does not meet the preset readiness condition at the current moment and cannot be used. At this time, the charging time of the second type of battery can be predicted, and the moment after the charging time is exceeded from the current moment can be confirmed as the ready moment of the second type of battery.
[0121] Furthermore, in predicting the charging time of the second type of battery, for the second type of battery in the reachable site, a first function of the battery power changing with time during the charging process in the battery dimension can be fitted according to the charging record of the second type of battery in the first specified time period before the current moment, and a second function of the battery power changing with time during the charging process in the site dimension can be fitted according to the charging record of the reachable site in the second specified time period before the current moment, and the first function is used to determine the first charging amount per unit time in the battery dimension, and the second function is used to determine the second charging amount per unit time in the site dimension, and then the first charging amount and the second charging amount are weighted according to the first weight of the second type of battery at the current moment and the second weight of the reachable site at the current moment to obtain the weighted charging amount per unit time, and the charging time of the second type of battery is determined according to the weighted charging amount, the current power of the second type of battery, and the preset ready power.
[0122] The first function starts from the second type of battery itself, reflects the relationship between the battery power and the time change during charging, and the first function can represent the charging performance of the second type of battery. Furthermore, the second function starts from the reachable site, reflects the relationship between the battery power and the time change during charging, and the second function can represent the charging performance of the reachable site.
[0123] It should be noted that the charging records of the second type of batteries may include information such as the start time of charging, the initial power during charging, the power at each moment during the charging process, and the end power at the end of charging; further, the charging records of the accessible sites may include the charging activity information of all batteries in the battery swap station, and the charging activity information may include information such as the start time of charging, the end time of charging, the battery charging mode, and the power at different moments during the charging process.
[0124] In specific implementation, the moment in the charging process and the battery power corresponding to the moment can be used as a set of data pairs, and the functional relationship of the battery power changing with time during the charging process can be fitted by constructing multiple sets of data pairs.
[0125] For example, when fitting the first function, multiple data pairs can be obtained through the charging records of the second type of battery in the past 7 days, and further, the first function of the battery power changing over time during the charging process under the battery dimension can be fitted through these multiple data pairs. For another example, when fitting the second function, multiple data pairs can be obtained through the charging records of the reachable sites in the past 4 days, and further, the second function of the battery power changing over time during the charging process under the site dimension can be fitted through these multiple data pairs.
[0126] Specifically, the rate of change of the battery power over time in the first function, that is, the increase in the battery power per unit time, can be obtained by deriving the first function. For the convenience of explanation, the increase in the battery power in the battery dimension is recorded as the first charge amount. Similarly, the rate of change of the battery power over time in the second function, that is, the increase in the battery power per unit time, can be obtained by deriving the second function. For the convenience of explanation, the increase in the battery power in the site dimension is recorded as the second charge amount.
[0127] Furthermore, the first charge amount and the second charge amount may be weighted by the following formula:
[0128] ;
[0129] Where T is the weighted charge per unit time;
[0130] is the first weight;
[0131] is the second weight;
[0132] is a first charge amount;
[0133] is the second charge amount.
[0134] It should be noted that the first weight and the second weight may be fixed, that is, the first weight and the second weight are fixed values preset in advance. Specifically, when the first weight and the second weight are fixed, the specific values of the first weight and the second weight are set according to actual needs, and are not limited in this embodiment. For example, in one possible implementation, the first weight and the second weight are the same, and the first weight and the second weight are both 0.5. For another example, in another possible implementation, the first weight is 0.3 and the second weight is 0.7. In addition, the first weight and the second weight can also be dynamically updated.
[0135] Specifically, after obtaining the weighted charge capacity, the difference between the preset ready power and the current power of the second type battery can be calculated, and then the ratio of the difference to the weighted charge capacity is determined as the charging time of the second type battery.
[0136] As described above, the preset ready power is set according to actual needs, and is not limited in this embodiment. In specific implementation, for example, in one possible implementation, the current time is 12:00, and the charging time of the second type of battery is 2 hours, then the ready time of the second type of battery is 14:00.
[0137] Furthermore, after the ready time of the battery is determined, the ready information of each battery in the reachable site when the first type of vehicle arrives can be determined based on the ready time of each battery in the reachable site and the travel time of the first type of vehicle to the reachable site.
[0138] Specifically, the time when the first type of vehicle arrives at the reachable site is the time after the current time passes the travel time. If the ready time of the second type of battery is earlier than the arrival time of the first type of vehicle, the ready information of the second type of battery when the first type of vehicle arrives at the reachable site is ready. If the ready time of the second type of battery is later than the arrival time of the first type of vehicle, the ready information of the second type of battery when the first type of vehicle arrives at the reachable site is not ready.
[0139] Referring to the previous description, the method provided in this embodiment, when predicting the charging time, fits the function of the battery charge changing with time during the charging process from the battery dimension and the site dimension respectively. It can simultaneously consider the individual charging behavior of the battery and the overall charging performance of the site, and can combine the individual charging performance of the battery with the overall charging performance of the battery swap station. It can accurately analyze the differences between individual batteries and the overall charging environment, accurately determine the charging amount per unit time, and thus more accurately predict the charging time of the battery.
[0140] S403: According to the readiness information of each battery in the reachable site when the first type of vehicle arrives, determine the battery with the readiness information indicating that it is ready as the battery that the reachable site can provide for the first type of vehicle.
[0141] Furthermore, according to the readiness information of each battery in the accessible station when the first type of vehicle arrives, the battery with the readiness information being ready is determined as the battery that the accessible station can provide for the first type of vehicle. In this way, it can be ensured that the vehicle can use the prepared battery when it arrives at the station, thereby improving the operational efficiency and reliability of the vehicle.
[0142] The method provided in this embodiment determines the travel time for the first type of vehicle to travel to the reachable site, and determines the ready time of each battery in the reachable site, and determines the ready information of each battery in the reachable site when the first type of vehicle arrives based on the ready time of each battery in the reachable site and the travel time for the first type of vehicle to travel to the reachable site, so as to determine the batteries with ready information as ready as the batteries that the reachable site can provide for the first type of vehicle based on the ready information of each battery in the reachable site when the first type of vehicle arrives. In this way, the batteries that each reachable site can provide for the first type of vehicle can be accurately determined, so as to provide accurate data basis for subsequent battery replacement scheduling, so as to further improve the accuracy of battery replacement scheduling.
[0143] Figure 5 This is a flowchart of the fourth embodiment of the battery swap scheduling method for multiple vehicles and multiple stations provided in this application. Please refer to Figure 5 , the method provided by the present application may include:
[0144] S501: For each vehicle in a scheduling domain, select reachable sites of the vehicle from various sites in the scheduling domain.
[0145] The specific implementation process and implementation principle of this step can be found in the description of the related art, which will not be repeated here. Further, if a vehicle has one reachable station, step S502 is executed; if the vehicle has multiple reachable stations, step S503 is executed.
[0146] S502. For a second-category vehicle that has a reachable site, the reachable site of the second-category vehicle is recommended as a recommended battery replacement site to the second-category vehicle.
[0147] Specifically, for the convenience of distinction, a vehicle with one reachable station is recorded as a second-category vehicle. Since the second-category vehicle has only one reachable station, the reachable station is directly recommended to the second-category vehicle as a recommended battery swap station.
[0148] S503. For each reachable site of each first-category vehicle, determine the battery that the reachable site can provide for the first-category vehicle, and determine a list consisting of identifiers of batteries that can be provided for the first-category vehicle in all reachable sites of the first-category vehicle and preset identifiers as a list of available batteries for the first-category vehicle.
[0149] S504. Based on the genetic algorithm, a target optimization problem is constructed with the goal of maximizing global fitness, with each first-category vehicle only being able to select one option from the list of available batteries for the first-category vehicle as a first constraint, and each first-category vehicle not being able to select the same battery as a second constraint.
[0150] Specifically, the specific implementation principle and implementation process of steps S503 to S504 can be found in the description of the relevant technology, which will not be repeated here.
[0151] S505. Utilize the genetic algorithm to find the optimal solution to the target optimization problem, and recommend a replacement battery for each first-category vehicle based on the optimal solution.
[0152] Optionally, when recommending battery replacement for each first-category vehicle according to the optimal solution, for a specific first-category vehicle for which the recommended battery replacement is not assigned a battery option, a reachable site is selected from the reachable sites of the specific first-category vehicle as the recommended battery replacement site for the specific first-category vehicle. Specifically, a reachable site can be randomly selected from the reachable sites of the specific first-category vehicle as the recommended battery replacement site.
[0153] Optionally, selecting a reachable site from the reachable sites of the specific first-category vehicle as a recommended battery swap site for the specific first-category vehicle includes:
[0154] (1) All reachable sites are sorted according to at least one of the following information: the distance between the specific first-class vehicle and each reachable site and the number of ready batteries that each reachable site is expected to have when the first-class vehicle arrives, to obtain a sorting result.
[0155] (2) According to the ranking result, a reachable station is selected from all reachable stations for the specific first-category vehicle as a recommended battery replacement station for the specific first-category vehicle.
[0156] For example, in one possible implementation, a reachable site is selected from the reachable sites of the specific first-class vehicle according to the number of ready batteries in the reachable sites of the specific first-class vehicle, the reachable sites of the specific first-class vehicle are sorted according to the number of ready batteries in each reachable site, and the reachable site with the largest number of ready batteries is selected from the sorting results as the recommended battery replacement site for the specific first-class vehicle.
[0157] For example, all reachable stations can be comprehensively ranked according to the distance between the specific first-class vehicle and each reachable station, and the number of ready batteries that each reachable station is expected to have when the first-class vehicle arrives, to obtain a comprehensive ranking result, and then the top-ranked reachable station is selected from the comprehensive ranking result as the recommended battery replacement station for the specific first-class vehicle.
[0158] The method provided in this embodiment is to screen out the reachable sites of the vehicle from each site in the scheduling domain for each vehicle in the scheduling domain. Vehicles with multiple reachable sites are recorded as first-class vehicles, and vehicles with one reachable site are recorded as second-class vehicles. For second-class vehicles, the reachable sites of the second-class vehicles are recommended to the second-class vehicles as recommended battery replacement sites; for first-class vehicles, determine the batteries that can be provided for the first-class vehicles by each reachable site of each first-class vehicle, and determine the list consisting of the identifiers and preset identifiers of the batteries that can be provided for the first-class vehicles in all reachable sites of the first-class vehicles as the list of available batteries for the first-class vehicles. Based on the genetic algorithm, with the goal of maximizing global fitness, the target optimization problem is constructed with the first constraint that each first-class vehicle can only select one option from the list of available batteries for the first-class vehicle and the second constraint that each first-class vehicle cannot select the same battery. Then, the genetic algorithm is used to solve the optimal solution of the target optimization problem, and a battery replacement battery is recommended for each first-class vehicle based on the optimal solution. When recommending battery replacement for each first-class vehicle according to the optimal solution, for a specific first-class vehicle whose recommended battery replacement is a non-allocated battery option, select one accessible site from the accessible sites of the specific first-class vehicle as the recommended battery replacement site for the specific first-class vehicle. In this way, when the available batteries are insufficient or the global resource allocation needs to be optimized, other battery replacement sites can be provided for certain first-class vehicles recommended as "non-allocated batteries", which can ensure that when the vehicle needs to replace the battery but has not been allocated a battery, it can still obtain the system recommendation to go to a suitable accessible site for battery replacement, which can improve the operating efficiency of electric vehicles; in addition, the efficient battery replacement experience can further improve user satisfaction.
[0159] Corresponding to the aforementioned embodiment of a battery swap scheduling method for multiple vehicles and multiple stations, the present application also provides an embodiment of a battery swap scheduling device for multiple vehicles and multiple stations.
[0160] The present application discloses an embodiment of a battery swapping dispatching device for multiple vehicles and multiple stations, which can be applied on a server. The device embodiment can be implemented by software, or by hardware, or by a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, the processor of the server where it is located reads the corresponding computer program instructions in the non-volatile memory into the memory and runs them. From the hardware level, if Figure 6As shown, this is a hardware structure diagram of the server where the battery swap dispatching device for multiple vehicles and multiple stations of this application is located. Figure 6 In addition to the processor, memory, network interface, and non-volatile memory shown, the server where the device is located in the embodiment may also include other hardware according to the actual functions of the battery replacement scheduling device for multiple vehicles and multiple stations, which will not be described in detail.
[0161] Figure 7 This is a structural diagram of the first embodiment of the battery swap dispatching device for multiple vehicles and multiple stations provided by this application. Figure 7 The battery swap scheduling device for multiple vehicles and multiple stations is applied to a server. The device provided in this embodiment includes a screening module 710, a determination module 720 and a recommendation module 730;
[0162] The screening module 710 is used to screen, for each vehicle in the scheduling domain, the reachable sites of the vehicle from the sites in the scheduling domain;
[0163] The determination module 720 is used to determine, for each reachable station of each first-class vehicle, the battery that the reachable station can provide for the first-class vehicle, and determine a list consisting of the identifiers of the batteries that can be provided for the first-class vehicle in all reachable stations of the first-class vehicle and preset identifiers as the list of available batteries for the first-class vehicle; wherein the first-class vehicle is a vehicle with multiple reachable stations; and the preset identifier is used to indicate that no battery option is allocated;
[0164] The recommendation module 730 is used to construct a target optimization problem based on a genetic algorithm with the goal of maximizing global fitness, with each first-class vehicle only being able to select one option from the list of available batteries for the first-class vehicle as a first constraint, and each first-class vehicle not being able to select the same battery as a second constraint; wherein the target optimization problem stipulates the use of a set of arrays as an individual encoding method, each position of the set of arrays representing a first-class vehicle, and the value of each position representing the selection result of the vehicle; when the value of each position represents a real battery, the fitness value of the position is a fitness value that comprehensively considers the distance from the vehicle to the station, the battery replacement cost, and the travel time; when the value of each position is that no battery option is allocated, the fitness value of the position is equal to a preset value, and the preset value is a negative number; the fitness of each individual is equal to the sum of the fitness values of each position; and the global fitness is equal to the maximum value of the fitness values of all individuals contained in the population;
[0165] The recommendation module 730 is also used to use the genetic algorithm to solve the optimal solution of the target optimization problem, and recommend a replacement battery for each first-class vehicle based on the optimal solution; wherein each position of the optimal solution represents a first-class vehicle, and the value of each position represents a replacement battery recommended for the first-class vehicle.
[0166] The device of this embodiment can be used to perform Figure 1 The steps, specific implementation principles and implementation processes of the method embodiment shown are similar and will not be repeated here.
[0167] Please continue to refer to Figure 6 The present application also provides a server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods provided in the first aspect of the present application are implemented.
[0168] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0169] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0170] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A battery swapping scheduling method for multiple vehicles and multiple stations, characterized in that: The battery swap scheduling method for multiple vehicles and multiple stations is applied to a server, and the method includes: For each vehicle in the dispatching domain, select the reachable sites of the vehicle from the sites in the dispatching domain; For each accessible station of each first-category vehicle, determine the battery that the accessible station can provide for the first-category vehicle, and determine a list consisting of the identifiers of the batteries that can be provided for the first-category vehicle in all accessible stations of the first-category vehicle and preset identifiers as the available battery list of the first-category vehicle; wherein the first-category vehicle is a vehicle with multiple reachable stations; and the preset identifier is used to indicate that no battery option is allocated; Based on a genetic algorithm, with the goal of maximizing global fitness, a target optimization problem is constructed with each first-class vehicle only being able to select one option from the list of available batteries for the first-class vehicle as the first constraint condition, and each first-class vehicle not being able to select the same battery as the second constraint condition; wherein, the target optimization problem stipulates the use of a set of arrays as an individual encoding method, each position of the set of arrays represents a first-class vehicle, and the value of each position represents the selection result of the vehicle; when the value of each position represents a real battery, the fitness value of the position is a fitness value that comprehensively considers the distance from the vehicle to the station, the battery replacement cost, and the travel time; when the value of each position is that no battery option is allocated, the fitness value of the position is equal to a preset value, and the preset value is a negative number; the fitness of each individual is equal to the sum of the fitness values of each position; the global fitness is equal to the maximum value of the fitness values of all individuals contained in the population; The genetic algorithm is used to find the optimal solution to the target optimization problem, and a replacement battery is recommended for each first-class vehicle based on the optimal solution; wherein each position of the optimal solution represents a first-class vehicle, and the value of each position represents a replacement battery recommended for the first-class vehicle.
2. The battery swapping scheduling method for multiple vehicles and multiple stations according to claim 1 is characterized in that: When using the genetic algorithm to solve the optimal solution of the target optimization problem, the method further includes: In each round of iteration, after mutation, it is determined whether each mutated individual is a damaged individual that does not satisfy the second constraint condition; If yes, for the damaged individual, traverse the chromosomes in the damaged individual in random order, and for the target chromosome currently traversed, determine whether the target chromosome conflicts with the traversed chromosome; If so, for the target chromosome, a battery that does not conflict with the traversed chromosome is selected from the available battery list corresponding to the target chromosome as the mutated chromosome.
3. The battery swapping dispatching method for multiple vehicles and multiple stations according to claim 1 is characterized in that: After recommending battery replacement for each first-category vehicle according to the optimal solution, the method further includes: For a specific first-category vehicle for which the recommended battery replacement battery is not allocated a battery option, one accessible site is selected from the reachable sites of the specific first-category vehicle as the recommended battery replacement site for the specific first-category vehicle.
4. The method according to claim 1, characterized in that: The recommending a replacement battery for each first-category vehicle according to the optimal solution includes: For each first-category vehicle, determine whether the target station where the battery replacement recommended for the first-category vehicle is located supports reservation; If so, a reservation order is generated according to the identification of the first type of vehicle and the identification of the battery replacement, and the reservation order is sent to the first type of vehicle and the target site, so that when the target site receives the reservation order, it locks and reserves the battery replacement for the first type of vehicle, and allows the first type of vehicle to go to the target site to replace the battery replacement; If not, the identification of the battery replacement is sent to the first type of vehicle, so that the first type of vehicle goes to the target site to replace the battery replacement.
5. The battery swapping dispatching method for multiple vehicles and multiple stations according to claim 1 is characterized in that: The step of determining, for each reachable site of each first-category vehicle, a battery that the reachable site can provide for the first-category vehicle comprises: Determine the travel time for the first-category vehicle to reach the accessible site; For each battery in the reachable site, determine the ready time of the battery, and determine the readiness information of each battery in the reachable site when the first type of vehicle arrives according to the ready time of each battery in the reachable site and the travel time of the first type of vehicle to the reachable site; wherein the readiness information includes ready and not ready; According to the readiness information of each battery in the reachable site when the first type of vehicle arrives, the battery with the readiness information indicating that it is ready is determined as the battery that the reachable site can provide for the first type of vehicle.
6. The method according to claim 5, characterized in that The step of determining the ready time of each battery in the reachable site includes: For the first type of battery that is ready in the reachable site, determine the ready time of the first type of battery as the current time; For the second type of battery that is not ready in the reachable site, fitting a first function of the battery power changing with time during the charging process in the battery dimension and a second function of the battery power changing with time during the charging process in the site dimension according to the charging record of the second type of battery in the first specified time period before the current moment and the charging record of the reachable site in the second specified time period before the current moment respectively; Determine a first charge amount per unit time in a battery dimension by using the first function, and determine a second charge amount per unit time in a site dimension by using the second function; Performing weighted processing on the first charge amount and the second charge amount according to the first weight of the second type of battery at the current moment and the second weight of the reachable site at the current moment, to obtain a weighted charge amount per unit time; The charging time of the second type battery is determined according to the weighted charge amount, the current power of the second type battery, and the preset ready power, and the ready time of the second type battery is determined as the time reached after the charging time from the current time.
7. The battery swapping dispatching method for multiple vehicles and multiple stations according to claim 3 is characterized in that: The selecting a reachable site from the reachable sites of the specific first-category vehicle as the recommended battery swap site for the specific first-category vehicle comprises: Sorting all reachable sites according to at least one of the distances between the specific first-class vehicle and each reachable site and the number of ready batteries that each reachable site is expected to have when the first-class vehicle arrives, to obtain a sorting result; According to the sorting result, a reachable site is selected from all reachable sites for the specific first-category vehicle as the recommended battery replacement site for the specific first-category vehicle.
8. The battery swapping dispatching method for multiple vehicles and multiple stations according to claim 1 is characterized in that: The step of selecting a reachable site for the vehicle from the sites within the scheduling domain includes: Calculating the distance between the vehicle and each station in the dispatching domain; Determine the vehicle's range at the current power level; According to the cruising range and the distance between the vehicle and each station, the stations that the vehicle can reach before the power is exhausted are screened out from the stations in the scheduling domain, and the screened out stations are determined as reachable stations for the vehicle.
9. The battery swapping dispatching method for multiple vehicles and multiple stations according to claim 1 is characterized in that: The method further comprises: For a second-category vehicle that has a reachable site, the reachable site of the second-category vehicle is recommended to the second-category vehicle as a recommended battery replacement site.
10. A battery swap dispatching device for multiple vehicles and multiple stations, characterized in that: The battery swap scheduling device for multiple vehicles and multiple stations is applied to a server, and the device includes a screening module, a determination module and a recommendation module; The screening module is used to screen, for each vehicle in the scheduling domain, the reachable sites of the vehicle from the sites in the scheduling domain; The determination module is used to determine, for each reachable station of each first-category vehicle, the battery that the reachable station can provide for the first-category vehicle, and determine a list consisting of identifiers of batteries that can be provided for the first-category vehicle in all reachable stations of the first-category vehicle and preset identifiers as a list of available batteries for the first-category vehicle; wherein the first-category vehicle is a vehicle with multiple reachable stations; and the preset identifier is used to indicate that no battery option is allocated; The recommendation module is used to construct a target optimization problem based on a genetic algorithm with the goal of maximizing global fitness, with each first-class vehicle only being able to select one option from the list of available batteries for the first-class vehicle as a first constraint, and each first-class vehicle not being able to select the same battery as a second constraint; wherein the target optimization problem stipulates the use of a set of arrays as an individual encoding method, each position of the set of arrays represents a first-class vehicle, and the value of each position represents the selection result of the vehicle; when the value of each position represents a real battery, the fitness value of the position is a fitness value that comprehensively considers the distance from the vehicle to the site, the battery replacement cost, and the travel time; when the value of each position is that no battery option is allocated, the fitness value of the position is equal to a preset value, and the preset value is a negative number; the fitness of each individual is equal to the sum of the fitness values of each position; the global fitness is equal to the maximum value of the fitness values of all individuals contained in the population; The recommendation module is also used to use the genetic algorithm to solve the optimal solution of the target optimization problem, and recommend a replacement battery for each first-class vehicle based on the optimal solution; wherein each position of the optimal solution represents a first-class vehicle, and the value of each position represents a replacement battery recommended for the first-class vehicle.
Citation Information
Patent Citations
Vehicle intelligent battery replacement navigation method and system based on multi-target genetic algorithm
CN115060278A
Intelligent scheduling method and device for charging and battery replacement of electric vehicle
CN116720714A