Genetic algorithm control method and device based on master-slave parallel fusion tabu search

By adopting the method of master-slave parallel fusion taboo search in the genetic algorithm, the problems of slow convergence speed and immature convergence of the genetic algorithm are solved, and a more efficient optimization process is achieved.

CN119940488APending Publication Date: 2025-05-06国投融合科技股份有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510000761.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

Current genetic algorithms have problems of immature convergence and slow convergence speed.

Method used

The genetic algorithm control method based on master-slave parallel fusion taboo search is adopted, and the first solution is distributed to the slave process by the main process to perform parallel calculations of the taboo search algorithm, and the population is updated periodically to ensure diversity.

Benefits of technology

The convergence speed of the genetic algorithm is improved, the problem of immature convergence is avoided, and the overall performance is improved through the local convergence advantages of the taboo search algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940488A_ABST
    Figure CN119940488A_ABST
Patent Text Reader

Abstract

The invention provides a control method and device for a genetic algorithm based on master-slave parallel fusion tabu search. The algorithm applied to a master process comprises the steps that an initial population is randomly generated; the first solution in the population is distributed to a plurality of slave processes, the slave processes are used for conducting iteration according to the received first solution and a tabu search algorithm and periodically feeding back an obtained second solution to the master process, and when the maximum number of iterations is reached, algorithm ending information and the second solution are fed back to the master process; if the second solution is received, but algorithm ending information is not received, updating the population according to a first set formed by the received second solution, and returning to execute the step of distributing the first solution in the population to the plurality of slave processes; and if algorithm ending information is received, acquiring and outputting a globally optimal solution. According to the method, the problem of low convergence speed is solved through parallel calculation and by utilizing the local convergence advantage of the tabu search algorithm. And the population diversity is ensured, and the problem of immature convergence is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data processing, and in particular to a control method and device for a genetic algorithm based on master-slave parallel fusion taboo search. Background Art

[0002] Genetic Algorithm (GA) is an adaptive global optimization probability search algorithm formed by simulating the genetic and evolutionary process of organisms in the natural environment. Its basic idea is to evaluate the quality of the problem solution according to the value of the fitness function to realize the search of the problem solution space. This adaptive global optimization probability search algorithm uses computers to simulate the biological evolution process. It can automatically acquire and accumulate knowledge about the search space during the search process, and adaptively control the search process, so as to quickly search for the optimal solution of the problem in a larger parameter space. As an efficient probability search algorithm, genetic algorithms show unique advantages in solving high-complexity problems such as large space, multi-peaks, nonlinearity and globalization, and have successfully solved many complex practical optimization problems. However, the obvious shortcomings of the current genetic algorithm are mainly the problems of immature convergence and slow convergence speed. Therefore, how to solve this problem has become a research direction for technicians in this field. Summary of the invention

[0003] The technical purpose to be achieved by the embodiments of the present application is to provide a control method and device for a genetic algorithm based on master-slave parallel fusion taboo search, so as to solve the problems of immature convergence and slow convergence speed of current genetic algorithms.

[0004] In order to solve the above technical problems, the embodiment of the present application provides a control method of a genetic algorithm based on master-slave parallel fusion taboo search, which is applied to a master process and includes:

[0005] Randomly generate an initial population, wherein the population has a preset number of first solutions;

[0006] Distribute the first solution in the population to a plurality of slave processes, wherein the first solution corresponds to the slave process one by one, and the slave process is used to iterate according to the received first solution according to the taboo search algorithm, and periodically feed back the obtained second solution to the master process, and feed back algorithm end information and the second solution to the master process when a maximum number of iterations is reached;

[0007] If the second solution is received but the algorithm end information is not received, then the population is updated according to the first set formed by the received second solution, and the step of distributing the first solution in the population to a plurality of slave processes is returned to be executed;

[0008] If the second solution and the algorithm end information are received, a global optimal solution is obtained according to the first set and outputted.

[0009] Specifically, in the control method as described above, updating the population according to the first set formed by the received second solution includes:

[0010] Randomly selecting two of the second solutions from the set as parent solutions;

[0011] Performing a crossover operation or a crossover operation and a mutation operation on the parent solution to obtain two child solutions;

[0012] According to a preset fitness function, obtaining fitness values ​​corresponding to the two child solutions;

[0013] Determine, according to the objective function and the fitness value, one of the two child solutions as a new first solution;

[0014] If the number of the new first solutions reaches the preset number, updating the second set formed by the new first solutions as the population;

[0015] If the number of the new first solutions is less than the preset number, the process returns to executing the step of randomly selecting two second solutions from the second set as parent solutions.

[0016] Optionally, in the control method as described above, updating the population according to the first set constructed from the received second solution includes:

[0017] Randomly select one of the second solutions from the first set as a parent solution;

[0018] Performing a mutation operation on the parent solution to obtain a new first solution;

[0019] If the number of the new first solutions reaches the preset number, updating the second set formed by the new first solutions as the population;

[0020] If the number of the new first solutions is less than the preset number, the process returns to the step of randomly selecting one of the second solutions from the first set as a parent solution.

[0021] Another embodiment of the present application further provides a control method of a genetic algorithm based on master-slave parallel fusion taboo search, which is applied to a slave process and includes:

[0022] According to the first solution sent by the main process, an iteration of the tabu search algorithm is executed to obtain a second solution corresponding to the current iteration;

[0023] If the first iteration number corresponding to the current iteration is less than the preset maximum iteration number, and the first iteration number reaches the second iteration number corresponding to the preset period, the second solution is fed back to the master process, and waiting for receiving a new first solution, the second solution is used to enable the master process to update the population according to the second solution and distribute the new first solution to the slave process;

[0024] If the first iteration number is less than a preset maximum iteration number, and the first iteration number does not reach a second iteration number corresponding to the preset period, performing one iteration of the taboo search algorithm according to the second solution;

[0025] If the number of iterations reaches a preset maximum number of iterations, the second solution and algorithm end information are fed back to the main process, and the taboo search algorithm is terminated. The algorithm end information is used to enable the main process to output a global optimal solution according to the algorithm end information.

[0026] Specifically, in the control method as described above, the step of executing one iteration of the taboo search algorithm includes:

[0027] Generate a neighborhood according to a target solution and a preset neighborhood generation strategy, wherein the target solution is the first solution or the second solution;

[0028] According to the position of the demarcation point, a candidate solution set is obtained from the neighborhood;

[0029] According to the evaluation function and the taboo table, the second solution corresponding to the current iteration is obtained from the candidate solution set, and the demarcation point position and the taboo table are updated.

[0030] Another embodiment of the present application further provides a control device for a genetic algorithm based on master-slave parallel fusion taboo search, which is applied to a main process and includes:

[0031] A population initialization module, used for randomly generating an initial population, wherein the population has a preset number of first solutions;

[0032] a distribution module, used for distributing the first solution in the population to a plurality of slave processes, wherein the first solution corresponds to the slave process one by one, and the slave process is used for iterating according to the taboo search algorithm based on the received first solution, and periodically feeding back the obtained second solution to the master process, and feeding back algorithm end information and the second solution to the master process when a maximum number of iterations is reached;

[0033] A first processing module, configured to update the population according to the first set composed of the received second solutions if the second solution is received but the algorithm end information is not received, and return to execute the step of distributing the first solution in the population to a plurality of slave processes;

[0034] The second processing module is used to obtain and output the global optimal solution according to the first set if the second solution and the algorithm end information are received.

[0035] Another embodiment of the present application further provides a control device for a genetic algorithm based on master-slave parallel fusion taboo search, which is applied to a slave process and includes:

[0036] A third processing module is used to perform one iteration of the tabu search algorithm according to the first solution sent by the main process, and obtain a second solution corresponding to the current iteration;

[0037] a fourth processing module, configured to feed back the second solution to the master process and wait for receiving a new first solution if the first iteration number corresponding to the current iteration is less than a preset maximum iteration number and the first iteration number reaches a second iteration number corresponding to a preset period, wherein the second solution is used to enable the master process to update the population according to the second solution and distribute the new first solution to the slave process;

[0038] a fifth processing module, configured to execute one iteration of the taboo search algorithm according to the second solution if the first iteration number is less than a preset maximum iteration number and the first iteration number does not reach a second iteration number corresponding to the preset period;

[0039] The sixth processing module is used to feed back the second solution and algorithm end information to the main process and terminate the taboo search algorithm if the number of iterations reaches a preset maximum number of iterations. The algorithm end information is used to enable the main process to output a global optimal solution according to the algorithm end information.

[0040] Another embodiment of the present application also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the control method of the genetic algorithm based on the master-slave parallel fusion taboo search applied to the main process as described above, or implements the steps of the control method of the genetic algorithm based on the master-slave parallel fusion taboo search applied to the slave process as described above.

[0041] Another embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the control method of the genetic algorithm based on the master-slave parallel fusion taboo search applied to the main process as described above are implemented, or the steps of the control method of the genetic algorithm based on the master-slave parallel fusion taboo search applied to the slave process as described above are implemented.

[0042] Another embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the control method of the genetic algorithm based on master-slave parallel fusion taboo search applied to the main process as described above, or implement the steps of the control method of the genetic algorithm based on master-slave parallel fusion taboo search applied to the slave process as described above.

[0043] Compared with the prior art, the control method and device of the genetic algorithm based on master-slave parallel fusion taboo search provided in the embodiment of the present application have at least the following beneficial effects:

[0044] The present application distributes the first solution to the slave process through the master process to perform parallel calculation of the taboo search algorithm, which is conducive to improving the convergence speed of the genetic algorithm, and using the local convergence advantage of the taboo search algorithm to improve the overall performance of the algorithm, thereby solving the problem of slow convergence of the genetic algorithm. At the same time, periodically updating the population based on the second solution fed back by the slave process and redistributing the first solution is conducive to ensuring population diversity to avoid the problem of immature convergence. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 One of the flow charts of the control method of the genetic algorithm based on master-slave parallel fusion taboo search applied to the main process of the present application;

[0046] Figure 2 The second flowchart of the control method of the genetic algorithm based on master-slave parallel fusion taboo search applied to the main process of the present application;

[0047] Figure 3 The third flowchart of the control method of the genetic algorithm based on master-slave parallel fusion taboo search applied to the main process of the present application;

[0048] Figure 4 One of the flow charts of the control method of the genetic algorithm based on master-slave parallel fusion taboo search applied to the slave process of the present application;

[0049] Figure 5 The second flowchart of the control method of the genetic algorithm based on master-slave parallel fusion taboo search applied to the slave process of the present application;

[0050] Figure 6 It is a structural schematic diagram of a control device of a genetic algorithm based on master-slave parallel fusion taboo search applied to a main process of the present application;

[0051] Figure 7 This is a schematic diagram of the structure of a control device of the present application for a genetic algorithm based on master-slave parallel fusion taboo search applied to a slave process. DETAILED DESCRIPTION

[0052] In order to make the technical problems, technical solutions and advantages to be solved by the application clearer, the following will be described in detail in conjunction with the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help fully understand the embodiments of the application. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the application. In addition, for clarity and brevity, the description of known functions and structures has been omitted.

[0053] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0054] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0055] It should be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0056] In the embodiments provided in the present application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, but B can also be determined according to A and / or other information.

[0057] See also Figure 1 An embodiment of the present application provides a control method of a genetic algorithm based on master-slave parallel fusion taboo search, which is applied to a master process and includes:

[0058] Step S101, randomly generating an initial population, wherein the population has a preset number of first solutions;

[0059] Step S102, distributing the first solution in the population to a plurality of slave processes, wherein the first solution corresponds to the slave process one by one, and the slave process is used to iterate according to the received first solution according to the taboo search algorithm, and periodically feed back the obtained second solution to the master process, and when the maximum number of iterations is reached, feed back the algorithm end information and the second solution to the master process;

[0060] Step S103, if the second solution is received but the algorithm end information is not received, then the population is updated according to the first set formed by the received second solution, and the step of distributing the first solution in the population to multiple slave processes is returned to be executed;

[0061] Step S104: If the second solution and the algorithm end information are received, a global optimal solution is obtained according to the first set and outputted.

[0062] In this embodiment, when executing the genetic algorithm based on master-slave parallel fusion taboo search, a preset number of first solutions are randomly generated based on the actual problem. The preset number of first solutions constitute the initial population of the genetic algorithm. In this step, the random generation method is not specifically limited.

[0063] After obtaining the initial population, the individuals in the population, i.e., the first solution, are distributed to multiple slave processes, and the slave processes further calculate the first solution. In this embodiment, the first solution is iteratively calculated according to the taboo search algorithm, and the second solution obtained is periodically fed back to the main process based on the number of iterations, wherein the maximum number of iterations of the taboo search algorithm is a preset multiple of the feedback cycle, i.e., during the execution of the taboo search algorithm, the slave process executes a certain number of iterations less than the maximum number of iterations for each first solution, and then feeds back the obtained local optimal solution, i.e., the second solution, to the main process for subsequent processing; if the maximum number of iterations is reached, the second solution and the algorithm end information are fed back to the main process, and the algorithm end information is used to inform the main process that the taboo search algorithm iteration of the slave process corresponding to the main process has ended, so that the main process can perform the final calculation.

[0064] When the master process receives the second solution fed back by the slave process, it will first determine whether the algorithm end information is received at the same time. If the algorithm end information is not received, it means that the current algorithm needs to continue to iterate. Therefore, according to the first set composed of the received second solution, the population is updated to improve the population diversity, and the step of distributing the first solution in the population to multiple slave processes is returned to execute, so that each slave process uses the redistributed first solution as the starting point for the next iteration to calculate; it should be noted that the distribution of the first solution is random distribution, so that the first solutions received by the same slave process twice may be related or unrelated, thereby improving the population diversity and avoiding the slave process from falling into the local optimum. If the algorithm end information is received, it means that the current algorithm does not need to continue to iterate, so according to the first set, the global optimal solution is obtained and output. Among them, the global optimal solution is the individual corresponding to the maximum or minimum fitness value after the fitness calculation of the individuals in the first set.

[0065] In summary, the present application distributes the first solution to the slave process through the master process to perform parallel calculation of the taboo search algorithm, which is conducive to improving the convergence speed of the genetic algorithm. The taboo search algorithm is a well-known intelligent heuristic search algorithm. Since TS has a memory function, it is introduced into the search process of the genetic algorithm to construct a new recombination strategy, and TS is used as the mutation operator of the genetic algorithm. The local convergence advantage of the taboo search algorithm is used to improve the overall performance of the algorithm, thereby solving the problem of slow convergence of the genetic algorithm. At the same time, periodically updating the population based on the second solution fed back from the process and redistributing the first solution is conducive to ensuring population diversity to avoid the problem of immature convergence.

[0066] It should be noted that the communication mode between the master process and the slave process is a blocking communication mode, that is, the master process enters a sleep or waiting state after distributing the first solution; after receiving the first solution, the slave process performs iterative calculations, and when the preset feedback cycle is reached, the second solution is fed back to the master process, and the process enters a sleep or waiting state, while the master process performs iterative calculations based on the fed-back second solution.

[0067] It should be noted that the master process and the slave process can be implemented in the same device or apparatus, or in different devices or apparatuses. For example, the master process is implemented in a first device or apparatus, and the slave process is implemented in a second device or apparatus (such as edge-cloud collaboration).

[0068] See also Figure 2 Specifically, in the control method as described above, updating the population according to the first set formed by the received second solution includes:

[0069] Step S201, randomly selecting two of the second solutions from the set as parent solutions;

[0070] Step S202, performing a crossover operation or a crossover operation and a mutation operation on the parent solution to obtain two child solutions;

[0071] Step S203, obtaining the fitness values ​​corresponding to the two child solutions according to a preset fitness function;

[0072] Step S204, determining one of the two child solutions as a new first solution according to the objective function and the fitness value;

[0073] Step S205, if the number of the new first solutions reaches the preset number, updating the second set formed by the new first solutions as the population;

[0074] Step S206: if the number of the new first solutions is less than the preset number, return to the step of randomly selecting two second solutions from the second set as parent solutions.

[0075] In this embodiment, the steps of updating the population based on the first set are illustrated, wherein the main process randomly selects two second solutions from the first set composed of second solutions as parent solutions, and then performs a crossover operation or a crossover operation and a mutation operation on the parent solutions, thereby obtaining two child solutions, wherein the crossover operation is preferably a sequential crossover. After obtaining the offspring solutions, calculations can be performed based on a preset fitness function to obtain the fitness values ​​corresponding to the two offspring solutions, and then one of the two offspring solutions can be determined as a new first solution based on the objective function and the fitness value, so as to facilitate updating the population. Specifically, if the objective function is a minimization objective, the offspring set with a smaller fitness value is taken as the new first solution, and if the objective function is a maximization objective, the offspring set with a larger fitness value is taken as the new first solution; if the number of new first solutions reaches the preset number of the population, the second set composed of the new first solutions is updated as the population, thereby realizing the update of the population; if the number of new first solutions does not reach the preset number of the population, it means that the population cannot be completely updated, so the step of randomly selecting two of the second solutions from the second set as the parent solution is executed, so as to continue to obtain the offspring solutions and determine another new first solution, and make further judgments.

[0076] See also Figure 3 Optionally, in the control method as described above, updating the population according to the first set constructed by the received second solution includes:

[0077] Step S301, randomly selecting one of the second solutions from the first set as a parent solution;

[0078] Step S302, performing a mutation operation on the parent solution to obtain a new first solution;

[0079] Step S303, if the number of the new first solutions reaches the preset number, updating the second set composed of the new first solutions as the population;

[0080] Step S304: if the number of the new first solutions is less than the preset number, return to the step of randomly selecting one of the second solutions from the first set as a parent solution.

[0081] In this embodiment, the step of updating the population based on the first set is illustrated, wherein the difference between this embodiment and the previous embodiment is that only one second solution is randomly selected as the parent solution, and the parent solution is mutated to obtain a child solution, that is, a new first solution, and the mutation operation at this time is preferably performed according to the mutation probability corresponding to each gene. Then, the population is updated according to whether the number of new first solutions reaches a preset number, or the step of randomly selecting a second solution from the first set as the parent solution is returned to continue to obtain new first solutions and make further judgments.

[0082] See also Figure 4 Another embodiment of the present application further provides a control method of a genetic algorithm based on master-slave parallel fusion taboo search, which is applied to a slave process and includes:

[0083] Step S401, executing one iteration of the tabu search algorithm according to the first solution sent by the main process, and obtaining a second solution corresponding to the current iteration;

[0084] Step S402: if the first iteration number corresponding to the current iteration is less than the preset maximum iteration number, and the first iteration number reaches the second iteration number corresponding to the preset period, the second solution is fed back to the master process, and waiting for receiving a new first solution, the second solution is used to enable the master process to update the population according to the second solution and distribute the new first solution to the slave process;

[0085] Step S403, if the first iteration number is less than a preset maximum iteration number, and the first iteration number does not reach a second iteration number corresponding to the preset period, then executing one iteration of the taboo search algorithm according to the second solution;

[0086] Step S404: if the number of iterations reaches a preset maximum number of iterations, the second solution and algorithm end information are fed back to the main process, and the taboo search algorithm is terminated. The algorithm end information is used to enable the main process to output a global optimal solution according to the algorithm end information.

[0087] In this embodiment, an example is given of a control method for a genetic algorithm based on a master-slave parallel fusion taboo search applied to a slave process. After receiving the first solution sent by the master process, the slave process performs one iteration of the taboo search algorithm according to the first solution to obtain the second solution corresponding to the current iteration, and then makes a judgment based on the relationship between the first iteration number corresponding to the current iteration and the second iteration number corresponding to the preset maximum number and the preset period. If the first iteration number is less than the maximum iteration number, but the first iteration number reaches the second iteration number corresponding to the preset period, it is determined that the current slave process has reached the feedback time and has not reached the algorithm end time. At this time, it is only necessary to feed back the second solution to the master process and wait for receiving a new first solution. The second solution is used to enable the master process to update the population according to the second solution and distribute the new first solution to the slave process. If the first iteration number reaches the maximum iteration number, it is determined that the current slave process has reached the algorithm end time, then the second solution and the algorithm end information are fed back to the master process, and the taboo search algorithm is terminated. The algorithm end information is used to enable the master process to output the global optimal solution according to the algorithm end information. If the first iteration number is less than the maximum iteration number and the first iteration number does not reach the second iteration number corresponding to the preset period, an iteration is performed based on the second solution obtained in the previous iteration to further search for a better solution corresponding to the first solution.

[0088] See also Figure 5 Specifically, in the control method as described above, the execution of one iteration of the taboo search algorithm includes:

[0089] Step S501, generating a neighborhood according to a target solution and a preset neighborhood generation strategy, wherein the target solution is the first solution or the second solution;

[0090] Step S502, obtaining a candidate solution set from the neighborhood according to the position of the demarcation point;

[0091] Step S503, according to the evaluation function and the taboo table, obtain the second solution corresponding to the current iteration from the candidate solution set, and update the demarcation point position and the taboo table.

[0092] In this embodiment, the steps of executing one iteration of the tabu search algorithm are exemplified, wherein a neighborhood is generated according to a target solution and a preset neighborhood generation strategy. Since one iteration of the tabu search algorithm can be based on the received first solution or the second solution in the previous iteration, the target solution is used here to represent the first solution or the second solution. The preset neighborhood generation strategy includes, but is not limited to, a random neighborhood generation strategy, a rule-based neighborhood generation strategy, and a probability-based neighborhood generation strategy. In a specific embodiment, the neighborhood is evenly divided into two parts.

[0093] Then, a candidate solution set is obtained from the neighborhood according to the position of the demarcation point, wherein the demarcation point position is pre-configured in the first iteration, and is an updated value based on the previous iteration in non-first iterations. The elements in the candidate set are also divided into two parts. The first half is composed of elements with the best evaluation value from the front part of the neighborhood, called centralized elements, which are used for centralized search; the second half is randomly selected from the elements in the second half of the neighborhood, called diversified elements, which are used for diversified search. When the program is running, the number of centralized elements and diversified elements changes dynamically according to the quality of the solution during the search process. Let the candidate set length be CL (candidate length), and the demarcation point length between centralized elements and diversified elements in the candidate set be DL (division length), that is, the first 1 to DL elements are centralized elements, and the last DL+1 to CI elements are diversified elements.

[0094] For the concentrated elements, they should be few and precise, and as far as possible, they should be in areas that have not been searched before, so they are generated by the insertion method, that is, randomly swapping the positions of two solutions, that is, randomly taking a solution and inserting it into the remaining n-1 solution sequences, and taking the sequence with the shortest increase in the length of the circuit path as a concentrated element; taking the next solution respectively, and repeating the above process until n concentrated elements are generated. For the diversified elements, they should be numerous and wide, and as far as possible, they should be in areas that have not been searched before, so they are generated by the random method, that is, randomly swapping the positions of two solutions.

[0095] In the first iteration, the pre-configured demarcation point position is preferably DL=CL / 2, that is, the centralized elements and the diversified elements in the candidate set each account for half. In the non-first iterative search process, DI changes dynamically according to the following rules.

[0096] 1. If the current local optimal solution searched in this iteration is better than the local optimal solution obtained in the previous iteration, then DL = DL + 1.

[0097] 2. If the current local optimal solution searched in this iteration is equal to or inferior to the local optimal solution obtained in the previous iteration, then DL = DL-1.

[0098] 3. To ensure the concentration of the search, when DL=1, it will not decrease; to ensure the diversity of the search, when DL=CL-1, it will not increase. That is, the candidate set always includes both the concentration element and the diversity element during the iteration process, and each has at least one.

[0099] 4. DL changes dynamically according to the above rules so that: when the quality of the solution is improved, the number of centralized elements in the candidate set increases, that is, the probability of centralized search increases, and correspondingly, the probability of diversified search decreases; conversely, when the quality of the solution is not improved, the number of diversified elements in the candidate set increases, that is, the probability of diversified search increases, and correspondingly, the probability of centralized search decreases. In this way, taboo search can automatically perform centralized search or diversified search according to the quality of the solution in the search process, which better solves the contradiction between centralized search and diversified search.

[0100] After obtaining the candidate solution set, the second solution corresponding to the current iteration can be obtained from the candidate solution set according to the evaluation function and the taboo table, and the demarcation point position and the taboo table can be updated. Specifically, the scores corresponding to each solution in the candidate solution set are obtained according to the evaluation function, and the scores are sorted based on the scores to determine that the optimal solution other than the solution in the taboo table is the second solution corresponding to the current iteration. The demarcation point position is updated based on the above description, and the taboo table is updated based on the second solution.

[0101] The taboo table is preconfigured as an empty table in the first iteration. In non-first iterations, the taboo table records the second solutions of previous iterations in chronological order. The taboo table can accommodate a preset number of second solutions. When updating, if the taboo table is not full, the second solutions are directly added to the taboo table in chronological order. If the taboo table is full, the oldest second solution is deleted and the second solution of the current iteration is added to the taboo table in chronological order.

[0102] See also Figure 6 Another embodiment of the present application further provides a control device for a genetic algorithm based on master-slave parallel fusion taboo search, which is applied to a main process and includes:

[0103] A population initialization module 601 is used to randomly generate an initial population, wherein the population has a preset number of first solutions;

[0104] A distribution module 602 is used to distribute the first solution in the population to multiple slave processes, wherein the first solution corresponds to the slave process one by one, and the slave process is used to iterate according to the taboo search algorithm based on the received first solution, and periodically feed back the obtained second solution to the master process, and feed back algorithm end information and the second solution to the master process when the maximum number of iterations is reached;

[0105] A first processing module 603 is used for updating the population according to the first set composed of the received second solutions if the second solution is received but the algorithm end information is not received, and returning to execute the step of distributing the first solution in the population to a plurality of slave processes;

[0106] The second processing module 604 is configured to obtain and output a global optimal solution according to the first set if the second solution and the algorithm end information are received.

[0107] Specifically, in the control device as described above, the first processing module 603 includes:

[0108] A first processing unit, configured to randomly select two of the second solutions from the set as parent solutions;

[0109] A second processing unit is used to perform a crossover operation or a crossover operation and a mutation operation on the parent solution to obtain two child solutions;

[0110] A third processing unit, used for obtaining fitness values ​​corresponding to the two child solutions according to a preset fitness function;

[0111] a fourth processing unit, configured to determine, according to an objective function and the fitness value, one of the two child solutions as a new first solution;

[0112] a fifth processing unit, configured to update the second set consisting of the new first solutions as the population if the number of the new first solutions reaches the preset number;

[0113] The sixth processing unit is configured to return to the step of randomly selecting two second solutions from the second set as parent solutions if the number of the new first solutions is less than the preset number.

[0114] Optionally, in the control device as described above, the first processing module 603 includes:

[0115] A seventh processing unit, configured to randomly select one of the second solutions from the first set as a parent solution;

[0116] an eighth processing unit, configured to perform a mutation operation on the parent solution to obtain a new first solution;

[0117] a ninth processing unit, configured to update the second set consisting of the new first solutions as the population if the number of the new first solutions reaches the preset number;

[0118] A tenth processing unit is used to return to the step of randomly selecting one of the second solutions from the first set as a parent solution if the number of the new first solutions is less than the preset number.

[0119] The control device embodiment of the present application applied to the main process is a device corresponding to the embodiment of the control method based on the master-slave parallel fusion taboo search genetic algorithm applied to the main process, and all the implementation means in the above method embodiment are applicable to the embodiment of the device, and can also achieve the same technical effect. The above control device provided in the embodiment of the present application can implement all the method steps implemented in the above method embodiment, and can achieve the same technical effect, and the parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be specifically repeated here.

[0120] See also Figure 7 Another embodiment of the present application further provides a control device for a genetic algorithm based on master-slave parallel fusion taboo search, which is applied to a slave process and includes:

[0121] The third processing module 701 is used to perform one iteration of the tabu search algorithm according to the first solution sent by the main process, and obtain a second solution corresponding to the current iteration;

[0122] The fourth processing module 702 is configured to feed back the second solution to the master process and wait for receiving a new first solution if the first iteration number corresponding to the current iteration is less than the preset maximum iteration number and the first iteration number reaches the second iteration number corresponding to the preset period, wherein the second solution is used to enable the master process to update the population according to the second solution and distribute the new first solution to the slave process;

[0123] A fifth processing module 703 is configured to execute one iteration of the taboo search algorithm according to the second solution if the first iteration number is less than a preset maximum iteration number and the first iteration number does not reach a second iteration number corresponding to the preset period;

[0124] The sixth processing module 704 is used to feed back the second solution and algorithm end information to the main process and terminate the taboo search algorithm if the number of iterations reaches a preset maximum number of iterations. The algorithm end information is used to enable the main process to output a global optimal solution according to the algorithm end information.

[0125] Specifically, in the control device as described above, the third processing module 701 and the fifth processing module 703 include:

[0126] an eleventh processing module, configured to generate a neighborhood according to a target solution and a preset neighborhood generation strategy, wherein the target solution is the first solution or the second solution;

[0127] A twelfth processing module, used for obtaining a candidate solution set from the neighborhood according to the position of the demarcation point;

[0128] The thirteenth processing module is used to obtain the second solution corresponding to the current iteration from the candidate solution set according to the evaluation function and the taboo table, and to update the demarcation point position and the taboo table.

[0129] The control device embodiment of the present application applied to the slave process is a device corresponding to the embodiment of the control method based on the master-slave parallel fusion taboo search genetic algorithm applied to the slave process, and all the implementation means in the above method embodiment are applicable to the embodiment of the device, and can also achieve the same technical effect. The above control device provided in the embodiment of the present application can implement all the method steps implemented in the above method embodiment, and can achieve the same technical effect, and the parts and beneficial effects that are the same as those in the method embodiment in this embodiment will not be specifically repeated here.

[0130] Another embodiment of the present application also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the control method of the genetic algorithm based on the master-slave parallel fusion taboo search applied to the main process as described above are implemented, or the steps of the control method of the genetic algorithm based on the master-slave parallel fusion taboo search applied to the slave process as described above are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0131] Another embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the control method of the genetic algorithm based on the master-slave parallel fusion taboo search applied to the main process as described above are implemented, or the steps of the control method of the genetic algorithm based on the master-slave parallel fusion taboo search applied to the slave process as described above are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0132] Another embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the control method of the genetic algorithm based on the master-slave parallel fusion taboo search applied to the main process as described above, or implement the steps of the control method of the genetic algorithm based on the master-slave parallel fusion taboo search applied to the slave process as described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0133] In addition, the present application may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplicity and clarity, and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0134] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusions.

[0135] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A control method based on a master-slave parallel fusion taboo search genetic algorithm, applied to the main process, characterized in that: include: Randomly generate an initial population, wherein the population has a preset number of first solutions; Distribute the first solution in the population to a plurality of slave processes, wherein the first solution corresponds to the slave process one by one, and the slave process is used to iterate according to the received first solution according to the taboo search algorithm, and periodically feed back the obtained second solution to the master process, and feed back algorithm end information and the second solution to the master process when a maximum number of iterations is reached; If the second solution is received but the algorithm end information is not received, then the population is updated according to the first set formed by the received second solution, and the step of distributing the first solution in the population to a plurality of slave processes is returned to be executed; If the second solution and the algorithm end information are received, a global optimal solution is obtained according to the first set and outputted.

2. The control method according to claim 1, characterized in that: The updating of the population according to the first set constructed by the received second solution comprises: Randomly selecting two of the second solutions from the set as parent solutions; Performing a crossover operation or a crossover operation and a mutation operation on the parent solution to obtain two child solutions; According to a preset fitness function, obtaining fitness values ​​corresponding to the two child solutions; Determine, according to the objective function and the fitness value, one of the two child solutions as a new first solution; If the number of the new first solutions reaches the preset number, updating the second set formed by the new first solutions as the population; If the number of the new first solutions is less than the preset number, the process returns to executing the step of randomly selecting two second solutions from the second set as parent solutions.

3. The control method according to claim 1, characterized in that: The updating of the population according to the first set constructed by the received second solution comprises: Randomly select one of the second solutions from the first set as a parent solution; Performing a mutation operation on the parent solution to obtain a new first solution; If the number of the new first solutions reaches the preset number, updating the second set formed by the new first solutions as the population; If the number of the new first solutions is less than the preset number, the process returns to the step of randomly selecting one of the second solutions from the first set as a parent solution.

4. A control method based on a master-slave parallel fusion taboo search genetic algorithm, applied to a slave process, characterized in that: include: According to the first solution sent by the main process, an iteration of the tabu search algorithm is executed to obtain a second solution corresponding to the current iteration; If the first iteration number corresponding to the current iteration is less than the preset maximum iteration number, and the first iteration number reaches the second iteration number corresponding to the preset period, the second solution is fed back to the master process, and waiting for receiving a new first solution, the second solution is used to enable the master process to update the population according to the second solution and distribute the new first solution to the slave process; If the first iteration number is less than a preset maximum iteration number, and the first iteration number does not reach a second iteration number corresponding to the preset period, performing one iteration of the taboo search algorithm according to the second solution; If the number of iterations reaches a preset maximum number of iterations, the second solution and algorithm end information are fed back to the main process, and the taboo search algorithm is terminated. The algorithm end information is used to enable the main process to output a global optimal solution according to the algorithm end information.

5. The control method according to claim 4, characterized in that: The step of performing one iteration of the tabu search algorithm comprises: Generate a neighborhood according to a target solution and a preset neighborhood generation strategy, wherein the target solution is the first solution or the second solution; According to the position of the demarcation point, a candidate solution set is obtained from the neighborhood; According to the evaluation function and the taboo table, the second solution corresponding to the current iteration is obtained from the candidate solution set, and the demarcation point position and the taboo table are updated.

6. A control device based on a genetic algorithm of master-slave parallel fusion taboo search, applied to the main process, characterized in that: include: A population initialization module, used for randomly generating an initial population, wherein the population has a preset number of first solutions; a distribution module, used for distributing the first solution in the population to a plurality of slave processes, wherein the first solution corresponds to the slave process one by one, and the slave process is used for iterating according to the taboo search algorithm based on the received first solution, and periodically feeding back the obtained second solution to the master process, and feeding back algorithm end information and the second solution to the master process when a maximum number of iterations is reached; A first processing module, configured to update the population according to the first set composed of the received second solutions if the second solution is received but the algorithm end information is not received, and return to execute the step of distributing the first solution in the population to a plurality of slave processes; The second processing module is used to obtain and output the global optimal solution according to the first set if the second solution and the algorithm end information are received.

7. A control device based on a master-slave parallel fusion taboo search genetic algorithm, applied to a slave process, characterized in that: include: A third processing module is used to perform one iteration of the tabu search algorithm according to the first solution sent by the main process, and obtain a second solution corresponding to the current iteration; a fourth processing module, configured to feed back the second solution to the master process and wait for receiving a new first solution if the first iteration number corresponding to the current iteration is less than a preset maximum iteration number and the first iteration number reaches a second iteration number corresponding to a preset period, wherein the second solution is used to enable the master process to update the population according to the second solution and distribute the new first solution to the slave process; a fifth processing module, configured to execute one iteration of the taboo search algorithm according to the second solution if the first iteration number is less than a preset maximum iteration number and the first iteration number does not reach a second iteration number corresponding to the preset period; The sixth processing module is used to feed back the second solution and algorithm end information to the main process and terminate the taboo search algorithm if the number of iterations reaches a preset maximum number of iterations. The algorithm end information is used to enable the main process to output a global optimal solution according to the algorithm end information.

8. An electronic device, characterized in that: It comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of a control method for a genetic algorithm based on a master-slave parallel fusion taboo search applied to a main process as described in any one of claims 1 to 3 are implemented, or the steps of a control method for a genetic algorithm based on a master-slave parallel fusion taboo search applied to a slave process as described in any one of claims 4 or 5 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a control method for a genetic algorithm based on a master-slave parallel fusion taboo search applied to a main process as described in any one of claims 1 to 3, or implements the steps of a control method for a genetic algorithm based on a master-slave parallel fusion taboo search applied to a slave process as described in any one of claims 4 or 5.

10. A computer program product, characterized in that It comprises computer instructions which, when executed by a processor, implement the steps of a control method of a genetic algorithm based on a master-slave parallel fusion taboo search applied to a main process as described in any one of claims 1 to 3, or implement the steps of a control method of a genetic algorithm based on a master-slave parallel fusion taboo search applied to a slave process as described in any one of claims 4 or 5.