Mixed integer linear programming (MILP) problem solving method and device
By performing feature extraction and decomposition parameters processing on the MILP problem, selecting the appropriate decomposition strategy to decompose and solve the MILP problem, it solves the problem that it is difficult to choose the appropriate decomposition strategy in the prior art, and improves the solution efficiency and possibility of the MILP problem.
Patent Information
- Application Number
- PCT/CN2024/128615
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-31
- Filing Date
- 2024-10-30
- Publication Date
- 2025-05-08
AI Technical Summary
When solving the problem of large-scale mixed integer programming (MILP), it is difficult to choose an appropriate decomposition strategy, resulting in difficulty in decoupling and low solution efficiency.
By extracting the MILP problem features, its decomposition parameters are obtained, including the problem decomposition number of blocks and the coupled variable proportion parameters, and then the problem is decomposed based on these parameters, sub-problems are obtained and solved separately.
This method can select appropriate decomposition strategies based on the feature information of the problem, improve the efficiency and possibility of feasible solutions of MILP problems, reduce the scale of the problem or achieve decoupling.
Smart Images

Figure CN2024128615_08052025_PF_FP_ABST
Abstract
Description
Method and device for solving mixed integer programming MILP problems
[0001] This application claims priority to the Chinese patent application with application number 202311467341.5 filed with the State Intellectual Property Office of China on November 3, 2023, and priority to the Chinese patent application with invention name “Mathematical solution method, device, computing device cluster and storage medium”, and priority to the Chinese patent application with application number 202410137720.6 filed with the State Intellectual Property Office of China on January 31, 2024, and priority to the Chinese patent application with invention name “Mixed integer programming MILP problem solving method and device”, all of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of data processing technology, and in particular to a method and device for solving a mixed integer programming (MILP) problem. Background Art
[0003] For mixed integer linear programming (MILP) problems stemming from real-world production, we typically start with the business context of the problem, have business experts understand and abstract the mathematical model, use modeling software to convert the mathematical model into a universal standard model file, and then utilize a solver to complete the solution and derive the decision results. The solver's solution of the standard model file plays a crucial role in the entire process. The key to solving MILP problems is how to efficiently and accurately obtain feasible solutions that meet customer requirements.
[0004] MILP problems encountered in real-world business scenarios are typically large in scale, and the cost of directly solving them using a MILP solver is often prohibitive for customers. The industry generally adopts a general problem decomposition strategy. First, using general decomposition strategies such as the Dantzig-Wolfe decomposition algorithm (DW) and Benders, the large-scale problem is broken down into multiple smaller subproblems. These subproblems are then solved in parallel. Finally, the feasible solutions to the subproblems are combined based on the decomposition method to recover the solution to the original problem.
[0005] While this approach can solve problems with high computational costs, the difficulty encountered with decomposition strategies for large-scale problems is that complete decoupling is often difficult to achieve in practice, with coupled variables or constraints often present. Consequently, there is often no single decomposition strategy for the same problem, making it difficult to select the appropriate one.
[0006] Summary of the Invention
[0007] The present application discloses a method and apparatus for solving a mixed integer programming (MILP) problem, which can obtain a suitable decomposition strategy, thereby improving the efficiency and possibility of obtaining a feasible solution to the MILP problem.
[0008] In a first aspect, an embodiment of the present application provides a method for solving a mixed integer programming (MILP) problem, comprising:
[0009] Obtaining description information of the MILP problem, the description information including an objective function, variables, constraints, and an integrity condition, the integrity condition being used to specify that some or all of the variables are integers, and performing feature extraction on the MILP problem using the description information of the MILP problem to obtain feature information of the MILP problem, the MILP feature information being used to describe the problem structure and / or complexity of the MILP problem;
[0010] Processing the characteristic information of the MILP problem to obtain a decomposition parameter of the MILP problem, wherein the decomposition parameter of the MILP problem includes at least one of the number of problem decomposition blocks and a coupling variable ratio parameter;
[0011] Decomposing the MILP problem based on the decomposition parameter of the MILP problem to obtain at least one sub-problem;
[0012] The at least one sub-problem is solved separately to obtain a solution to the MILP problem.
[0013] In an embodiment of the present application, feature information of the MILP problem is obtained by extracting features from the MILP problem; decomposition parameters of the general MILP problem are obtained based on the feature information of the MILP problem; the decomposition parameters of the MILP problem include at least one of the number of problem decomposition blocks and a coupling variable ratio parameter; the MILP problem is then decomposed based on the decomposition parameters of the MILP problem to obtain at least one subproblem; and the at least one subproblem is solved separately to obtain a solution to the MILP problem. By adopting this approach, the decomposition parameters of the MILP problem are first obtained, and then the MILP problem is decomposed based on the decomposition parameters to obtain at least one subproblem. In this way, the MILP problem can be decomposed based on an appropriate problem decomposition strategy, achieving the goal of problem decoupling or reducing the problem size, thereby improving the efficiency and possibility of obtaining a feasible solution to the MILP problem.
[0014] The decomposition parameter can be understood as the decomposition strategy for the MILP problem. For example, the decomposition parameter can be the number of decomposition blocks, that is, the number of subproblems into which the general MILP problem is decomposed. Another example is the coupled variable ratio parameter, that is, the ratio of coupled variables in the decomposition strategy for the general MILP problem. Coupled variables can be understood as variables that appear simultaneously in different constraints. Of course, the decomposition parameter can also include the number of decomposition blocks and the coupled variable ratio parameter.
[0015] Obtaining the decomposition parameters of the MILP problem helps to decompose the original problem based on the decomposition parameters.
[0016] In a possible implementation, the characteristic information of the MILP problem includes at least one of sparsity of a coefficient matrix, a distribution of non-zero elements, and a variable graph of the MILP problem.
[0017] Exemplarily, at least one of the sparsity, non-zero element distribution, and variable graph is input into a first strategy generator to obtain decomposition parameters of the MILP problem.
[0018] The coefficient matrix sparsity of the general MILP problem is the ratio of the number of nonzero elements in the constraint matrix, where the constraint matrix is the matrix corresponding to the constraints of the general MILP problem. The nonzero element distribution of the general MILP problem is the arrangement of the nonzero elements in the rows and columns of the constraint matrix. The variable graph of the general MILP problem is the graph structure composed of constraints and variables.
[0019] In a possible implementation, solving the at least one sub-problem separately to obtain a solution to the MILP problem includes:
[0020] Performing feature extraction on the at least one sub-problem to obtain feature information of the at least one sub-problem; the feature information includes at least one of a constraint type, a variable type, and an objective function coefficient;
[0021] Processing, based on characteristic information of each subproblem in the at least one subproblem, to obtain a solution strategy for the at least one subproblem and solution parameters corresponding to the solution strategy, wherein the solution strategy includes a recommended heuristic algorithm;
[0022] Solve the at least one subproblem using the solution strategy for the at least one subproblem and solution parameters corresponding to the solution strategy to obtain a solution to the at least one subproblem;
[0023] A solution to the MILP problem is obtained based on a solution to the at least one subproblem.
[0024] This example is based on extracting features from subproblems and obtaining solution strategies corresponding to the subproblems and solution parameters corresponding to the solution strategies, which can facilitate subsequent solutions to the subproblems.
[0025] Exemplarily, feature extraction is performed on each of the at least one sub-problem to obtain feature information of the at least one sub-problem; the feature information includes at least one of a constraint type, a variable type, and an objective function coefficient;
[0026] Inputting feature information of each subproblem of the at least one subproblem into a second strategy generator, respectively, to obtain a solution strategy for the at least one subproblem and solution parameters corresponding to the solution strategy, wherein the solution strategy includes a recommended heuristic algorithm;
[0027] Processing the at least one subproblem based on the solution strategy for the at least one subproblem and solution parameters corresponding to the solution strategy to obtain a solution to the at least one subproblem;
[0028] A solution to the MILP problem is obtained based on a solution to the at least one subproblem.
[0029] The constraint type is the combination of variables in the constraint. The variable type is the attribute of the variable (e.g., integer variable, binary variable, or continuous variable). The objective function coefficient is the multiplier before the variable in the objective function.
[0030] In another possible implementation, solving the at least one sub-problem separately to obtain a solution to the MILP problem includes:
[0031] Receiving a first instruction input by a user, wherein the first instruction indicates a user-configured custom solution algorithm, wherein the custom solution algorithm is used to solve the at least one sub-problem;
[0032] Solve the at least one sub-problem using the custom solving algorithm to obtain a solution to the at least one sub-problem;
[0033] A solution to the MILP problem is obtained based on a solution to the at least one subproblem.
[0034] In this example, when a user-defined heuristic algorithm exists, the solution is performed based on the user-defined heuristic algorithm.
[0035] Exemplarily, the algorithm may be called based on a user-defined heuristic algorithm callback interface to solve the subproblem.
[0036] In another possible implementation, a second instruction input by a user is received, wherein the second instruction indicates a solution algorithm, the solution algorithm being used to solve the at least one subproblem, the solution algorithm including at least one of a recommended heuristic algorithm, a general heuristic algorithm, and a general solution algorithm, the general heuristic algorithm being a preset heuristic algorithm, and the general solution algorithm being a non-heuristic algorithm;
[0037] Solving the at least one sub-problem separately to obtain a solution to the MILP problem includes:
[0038] The at least one sub-problem is solved respectively using the solution algorithm indicated by the second instruction to obtain a solution to the MILP problem.
[0039] This example solves the problem based on the solution algorithm specified by the user.
[0040] In one possible implementation, the second instruction includes a solution priority, where the solution priority represents a solution speed. Solving the at least one subproblem using the solution algorithm indicated by the second instruction to obtain a solution to the MILP problem includes:
[0041] For the i-th subproblem in the at least one subproblem, i is a positive integer;
[0042] If the solution priority is not lower than the first priority, the recommended heuristic algorithm is used to solve the i-th subproblem to obtain a solution to the i-th subproblem.
[0043] In this example, different solving algorithms can be selected based on the solution priority settings to achieve the solution goal. For example, the priority can be set based on the solution speed, or based on the solution accuracy, quality, etc.
[0044] In one possible implementation, if the solution priority is not lower than the second priority, the recommended heuristic algorithm and the general heuristic algorithm are used respectively to solve the i-th subproblem to obtain a solution to the i-th subproblem, wherein the first priority is higher than the second priority.
[0045] In one possible implementation, if the solution priority is not lower than the third priority, the recommended heuristic algorithm, the general heuristic algorithm and the general solution algorithm are used respectively to solve the i-th subproblem to obtain the solution to the i-th subproblem, wherein the second priority is higher than the third priority.
[0046] In a possible implementation, the recommended heuristic algorithm is used to solve the i-th subproblem to obtain a first solution to the i-th subproblem;
[0047] Solving the i-th subproblem using the universal heuristic algorithm to obtain a second solution to the i-th subproblem;
[0048] Solve the i-th subproblem using the general solution algorithm to obtain a third solution to the i-th subproblem;
[0049] A solution to the i-th subproblem is obtained based on the first solution, the second solution, and the third solution to the i-th subproblem.
[0050] In this example, the solution to the subproblem is obtained by combining the solutions obtained by multiple solving algorithms. This can help improve the quality of the solution to the subproblem.
[0051] In a second aspect, an embodiment of the present application provides a mixed integer programming (MILP) problem solving device, comprising:
[0052] an acquisition module, configured to acquire description information of the MILP problem, the description information including an objective function, variables, constraints, and an integrity condition, the integrity condition being used to specify that some or all of the variables are integers, and to perform feature extraction on the MILP problem using the description information of the MILP problem to obtain feature information of the MILP problem, the feature information of the MILP being used to describe the problem structure and / or complexity of the MILP problem;
[0053] a processing module, configured to process the characteristic information of the MILP problem to obtain a decomposition parameter of the MILP problem, wherein the decomposition parameter of the MILP problem includes at least one of the number of problem decomposition blocks and a coupling variable ratio parameter;
[0054] a decomposition module, configured to decompose the MILP problem based on a decomposition parameter of the MILP problem to obtain at least one subproblem;
[0055] A solving module is used to solve the at least one sub-problem respectively to obtain a solution to the MILP problem.
[0056] In a possible implementation, the characteristic information of the MILP problem includes at least one of sparsity of a coefficient matrix, a distribution of non-zero elements, and a variable graph of the MILP problem.
[0057] In a possible implementation, the solution module is configured to:
[0058] Performing feature extraction on the at least one sub-problem to obtain feature information of the at least one sub-problem; the feature information includes at least one of a constraint type, a variable type, and an objective function coefficient;
[0059] Processing, based on characteristic information of each subproblem in the at least one subproblem, to obtain a solution strategy for the at least one subproblem and solution parameters corresponding to the solution strategy, wherein the solution strategy includes a recommended heuristic algorithm;
[0060] Solve the at least one subproblem using the solution strategy for the at least one subproblem and solution parameters corresponding to the solution strategy to obtain a solution to the at least one subproblem;
[0061] A solution to the MILP problem is obtained based on a solution to the at least one subproblem.
[0062] In another possible implementation, the solution module is configured to:
[0063] Receiving a first instruction input by a user, wherein the first instruction indicates a user-configured custom solution algorithm, wherein the custom solution algorithm is used to solve the at least one sub-problem;
[0064] Solve the at least one sub-problem using the custom solving algorithm to obtain a solution to the at least one sub-problem;
[0065] A solution to the MILP problem is obtained based on a solution to the at least one subproblem.
[0066] In another possible implementation, the system further includes a receiving module, configured to: receive a second instruction input by a user, wherein the second instruction indicates a solution algorithm, the solution algorithm is used to solve the at least one subproblem, the solution algorithm includes at least one of a recommended heuristic algorithm, a general heuristic algorithm, and a general solution algorithm, the general heuristic algorithm is a preset heuristic algorithm, and the general solution algorithm is a non-heuristic algorithm;
[0067] The solving module is configured to use the solving algorithm indicated by the second instruction to solve the at least one sub-problem respectively to obtain a solution to the MILP problem.
[0068] In one possible implementation, the second instruction includes a solution priority, where the solution priority represents a speed of solution. For the i-th subproblem in the at least one subproblem, i is a positive integer, and the solution module is further configured to:
[0069] If the solution priority is not lower than the first priority, the recommended heuristic algorithm is used to solve the i-th subproblem to obtain a solution to the i-th subproblem.
[0070] In a possible implementation, the solution module is further configured to:
[0071] If the solution priority is not lower than the second priority, the recommended heuristic algorithm and the general heuristic algorithm are used respectively to solve the i-th subproblem to obtain a solution to the i-th subproblem, wherein the first priority is higher than the second priority.
[0072] In a possible implementation, the solution module is further configured to:
[0073] If the solution priority is not lower than the third priority, the recommended heuristic algorithm, the general heuristic algorithm and the general solution algorithm are used respectively to solve the i-th subproblem to obtain a solution to the i-th subproblem, wherein the second priority is higher than the third priority.
[0074] In a possible implementation, the solution module is further configured to:
[0075] Solve the i-th subproblem using the recommended heuristic algorithm to obtain a first solution to the i-th subproblem;
[0076] Solving the i-th subproblem using the universal heuristic algorithm to obtain a second solution to the i-th subproblem;
[0077] Solve the i-th subproblem using the general solution algorithm to obtain a third solution to the i-th subproblem;
[0078] A solution to the i-th subproblem is obtained based on the first solution, the second solution, and the third solution to the i-th subproblem.
[0079] In a third aspect, the present application provides a computing device cluster, comprising at least one computing device, each computing device comprising a processor and a memory;
[0080] The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method provided in any possible implementation of the first aspect.
[0081] In a fourth aspect, the present application provides a computer program product comprising instructions, which, when executed by a computing device cluster, enables the computing device cluster to execute the method provided in any possible implementation of the first aspect.
[0082] In a fifth aspect, the present application provides a computer-readable storage medium comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method provided in any possible implementation of the first aspect.
[0083] It is understandable that the apparatus described in the second aspect, the computing device cluster described in the third aspect, the computer program product described in the fourth aspect, or the computer-readable storage medium described in the fifth aspect are all used to perform any of the methods provided in the first aspect. Therefore, the beneficial effects that can be achieved can be referenced to the beneficial effects of the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] The following is an introduction to the drawings used in the embodiments of this application.
[0085] FIG1 is a schematic diagram of a mixed integer programming (MILP) problem solving system provided in an embodiment of the present application;
[0086] FIG2 is a flow chart of a method for solving a mixed integer programming (MILP) problem according to an embodiment of the present application;
[0087] FIG3 is a schematic diagram of a mixed integer programming (MILP) problem solving method provided in an embodiment of the present application;
[0088] FIG4 is a general strategy generator provided in an embodiment of the present application;
[0089] FIG5 is a problem decomposition strategy generator provided by an embodiment of the present application;
[0090] FIG6 is a sub-problem solving strategy generator provided by an embodiment of the present application;
[0091] FIG7 is a schematic diagram of a multi-priority heuristic solution method provided in an embodiment of the present application;
[0092] FIG8 is a schematic diagram of the structure of a mixed integer programming MILP problem solving device provided in an embodiment of the present application;
[0093] FIG9 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0094] FIG10 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;
[0095] FIG11 is a schematic diagram of the structure of another computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION
[0096] The following describes the embodiments of the present application in conjunction with the accompanying drawings. The terms used in the implementation methods of the embodiments of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the present application.
[0097] For ease of understanding, the following examples provide some explanations of concepts related to the embodiments of the present application for reference.
[0098] 1.MILP Problem
[0099] MILP problems are a class of optimization problems characterized by: 1) both the objective function and the constraints being linear; and 2) all or some of the variables involved being integers. MILP problems are considered non-deterministic polynomial (NP)-hard problems. MILP problems are used in many practical scenarios, including cutting, bin packing, path planning, and batch scheduling. Software systems used to solve MILP problems are generally referred to as MILP solvers.
[0100] 2. Problem decomposition
[0101] Problem decomposition is a technique for solving large-scale, complex optimization problems. For optimization problems with multiple variables and constraints, the goal is to decompose them into two or more subproblems with independent variables and constraints. These problems are then solved separately and the results recombined. For problems that cannot be decomposed independently, the decomposition sometimes includes coupled variables or constraints.
[0102] In the solver, the initial problem is decomposed into subproblems, and the subproblems are solved to obtain the solution of each subproblem. Then, how to use the solution of each subproblem to obtain the solution of the initial problem depends on the specific decomposition method and solution algorithm. Generally speaking, there are the following common situations:
[0103] If you're using a divide-and-conquer algorithm, you usually need to combine the solutions to the subproblems to get the solution to the original problem. For example, in quick sort, you need to combine the sorted left and right subarrays into a single sorted array, which will serve as solution 1 for the original array.
[0104] If dynamic programming is used, it is usually necessary to construct a solution to the original problem based on the solutions to the subproblems. For example, in the knapsack problem, it is necessary to backtrack to the optimal solution to the original problem based on the optimal values and choices of the subproblems.
[0105] If a greedy approach is used, it is usually necessary to accumulate the optimal choices for the subproblems to obtain the solution to the original problem. For example, in the activity selection problem, the activities selected at each step need to be added to the final solution set.
[0106] If Benders decomposition is used, it is usually necessary to generate cutting planes or branch and bound based on the dual solutions of the subproblems and update the constraints of the main problem until the optimal solution of the original problem is found4.
[0107] 3. Heuristics
[0108] Heuristics are a way of thinking about solving optimization problems, a method of solving any problem or self-exploration. The methods they use are not guaranteed to be optimal, complete, or rational, but they can often approach or even reach the optimal target value at a relatively low cost.
[0109] 4. General heuristic algorithms generally refer to heuristic methods for general MILP problem types. For example, general heuristic algorithms are pre-built heuristic algorithms.
[0110] 5. General solvers (general solution algorithms) generally refer to solvers for general MILP problem types. General solution algorithms are also known as non-heuristic algorithms. Non-heuristic algorithms are methods that fully or partially traverse the solution space of a problem, following fixed steps and logic, rather than relying on experience or rules. They guarantee finding an optimal solution or a quality-assured approximate solution. Non-heuristic algorithms can typically handle a wider range of problems, but may require more time and resources.
[0111] The main differences between heuristic and non-heuristic algorithms lie in whether they guarantee optimality, whether they rely on the characteristics of the problem, whether they use heuristic functions, and the complexity and efficiency of the search process. Heuristic algorithms are more flexible, faster, and better suited to complex practical problems, but they may get stuck in local optima or produce inferior solutions. Non-heuristic algorithms are more rigorous, more reliable, and better suited to solving theoretical, abstract problems, but they may incur greater computational overhead or fail to find feasible solutions.
[0112] The above exemplary description of the concepts can be applied in the following embodiments.
[0113] The system architecture of the embodiment of the present application will be described in detail below with reference to the accompanying drawings. Referring to FIG1 , FIG1 is a schematic diagram of a mixed integer programming (MILP) problem solving system applicable to the embodiment of the present application, the system including a server 101 and a terminal 102 .
[0114] The server 101 is a device with centralized computing capabilities. Exemplarily, the server 101 can be implemented by a server, a virtual machine, a cloud, or a robot.
[0115] When the server 101 includes a server, the server type includes but is not limited to a general-purpose computer, a dedicated server computer, a blade server, etc. This application does not impose a strict limit on the number of servers included in the server 101, and the number can be one or multiple (such as a server cluster, etc.).
[0116] A virtual machine is a computing module that simulates complete hardware system functions through software and runs in a completely isolated environment. Of course, in addition to virtual machines, the server 101 can also be implemented through other computing instances, such as containers.
[0117] The cloud is a software platform that uses application virtualization technology to enable one or more software or applications to be developed and run in an independent virtualized environment. Optionally, when the server 101 is implemented via the cloud, the cloud can be deployed on a public cloud, a private cloud, or a hybrid cloud.
[0118] The terminal 102 may also be referred to as a terminal device, user equipment (UE), mobile station, mobile terminal, etc. The terminal can be widely used in various scenarios, for example, device-to-device (D2D), vehicle-to-everything (V2X) communication, machine-type communication (MTC), Internet of Things (IOT), virtual reality, augmented reality, industrial control, autonomous driving, telemedicine, smart grid, smart furniture, smart office, smart wearable, smart transportation, smart city, etc. The terminal can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a wearable device, a vehicle, a drone, a helicopter, an airplane, a ship, a robot, a robotic arm, a smart home device, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal.
[0119] The above describes the architecture of the embodiment of the present application. The following describes the method of the embodiment of the present application in detail.
[0120] Referring to Figure 2, it is a flow chart of a mixed integer programming MILP problem solving method provided by an embodiment of the present application. Optionally, the method can be applied to the aforementioned mixed integer programming MILP problem solving system, such as the mixed integer programming MILP problem solving system shown in Figure 1. The mixed integer programming MILP problem solving method shown in Figure 2 may include steps 201-204. It should be understood that this application is described in the order of 201-204 for the convenience of description, and is not intended to be limited to execution in the above order. The embodiment of the present application does not limit the order of execution, execution time, number of executions, etc. of the above one or more steps. The following description is made using the execution subject of steps 201-204 of the mixed integer programming MILP problem solving method as a server as an example, and this application is also applicable to other execution subjects. Steps 201-204 are as follows:
[0121] 201. Obtain description information of the MILP problem, where the description information includes an objective function, variables, constraints, and an integrity condition, where the integrity condition is used to specify that some or all of the variables are integers, and perform feature extraction on the MILP problem using the description information of the MILP problem to obtain feature information of the MILP problem, where the MILP feature information is used to describe the problem structure and / or complexity of the MILP problem.
[0122] The above-mentioned MILP problem can be, for example, at least one of supply chain, logistics, energy, production scheduling, and other problems. Of course, it can also be other problems, and this solution does not limit this.
[0123] The constraints mentioned above can be, for example, knapsack constraints, clique constraints, set cover constraints, set splitting constraints, set configuration constraints, etc. For example, the objective function and constraints are all linear, and some or all of the variables involved are integer variables. Other forms are also possible, and this solution does not limit them.
[0124] In one possible implementation, the MILP problem is a general MILP problem.
[0125] In a possible implementation, the characteristic information of the MILP problem includes at least one of coefficient matrix sparsity, non-zero element distribution, and variable graph of a general MILP problem.
[0126] The coefficient matrix sparsity of the MILP problem is the ratio of the number of nonzero elements in the constraint matrix, where the constraint matrix is the matrix corresponding to the constraints of the general MILP problem. The nonzero element distribution of the MILP problem is the arrangement of the nonzero elements in the rows and columns of the constraint matrix. The variable graph of the MILP problem is the graph structure composed of the constraints and variables.
[0127] In one possible implementation, the feature information can be obtained by inputting the MILP problem into a first preset neural network model for feature extraction. Optionally, the first preset neural network model can be a convolutional neural network model.
[0128] 202. Process the characteristic information of the MILP problem to obtain decomposition parameters of the MILP problem, wherein the decomposition parameters of the MILP problem include at least one of the number of problem decomposition blocks and a coupling variable ratio parameter.
[0129] The decomposition parameter can be understood as the decomposition strategy of the MILP problem.
[0130] For example, the decomposition parameter can be the number of decomposition blocks, that is, the number of subproblems into which the MILP problem is decomposed. Another example is the coupled variable ratio parameter, which specifies the ratio of coupled variables in the MILP decomposition strategy. Coupled variables can be understood as variables that appear simultaneously in different constraints. Alternatively, the decomposition parameter can include both the number of decomposition blocks and the coupled variable ratio parameter.
[0131] In a possible implementation, at least one of the characteristic information, such as sparsity, non-zero element distribution, and variable graph, is input into a first strategy generator to obtain decomposition parameters of the MILP problem.
[0132] The first strategy generator may be, for example, a second preset neural network model.
[0133] In this example, obtaining the decomposition parameters of the MILP problem helps to decompose the original problem based on the decomposition parameters.
[0134] 203. Decompose the MILP problem based on the decomposition parameters of the MILP problem to obtain at least one sub-problem.
[0135] According to the above-obtained number of problem decomposition blocks and / or coupling variable ratio parameters, the MILP problem is decomposed to obtain one or more sub-problems.
[0136] The one or more sub-problems obtained by the decomposition may be coupled.
[0137] 204. Solve the at least one sub-problem separately to obtain a solution to the MILP problem.
[0138] For example, the solution to the MILP problem can be obtained by solving the at least one subproblem in parallel and then performing processing based on the solutions to the at least one subproblem. This processing can include, for example, concatenating, fine-tuning, and verifying the solutions to the subproblems.
[0139] In a first possible implementation, step 204 may include steps 2041-2044, specifically as follows:
[0140] 2041. Perform feature extraction on the at least one sub-problem to obtain feature information of the at least one sub-problem.
[0141] In a possible implementation, the characteristic information of the subproblem includes at least one of a constraint type, a variable type, and an objective function coefficient.
[0142] The constraint type is the combination of variables in the constraint. The variable type is the attribute of the variable (e.g., integer variable, binary variable, or continuous variable). The objective function coefficient is the multiplier before the variable in the objective function.
[0143] In a possible implementation, the feature information of the at least one sub-problem can be obtained by inputting the at least one sub-problem into a third preset neural network model for feature extraction.
[0144] Optionally, the third preset neural network model may be a convolutional neural network model. It is understandable that the third preset neural network model may be the same model as the first preset neural network model, and this solution does not impose any limitation on this.
[0145] 2042. Process the feature information of each subproblem in the at least one subproblem to obtain a solution strategy for the at least one subproblem and solution parameters corresponding to the solution strategy, wherein the solution strategy includes a recommended heuristic algorithm.
[0146] Exemplarily, the characteristic information of each subproblem in the at least one subproblem is input into a second strategy generator to obtain a solution strategy for the at least one subproblem and solution parameters corresponding to the solution strategy, wherein the solution strategy includes a recommended heuristic algorithm. The second strategy generator can be the same as the first strategy generator or a different one, and this is not limited in this solution.
[0147] By inputting different sub-problems into the second strategy generator respectively, the solution strategy of each sub-problem and the solution parameters corresponding to the solution strategy are obtained.
[0148] The solution strategy includes a recommended heuristic algorithm, that is, a heuristic algorithm recommended by the server. The recommended heuristic algorithm can be a single heuristic algorithm or multiple heuristic algorithms, such as a combination of multiple heuristic algorithms, which is not limited in this solution.
[0149] In this example, by obtaining a solution strategy for at least one sub-problem and solution parameters corresponding to the solution strategy, it can be helpful to solve the sub-problem later.
[0150] 2043. Solve the at least one subproblem using the solution strategy for the at least one subproblem and solution parameters corresponding to the solution strategy to obtain a solution to the at least one subproblem.
[0151] In this example, a solution to the at least one sub-problem can be obtained by solving the corresponding sub-problem based on the heuristic algorithm corresponding to the at least one sub-problem recommended by the server.
[0152] In a second possible implementation, step 204 may include the following steps A1-A3, specifically as follows:
[0153] A1. Receive a first instruction input by a user, wherein the first instruction indicates a user-configured custom solution algorithm, and the custom solution algorithm is used to solve the at least one sub-problem.
[0154] A2. Solve the at least one sub-problem using the custom solving algorithm to obtain a solution to the at least one sub-problem.
[0155] A3. Obtain a solution to the MILP problem based on a solution to the at least one subproblem.
[0156] The first instruction of this example indicates that there is a user-defined heuristic algorithm. Then, the at least one sub-problem is processed based on the user-defined heuristic algorithm to obtain a solution to the at least one sub-problem.
[0157] That is to say, when there is a user-defined heuristic algorithm, the sub-problem is solved based on the user-defined heuristic algorithm.
[0158] When a user-defined heuristic algorithm exists for a subproblem (e.g., a particular subproblem or several subproblems), the user-defined heuristic algorithm is used to solve the subproblem. For other subproblems, the above-recommended heuristic algorithm can be used to solve the problem.
[0159] In a third possible implementation, step 205 is further included, which is specifically as follows:
[0160] 205. Receive a second instruction input by the user, wherein the second instruction indicates a solution algorithm, the solution algorithm is used to solve the at least one sub-problem, the solution algorithm includes at least one of a recommended heuristic algorithm, a general heuristic algorithm, and a general solution algorithm, the general heuristic algorithm is a preset heuristic algorithm, and the general solution algorithm is a non-heuristic algorithm.
[0161] Accordingly, step 204 may include:
[0162] The at least one subproblem is solved using the solution algorithm indicated by the second instruction to obtain a solution to the MILP problem. In other words, the user indicates which algorithm or algorithms to use to solve the subproblem. Then, the solution is performed based on the user's instruction.
[0163] For example, if the user instructs to use the recommended heuristic algorithm for solving the problem, the recommended heuristic algorithm will be used to solve the subproblem. For another example, if the user instructs to use the general heuristic algorithm for solving the problem, the general heuristic algorithm will be used to solve the subproblem. For another example, if the user instructs to use the general solver (i.e., the general solving algorithm) for solving the problem, the general solver will be used to solve the subproblem. For another example, if the user instructs to use the recommended heuristic algorithm and the general solver for solving the problem, the recommended heuristic algorithm and the general solver will be used to solve the subproblem respectively. For another example, if the user instructs to use the recommended heuristic algorithm, the general heuristic algorithm, and the general solver for solving the problem, the recommended heuristic algorithm, the general heuristic algorithm, and the general solver will be used to solve the subproblem respectively.
[0164] In a possible implementation, the second instruction includes a solution priority, where the solution priority represents a solution speed.
[0165] In other words, the user indicates the priority of the solution, for example, a high priority means a fast solution speed, while a low priority means a slow solution speed. Optionally, the faster the solution speed, the lower the solution accuracy and quality, while the slower the solution speed, the higher the solution accuracy and quality, etc.
[0166] Wherein, for the i-th subproblem in the at least one subproblem, i is a positive integer;
[0167] If the solution priority is not lower than the first priority, the recommended heuristic algorithm is used to solve the i-th subproblem to obtain a solution to the i-th subproblem.
[0168] For the solution of the recommended heuristic algorithm, please refer to the introduction of steps 2041-2042, which will not be repeated here.
[0169] Exemplarily, if the user's solution priority is not lower than the first priority, the i-th sub-problem is processed based on the solution strategy of the i-th sub-problem and the solution parameters corresponding to the solution strategy to obtain a solution to the i-th sub-problem.
[0170] In one possible implementation, if the user's solution priority is not lower than the second priority, the i-th sub-problem is processed based on the solution strategy of the i-th sub-problem, the solution parameters corresponding to the solution strategy, and the general heuristic algorithm to obtain a solution to the i-th sub-problem, wherein the first priority is higher than the second priority.
[0171] In one possible implementation, if the user's solution priority is not lower than the third priority, the i-th sub-problem is processed based on the solution strategy of the i-th sub-problem and the solution parameters corresponding to the solution strategy, the general heuristic algorithm and the general solver to obtain a solution to the i-th sub-problem, wherein the second priority is higher than the third priority.
[0172] That is, when the priority is not lower than the first priority, the recommended heuristic algorithm is used to solve the subproblem. When the priority is not lower than the second priority, the recommended heuristic algorithm and the general heuristic algorithm are used to solve the subproblem. When the priority is not lower than the third priority, the recommended heuristic algorithm, the general heuristic algorithm, and the general solver are used to solve the subproblem.
[0173] Exemplarily, for the i-th subproblem among the at least one subproblem, if the user's solution priority is not lower than the third priority, then based on the solution strategy of the i-th subproblem and the solution parameters corresponding to the solution strategy, the i-th subproblem is processed to obtain a first solution to the i-th subproblem; and based on the universal heuristic algorithm, the i-th subproblem is processed to obtain a second solution to the i-th subproblem; and based on the universal solver, the i-th subproblem is processed to obtain a third solution to the i-th subproblem; and then, based on the first solution, the second solution, and the third solution to the i-th subproblem, a solution to the i-th subproblem is obtained. For example, based on the objective function, a solution with a better objective value is selected from the first solution, the second solution, and the third solution.
[0174] Regarding the solution to the sub-problem when the user's solution priority is not lower than the second priority, please refer to the introduction to the solution to the sub-problem when the user's solution priority is not lower than the third priority, which will not be repeated here.
[0175] Alternatively, different solution algorithms can be set based on different priorities. For example, if the solution priority is first, the recommended heuristic algorithm is used for solution. If the solution priority is second, a general heuristic algorithm is used for solution. If the solution priority is third, a general solution algorithm is used for solution, and so on. This solution does not impose any restrictions on this.
[0176] In a fourth possible implementation, a check is performed to determine whether a user-defined heuristic algorithm exists. If so, the subproblem is solved based on the user-defined heuristic algorithm. If not, a second instruction input by the user is received, wherein the second instruction indicates a solution algorithm, including at least one of the recommended heuristic algorithm, a general heuristic algorithm, and a general solver. For an introduction to this part, please refer to the description of step 2043 above and will not be repeated here.
[0177] It can be understood that the first to fourth possible implementations provided above can be used in combination, etc., and this solution does not limit this.
[0178] 2044. Obtain a solution to the MILP problem based on a solution to the at least one subproblem.
[0179] For example, by synthesizing the feasible solutions of these subproblems, the solution of the MILP problem can be obtained.
[0180] In an embodiment of the present application, feature information of the MILP problem is obtained by extracting features from the MILP problem; decomposition parameters of the MILP problem are obtained based on the feature information of the MILP problem; the decomposition parameters of the MILP problem include at least one of the number of problem decomposition blocks and a coupling variable ratio parameter; the MILP problem is then decomposed based on the decomposition parameters of the MILP problem to obtain at least one subproblem; and the at least one subproblem is solved separately to obtain a solution to the MILP problem. By adopting this approach, the decomposition parameters of the MILP problem are first obtained, and then the MILP problem is decomposed based on the decomposition parameters to obtain at least one subproblem. In this way, the MILP problem can be decomposed based on an appropriate problem decomposition strategy, achieving the goal of problem decoupling or reducing the problem size, thereby improving the efficiency and possibility of obtaining a feasible solution to the MILP problem.
[0181] 3 is a schematic diagram of a mixed integer programming MILP problem solving method provided by an embodiment of the present application. The mixed integer programming MILP problem solving method shown in FIG3 may include steps 301-309. Steps 301-309 are as follows:
[0182] 301. Start.
[0183] 302. Read the question.
[0184] Read the MILP problem.
[0185] 303. Input problem decomposition strategy generator.
[0186] The above problem is input as input data to the problem decomposition strategy generator. The problem decomposition strategy generator can perform feature extraction on the problem, obtaining feature information such as that described in step 201 in the embodiment shown in FIG2 . Hyperparameter inference is then performed based on this feature information to obtain problem decomposition parameters, such as the number of problem decomposition blocks and the coupled variable ratio parameter.
[0187] In one possible implementation, as shown in FIG. 4 , a general strategy generator is provided for an embodiment of the present application, wherein the input data of step 401 is input into the general strategy generator for processing in step 402, and the strategy selection and parameters are output in step 403. For the input data, the user selection in step 404 can be used to determine whether to use the black box optimization engine 405 or the inference engine 406 for online training to obtain the corresponding strategy, thereby supporting the next step of the solution operation. At the same time, based on existing historical selections and execution feedback, an offline training label database 407 is established, and the user selection in step 408 determines whether to use the black box optimization engine 409 or the inference engine 410 for offline training to enhance the capabilities of the instant inference engine 406.
[0188] FIG5 shows a problem decomposition strategy generator provided by an embodiment of the present application. The original problem data is read in and features are extracted to obtain feature information, such as the coefficient matrix, the degree of coefficients, the distribution of nonzero elements, and the variable graph. This feature information is then input into the general strategy generator shown in FIG4 for processing to obtain problem decomposition parameters, such as the number of problem decomposition blocks and the coupled variable ratio parameter.
[0189] 304. Output problem decomposition parameters.
[0190] 305. Decompose the problem based on the problem decomposition parameter to obtain at least one sub-problem.
[0191] 306. Input at least one sub-problem into a sub-problem solving strategy generator for processing to obtain a solving strategy and solving parameters for the sub-problem.
[0192] The at least one subproblem is input as input data to a subproblem-solving strategy generator. The subproblem-solving strategy generator may perform feature extraction on the subproblem, obtaining feature information such as that described in step 2041 in the embodiment shown in FIG2 . Hyperparameter inference is then performed based on this feature information to obtain a solution strategy and solution parameters for the at least one subproblem. The solution strategy includes a recommended heuristic algorithm.
[0193] In one possible implementation, as shown in FIG6 , a subproblem-solving strategy generator is provided in an embodiment of the present application. Subproblem data is read in and features are extracted from the subproblems to obtain feature information of the subproblems. This feature information may include, for example, constraint types, variable types, and objective function coefficients. This feature information is input into a general strategy generator as shown in FIG4 for processing to obtain a subproblem-solving strategy and solution parameters. For example, the solution strategy may be a recommended heuristic algorithm combination, and the solution parameters may be the built-in parameters of the selected heuristic algorithm.
[0194] 307. Output sub-problem solving strategy and solution parameters.
[0195] 308. Solve the sub-problems based on the customized heuristic algorithm to obtain the solutions to each sub-problem.
[0196] In one possible implementation, heuristic solution strategies of different levels are called in descending order of priority to obtain feasible solutions to the subproblems. FIG7 is a schematic diagram of a multi-priority heuristic solution method provided in an embodiment of the present application. The method may include steps 701-711, as follows:
[0197] 701. Input sub-problem data and corresponding solution strategies and parameters of the sub-problems.
[0198] 702. Determine whether there is a user-defined heuristic algorithm.
[0199] For example, by receiving instructions input by the user, it is determined whether there is a user-defined heuristic algorithm.
[0200] 703. If yes, solve the subproblem based on the user-defined heuristic algorithm.
[0201] If a user-defined heuristic algorithm exists, illustratively, the algorithm can be called based on the user-defined heuristic algorithm callback interface to solve the subproblem.
[0202] 704. If not, obtain the solution priority input by the user.
[0203] If there is no user-defined heuristic algorithm, the solution can be based on the user's instructions.
[0204] 705. If the solution priority is not lower than the first priority, execute step 706.
[0205] The first priority, for example, indicates that the solution speed is fast. Of course, it can also indicate other factors, such as solution accuracy, quality, etc., which are not limited in this solution.
[0206] 706. Solve the sub-problems based on the recommended heuristic algorithm.
[0207] 707. If the solution priority is not lower than the second priority, execute step 708.
[0208] The second priority indicates, for example, that the solving speed is medium.
[0209] 708. Solve the subproblems based on the recommended heuristic algorithm and the general heuristic.
[0210] That is, the solution is obtained based on two heuristic algorithms. For the introduction of this part, please refer to the record of step 2043 in the embodiment shown in Figure 2, and no further details will be given here.
[0211] 709. If the solution priority is not lower than the third priority, execute step 709.
[0212] The third priority, for example, indicates that the solving speed is slow.
[0213] 710. Solve the subproblems based on the recommended heuristic algorithm, the general heuristic and the general solver.
[0214] That is, the solution is performed based on three heuristic algorithms. For the introduction of this part, please refer to the record of step 2043 in the embodiment shown in Figure 2, and no further details will be given here.
[0215] 711. Obtain a feasible solution to the subproblem.
[0216] Based on the method illustrated in steps 701-711 shown in FIG7 , solutions to various sub-problems can be obtained by performing the solving operation.
[0217] 309. Perform synthesis processing on the obtained solutions to the sub-problems to obtain the solution to the read problem.
[0218] The feasible solutions of the subproblems are synthesized into a feasible solution to the original problem and then exit. The synthesis can be, for example, the concatenation, fine-tuning, and verification of all the solutions to the subproblems.
[0219] In this example, feature extraction and hyperparameter reasoning are performed on the original problem to obtain appropriate decomposition parameters for the original problem. Based on these decomposition parameters, the original problem is decomposed to obtain at least one subproblem. Feature extraction and hyperparameter reasoning are performed on the subproblems to generate appropriate subproblem-solving strategies and solution parameters. This approach can achieve a better decomposition method for solving large-scale problems and improve the efficiency of solving subproblems. Furthermore, by solving subproblems through a multi-priority heuristic strategy and supporting the import of user-defined heuristic algorithms, the system can maximize the use of the special structure of subproblems, further improving solution efficiency.
[0220] While the embodiments of this application focus on heuristic algorithms for MILP problems, the feature of importing user-defined heuristic algorithms can be extended to other software architecture designs for MILP problems, as well as features for customizing algorithms such as preprocessing, cutting planes, branching, and node selection. This feature can help developers and users collaborate better in solving MILP problems with special structures while protecting user privacy.
[0221] It should be noted that in the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between the various embodiments are consistent and can be referenced by each other. The technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships.
[0222] The above describes in detail the method of the embodiment of the present application, and the following provides the device of the embodiment of the present application. It will be understood that in the various device embodiments of the present application, the division of multiple units or modules is only a logical division based on function, and is not intended to limit the specific structure of the device. In a specific implementation, some functional modules may be subdivided into more small functional modules, and some functional modules may be combined into one functional module, but no matter whether these functional modules are subdivided or combined, the general process performed by the device is the same. For example, some devices include a receiving unit and a sending unit. In some designs, the sending unit and the receiving unit can also be integrated into a communication unit, which can implement the functions implemented by the receiving unit and the sending unit. Typically, each unit corresponds to its own program code (or program instructions), and when the program code corresponding to each of these units runs on the processor, the unit is controlled by the processing unit to execute the corresponding process to implement the corresponding function.
[0223] The embodiments of the present application also provide a device for implementing any of the above methods. For example, a mixed integer programming (MILP) problem solving device is provided, which includes modules (or means) for implementing each step performed by the server in any of the above methods.
[0224] For example, FIG8 is a schematic diagram of a mixed integer programming (MILP) problem solving apparatus provided by an embodiment of the present application. The mixed integer programming (MILP) problem solving apparatus is used to implement the aforementioned mixed integer programming (MILP) problem solving method, such as the mixed integer programming (MILP) problem solving method shown in FIG2 .
[0225] As shown in FIG8 , the apparatus may include an acquisition module 801 , a processing module 802 , a decomposition module 803 , and a solution module 804 , specifically as follows:
[0226] An acquisition module 801 is configured to acquire description information of a MILP problem, the description information including an objective function, variables, constraints, and an integrity condition, wherein the integrity condition specifies that some or all of the variables are integers, and perform feature extraction on the MILP problem using the description information of the MILP problem to obtain feature information of the MILP problem, wherein the MILP feature information is used to describe the problem structure and / or complexity of the MILP problem.
[0227] A processing module 802 is configured to process the characteristic information of the MILP problem to obtain a decomposition parameter of the MILP problem, wherein the decomposition parameter of the MILP problem includes at least one of the number of problem decomposition blocks and a coupling variable ratio parameter;
[0228] A decomposition module 803 is configured to decompose the MILP problem based on the decomposition parameters of the MILP problem to obtain at least one sub-problem;
[0229] The solving module 804 is configured to solve the at least one sub-problem separately to obtain a solution to the MILP problem.
[0230] Among them, the acquisition module 801, processing module 802, decomposition module 803, and solution module 804 can all be implemented by software or hardware. For example, the implementation of the acquisition module 801 is described below using the acquisition module 801 as an example. Similarly, the implementation of the processing module 802, decomposition module 803, and solution module 804 can refer to the implementation of the acquisition module 801.
[0231] As an example of a software functional unit, the acquisition module 801 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the acquisition module 801 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.
[0232] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.
[0233] As an example of a hardware functional unit, the acquisition module 801 may include at least one computing device, such as a server. Alternatively, the acquisition module 801 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0234] The multiple computing devices included in acquisition module 801 can be distributed in the same region or in different regions. The multiple computing devices included in acquisition module 801 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in acquisition module 801 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.
[0235] It should be noted that, in other embodiments, the acquisition module 801 can be used to execute any step in the mixed integer programming MILP problem solving method, the processing module 802 can be used to execute any step in the mixed integer programming MILP problem solving method, the decomposition module 803 can be used to execute any step in the mixed integer programming MILP problem solving method, and the solution module 804 can be used to execute any step in the mixed integer programming MILP problem solving method. The steps that the acquisition module 801, the processing module 802, the decomposition module 803 and the solution module 804 are responsible for implementing can be specified as needed. The full functions of the mixed integer programming MILP problem solving device are realized by respectively implementing different steps in the mixed integer programming MILP problem solving method through the acquisition module 801, the processing module 802, the decomposition module 803 and the solution module 804.
[0236] In a possible implementation, the characteristic information of the MILP problem includes at least one of sparsity of a coefficient matrix, a distribution of non-zero elements, and a variable graph of the MILP problem.
[0237] Exemplarily, the processing module 802 is configured to input at least one of the sparsity, the non-zero element distribution, and the variable graph into a first strategy generator to obtain decomposition parameters of the MILP problem.
[0238] In a possible implementation, the solution module 804 is configured to:
[0239] Performing feature extraction on the at least one sub-problem to obtain feature information of the at least one sub-problem; the feature information includes at least one of a constraint type, a variable type, and an objective function coefficient;
[0240] Processing, based on characteristic information of each subproblem in the at least one subproblem, to obtain a solution strategy for the at least one subproblem and solution parameters corresponding to the solution strategy, wherein the solution strategy includes a recommended heuristic algorithm;
[0241] Solve the at least one subproblem using the solution strategy for the at least one subproblem and solution parameters corresponding to the solution strategy to obtain a solution to the at least one subproblem;
[0242] A solution to the MILP problem is obtained based on a solution to the at least one subproblem.
[0243] In another possible implementation, the solution module 804 is configured to:
[0244] Receiving a first instruction input by a user, wherein the first instruction indicates a user-configured custom solution algorithm, wherein the custom solution algorithm is used to solve the at least one sub-problem;
[0245] Solve the at least one sub-problem using the custom solving algorithm to obtain a solution to the at least one sub-problem;
[0246] A solution to the MILP problem is obtained based on a solution to the at least one subproblem.
[0247] In yet another possible implementation, the device further includes a receiving module, configured to:
[0248] Receive a second instruction input by a user, wherein the second instruction indicates a solution algorithm, the solution algorithm is used to solve the at least one subproblem, the solution algorithm includes at least one of a recommended heuristic algorithm, a general heuristic algorithm, and a general solution algorithm, the general heuristic algorithm is a preset heuristic algorithm, and the general solution algorithm is a non-heuristic algorithm;
[0249] The solving module 804 is configured to use the solving algorithm indicated by the second instruction to solve the at least one sub-problem respectively to obtain a solution to the MILP problem.
[0250] In a possible implementation, the second instruction includes a solution priority, where the solution priority represents a solution speed. The solution module 804 is further configured to:
[0251] For the i-th subproblem in the at least one subproblem, i is a positive integer;
[0252] If the solution priority is not lower than the first priority, the recommended heuristic algorithm is used to solve the i-th subproblem to obtain a solution to the i-th subproblem.
[0253] In a possible implementation, the solving module 804 is further configured to:
[0254] If the solution priority is not lower than the second priority, the recommended heuristic algorithm and the general heuristic algorithm are used respectively to solve the i-th subproblem to obtain a solution to the i-th subproblem, wherein the first priority is higher than the second priority.
[0255] In a possible implementation, the solving module 804 is further configured to:
[0256] If the solution priority is not lower than the third priority, the recommended heuristic algorithm, the general heuristic algorithm and the general solution algorithm are used respectively to solve the i-th subproblem to obtain a solution to the i-th subproblem, wherein the second priority is higher than the third priority.
[0257] In a possible implementation, the solving module 804 is further configured to:
[0258] Solve the i-th subproblem using the recommended heuristic algorithm to obtain a first solution to the i-th subproblem;
[0259] Solving the i-th subproblem using the universal heuristic algorithm to obtain a second solution to the i-th subproblem;
[0260] Solve the i-th subproblem using the general solution algorithm to obtain a third solution to the i-th subproblem;
[0261] A solution to the i-th subproblem is obtained based on the first solution, the second solution, and the third solution to the i-th subproblem.
[0262] For the introduction of the above modules, please refer to the description of the above embodiments, which will not be repeated here.
[0263] It should be understood that the division of the modules in the above-mentioned devices is merely a division of logical functions. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. In addition, the modules in the mixed integer programming MILP problem solving device can be implemented in the form of a processor calling software; for example, the mixed integer programming MILP problem solving device includes a processor, the processor is connected to a memory, and the memory stores instructions. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of the modules of the device, wherein the processor is, for example, a general-purpose processor, such as a central processing unit (CPU) or a microprocessor, and the memory is a memory within the device or a memory outside the device. Alternatively, the modules in the device can be implemented in the form of hardware circuits, and the functions of some or all units can be realized by designing the hardware circuits. The hardware circuit can be understood as one or more processors. For example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC), which realizes the functions of some or all of the above units by designing the logical relationship of the components in the circuit. For another example, in another implementation, the hardware circuit can be implemented by a programmable logic device (PLD). Taking a field programmable gate array (FPGA) as an example, it can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by configuring the configuration file, thereby realizing the functions of some or all of the above units. All modules of the above devices can be implemented in the form of software called by the processor, or in the form of hardware circuits, or in part by the form of software called by the processor, and the rest by hardware circuits.
[0264] This application also provides a computing device 900. As shown in Figure 9, computing device 900 includes a bus 902, a processor 904, a memory 906, and a communication interface 908. Processor 904, memory 906, and communication interface 908 communicate with each other via bus 902. Computing device 900 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 900.
[0265] Bus 902 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG9 illustrates a single bus line, but this does not imply a single bus or type of bus. Bus 902 may include a path for transmitting information between various components of computing device 900 (e.g., memory 906, processor 904, and communication interface 908).
[0266] The processor 904 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0267] The memory 906 may include volatile memory, such as random access memory (RAM). The processor 904 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0268] Memory 906 stores executable program code. Processor 904 executes the executable program code to implement the functions of the aforementioned acquisition module, processing module, decomposition module, and solution module, thereby implementing the mixed integer programming (MILP) problem solving method. Specifically, memory 906 stores instructions for executing the mixed integer programming (MILP) problem solving method.
[0269] The communication interface 908 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 900 and other devices or a communication network.
[0270] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0271] As shown in Figure 10, the computing device cluster includes at least one computing device 900. The memory 906 in one or more computing devices 900 in the computing device cluster may store the same instructions for executing the mixed integer programming (MILP) problem solving method.
[0272] In some possible implementations, the memory 906 of one or more computing devices 900 in the computing device cluster may also store partial instructions for executing the mixed integer programming (MILP) problem-solving method. In other words, the combination of one or more computing devices 900 can collectively execute instructions for executing the mixed integer programming (MILP) problem-solving method.
[0273] It should be noted that the memory 906 in different computing devices 900 in the computing device cluster can store different instructions, each for executing a portion of the functions of the mixed integer programming (MILP) problem solving apparatus. In other words, the instructions stored in the memory 906 in different computing devices 900 can implement the functions of one or more of the acquisition module, processing module, decomposition module, and solution module.
[0274] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network, which may be a wide area network or a local area network.
[0275] Figure 11 illustrates a possible implementation. As shown in Figure 11 , two computing devices 900A and 900B are connected via a network. Specifically, the connection to the network is achieved via a communication interface within each computing device. In this possible implementation, the memory 906 within computing device 900A stores instructions for executing the functions of processing module 802. Simultaneously, the memory 906 within computing device 900B stores instructions for executing the functions of acquisition module 801, decomposition module 803, and solution module 804.
[0276] The connection method between the computing device clusters shown in Figure 11 can be that considering that the mixed integer programming MILP problem solving method provided in this application needs to process a large amount of feature information of MILP problems, it is considered to entrust the functions implemented by the acquisition module 801, the decomposition module 803 and the solution module 804 to the computing device 900B for execution.
[0277] It should be understood that the functionality of the computing device 900A shown in FIG11 may also be implemented by multiple computing devices 900. Similarly, the functionality of the computing device 900B may also be implemented by multiple computing devices 900.
[0278] The present application also provides a computer program product comprising instructions. The computer program product may be software or a program product comprising instructions that can be executed on a computing device or stored in any available medium. When the computer program product is executed on at least one computing device, the at least one computing device executes a method for solving a mixed integer programming (MILP) problem.
[0279] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute a mixed integer programming (MILP) problem solving method.
[0280] It should be understood that in the description of this application, unless otherwise specified, " / " indicates that the objects associated with each other are in an "or" relationship. For example, A / B can mean A or B; where A and B can be singular or plural. Also, in the description of this application, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural. In addition, to facilitate the clear description of the technical solutions of the embodiments of this application, in the embodiments of this application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity or execution order, and words such as "first" and "second" do not necessarily mean different. At the same time, in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner to facilitate understanding.
[0281] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling, direct coupling, or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, and can be electrical, mechanical or other forms.
[0282] Units described as separate components may or may not be physically separate, and components shown as units 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0283] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic medium such as a floppy disk, a hard disk, a tape, a magnetic disk, or an optical medium such as a digital versatile disc (DVD), or a semiconductor medium such as a solid state disk (SSD).
[0284] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for solving a mixed integer programming (MILP) problem, characterized in that: include: Acquire description information of the MILP problem, the description information including an objective function, variables, constraints and integrity conditions, the integrity conditions being used to specify that some or all of the variables are integers, and use the description information of the MILP problem to perform feature extraction on the MILP problem to obtain feature information of the MILP problem, the feature information of the MILP being used to describe the problem structure and / or complexity of the MILP problem; Processing is performed based on the characteristic information of the MILP problem to obtain a decomposition parameter of the MILP problem, wherein the decomposition parameter of the MILP problem includes at least one of the number of problem decomposition blocks and a coupling variable ratio parameter; Decomposing the MILP problem based on the decomposition parameters of the MILP problem to obtain at least one sub-problem; The at least one sub-problem is solved separately to obtain a solution to the MILP problem.
2. The method according to claim 1, characterized in that The characteristic information of the MILP problem includes at least one of the coefficient matrix sparsity, non-zero element distribution, and variable graph of the MILP problem.
3. The method according to claim 1 or 2, characterized in that: The separately solving the at least one sub-problem to obtain a solution to the MILP problem includes: Performing feature extraction on the at least one sub-problem respectively to obtain feature information of the at least one sub-problem; the feature information includes at least one of a constraint type, a variable type, and an objective function coefficient; Processing based on the characteristic information of each sub-problem in the at least one sub-problem to obtain a solution strategy for the at least one sub-problem and a solution parameter corresponding to the solution strategy, wherein the solution strategy includes a recommended heuristic algorithm; Solve the at least one sub-problem using the solution strategy for the at least one sub-problem and solution parameters corresponding to the solution strategy to obtain a solution to the at least one sub-problem; A solution to the MILP problem is obtained based on a solution to the at least one subproblem.
4. The method according to claim 1 or 2, characterized in that: The separately solving the at least one sub-problem to obtain a solution to the MILP problem includes: Receive a first instruction input by a user, wherein the first instruction indicates a user-defined solution algorithm configured by the user, and the user-defined solution algorithm is used to solve the at least one sub-problem; Solve the at least one sub-problem using the custom solving algorithm to obtain a solution to the at least one sub-problem; A solution to the MILP problem is obtained based on a solution to the at least one subproblem.
5. The method according to claim 1 or 2, characterized in that: The method further comprises: Receive a second instruction input by a user, wherein the second instruction indicates a solution algorithm, the solution algorithm is used to solve the at least one sub-problem, the solution algorithm includes at least one of a recommended heuristic algorithm, a general heuristic algorithm, and a general solution algorithm, the general heuristic algorithm is a preset heuristic algorithm, and the general solution algorithm is a non-heuristic algorithm; The separately solving the at least one sub-problem to obtain a solution to the MILP problem includes: The at least one sub-problem is solved respectively using the solution algorithm indicated by the second instruction to obtain a solution to the MILP problem.
6. The method according to claim 5, characterized in that The second instruction includes a solution priority, the solution priority represents the speed of the solution, and the use of the solution algorithm indicated by the second instruction to solve the at least one sub-problem respectively to obtain a solution to the MILP problem includes: For the i-th subproblem in the at least one subproblem, i is a positive integer; If the solution priority is not lower than the first priority, the recommended heuristic algorithm is used to solve the i-th sub-problem to obtain a solution to the i-th sub-problem.
7. The method according to claim 6, characterized in that The method further comprises: If the solution priority is not lower than the second priority, the recommended heuristic algorithm and the general heuristic algorithm are used respectively to solve the i-th subproblem to obtain a solution to the i-th subproblem, wherein the first priority is higher than the second priority.
8. The method according to claim 6 or 7, characterized in that: The method further comprises: If the solution priority is not lower than the third priority, the recommended heuristic algorithm, the general heuristic algorithm and the general solution algorithm are used respectively to solve the i-th subproblem to obtain a solution to the i-th subproblem, wherein the second priority is higher than the third priority.
9. The method according to claim 8, characterized in that The respectively using the recommended heuristic algorithm, the general heuristic algorithm and the general solution algorithm to solve the i-th sub-problem to obtain a solution to the i-th sub-problem includes: Solving the i-th subproblem using the recommended heuristic algorithm to obtain a first solution to the i-th subproblem; Solving the i-th subproblem using the universal heuristic algorithm to obtain a second solution to the i-th subproblem; Solving the i-th subproblem using the general solution algorithm to obtain a third solution to the i-th subproblem; A solution to the i-th sub-problem is obtained based on the first solution to the i-th sub-problem, the second solution and the third solution.
10. A mixed integer programming MILP problem solving device, characterized in that: include: An acquisition module is used to acquire description information of the MILP problem, wherein the description information includes an objective function, variables, constraints, and integrity conditions, wherein the integrity conditions are used to specify that some or all of the variables are integers, and to perform feature extraction on the MILP problem using the description information of the MILP problem to obtain feature information of the MILP problem, wherein the feature information of the MILP is used to describe the problem structure and / or complexity of the MILP problem; A processing module, configured to process the characteristic information of the MILP problem to obtain a decomposition parameter of the MILP problem, wherein the decomposition parameter of the MILP problem includes at least one of the number of problem decomposition blocks and a coupling variable ratio parameter; A decomposition module, configured to decompose the MILP problem based on a decomposition parameter of the MILP problem to obtain at least one sub-problem; The solving module is used to solve the at least one sub-problem respectively to obtain a solution to the MILP problem.
11. The device according to claim 10, characterized in that The characteristic information of the MILP problem includes at least one of the coefficient matrix sparsity, non-zero element distribution, and variable graph of the MILP problem.
12. The device according to claim 10 or 11, characterized in that The solution module is used for: Performing feature extraction on the at least one sub-problem respectively to obtain feature information of the at least one sub-problem; the feature information includes at least one of a constraint type, a variable type, and an objective function coefficient; Processing based on the characteristic information of each sub-problem in the at least one sub-problem to obtain a solution strategy for the at least one sub-problem and a solution parameter corresponding to the solution strategy, wherein the solution strategy includes a recommended heuristic algorithm; Solve the at least one sub-problem using the solution strategy for the at least one sub-problem and solution parameters corresponding to the solution strategy to obtain a solution to the at least one sub-problem; A solution to the MILP problem is obtained based on a solution to the at least one subproblem.
13. The device according to claim 10 or 11, characterized in that The solution module is used for: Receive a first instruction input by a user, wherein the first instruction indicates a user-defined solution algorithm configured by the user, and the user-defined solution algorithm is used to solve the at least one sub-problem; Solve the at least one sub-problem using the custom solving algorithm to obtain a solution to the at least one sub-problem; A solution to the MILP problem is obtained based on a solution to the at least one subproblem.
14. The device according to claim 10 or 11, characterized in that Also included is a receiving module for: Receive a second instruction input by a user, wherein the second instruction indicates a solution algorithm, the solution algorithm is used to solve the at least one sub-problem, the solution algorithm includes at least one of a recommended heuristic algorithm, a general heuristic algorithm, and a general solution algorithm, the general heuristic algorithm is a preset heuristic algorithm, and the general solution algorithm is a non-heuristic algorithm; The solution module is used for: The at least one sub-problem is solved respectively using the solution algorithm indicated by the second instruction to obtain a solution to the MILP problem.
15. The device according to claim 14, characterized in that The second instruction includes a solution priority, the solution priority represents the speed of solution, for the i-th sub-problem in the at least one sub-problem, i is a positive integer, and the solution module is further used to: If the solution priority is not lower than the first priority, the recommended heuristic algorithm is used to solve the i-th sub-problem to obtain a solution to the i-th sub-problem.
16. The device according to claim 15, characterized in that The solution module is also used for: If the solution priority is not lower than the second priority, the recommended heuristic algorithm and the general heuristic algorithm are used respectively to solve the i-th subproblem to obtain a solution to the i-th subproblem, wherein the first priority is higher than the second priority.
17. The device according to claim 15 or 16, characterized in that The solution module is also used for: If the solution priority is not lower than the third priority, the recommended heuristic algorithm, the general heuristic algorithm and the general solution algorithm are used respectively to solve the i-th subproblem to obtain a solution to the i-th subproblem, wherein the second priority is higher than the third priority.
18. The device according to claim 17, characterized in that The solution module is also used for: Solving the i-th subproblem using the recommended heuristic algorithm to obtain a first solution to the i-th subproblem; Solving the i-th subproblem using the universal heuristic algorithm to obtain a second solution to the i-th subproblem; Solving the i-th subproblem using the general solution algorithm to obtain a third solution to the i-th subproblem; A solution to the i-th sub-problem is obtained based on the first solution to the i-th sub-problem, the second solution and the third solution.
19. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 9.
20. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 9.
21. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Apparatus and method for solving mathematical programming problem
CN103389964A
Pre-solving configuration method and device
CN116050522A
Scheduling optimization method and system based on cooperative distribution of vehicle and unmanned aerial vehicle
CN116384606A
Generalized branching methods for mixed integer programming
US20060112049A1
Automated decomposition for mixed integer linear programs with embedded networks requiring minimal syntax
US20150347149A1