Hybrid optimization solving method and device based on generative adversarial network assistance, equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING TECH & BUSINESS UNIV
- Filing Date
- 2025-10-09
- Publication Date
- 2026-08-07
AI Technical Summary
[0007]本申请提供一种基于生成对抗网络辅助的混合优化求解方法、装置、设备及存储介质,通过结合精确求解器所获得的知识与元启发式算法的高效性,以克服现有技术在处理大规模组合优化问题时求解时间长和解的质量低的问题
(1)显著提升求解效率:本申请通过条件生成对抗网络(CGAN)生成的优质初始路径,大规模邻域搜索(LNS)的收敛速度大幅提升,与依赖随机初始化的传统LNS方法相比,平均计算时间从5.37秒缩短至3.14秒,效率提升41.5%,适用于大规模物流配送场景。
Smart Images

Figure CN121235029B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of logistics optimization technology, and in particular to a hybrid optimization solution method, apparatus, device and storage medium based on generative adversarial network assistance. Background Technology
[0002] Combinatorial optimization problems are a core class of challenging problems in operations research and computer science, widely found in fields such as logistics, production scheduling, and supply chain management. These problems are characterized by discrete decision variables and an exponentially increasing solution space with increasing problem size; examples include the Traveling Salesman Problem (TSP), the Vehicle Routing Problem (VRP), and production scheduling problems.
[0003] Currently, the mainstream technologies for solving combinatorial optimization problems are mainly divided into two categories: exact solution algorithms, such as linear programming, integer programming, and mixed integer programming. These algorithms can guarantee finding the globally optimal solution to the problem. Commercial solvers, represented by Gurobi® or CPLEX®, are the leading tools in this field (References: Gurobi Optimization, "Gurobi Optimizer Reference Manual", 2023; IBM, "CPLEX User's Manual", 2022). The structure of these algorithms includes variable definition, constraint modeling, and the solution process. The position and connection relationships of each component are realized through mathematical models, and signal transmission is reflected in the dependencies between optimization variables. However, the inventors found that when the problem size (e.g., the number of cities, tasks, vehicles, etc.) is too large, these exact solvers cannot provide an optimal solution within an acceptable time (e.g., hours or days), or even provide any solution at all. This has become a serious bottleneck, limiting its application in real-world large-scale business applications.
[0004] Heuristic and metaheuristic algorithms, such as genetic algorithms, simulated annealing, tabu search, and large-scale neighborhood search, can find high-quality approximate solutions in a reasonable amount of time. Taking LNS as an example (references: P. Shaw, "Using constraint programming and local search methods to solve vehicle routing problems", CP-98, 1998; K. Helsgaun, "An effective implementation of the Lin-Kernighan traveling salesman heuristic", European Journal of Operational Research, 2000), its structure includes initial solution generation, destruction, and repair operations. The positions and connections of each component are represented by path sequences, and signal transmission is reflected in iteratively updating the path length. However, these algorithms often rely on random initialization or simple greedy strategies, which may lead to the following problems: (1) The low quality of the initial solution leads to the algorithm requiring a large number of iterations to converge, which reduces the solution efficiency; (2) It is easy to get trapped in local optima, resulting in a large gap between the final solution and the global optimal solution; (3) The computation is inefficient, the average time may be several minutes or longer, and the solution quality is unstable (high standard deviation).
[0005] According to literature statistics, on the TSPLIB benchmark dataset, the average distance error of traditional LNS can reach more than 10% (Reference: G. Reinelt, "TSPLIB—A traveling salesman problem library", ORSAJournal on Computing, 1991).
[0006] During the research process, the inventors of this application discovered that the existing technology lacks a hybrid method that can efficiently combine the optimal solution knowledge of an accurate solver with the efficient search capability of a metaheuristic algorithm, in order to overcome the shortcomings of slow solution speed and poor solution quality when dealing with large-scale combinatorial optimization problems. Summary of the Invention
[0007] This application provides a hybrid optimization solution method, apparatus, device, and storage medium based on generative adversarial network assistance. By combining the knowledge obtained by the exact solver with the efficiency of metaheuristic algorithms, it overcomes the problems of long solution time and low solution quality in the existing technology when dealing with large-scale combinatorial optimization problems.
[0008] Firstly, this application provides a hybrid optimization solution method based on generative adversarial networks (GANs), the method comprising an offline training phase and an online solution phase; wherein, the offline training phase includes: Multiple combinatorial optimization problem instances are solved using an exact solver to obtain their optimal solutions and form an optimal solution dataset. The optimal solution dataset includes instance ID, input features, optimal solutions, and target values. The combinatorial optimization problem instances include vehicle routing problem, traveling salesman problem, production scheduling problem, or supply chain optimization problem. A conditional generative adversarial network is constructed. The optimal solution in the optimal solution dataset is used as the real sample, and the features of the problem instance are used as the conditional input. The conditional generative adversarial network is then trained adversarially so that the generator of the conditional generative adversarial network learns the internal structure and pattern of the optimal solution. The online solution phase includes: A large-scale combinatorial optimization problem is obtained, and its features are input into the generator of a pre-trained conditional generative adversarial network to generate one or more high-quality initial solutions; wherein, the large-scale combinatorial optimization problem includes instances of combinatorial optimization problems that cannot be solved by an exact solver within a set time. The high-quality initial solution is used as the starting point or initial population of the metaheuristic algorithm. The metaheuristic algorithm is executed to perform iterative search and optimization to obtain the optimized solution of the large-scale combinatorial optimization problem.
[0009] In one possible design, the metaheuristic algorithm is a genetic algorithm, simulated annealing, tabu search, or large-scale neighborhood search.
[0010] In one possible design, the online solution phase further includes an intelligent perturbation step; wherein the intelligent perturbation step includes: When the metaheuristic algorithm gets stuck in a local optimum or fails to improve significantly over several generations, the generator of the conditional generative adversarial network is invoked again to generate a new solution that is sufficiently different from the current local optimum and has high-quality features, thereby perturbing the current search process and helping the algorithm escape the local optimum.
[0011] In one possible design, the exact solver is either Gurobi® or CPLEX®.
[0012] In one possible design, when the combinatorial optimization problem instance is a traveling salesman problem, if the traveling salesman problem has 50-100 nodes, then the combinatorial optimization problem instance is determined to be a small-scale combinatorial optimization problem instance.
[0013] In one possible design, the conditional generative adversarial network is a Transformer-based conditional generative adversarial network, in which the generator uses a Transformer encoder to process sequential data, and the discriminator is used to evaluate the authenticity and feasibility of the generated solution; the loss function of the adversarial training includes adversarial loss, reconstruction loss, feasibility loss and objective function loss.
[0014] In one possible design, the adversarial training process employs data augmentation and transfer learning to address the issue of limited data volume, wherein the data augmentation includes path perturbation and the transfer learning includes fine-tuning after pre-training from a public dataset.
[0015] Secondly, this application provides a hybrid optimization solution device based on generative adversarial network assistance, the device comprising: The offline training module is configured as follows: Multiple combinatorial optimization problem instances are solved using an exact solver to obtain their optimal solutions and form an optimal solution dataset. The optimal solution dataset includes instance ID, input features, optimal solutions, and target values. The combinatorial optimization problem instances include vehicle routing problem, traveling salesman problem, production scheduling problem, or supply chain optimization problem. A conditional generative adversarial network is constructed. The optimal solution in the optimal solution dataset is used as the real sample, and the features of the problem instance are used as the conditional input. The conditional generative adversarial network is then trained adversarially so that the generator of the conditional generative adversarial network learns the internal structure and pattern of the optimal solution. The online solver module is configured as follows: A large-scale combinatorial optimization problem is obtained, and its features are input into the generator of a pre-trained conditional generative adversarial network to generate one or more high-quality initial solutions; wherein, the large-scale combinatorial optimization problem includes instances of combinatorial optimization problems that cannot be solved by an exact solver within a set time. The high-quality initial solution is used as the starting point or initial population of the metaheuristic algorithm. The metaheuristic algorithm is executed to perform iterative search and optimization to obtain the optimized solution of the large-scale combinatorial optimization problem.
[0016] Thirdly, embodiments of this application provide an electronic device, including: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, causing the at least one processor to perform the hybrid optimization solution method based on generative adversarial network assistance as described in the first aspect and various possible designs of the first aspect.
[0017] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the hybrid optimization solution method based on generative adversarial networks assisted as described in the first aspect and various possible designs of the first aspect.
[0018] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the hybrid optimization solution method based on generative adversarial network assistance as described in the first aspect and various possible designs of the first aspect.
[0019] The hybrid optimization solution method, apparatus, device, and storage medium based on generative adversarial networks provided in this application have at least the following beneficial effects: (1) Significantly improves solution efficiency: This application generates high-quality initial paths through conditional generative adversarial networks (CGAN), which greatly improves the convergence speed of large-scale neighborhood search (LNS). Compared with the traditional LNS method that relies on random initialization, the average computation time is reduced from 5.37 seconds to 3.14 seconds, and the efficiency is improved by 41.5%, which is suitable for large-scale logistics and distribution scenarios.
[0020] (2) Significantly improve path quality: This application uses the intelligent perturbation mechanism of CGAN. This method effectively helps LNS to escape local optima and find a path closer to the global optimum. The average distance is optimized by 12.44%, the optimal distance is optimized by 10.79%, and the total mileage of logistics transportation is significantly reduced.
[0021] (3) Strong compatibility: This application can be combined with various metaheuristic algorithms (such as LNS, genetic algorithm, etc.) and is applicable to various logistics optimization problems of different orders of magnitude, including vehicle routing problem (VRP) and traveling salesman problem (TSP).
[0022] (4) Socioeconomic benefits: Applying this algorithm to logistics distribution and transportation scheduling can potentially reduce transportation costs by 5%-15% compared to traditional algorithms, improve distribution efficiency, and reduce carbon emissions, demonstrating significant economic and environmental value. These effects are directly driven by CGAN's pattern learning capabilities. Experimental data is based on the Kaggle TSP dataset, and scientific analysis shows that guided search effectively reduces ineffective exploration. Attached Figure Description
[0023] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0024] Figure 1A flowchart illustrating a hybrid optimization solution method based on generative adversarial networks (GANs) provided in this application embodiment; Figure 2 A flowchart illustrating the application of the hybrid optimization solution method based on generative adversarial networks (GANs) in this application to the large-scale traveling salesman problem in the field of logistics optimization. Figure 3 A flowchart illustrating the implementation of the conventional LNS method provided in this application embodiment; Figure 4 This is a structural diagram of the hybrid optimization solver based on generative adversarial network assistance provided in an embodiment of this application.
[0025] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0027] The collection, storage, use, processing, transmission, provision, and disclosure of financial data or user data involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0028] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0029] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0030] Definitions: GAN: Generative Adversarial Network; Transformer-CGAN: A conditional generative adversarial network based on Transformer; LNS: Large Neighborhood Search; TSP: Traveling Salesman Problem; VRP: Vehicle Routing Problem; GA: Genetic Algorithm; GNN: Graph Neural Network; MLP: Multi-Layer Perceptron.
[0031] Example 1: To address the shortcomings of existing technologies, such as long solution time for exact solutions on large-scale problems, low initial solution quality and susceptibility to local optima in heuristic algorithms leading to unstable overall solution quality and low computational efficiency, this application provides a hybrid optimization solution method based on generative adversarial networks (GANs). Figure 1 As shown, the hybrid optimization solution method based on generative adversarial network assistance includes the following steps S10-S20.
[0032] S10: Offline training phase.
[0033] In this embodiment, step S10 includes the following steps S101-S102.
[0034] S101: Use an exact solver to solve multiple combinatorial optimization problem instances, obtain their optimal solutions, and form an optimal solution dataset. The optimal solution dataset contains instance ID, input features, optimal solutions, and target values. Combinatorial optimization problem instances include vehicle routing problems, traveling salesman problems, production scheduling problems, or supply chain optimization problems.
[0035] For example, in step S101, a precise solver (such as Gurobi® or CPLEX®) is used to solve multiple small but representative combinatorial optimization problem instances to obtain their optimal solutions, forming an optimal solution dataset. The instances are selected in a diverse manner (e.g., 50-100 nodes in TSP), covering structures such as Euclidean distance. The solution is achieved through a mixed-integer programming model, encoded as permutation vectors or adjacency matrices, with additional input features (such as coordinate matrices). The location and connection relationships of each component are defined: the dataset contains instance IDs, input features, optimal solutions, and target values; signal transmission is stored in a file format, thus generating the optimal solution dataset.
[0036] S102: Construct a conditional generative adversarial network (GAN). Use the best solution in the optimal solution dataset as the real sample and the features of the problem instance as the conditional input to perform adversarial training on the GAN, so that the generator of the GAN learns the internal structure and pattern of the optimal solution.
[0037] For example, in step S102, the GAN model is trained as follows: A Conditional Generative Adversarial Network (GAN) is constructed, whose generator takes the features of problem instances as conditional input and solutions from the optimal solution dataset as real samples. Through adversarial training, the generator learns the intrinsic structure and patterns of optimal solutions, thereby generating high-quality candidate solutions given problem features. The generator can use a Transformer encoder to process sequential data, and a discriminator evaluates realism and feasibility. The loss function includes adversarial loss, reconstruction loss (L1 / L2 norm), feasibility loss (penalizing constraint violations), and objective function loss (optimizing path length). To cope with limited data, data augmentation (such as path legitimacy perturbation) and transfer learning (pre-training from a public dataset such as TSPLIB and then fine-tuning) are employed. Training parameters: 100-200 epochs, batch size 32.
[0038] S20: Online solution phase.
[0039] In this embodiment, step S20 includes the following steps S201-S202.
[0040] S201: Obtain a large-scale combinatorial optimization problem, input the features of the large-scale combinatorial optimization problem into the generator of the trained conditional generative adversarial network, and generate one or more high-quality initial solutions; wherein, the large-scale combinatorial optimization problem includes instances of combinatorial optimization problems that cannot be solved by an exact solver within a set time.
[0041] For example, in step S201, for a large-scale combinatorial optimization problem that cannot be solved by an exact solver in a reasonable time, the features of the problem instance are input into a trained GAN generator to generate one or more high-quality initial solutions, thereby achieving the generation of high-quality initial solutions.
[0042] S202: Use high-quality initial solutions as the starting point or initial population of the metaheuristic algorithm, execute the metaheuristic algorithm for iterative search and optimization, and obtain the optimized solution of the large-scale combinatorial optimization problem.
[0043] For example, in step S202, the initial solution generated by the GAN is used as the starting point or initial population of a metaheuristic algorithm (e.g., genetic algorithm, large-scale neighborhood search, tabu search, etc.) for iterative search and optimization.
[0044] In some embodiments, during the operation of the metaheuristic algorithm, when the algorithm gets stuck in a local optimum or has no significant improvement for several consecutive generations, the GAN generator is called again to generate a new solution that is sufficiently different from the current local optimum but still has high-quality features, in order to perturb the current search and help the algorithm escape the local optimum.
[0045] This embodiment, through the two stages of steps S10 and S20 described above, utilizes the adversarial training principle in machine learning and the neighborhood search principle in optimization theory to achieve a transformation from blind search to guided search, turning the "blind" random search of heuristic algorithms into an "oriented and evidence-based" intelligent search.
[0046] Example 2: This application provides a hybrid optimization solution method based on generative adversarial networks (GANs). The specific implementation principle of this method is detailed in Embodiment 1 and will not be repeated here. This embodiment applies this method to the large-scale traveling salesman problem (TSP) in the field of logistics optimization, using data such as city coordinates and distance matrices for computation to simulate optimal route planning in logistics distribution.
[0047] like Figure 2 The diagram shows a flowchart of a hybrid optimization solution method based on generative adversarial networks applied to the large-scale traveling salesman problem in the field of logistics optimization, which includes...
[0048] Offline training phase: Use the Gurobi® solver to find optimal routes for small-scale TSP problems involving 30-100 cities. Data includes city coordinates. Gurobi® calculates the minimum total distance using a mixed-integer programming model, ensuring the generation of a single path sequence (e.g., [1, 3, 5, 2, 4]) that satisfies the constraint that each city in the TSP is visited exactly once. Data is stored as a CSV file, providing training samples to simulate optimized routes between cities in logistics.
[0049] In this embodiment, city coordinates are expressed in latitude and longitude, in the form of [[40.7128, -74.0060], [34.0522, -118.2437], ...]. The distance matrix is calculated based on Euclidean distance, and the calculation formula is as follows: ; in, Indicates the distance between two cities. and This represents the coordinates of one of the cities. and This represents the coordinates of another city.
[0050] Training the GAN model using PyTorch. TM The framework constructs a Conditional Generative Adversarial Network (CGAN) model. The generator is a Transformer-based structure (TransformerSimpleGenerator), receiving city coordinates, a distance matrix, and random noise as input to generate an adjacency matrix representing TSP paths. The discriminator is an adaptive discriminator that dynamically adjusts the discrimination strength during training to evaluate the authenticity of the generated paths. The model is trained adversarially, enabling the generator to learn to generate high-quality paths from TSP problem instances. The generator performs forward propagation through a Transformer encoder and a simple decoder layer, outputting the adjacency matrix. The discriminator evaluates the adjacency matrices of real paths (from the dataset) and generated paths. The loss is calculated as generator loss = adversarial loss + constraint penalty term (degree_loss), ensuring each city has one in-degree and one out-degree, meeting the TSP path requirements. The discriminator loss is calculated using BCEWithLogitsLoss to differentiate between real and fake samples, and label smoothing techniques are used for stable training. Through forward propagation and backward gradient updates during training, the adaptive discriminator strength is adjusted based on the performance gap between the generator and discriminator. Dynamic training balance adjusts the steps of the generator and discriminator according to the training phase (e.g., warm-up, balancing, fine-tuning) to prevent pattern collapse and promote stable convergence. The generator learns to capture the inherent structural patterns of the optimal TSP path, generating high-quality initial solutions for new TSP problems.
[0051] Online solution phase: Solve the large-scale TSP problem involving 2000 cities, with data including the coordinates of 2000 cities and their corresponding distance matrices.
[0052] Starting LNS: The initial path set generated by the GAN is used as the starting solution for the Large-Scale Neighborhood Search (LNS) algorithm. The LNS algorithm begins its iterative process of breaking and repairing to find better solutions. The GAN output is concatenated with the LNS input for iterative feedback. Solution quality evaluation triggers GAN regeneration, shortening convergence time and improving solution quality.
[0053] Intelligent perturbation: During the LNS process, if the algorithm fails to find a better solution in 10 consecutive iterations, a GAN-assisted intelligent perturbation mechanism is triggered. Using a subset of the current optimal path as a condition, the GAN generator generates an optimized path segment to replace it. This new solution will then be used to continue the LNS iteration.
[0054] To further illustrate the advancements of the proposed method, the traditional LNS method was applied to a large-scale traveling salesman problem in the field of logistics optimization, using the same data. The implementation process of the traditional LNS method is as follows: Figure 3 As shown, a random initial solution is first generated at the input layer; then, the core algorithm layer is entered, where a destruction operation is performed, i.e., removing parts of the solution's structure, followed by a repair operation, where the removed parts are reinserted into the solution. This destruction and repair iterative cycle is repeated until the convergence condition is met; finally, the converged solution is output at the result layer. Traditional LNS has two significant drawbacks: first, it is blind, as the destruction and repair operations lack effective guidance and simply adjust the solution's structure randomly, making it difficult to explore in a targeted manner towards a better solution; second, the solution quality is unstable, as the solution obtained from each run varies greatly in quality due to the reliance on random exploration, making it impossible to consistently obtain high-quality optimized solutions.
[0055] Using 200 cities as test data, the method of this embodiment was compared with the traditional LNS method. The results are shown in Table 1.
[0056] Table 1 Comparison of Effects
[0057] As shown in Table 1, when dealing with a TSP problem involving multiple customer points, the method proposed in this invention can find an approximate solution with a quality 5% higher than that of the traditional LNS algorithm (starting from a random initial solution) within 10 minutes, while reducing the solution time by 15%.
[0058] Example 3: This application also provides a hybrid optimization solution device based on generative adversarial networks (GANs), such as... Figure 4 As shown, the hybrid optimization solver based on generative adversarial network assistance includes: Offline training module 401 is configured as follows: Multiple combinatorial optimization problem instances are solved using an exact solver to obtain their optimal solutions and form an optimal solution dataset. The optimal solution dataset includes instance ID, input features, optimal solutions, and target values. The combinatorial optimization problem instances include vehicle routing problem, traveling salesman problem, production scheduling problem, or supply chain optimization problem. A conditional generative adversarial network is constructed. The optimal solution in the optimal solution dataset is used as the real sample, and the features of the problem instance are used as the conditional input. The conditional generative adversarial network is then trained adversarially so that the generator of the conditional generative adversarial network learns the internal structure and pattern of the optimal solution. Online solver module 402 is configured as follows: A large-scale combinatorial optimization problem is obtained, and its features are input into the generator of a pre-trained conditional generative adversarial network to generate one or more high-quality initial solutions; wherein, the large-scale combinatorial optimization problem includes instances of combinatorial optimization problems that cannot be solved by an exact solver within a set time. The high-quality initial solution is used as the starting point or initial population of the metaheuristic algorithm. The metaheuristic algorithm is executed to perform iterative search and optimization to obtain the optimized solution of the large-scale combinatorial optimization problem.
[0059] This application provides an electronic device. The electronic device may include a processor and a memory, wherein the processor and the memory can communicate; exemplarily, the processor and the memory communicate via a communication bus.
[0060] The processor executes computer execution instructions stored in memory, causing the processor to perform the scheme in the above embodiments. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0061] The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.
[0062] The electronic device provided in this application embodiment can be the terminal device described in the above embodiments.
[0063] This application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer performs the technical solution of the hybrid optimization solution method based on generative adversarial network assistance described in the above embodiments.
[0064] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the technical solution of the hybrid optimization solution method based on generative adversarial network assistance in the above embodiments.
[0065] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0066] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.
[0067] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.
[0068] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0069] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0070] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.
[0071] Buses can be Industry Standard Architecture (ISA) buses, Peripheral Component Interconnect (PCI) buses, or Extended Industry Standard Architecture (EISA) buses, etc. Buses can be categorized into address buses, data buses, control buses, etc.
[0072] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0073] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.
[0074] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A hybrid optimization solution method based on generative adversarial networks (GANs), characterized in that, The method includes an offline training phase and an online solving phase; wherein, the offline training phase includes: Multiple combinatorial optimization problem instances are solved using an exact solver to obtain their optimal solutions, forming an optimal solution dataset. This dataset includes instance IDs, input features, optimal solutions, and target values. The combinatorial optimization problem instances include vehicle routing problems, Traveling Salesman Problems (TSPs), production scheduling problems, and supply chain optimization problems. Specifically, solving multiple combinatorial optimization problem instances using an exact solver includes: using the Gurobi® solver to obtain optimal routes for small-scale TSPs involving 30-100 cities. The data includes city coordinates. Gurobi® calculates the minimum total distance using a mixed-integer programming model to ensure a single path sequence is generated, satisfying the constraint that each city is visited exactly once. The data is stored as a CSV file. The city coordinates are expressed in latitude and longitude as [[40.7128,-74.0060],[34.0522,-118.2437],...]. The distance matrix is calculated based on Euclidean distance using the following formula: Where d represents the distance between the two cities. and This represents the coordinates of one of the cities. and This represents the coordinates of another city; A conditional generative adversarial network (GAN) is constructed. The optimal solutions in the optimal solution dataset are used as real samples, and the features of problem instances are used as conditional inputs. The GAN is then adversarially trained so that its generator learns the intrinsic structure and patterns of the optimal solutions. The construction of the GAN includes building a conditional GAN model using the PyTorch™ framework. This model is a Transformer-based GAN, and its generator has a Transformer-based structure, receiving city coordinates, a distance matrix, and random noise as inputs. The model generates an adjacency matrix representing TSP paths. An adaptive discriminator dynamically adjusts its discrimination strength during training to evaluate the authenticity of generated paths. Through adversarial training, the generator learns to generate high-quality paths from TSP problem instances. The generator performs forward propagation through a Transformer encoder and a simple decoder layer, outputting the adjacency matrix. The discriminator evaluates the adjacency matrices of real and generated paths. The loss calculation for adversarial training is: Generator Loss = Adversarial Loss + Constraint Penalty, ensuring each city has one in-degree and one out-degree, meeting TSP path requirements. The discriminator loss is calculated using BCE With Logits Loss to classify real and fake samples, and label smoothing is employed for stable training. Training is conducted through forward propagation and backward gradient updates. The adaptive discriminator strength is adjusted based on the performance gap between the generator and discriminator. Dynamic training balancing adjusts the steps of the generator and discriminator during training to prevent pattern collapse and promote stable convergence. The generator learns to capture the inherent structural patterns of optimal TSP paths, generating high-quality initial solutions for new TSP problems. The online solution phase includes: A large-scale combinatorial optimization problem is obtained, and its features are input into the generator of a pre-trained conditional generative adversarial network to generate one or more high-quality initial solutions. The large-scale combinatorial optimization problem includes instances of combinatorial optimization problems that cannot be solved by an exact solver within a set time. The large-scale combinatorial optimization problem is a large-scale traveling salesman problem with 2000 cities applied to the field of logistics optimization. The data includes the coordinates of 2000 cities and their corresponding distance matrices. The high-quality initial solution is used as the starting point or initial population of the metaheuristic algorithm. The metaheuristic algorithm is then executed for iterative search and optimization to obtain the optimal path planning in logistics distribution. The metaheuristic algorithm is a large-scale neighborhood search (LNS). The initial path set generated by the generative adversarial network (GAN) is used as the starting solution for the LNS algorithm. The LNS algorithm begins its iterative process of destruction and repair to find a better solution. The GAN output is connected to the LNS input for iterative feedback. Solution quality evaluation triggers GAN regeneration, shortening the convergence time and improving solution quality. The algorithm also includes an intelligent perturbation step: during LNS operation, if the algorithm does not find a better solution in 10 consecutive iterations, a GAN-assisted intelligent perturbation mechanism is triggered. A subset of the current optimal path is used as a condition, and the GAN generator generates an optimized path segment to replace it. This new solution is then used to continue the LNS iteration.
2. The hybrid optimization solution method based on generative adversarial networks assisted by claim 1, characterized in that, The metaheuristic algorithm is a genetic algorithm, simulated annealing, tabu search, or large-scale neighborhood search.
3. The hybrid optimization solution method based on generative adversarial networks assisted by claim 1, characterized in that, The online solution phase further includes an intelligent perturbation step; wherein the intelligent perturbation step includes: When the metaheuristic algorithm gets stuck in a local optimum or fails to improve significantly over several generations, the generator of the conditional generative adversarial network is invoked again to generate a new solution that is sufficiently different from the current local optimum and has high-quality features, thereby perturbing the current search process and helping the algorithm escape the local optimum.
4. The hybrid optimization solution method based on generative adversarial networks assisted by claim 1, characterized in that, The exact solver is either Gurobi® or CPLEX®.
5. The hybrid optimization solution method based on generative adversarial networks assisted by claim 1, characterized in that, When the combinatorial optimization problem instance is a traveling salesman problem, if the number of nodes in the traveling salesman problem is 50-100, then the combinatorial optimization problem instance is determined to be a small-scale combinatorial optimization problem instance.
6. The hybrid optimization solution method based on generative adversarial networks assisted by claim 1, characterized in that, The conditional generative adversarial network is a Transformer-based conditional generative adversarial network. Its generator uses a Transformer encoder to process sequential data, and the discriminator is used to evaluate the authenticity and feasibility of the generated solution. The loss function of the adversarial training includes adversarial loss, reconstruction loss, feasibility loss and objective function loss.
7. The hybrid optimization solution method based on generative adversarial networks assisted by claim 1, characterized in that, The adversarial training process employs data augmentation and transfer learning to address the issue of limited data volume. The data augmentation includes path perturbation, and the transfer learning includes fine-tuning after pre-training on a public dataset.
8. A hybrid optimization solver based on generative adversarial networks (GANs) for implementing the method as described in any one of claims 1-7, characterized in that, The device includes: The offline training module is configured as follows: Multiple combinatorial optimization problem instances are solved using an exact solver to obtain their optimal solutions and form an optimal solution dataset. The optimal solution dataset includes instance ID, input features, optimal solutions, and target values. The combinatorial optimization problem instances include vehicle routing problem, traveling salesman problem, production scheduling problem, or supply chain optimization problem. A conditional generative adversarial network is constructed. The optimal solution in the optimal solution dataset is used as the real sample, and the features of the problem instance are used as the conditional input. The conditional generative adversarial network is then trained adversarially so that the generator of the conditional generative adversarial network learns the internal structure and pattern of the optimal solution. The online solver module is configured as follows: A large-scale combinatorial optimization problem is obtained, and its features are input into the generator of a pre-trained conditional generative adversarial network to generate one or more high-quality initial solutions; wherein, the large-scale combinatorial optimization problem includes instances of combinatorial optimization problems that cannot be solved by an exact solver within a set time. The high-quality initial solution is used as the starting point or initial population of the metaheuristic algorithm. The metaheuristic algorithm is executed to perform iterative search and optimization to obtain the optimized solution of the large-scale combinatorial optimization problem.
9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes the computer execution instructions stored in the memory to implement the hybrid optimization solution method based on generative adversarial network assistance as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the hybrid optimization solution method based on generative adversarial network assistance as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and system for meta-learning of neural combinatorial optimization heuristics
US20230214650A1
Local-search based solution of combinatorial optimization problem using annealer-based solvers
US20240330698A1