AI-assisted linear programming solver method, system and medium
Improve the pricing steps of simplex method through variable classification and use machine learning model training, the problem of inefficiency of existing LP solvers is solved, and more efficient and adaptable LP solution is achieved.
Patent Information
- Application Number
- CN202380055374.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-08-11
- Filing Date
- 2023-08-11
- Publication Date
- 2025-03-07
AI Technical Summary
Existing linear programming solvers are inefficient in dealing with optimization problems of a large number of variables and constraints, and existing improved methods such as DeepSimplex have limitations and cannot be applied to all types of LP problems.
By leveraging the classification of LP problem variables, the pricing steps of simplex method are improved, custom initial bases are generated, and trained through machine learning models to improve the efficiency of the LP solver.
It improves the efficiency and adaptability of the LP solver, can solve the cyclic LP problem in an average shorter time, reduces the number of iterations of the simplex algorithm, and is suitable for LP problems of different scales and structures.
Smart Images

Figure CN119585729A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This patent application claims priority to U.S. patent application No. 17 / 886,339 filed on August 11, 2022, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present invention relates to linear programming, including an artificial intelligence-assisted linear programming solver. Background Art
[0004] Many companies, organizations, and government agencies need to optimize their operations for a variety of reasons, for example, to maximize profits, improve operational efficiency, or provide better products or services. To accomplish this task, they usually have to solve linear programming (LP) problems, which consist of an objective function that aims to optimize (i.e., maximize or minimize) a set of variables under several constraints that the variables must satisfy.
[0005] The nature of these optimization tasks is often cyclical in time, so new problems of the same type need to be solved regularly. In addition, these optimization problems often consist of a large number of variables and constraints, requiring a lot of computing time and resources to solve. Therefore, improving the efficiency of LP solver software is very important to end users.
[0006] The linear programming problem consists of a set of n variables Minimize or maximize the objective function:
[0007]
[0008] The objective function is linear with respect to x, and the coefficients of these variables are given by the vector In addition, these variables must satisfy a set of m linear constraints:
[0009]
[0010] Furthermore, each variable is subject to its own fixed bounds (here simplified to zero):
[0011] x≥0 (3)
[0012] Constraint coefficient vector Can be stacked into an m×n matrix, and the constraints can be expressed as vector inequalities using matrix products:
[0013] Ax≤b (4)
[0014] Constrained inequalities can be transformed into equalities by introducing logical variables (also called slack variables or row variables) that represent the gap between the constraints and their bounds:
[0015] Ax+v=b,v≥0 (5)
[0016] Therefore, the LP problem can be viewed as optimizing the objective function (1) over m+n variables while satisfying the constraint equation (5).
[0017] The simplex method is a class of optimization algorithms commonly used to solve LP problems. The constraints (4) in the LP problem definition create a feasible region in x-space. The boundary of this region forms a convex polyhedron. Since the objective function is linear, the optimal solution must include the vertices of the boundary polyhedron, unless the problem is unbounded.
[0018] Each vertex of the boundary polyhedron corresponds to a basic solution, where n variables (consider x and v) are at their boundaries (0 in the simplified definition above) and m variables are set to solve the constraints. The latter m variables are called basic variables, while the other n variables are called non-basic variables.
[0019] The simplex method starts with a feasible base solution and then swaps a base variable into the basis and a nonbase variable out of the basis to improve the objective value, and continues until no further improvement can be made, at which point a solution is obtained.
[0020] FIG. 2B (prior art) shows a simplified schematic diagram illustrating the simplex method. A feasible region 250 in variable space is bounded by the zero boundaries of two x variables x1 252 and x2 254 and the equations of each constraint 256. In this example, variables x1, x2 are non-basic variables and are fixed to their zero fixed boundaries. The first iteration 260 selects x1 to enter the basis to exchange one of the logical variables, and the solution moves to the next vertex 262, which is located at the intersection of two non-basic variable boundaries (x2=0 and the current non-basic constraint in the equality case). The second iteration 264 and the third iteration 266 also move the solution to a new vertex of the polyhedral shape of the feasible region 250.
[0021] There are two types of simplex methods. The primal simplex method works exactly as described above, while the dual simplex method works on a related problem, called the dual problem. The optimization process for the dual problem is slightly different from the primal method, but relies on the same basic idea of swapping variables in and out of the base solution until a solution is obtained.
[0022] For both simplex methods, there is a pricing step in the algorithm where the pivot variable is chosen. The pivot variable is the entry variable of the primal simplex, representing the variable that is added to the basis (i.e., the variable changes from non-basic to basic). We can say that the variable is rolled into the basis. The pivot variable is the leaving variable of the dual simplex, representing the variable that is removed from the basis (i.e., the variable changes from basic to non-basic). We can say that the variable is rolled out of the basis. In both methods, the pivot variable is chosen based on a heuristic that weighs the different characteristics of each variable and chooses the most ideal variable. There are many different fast heuristics, but no single method has been shown to be the most effective in all cases.
[0023] Several existing techniques have been developed to improve the efficiency of algorithms for solving LP problems, including at least one approach that uses artificial intelligence to improve the pricing heuristics used by the simplex method.
[0024] One existing approach is called DeepSimplex. DeepSimplex adds machine learning to the pricing step of the simplex method. In DeepSimplex, a decision model is trained so that at each simplex iteration, the model chooses between two pricing heuristics (called “pivot rules” in the published research literature on DeepSimplex). One of the heuristics (called “Dantzig”) is less powerful but faster to compute, and the other heuristic (called “steepest-edge”) may produce better pivots but takes longer to compute. DeepSimplex chooses the steepest-edge heuristic only when it is needed, so it may save computational time when solving certain LP problems.
[0025] In DeepSimplex, a series of 5-node traveling salesman problems are generated, which are then converted to LP problems. These problems are then used to train a pivot heuristic decision model. The model is trained using reinforcement learning, where a reduced cost is input to the model, which makes a decision; the resulting base state is assigned a reward score that penalizes each step before reaching the optimal solution. Training rewards finding the optimal solution. The weight of the penalty is determined by the computational cost of each heuristic.
[0026] However, DeepSimplex has some limitations. First, DeepSimplex’s model is fixed to the shape of the LP problem it is trained to solve, because the input shape must have a fixed number of variables. So, for example, a DeepSimplex model trained for the 5-node traveling salesman problem cannot be used to solve the 6-node problem. Second, from the results published by the DeepSimplex researchers, it is not clear whether DeepSimplex can improve efficiency: in the best case, the efficiency of the technique seems to be roughly comparable to that of the steepest edge heuristic.
[0027] The second class of existing methods is a set of techniques for solving mixed integer problems (MIPs). MIPs are the same as LP problems, except that some variables must be integers. A common MIP solution algorithm involves first solving the MIP as an LP problem without the integerness constraint. Then, a tree search is performed on the integer variables to find which of the two closest values of the integer variable (one smaller and one larger) will return a better target value while remaining feasible.
[0028] Choosing which variables to branch on next relies on a range of different heuristics that can be computationally intensive, so some existing methods use machine learning models to make this decision more efficiently. One example is MIP-GNN, which uses a set of near-optimal solutions to the training problem as its training data. The input features of the data instances are the constraints and the adjacency graph of the variables, and the labels are the deviations (upper or lower values) of each variable.
[0029] However, these machine learning methods for improving MIP solvers have limitations when applied to LP solvers. MIP branching models like MIP-GNN work well for solving MIP problems but are not useful for solving LP problems. The simplex method for LP problem solving does not have a tree search component like the MIP branching model.
[0030] Therefore, there is a need for techniques that can overcome one or more limitations of the above-mentioned existing methods to improve the efficiency and / or effectiveness of LP solvers. Summary of the invention
[0031] In various examples, the present disclosure describes methods, systems, and computer-readable media for using artificial intelligence to assist a linear programming solver.
[0032] In practice, LP problems in a cyclic sequence are of the same type, so these problems are likely to share different types of variables that play similar roles in the problem's objective function and its constraints. These shared classes of variables indicate that problems of the same series or type have similarities in structure that LP solver software can potentially exploit. Existing methods for improving the efficiency of LP solvers do not consider any explicit classification of variables in their optimization algorithms.
[0033] Examples described herein can utilize classification of variables to improve LP solver efficiency in the pricing step and / or generate a custom initial basis for the first iteration of the simplex method. In some examples, implicit classification of variables can be derived based on common prefixes of variable labels in the LP problem file to improve the efficiency of the optimization algorithm in the LP solver. Thus, some examples can improve the standard simplex algorithm, which involves selecting individual variables in its pricing step.
[0034] An example of the classification of variables reflected in the category data defined in the LP problem is now described. An electric power company has been solving the same type of periodic recurring LP problem to optimize the benefits of its energy transactions with other energy companies. After meeting domestic demand, the electric power company can export more electricity and sell the electricity to other energy companies. The additional power generation is determined by optimizing the benefit function and constraints based on many equipment variables, plant variables, and market variables. These variables can be classified according to their data sources: for example, variables related to hydropower data can include reservoir data, turbine data, and regulation data; other variables can be related to thermal energy data; and other variables can be related to market data. Therefore, the LP problem can include variables derived from or related to three sources, one of which has three sub-sources, which may produce category data that divides the variables into three categories (hydropower, thermal energy, market), five categories (reservoir, turbine, regulation, thermal energy, market), or some other category configuration. In order to grasp market fluctuations and production capacity, the electric power company must solve an LP problem every hour, and the type of LP problem to be solved every hour requires finding a solution to the optimization objective function that defines the trade balance and thermal energy ratio.
[0035] Some embodiments described herein may provide an LP-assisted software system that includes various modules that improve the efficiency and / or effectiveness of an LP solver by utilizing categorical data associated with variables of a predetermined type of LP problem (e.g., a cyclic LP problem). A custom basis module of the LP-assisted software system may be used to generate a custom basis for a first iteration of a simplex method used by the LP solver, thereby providing an improved starting point for the simplex method that may be close to an optimal basis based on the categorical data of the problem. A training module is used to train a machine learning model to perform a pricing step of the simplex method for a predetermined type of LP problem using the categorical data. Once the model is trained, an enhanced solver executes the simplex method enhanced by the trained model, which performs the pricing step using the categorical data to solve a new LP problem of the predetermined type.
[0036] Therefore, the embodiments described herein can solve a technical problem, that is, provide a method that can improve the efficiency of LP solvers by utilizing the classification of LP problem variables. Specifically, the examples described herein can improve the function of a computer in solving LP problems by improving efficiency, adaptability and / or versatility. Improving efficiency means that, given a series of cyclic LP problems, the examples described herein can solve each problem in an average shorter time compared to the same solver without using the features described herein. The examples described herein can reduce the number of iterations of the simplex algorithm required to solve the LP problem, thereby shortening the problem solving time. Adaptability means that the examples described herein should be compatible with different LP problems of a predetermined type (e.g., LP problems in the same cyclic series), even if the number of variables and the category composition of each problem are different. Since the examples described herein may rely on a fixed list of all possible categories, these examples can be used to solve LP problems of different sizes and LP problems with missing categories in the composition. Versatility means that the examples described herein are not limited to a single application of LP problems. By using features common to all LP problems and the category features of the LP problems being solved, the examples described herein can be compatible with cyclic LP problems or other LP problems of a common predetermined type regardless of how these examples are applied. In some examples, the techniques described herein can be used to improve the efficiency of an LP solver for any problem of a predetermined type (eg, in a series of cyclic problems) that has a similar structure but may differ in variable and class composition.
[0037] As used herein, the term "linear programming" or "LP" refers to a discipline or set of techniques for maximizing or minimizing a linear objective function subject to constraints on the variables of the linear objective function. A "linear programming problem" refers to a set of given variables and constraints, and an objective function for those variables, that together define a specific problem to be solved using linear programming. A "linear programming problem type" refers to a class of linear programming problems, e.g., a set of all linear programming problems that share a common set of variables and objective functions but have different constraints. A "recurrent" linear programming problem type refers to a series of linear programming problems defined over time for a given system, such that each time the problem repeats, the variables and objective function remain the same, but the constraints change. An example of a recurrent linear programming problem type is a problem where the output of electricity from a power plant must be maximized every hour subject to a set of constraints defined by the current conditions at that hour.
[0038] The term "mixed integer programming problem" or "MIP problem" as used in this article refers to a problem that requires optimizing an objective function, just like an LP problem, but with the added constraint that a subset of the variables must be integers.
[0039] As used herein, the term "solution" refers to a set of values for the variables of an LP problem. A "feasible solution" refers to a solution that also satisfies the constraints of the LP problem. An "optimal solution" refers to a feasible solution that produces an optimal (i.e., maximum or minimum) objective function value.
[0040] The term "basis" as used in this article refers to the set of variables that completely solves the constraint equations in the LP problem. Any variable not in the basis is set at a fixed individual boundary. Variables in the basis are called "basic" variables; variables not in the basis are called "non-basic" variables.
[0041] As used in this article, the terms "simplex", "simplex method", or "simplex algorithm" refer to a common type of iterative algorithm that solves LP problems by improving the objective function by replacing variables one by one from a valid basis. Simplex algorithms include primal simplex and dual simplex. The dual simplex algorithm is a variant of the primal simplex method that finds the same optimum by optimizing a similar dual problem.
[0042] As used herein, the term "pricing" or "pricing step" refers to a step in the simplex method in which a pivot variable is chosen to be swapped in (in the primal simplex) or out (in the dual simplex) in the basis, typically based on a heuristic used by the simplex algorithm. The heuristic may be referred to as the "simplex heuristic." Swapping a variable in may be referred to as adding a variable to the basis; swapping a variable out may be referred to as removing a variable from the basis. The term "price" should be understood to mean any indicator of desirability for a given purpose, not just monetary or financial prices.
[0043] The term "pivot variable" as used herein refers to a variable that is selected to be swapped in or out by a pricing step.
[0044] The term "category" as used herein refers to any grouping of variables according to one or more common characteristics. In some cases, if some variables are not classified, they can be considered to belong to the "unclassified" category.
[0045] The term "model" as used herein may refer to a mathematical model or a computational model. A model may be implemented, embodied, run, or executed by an algorithm, a computer program, or a computing structure or device. In the current exemplary embodiment, unless otherwise specified, a model refers to a "machine learning model", i.e., a predictive model implemented by an algorithm trained using deep learning or other machine learning techniques (e.g., a deep neural network (DNN)).
[0046] The term “machine learning” (ML), as used in this article, can refer to a type of artificial intelligence that enables software programs to improve the accuracy of predictions without being explicitly programmed.
[0047] As used herein, "input sample" may refer to any data sample, such as image data, used as input to a machine learning model. An input sample may refer to a training data sample used to train a machine learning model, or a data sample provided to a trained machine learning model, which infers (i.e., predicts) an output based on the data sample for a task for which the machine learning model has been trained. Thus, for a machine learning model performing an image classification task, the input sample may be a single digital image.
[0048] The term "training" as used herein can refer to a process in which an algorithm uses historical data to extract patterns from it and learns to distinguish those patterns in data it has not yet seen. Machine learning uses training to produce a trained model that is capable of performing a specific reasoning task.
[0049] The term “reinforcement learning” as used in this article refers to a machine learning technique that involves training a model to choose actions in an environment so as to maximize the cumulative reward per episode.
[0050] As used herein, the term "supervised learning" refers to a machine learning technique that involves training a model to minimize the difference between a set of data outputs based on corresponding data inputs and a set of training labels associated with the data inputs. The training labels represent the ground truth values corresponding to the data inputs.
[0051] As used herein, the statement "an element 'serves' for a particular purpose" may mean that the element performs a particular function or is used to perform one or more particular steps or operations, as described herein.
[0052] As used herein, the statement "a second element is 'based' on a first element" may mean that a characteristic of the second element is at least partially affected by or determined by a characteristic of the first element. The first element may be considered as an input to an operation or calculation or a series of operations or calculations that produce the second element as an output related to the first element.
[0053] In a first aspect of the present invention, a method is provided. A linear programming (LP) problem definition is obtained, the LP problem definition being used to define a predetermined type of LP problem. The LP problem definition includes: variable data specifying a plurality of variables; objective function data specifying an objective function of the plurality of variables; constraint data specifying a plurality of constraints, each constraint being used to constrain the value of at least one variable among the plurality of variables; and category data specifying a corresponding category for each of the plurality of variables. A pricing model is obtained, the pricing model being trained by machine learning to perform a pricing step of a simplex algorithm with respect to the predetermined type of LP problem. The LP problem is solved by: generating an initial basis including a subset of the plurality of variables, the initial basis being designated as a current basis; and performing one or more iterations of the simplex algorithm on the current basis. Each iteration includes: applying the simplex algorithm to the current basis to generate a set of values for the plurality of variables; generating a value of the objective function according to the set of values for the plurality of variables; and obtaining an updated basis including a subset of the plurality of variables by processing the category data using the pricing model to perform the pricing step of the simplex algorithm. The updated basis is designated as the current basis.
[0054] In a second aspect of the present invention, a method is provided. A linear programming (LP) problem definition is obtained, the LP problem definition being used to define a predetermined type of LP problem. The LP problem definition includes: variable data specifying a plurality of variables; objective function data specifying an objective function of the plurality of variables; constraint data specifying a plurality of constraints, each constraint being used to constrain the value of at least one variable among the plurality of variables; and category data specifying a corresponding category for each of the plurality of variables. A pricing model is obtained, the pricing model being trained by machine learning to perform a pricing step of a simplex algorithm with respect to the predetermined type of LP problem. The LP problem is solved by: generating an initial basis including a subset of the plurality of variables, the initial basis being designated as a current basis; and performing one or more iterations of the simplex algorithm on the current basis. Each iteration includes: applying the simplex algorithm to the current basis to generate a set of values for the plurality of variables; generating a value of the objective function according to the set of values for the plurality of variables; and obtaining an updated basis including a subset of the plurality of variables by processing the category data using the pricing model to perform the pricing step of the simplex algorithm. The updated basis is designated as the current basis.
[0055] In a third aspect of the present invention, a non-transitory computer-readable medium is provided, the non-transitory computer-readable medium having instructions tangibly stored thereon, the instructions, when executed by a processing system of a computing system, causing the computing system to perform a plurality of operations. A linear programming (LP) problem definition is obtained, the LP problem definition being used to define a predetermined type of LP problem. The LP problem definition includes: variable data specifying a plurality of variables; objective function data specifying an objective function of the plurality of variables; constraint data specifying a plurality of constraints, each constraint being used to constrain a value of at least one of the plurality of variables; and category data specifying a corresponding category for each of the plurality of variables. A pricing model is obtained, the pricing model being trained by machine learning to perform a pricing step of a simplex algorithm relative to the predetermined type of LP problem. The LP problem is solved by: generating an initial basis including a subset of the plurality of variables, the initial basis being designated as a current basis; and performing one or more iterations of the simplex algorithm on the current basis. Each iteration includes: applying the simplex algorithm to the current basis to generate a set of values for the plurality of variables; generating a value for the objective function based on the set of values for the plurality of variables; and performing the pricing step of the simplex algorithm by processing the category data using the pricing model to obtain an updated basis including a subset of the plurality of variables. The updated basis is designated as the current basis.
[0056] In a fourth aspect of the present invention, a system is provided. The system includes: one or more processing devices; and a non-transitory memory storing software instructions, wherein when the software instructions are executed by the one or more processing devices, the system performs the following operations: obtaining a linear programming (LP) problem definition, wherein the LP problem definition is used to define a predetermined type of LP problem and includes: variable data specifying a plurality of variables; objective function data specifying an objective function of the plurality of variables; constraint data specifying a plurality of constraints, each constraint being used to constrain the value of at least one variable in the plurality of variables; and category data specifying a corresponding category for each variable in the plurality of variables; obtaining a pricing model, wherein the pricing model is trained by machine learning to Executing a pricing step of a simplex algorithm with respect to the predetermined type of LP problem; and solving the LP problem by: generating an initial basis including a subset of the multiple variables, the initial basis being designated as a current basis; and executing one or more iterations of the simplex algorithm on the current basis, each iteration comprising: applying the simplex algorithm to the current basis to generate a set of values of the multiple variables; generating a value of the objective function based on the set of values of the multiple variables; and obtaining an updated basis including a subset of the multiple variables by processing the category data using the pricing model to execute the pricing step of the simplex algorithm, the updated basis being designated as the current basis.
[0057] In some exemplary embodiments of these aspects, processing the category data using the pricing model to obtain the updated basis includes selecting one or more variables to be removed from the current basis to obtain the updated basis.
[0058] In some exemplary embodiments of these aspects, selecting the one or more variables to be removed from the current base includes: using the pricing model to determine a category to be transferred out; and selecting the one or more variables from the determined category.
[0059] In some exemplary embodiments of these aspects, selecting the one or more variables to be removed from the current base includes: using the pricing model to generate a price score for each variable of the current base based at least in part on the category of the variable; and processing the price scores to select the one or more variables.
[0060] In some exemplary embodiments of these aspects, processing the category data using the pricing model to obtain the updated base includes: processing the category data using the pricing model to achieve the following purposes: selecting one or more variables from the multiple variables to be removed from the current base; and selecting one or more variables from the multiple variables to be added to the current base.
[0061] In some exemplary embodiments of these aspects, selecting the one or more variables to be removed from the current base and selecting the one or more variables to be added to the current base includes: using the pricing model to generate a price score for each variable of the current base based at least in part on the category of the variable; and processing the price scores to select the one or more variables to be removed from the current base and selecting the one or more variables to be added to the current base.
[0062] In some exemplary embodiments of these aspects, generating the initial basis includes generating the initial basis as a custom basis based on a plurality of known optimal basis of the LP problem of the predetermined type.
[0063] In some exemplary embodiments of these aspects, generating the custom basis includes selecting the variables in the subset based on statistical distribution of the variables of the plurality of known optimal bases in a plurality of categories.
[0064] In some exemplary embodiments of these aspects, generating the initial basis includes: generating the initial basis as a custom basis by: obtaining a custom basis generation model, the custom basis generation model being trained by machine learning to generate a custom basis for the predetermined type of LP problem; and processing the LP problem definition using the custom basis generation model to generate the initial basis.
[0065] In some exemplary embodiments of these aspects, the custom basis generation model is trained by: obtaining custom basis training data including a plurality of data samples, each data sample including: constraint data of a corresponding LP problem of the predetermined type; and an optimal basis of the corresponding LP problem. For each data sample, the custom basis generation model is trained using supervised learning by: using the LP problem definition as an input to the custom basis generation model; and using the optimal basis as a training label.
[0066] In some exemplary embodiments of these aspects, the pricing model is trained by: using the pricing model to perform the pricing step of the simplex algorithm when solving multiple LP problems of the predetermined type; and using a reward function that is based at least in part on the number of iterations of the simplex algorithm required to solve a given LP problem and reinforcement learning.
[0067] In some exemplary embodiments of these aspects, the reward function is also based at least in part on the objective function.
[0068] In some exemplary embodiments of these aspects, the pricing model is trained by: obtaining pricing training data comprising a plurality of data samples, each data sample comprising: an LP problem definition of a corresponding LP problem of the predetermined type; and a current basis of the corresponding LP problem; and for each data sample, training the pricing model using supervised learning by: using the LP problem definition and the current basis as inputs to the pricing model; using training labels comprising an estimated optimal update basis.
[0069] In some exemplary embodiments of these aspects, the estimated optimal update basis is obtained based on expert opinion.
[0070] In some exemplary embodiments of these aspects, the estimated optimal update basis is generated using a simplex pricing heuristic that is restricted to a known optimal basis for the corresponding LP problem.
[0071] In some exemplary embodiments of these aspects, the category of a given variable is based on a corresponding source of the variable.
[0072] In some exemplary embodiments of these aspects, the category of a given variable is based on one or more constraints of the constraint data relating to the variable.
[0073] In some exemplary embodiments of these aspects, the method further includes: determining that an optimization condition is satisfied; and outputting an optimal solution to the LP problem, the optimal solution comprising a set of optimal values of the multiple variables corresponding to the optimal value of the objective function.
[0074] In some exemplary embodiments of these aspects, generating the initial basis includes: generating the initial basis as a custom basis according to a plurality of known optimal basis of the LP problem of the predetermined type. The method also includes: determining that an optimization condition is satisfied; and outputting an optimal solution to the LP problem, the optimal solution including a set of optimal values of the plurality of variables corresponding to the optimal value of the objective function. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Reference is now made by way of example to the accompanying drawings which illustrate exemplary embodiments of the present application, in which:
[0076] Figure 1 is a block diagram of an exemplary computing system that can be used to implement the examples described herein.
[0077] FIG. 2A (Prior Art) is a schematic diagram of a conventional LP problem solver using the simplex method.
[0078] 2B (Prior Art) is a graph of the movement of the solution between vertices of the feasible region of the LP problem in repeated iterations of the simplex method.
[0079] Figure 3 Schematic diagram of the operation of an exemplary custom base module of the LP auxiliary software system provided by the present invention.
[0080] Figure 4 Schematic diagram of the operation of an exemplary training module of the LP-assisted software system provided by the present invention.
[0081] Figure 5 Schematic diagram of the operation of an exemplary enhanced solver of the LP auxiliary software system provided by the present invention.
[0082] Figure 6 is a flow chart showing the operation of the method provided by the present invention for assisting the LP solver using artificial intelligence.
[0083] Fig. 7A Schematic diagram of the operation of an exemplary pricing supervised learning module of the LP-assisted software system in an alternative embodiment provided by the present invention.
[0084] Figure 7B Schematic diagram of the operation of an exemplary pricing supervised learning module of an LP-assisted software system using two sub-models of a pricing model in an alternative embodiment provided by the present invention.
[0085] Figure 8 Schematic diagram of the operation of an exemplary custom-based supervised learning module of the LP-assisted software system in yet another alternative embodiment provided by the present invention.
[0086] Similar reference numerals may be used in different drawings to represent similar components. DETAILED DESCRIPTION
[0087] Methods, systems, and computer readable media for using artificial intelligence to assist a linear programming solver will now be described in conjunction with exemplary embodiments.
[0088] Exemplary Computing System
[0089] First, a system or device (eg, a computing system) that can be used with the examples disclosed herein is described.
[0090] Figure 1is a block diagram of an exemplary simplified computing system 100. Computing system 100 can be a device for executing instructions 112 according to the examples disclosed herein, including instructions in LP-assisted software system 120. Other computing systems suitable for implementing the embodiments described herein can be used, and these computing systems can include components different from those discussed below. In some examples, computing system 100 can be implemented on more than one physical hardware unit, for example, in a parallel computing, distributed computing, virtual server, or cloud computing configuration. Although Figure 1 A single instance of each component is shown, but multiple instances of each component may exist in computing system 100 .
[0091] The computing system 100 may include a processing system having one or more processing devices 102, such as a central processing unit (CPU) with a hardware accelerator, a graphics processing unit (GPU), a tensor processing unit (TPU), a neural processing unit (NPU), a microprocessor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a dedicated logic circuit, a dedicated artificial intelligence processor unit, or a combination thereof.
[0092] The computing system 100 may also include one or more optional input / output (I / O) interfaces 104 that may enable connection to one or more optional input devices 115 and / or optional output devices 117. In the illustrated example, the one or more input devices 115 (e.g., a keyboard, a mouse, a microphone, a touch screen, and / or a keypad) and the one or more output devices 117 (e.g., a display, a speaker, and / or a printer) are shown as optional and external to the computing system 100. In other examples, one or more of the one or more input devices 115 and / or the one or more output devices 117 may be included as a component in the computing system 100. In other examples, any one or more input devices 115 and one or more output devices 117 may not be present, in which case the one or more I / O interfaces 104 may not be required.
[0093] The computing system 100 may include one or more optional network interfaces 106 for wired or wireless communications with a network (e.g., an intranet, the Internet, a P2P network, a WAN, and / or a LAN) or other nodes. The network interface 106 may include a wired link (e.g., an Ethernet cable) and / or a wireless link (e.g., one or more antennas) for intra-network and / or inter-network communications.
[0094] The computing system 100 may also include one or more storage units 108, which may include mass storage units such as solid-state drives, hard disk drives, magnetic disk drives, and / or optical disk drives. The computing system 100 may include one or more memories (collectively referred to as memory 110), which may include volatile or non-volatile memory (e.g., flash memory, random access memory (RAM), and / or read-only memory (ROM)). The non-transitory memory 110 may store instructions 112 for execution by one or more processing devices 102 to perform the examples described in the present invention, etc. The memory 110 may include other software instructions 112 to implement an operating system and other applications / functions, etc. In some examples, the memory 110 may include software instructions 112 for execution by the processing device 102 to implement the LP assisting software system 120 disclosed herein. The non-transitory memory 110 may store data, such as custom base training data 114 , pricing training data 116 , and / or various other forms of data described herein (eg, LP definitions of LP problems to be solved).
[0095] In some other examples, one or more data sets and / or modules may be provided by an external memory (e.g., an external drive in wired or wireless communication with the computing system 100), or by a transient or non-transient computer-readable medium. Examples of non-transient computer-readable media include RAM, ROM, erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, CD-ROM, or other portable memory.
[0096] A bus 109 may be present to provide communication between components in the computing system 100, including one or more processing devices 102, one or more I / O interfaces 104, one or more network interfaces 106, one or more storage units 108, and / or memory 110. The bus 109 may be any suitable bus architecture, including a memory bus, a peripheral bus, or a video bus, etc. In some examples, the computing system 100 is a distributed computing system, and the functions of the bus 109 may be performed by a network interface 106 that communicates with a communication link.
[0097] Exemplary LP Assistance Software System
[0098] Now combine Figures 3 to 6 An exemplary LP assisting software system 120 is described. Then, alternative embodiments of various components in the LP assisting software system 120 (i.e., Fig. 7A and Figure 7B An alternative training module for training pricing models via supervised learning in Figure 8 ) are described in , including alternative custom base modules for machine learning models trained via supervised learning.
[0099] However, first, the operation of a conventional LP solver using the simplex method is described with reference to FIG. 2A , which shows an example of an LP solver for solving an LP problem.
[0100] FIG. 2A (Prior Art) is a schematic diagram of a conventional LP solver 200 using the simplex method. The LP solver 200 is provided with an LP problem 202, which is defined by variable data 204 defining a plurality of variables and constraint data 206 defining constraints on the values of the variables. The LP problem 202 also typically defines an objective function, which may be defined by objective data (not shown), as described below. Figures 3 to 8 as shown in the example.
[0101] The LP solver 200 also receives an initial basis 211, which indicates a subset of variables of the variables defined by the variable data 204, the variables in the subset to be used as a basis in a first iteration of the simplex method. In the first iteration, the simplex algorithm 212 is applied to the LP problem and the initial basis 211 to generate a new current basis 218 using a pricing step 216. As shown in FIG. 2B described in the background section above, the first iteration corresponds to moving the current solution to the second vertex 262 of the feasible region 250 of the LP problem defined by its constraints 256 in the first iteration 260. The new current basis 218 is used as a basis for the second iteration, and the simplex algorithm 212 continues to perform iterations 214 to generate new updated bases using the pricing step 216, which are used as the current basis 218 for the next iteration until the LP problem 202 is solved. Once the LP problem is solved by finding an optimal solution, the LP solver 200 may retain not only the optimal solution (ie, the optimal values of the variables), but also the optimal basis 222 and the optimal value 220 of the objective function corresponding to the optimal solution.
[0102] The exemplary LP assistance software system 120 described herein may be used to assist an LP solver 200 for solving a plurality of LP problems 202 of a predetermined type, such as a series of cyclic LP problems that must be solved within a fixed time interval. As described above, cyclic LP problems are very common in the decision-making processes of many organizations, and solving these problems may require a large amount of computing resources.
[0103] Because LP problems have cyclical or other common characteristics, problems of the same type necessarily have some structural similarities that are shared by the variables of each problem in a sequence or type. These structural similarities allow the variables to be grouped or classified. If the variables are labeled according to their data source or their role in the equation (e.g., the type of constraints they introduce), the category of each variable can be determined by extracting the category information from the label of each variable. It will be appreciated that various techniques can be used to determine the structural similarities between groups of variables of a predetermined type of LP problem, so that the variables can be classified.
[0104] To solve the LP problem of the predetermined type, LP problem solver software such as CPLEX, OptVerse or COIN-OR can be used. These software packages use simplex type optimizers (i.e., primal simplex or dual simplex). The LP auxiliary software system 120 can be embedded in the simplex solver feature of these software products. In order to reduce the number of iterations 214 required to solve a given LP problem of the predetermined type, the LP auxiliary software system 120 can use information of the variables (including the category data of the variables) to guide the simplex algorithm 212.
[0105] Example Custom Base Module
[0106] Figure 3 is a schematic diagram of the operation of an exemplary custom basis module 300 in the LP assisting software system 120. The purpose of the custom basis module 300 is to start the simplex algorithm at a state closer to the optimal state, thereby reducing the number of solver iterations to obtain the optimal solution. The custom basis module 300 achieves this purpose by first generating a custom basis distribution 310 of the basis variables on the categories based on past LP problems, and then, when the custom basis module is deployed to solve a new LP problem, using the custom basis distribution 310 as a reference to generate a custom basis 318, which is to be used as an initial basis to solve the new LP problem. The custom basis is generated based on the category data 208 of the LP problem being solved and the relationship between the category data 208 and the category distribution of the optimal basis of the previously solved LP problem of the same predetermined type.
[0107] In operation, the custom basis module 300 runs in two modes: one is an analysis mode, which is executed once to collect and statistically analyze data about the optimal basis for a series of LP problems; the other is a deployment mode, which is used to generate a custom basis for each new LP problem to be solved by the LP solver with the assistance of the LP auxiliary software system 120.
[0108] In the analysis mode, the custom basis module 300 collects data about the optimal basis of a predetermined type of LP problem (e.g., other problems in the cyclic series), and analyzes the collected data to determine the statistical distribution of the variables of the optimal basis in various categories. The analysis mode can be viewed as roughly similar to the training mode of a machine learning model: in fact, the following combined Figure 8 A second exemplary embodiment of a custom base module 300 is described, wherein the custom base module 300 includes a machine learning model trained in an initial training mode.
[0109] In the analysis mode, the custom base module 300 receives a set or series of LP problems of a predetermined type, such as a cyclic LP problem in a cyclic series. Each LP problem is defined by an LP problem definition 302, which includes variable data 204 specifying problem variables, constraint data 206 specifying problem constraints, category data 208 specifying each variable category, and objective function data 210 specifying an objective function. In some examples, multiple problems of the same type may share one or more of these data types, which may be stored by the LP assisting software system 120 (e.g., in the memory 110), so that each new LP problem definition 302 received by the LP assisting software system 120 only needs to define the remaining types of data that are specific to the new LP problem of the predetermined type.
[0110] For each LP problem definition 302 in the above series, the LP problem is solved using a conventional LP solver 200, for example, using a conventional non-auxiliary simplex method or other known techniques. Once the LP solver 200 determines the optimal solution to the LP problem, the custom basis module 300 stores the optimal basis 222. This process is repeated for each LP problem definition 302. After the LP solver 200 solves the entire series of LP problems, the statistical category analysis module 308 processes a set of stored corresponding optimal bases 306, calculates the category distribution of the variables of each optimal basis 222 in the optimal basis 306, and calculates the statistical distribution of the optimal basis variables in all categories, which is aggregated across the entire series of LP problem definitions 302. This statistical distribution is called a custom basis distribution 310. For example, the custom basis distribution may indicate that, according to some statistical aggregation indicator, the optimal basis 306 tends to have 20% of the basic variables belonging to category 1, 30% of the basic variables belonging to category 2, and 30% of the basic variables belonging to category 3, and the custom basis distribution 310 may be represented as an array [.2,.3,.3].
[0111] The purpose of the analysis mode of the custom base module 300 is to generate a custom base distribution 310. In some examples, the custom base distribution 310 is generated once and stored. In other examples, the custom base distribution 310 is continuously updated based on other LP problem definitions 302 received over time. In this respect, the custom base module 300 in the analysis mode is similar to the training module of a machine learning model, in that the custom base module can train the model once and then stop, or it can continue to fine-tune the model over time as new training data is received.
[0112] In deployment mode, custom basis module 300 generates a specific custom basis to assist in solving a new LP problem using custom basis generation module 314. The new LP problem is received in the form of a new LP problem definition 312. Custom basis generation module 314 applies custom basis distribution 310 to the new LP problem definition 312 to determine how many variables in each category should be included in custom basis 318 generated as an initial basis for the new LP problem.
[0113] Example Training Modules
[0114] Figure 4 4 is a schematic diagram of the operation of an exemplary training module 400 in the LP auxiliary software system 120. The training module 400 is used to train the pricing model 404 to perform the pricing step of the simplex method performed by the enhanced solver 500, which is described below in conjunction with Figure 5 Describe in detail.
[0115] In operation, the training module 400 receives a series or a set of LP problem definitions 302 that define a predetermined type of LP problem. The series of LP problem definitions 302 are also provided to the custom basis generation module 314 and the enhanced solver 500. For each LP problem defined by the set of LP problem definitions 302, the custom basis generation module 314 applies the custom basis distribution 310 to the LP problem definition 302 to generate a custom basis 318. The enhanced solver 500 receives the custom basis 318 and uses the custom basis as an initial basis to solve the LP problem defined by the corresponding LP problem definition 302.
[0116] The enhanced solver 500 first defines its current basis 402 (i.e., the custom basis 318) as an initial basis. The simplex algorithm 212 is used to perform the first iteration and obtain the objective function value 410 of the solution of the first iteration. The pricing model 404 is used to perform the pricing step, i.e., determine one or more pivot variables based at least in part on the category data 208 of the LP problem definition 302. The simplex algorithm 212 and the pricing model 404 use the basis generation module 406 to generate an updated basis 408, which is used as the current basis 402 for the second iteration. This cycle is repeated until the LP problem is solved.
[0117] The optimization condition module 412 is used to determine when the LP problem is solved by, for example, applying a standard simplex technique to determine whether further optimization can be performed or whether additional iterations of the simplex method will result in a suboptimal (i.e., lower or higher) objective function value 410. Once the optimization condition module 412 determines that the optimization condition is satisfied, it outputs an optimal solution 504 to the LP problem. In some embodiments, the enhanced solver 500 may also output and / or store other useful information about the solved LP problem, such as an optimal basis 222 and / or an optimal value 220 of the objective function corresponding to the optimal solution 504.
[0118] The pricing model 404 is a machine learning model, such as an artificial neural network. The pricing module 404 receives various relevant data as input from the simplex algorithm 212, such as the current base 402 (and / or the category distribution of the variables in the current base 402). Based on the category distribution of the current base 402, the pricing model 404 outputs one or more decisions about pricing to select one or more pivot variables for the updated base 408. In some embodiments, the pricing model 404 outputs the category of one or more variables to be transferred out of the base. In some embodiments, the pricing model 404 outputs the category of one or more variables to be transferred into the base. In some embodiments, the pricing model 404 outputs a price score for each variable based at least in part on the category of the variable. The base generation module 406 uses the output of the pricing model 404 to transfer in and / or out one or more variables according to the price score or one or more categories determined by the pricing model 404, thereby generating an updated base 408. In some embodiments, the base generation module 406 applies the rules or heuristics provided by the simplex algorithm 212 to select the variables to be transferred in and / or out under the constraints of the output of the pricing model 404.
[0119] Thus, embodiments of pricing models 404 that output categories for one or more pivot variables make pivot decisions based on each category, while embodiments of pricing models 404 that generate price scores for each variable make pivot decisions based on each variable. Using examples based on each variable can provide more data inputs to the pricing model than simply the category distribution of the current base 402: for example, the pricing model can also process inputs such as constraint data 206, current objective function value 410, various data generated by the simplex algorithm 212, etc.
[0120] In some embodiments, the pricing model 404 selects only the category of the pivot variable (i.e., the input variable of the primal simplex, the leaving variable of the dual simplex), or the price score is used only to select the pivot variable. However, the selection heuristic method for selecting the replacement variable for the pivot variable (i.e., the leaving variable of the primal simplex, the input variable of the dual simplex), while more robust than the heuristic method for selecting the pivot variable itself, may still make incorrect decisions by selecting variables that have been correctly assigned as basic variables or non-basic variables. Therefore, some embodiments may also use the pricing model 404 (e.g., using the following in combination Figure 7B The second sub-model described in the previous section) is used to assist in selecting a replacement variable for the pivot variable (e.g., by selecting a category of the replacement variable for the pivot variable, or using a price score to select a replacement variable for the pivot variable).
[0121] In some embodiments, the pricing model 404 generates a price score for each variable, thereby allowing the base generation module 406 to select a pivot variable based on each variable rather than based on each category. Compared with the embodiment in which the pricing model 404 is used to simply select the category of the pivot variable, the embodiment using the price score can provide more input features for the training module 400. By using additional inputs in training, the pricing model 404 can be trained to make decisions based on each variable rather than based on each category, because all variables of a category become more different from each other due to the additional data. The additional features considered by the training module 400 in the embodiment using the price score can include problem-level features 760 that are constant for each problem, for example, the number of non-zero entries for each constraint, or the similarity of each constraint to the target solution. The additional features considered can also include solver-level features 756, for example, the value of a variable or its reduced cost.
[0122] During training, as the boost solver 500 solves a series of LP problems, the training module 400 adjusts the learnable parameters of the pricing model 404 through reinforcement learning. There may also be alternative methods for training the pricing model 404. An example of supervised learning is described below in conjunction with FIG.
[0123] In reinforcement learning, the training module 400 generates rewards 401 based on the state of the system being monitored. The purpose of the rewards 401 is to adjust the behavior of the model being trained to reinforce the behavior that tends to produce the desired behavior, for example, to accelerate the progress of achieving the goal. The training module can monitor various data related to the state of the system, such as the current LP problem definition 302, the corresponding custom basis 318, the updated basis 408 for each iteration, and the output of the pricing model 404. In some embodiments, the training module 400 can generate rewards 401 at least in part based on the number of iterations of the simplex algorithm 212 required to meet the optimization condition: for example, reducing the reward at each iteration, or applying a negative correction value to the reward at the end of the solution process based on the number of iterations performed (as monitored by the optimization condition module 412, etc.). In some embodiments, the training module 400 can generate rewards 401 at least in part based on the objective function value 410: for example, after each iteration, applying a correction value proportional to the positive or negative change in the objective value function 410 affected by the iteration to the reward 401. For example, after each iteration of the simplex algorithm 212, the training module 400 uses the reward 401 as a basis to adjust the values of the learnable parameters of the pricing model.
[0124] Example Enhanced Solver
[0125] Figure 5 is a schematic diagram of the operation of an exemplary enhanced solver 500 in the LP auxiliary software system 120. Figure 4 as shown), supervised learning (such as Fig. 7A and Figure 7B After the pricing model 404 is trained using a machine learning algorithm (as shown in the figure) or other machine learning algorithm, the enhanced solver 500 can be deployed to solve any new LP problem of a predetermined type (defined by the new LP problem definition 502) for which the pricing model 404 has been trained and for which the custom base module 300 determines the custom base distribution 310. For example, the enhanced solver 500 can be deployed with the trained pricing model 404 to solve recurring LP problems in real time (e.g., once a minute, once an hour, or once a day) as they occur.
[0126] The operation of the enhanced solver 500 is as described above in conjunction with Figure 4 Once the pricing model 404 is sufficiently trained, it can generate outputs to guide the basis generation module 406 to generate an updated basis 408, thereby reducing the number of iterations required to solve the LP problem.
[0127] Exemplary Methods for AI-Assisted LP Solving
[0128] Figure 6 is a flow chart of the operation of a method 600 of using artificial intelligence to assist an LP solver. Figures 3 to 5 However, it is understood that other examples of the technology described herein may be used to perform one or more steps of method 600, for example, Fig. 7A and Figure 7B and / or Figure 8 Alternative embodiments described.
[0129] At 602, as described above in conjunction with Figure 3 As described, the custom basis module generates the custom basis distribution 310. As described above, some embodiments may perform step 602 only once, while other embodiments may continuously update the custom basis distribution 310 as a series of new LP problems are acquired and solved.
[0130] At 604, as described above in conjunction with Figure 4 As described above, the pricing model is trained 404. In some examples, other training techniques may be used, for example, as described below in conjunction with Fig. 7A and Figure 7B The pricing model is trained to perform the pricing step of the simplex algorithm 212 based at least in part on the category data 208 of the LP problem definition 302 used in training.
[0131] At 606, the LP assistance software system 120 is ready to be deployed to assist in solving a new LP problem of a type for which it has been trained and configured. A new LP problem definition 302 is obtained, including the categorical data 208 of its variables.
[0132] At 608 , the custom basis generation module 314 generates the custom basis 318 for the new LP problem definition 302 based on the custom basis distribution 310 and the category data 208 and the variable data 204 of the new LP problem definition 302 .
[0133] At 610, the simplex algorithm 212 is iteratively executed, augmented by the pricing model 404 to perform a pricing step based at least in part on the category data 208, as described above in conjunction with Figure 4 and Figure 5 The pricing model 404 generates outputs (eg, categories of input and / or output variables, price scores of variables), which are used by the basis generation module 406 to generate an updated basis 408 . The updated basis 408 replaces the current basis 402 .
[0134] At 612, the optimization condition module 412 determines whether the optimization condition is satisfied, as described above. If the optimization condition is satisfied, the method 600 proceeds to 614, otherwise returns to 610 and performs another iteration of the simplex algorithm 212 using the current basis 402.
[0135] At 614, the problem is solved and the enhanced solver 500 outputs the optimal solution 504. If other LP problems appear or still need to be solved, the method 600 may return to step 606 to start solving the next LP problem.
[0136] Alternative training modules via supervised learning
[0137] Fig. 7Ais a schematic diagram of the operation of an exemplary pricing supervised learning module 700 in the LP-assisted software system 120 in an alternative embodiment. In this embodiment, the pricing supervised learning module 700 configured to train the pricing model 404 by supervised learning replaces the training module 400. In supervised learning, after processing the training data sample, the ground truth semantic label on the training data is compared with the output of the model, and a loss is generated according to the comparison result using a loss function 701. In this embodiment, the training data sample is the state of the LP problem being solved (for example, provided by the simplex algorithm 212), and the label is a set of corresponding estimated optimal variables 704. Therefore, the pricing model 404 is directly trained to select the best available pivot variable. The label obtained from the optimal basis 306 and the solver-level value replaces the reward 401, and only the category distribution of the current basis 402 is used as the input of the pricing supervised learning module 700 in supervised learning. In some examples, the estimated optimal variables 704 can be generated according to the opinions of human experts on which optimal variables to select as pivot variables in a given problem state. In some examples, the estimated optimal variables 704 can be generated as the most desirable variables using standard heuristics (e.g., the simplex pivot heuristic), but are constrained to those variables that are also optimal basis variables (i.e., part of the optimal basis of the LP problem). Since the optimal basis 306 of the LP problem solved in training is known, the optimal basis 306 can be used to guide training label generation. Figure 7B A detailed schematic diagram of the pricing supervised learning module 700 with different data inputs is shown in the context of a pricing model 404 for selecting out-pivot variables and in-pivot variables.
[0138] Figure 7B Schematic diagram of the operation of an exemplary pricing supervised learning module 700 in the LP-assisted software system 120 using two sub-models 772, 774 of the pricing model 404 in an alternative embodiment. The first sub-model 772 selects the pivot variable (i.e., the input variable of the dual simplex, the leaving variable of the primal simplex), and the second sub-model 774 selects the replacement variable (i.e., the leaving variable of the dual simplex, the input variable of the primal simplex). Each sub-model 772, 774 is trained by a corresponding training sub-module 752, 754 in the pricing supervised learning module 700, respectively. The pricing supervised learning module 700 receives inputs including: a set of solver features 756 generated by the simplex algorithm 212, a set of problem features 760 based on the LP problem state 758, and a basis distribution 762 indicating the class distribution of the basic variables of the current basis 402. The estimated optimal variables 704 generated under the guidance of the simplex algorithm 212 according to the optimal basis 306 are used as training labels.
[0139] Alternatively, the pricing model 404 may be trained using a greater variety of states using randomly generated individual LP problem states 758, rather than training the pricing model 404 while solving the LP problem. In this case, the simplex algorithm 212 is only used to obtain the solver features 756 and the estimated optimal variables 704, without performing solution iterations.
[0140] Alternative custom base modules trained via supervised learning
[0141] Figure 8 is a schematic diagram of the operation of an exemplary custom-base supervised learning module 800 for training a custom-base generation model 802 in the LP-assisted software system 120 in other alternative embodiments. Figure 3 The custom basis generation module 314 in generates a custom basis for each new LP problem using a fixed statistical distribution (i.e., the custom basis distribution 310). In this alternative embodiment, the machine learning model can be trained by supervised learning or other techniques to generate a custom basis based on other data specific to a given new LP problem. Figure 8 , the custom basis generation model 802 replaces the custom basis generation module 314. The custom basis supervised learning module 800 trains the custom basis generation model 802, and generates a loss function 801 based on a comparison between the custom basis 318 generated by the custom basis generation model 802 and the training labels, which are in the form of known optimal bases 306 of the problem used to train the custom basis generation model 802. Since the optimal bases 306 of the training LP data are known, these optimal bases can be used as labels for the training model. The category data 208 and other problem-level features (e.g., variable data 204, constraint data 206, and objective function data 210) are used as input to train the custom basis generation model 802 to classify each variable as a basic variable or a non-basic variable in order to generate the custom basis 318.
[0142] Once the custom basis generation model 802 is trained, it is deployed in place of the custom basis generation module 314 to generate a custom basis 318 for each new LP problem solved by the trained enhanced solver 500, such as Figure 5 The result of predicting the trained custom basis generation model 802 according to the new LP problem definition 502 is used to generate the custom basis 318, which is then used as the current basis 402 for the enhanced solver 500 to perform the first iteration.
[0143] In some examples, the techniques described herein, such as the LP-assisted software system 120, can be used as part of an existing optimization cloud service. These services can include a loop execution mode in which the solver determines that the LP problem is part of a series and then uses the solver data to improve its initial basis and decision model to complete each optimization in the series using the techniques described herein.
[0144] Examples have been described in which category data 208 is associated with variables based on user-provided categories (e.g., variable origin) or prefixes in variable labels. In some examples, the category assignments for variables can be performed automatically by analyzing the structure of the LP problem (e.g., its constraint data 206) to assign categories. In some examples, such classifications may be less prone to human error and may determine other useful categories.
[0145] Overview
[0146] Although the present invention describes methods and processes by steps performed in a certain order, one or more steps in the methods and processes may be appropriately omitted or changed. Where appropriate, one or more steps may be performed in an order other than the order described.
[0147] Although the present invention is at least partially described in terms of methods, it will be understood by those of ordinary skill in the art that the present invention is also directed to various components for performing at least some aspects and features of the methods, whether by hardware components, software, or any combination thereof. Accordingly, the technical solution of the present invention may be embodied in the form of a software product. Suitable software products may be stored in a pre-recorded storage device or other similar non-volatile or non-transient computer-readable medium, including a DVD, CD-ROM, USB flash drive, removable hard disk, or other storage medium. The software product includes instructions tangibly stored thereon, which enable a processing device (e.g., a personal computer, a server, or a network device) to execute examples of the methods disclosed herein.
[0148] Without departing from the subject matter of the claims, the present invention may be implemented in other specific forms. The exemplary embodiments described are merely illustrative and not restrictive in all respects. Features selected from one or more of the above-described embodiments may be combined to create alternative embodiments not explicitly described, and features suitable for such combinations may be understood within the scope of the present invention.
[0149] All values and subranges within the disclosed ranges are disclosed. In addition, although the systems, devices, and processes disclosed and shown herein may include a specific number of elements / components, the systems, devices, and components may be modified to include more or less such elements / components. For example, although any disclosed element / component may be cited as a single quantity, the embodiments disclosed herein may be modified to include a plurality of such elements / components. The subject matter described herein is intended to cover and encompass all appropriate technical changes.
[0150] The contents of all published papers mentioned in this invention are incorporated herein by reference.
Claims
1. A method, characterized in that include: A linear programming (LP) problem definition is obtained, wherein the LP problem definition is used to define a predetermined type of LP problem and includes: Specify variable data for multiple variables; objective function data specifying an objective function of the plurality of variables; Constraint data specifying a plurality of constraint conditions, each constraint condition being used to constrain a value of at least one variable among the plurality of variables; assigning categorical data of a corresponding category to each variable in the plurality of variables; Obtaining a pricing model, the pricing model being trained by machine learning to perform a pricing step of a simplex algorithm with respect to the predetermined type of LP problem; Solve the LP problem by doing the following: generating an initial basis including a subset of the plurality of variables, the initial basis being designated as a current basis; Performing one or more iterations of the simplex algorithm on the current basis, each iteration comprising: applying the simplex algorithm to the current basis to generate a set of values for the plurality of variables; generating a value of the objective function based on the set of values of the plurality of variables; An updated basis including a subset of the plurality of variables is obtained by processing the category data using the pricing model to perform the pricing step of the simplex algorithm, and the updated basis is designated as the current basis.
2. The method according to claim 1, characterized in that Processing the category data using the pricing model to obtain the update base includes: One or more variables to be removed from the current basis are selected to obtain the updated basis.
3. The method according to claim 2, characterized in that Selecting the one or more variables to be removed from the current basis includes: using the pricing model to determine the categories to transfer out; The one or more variables are selected from the determined categories.
4. The method according to claim 2, characterized in that: Selecting the one or more variables to be removed from the current basis includes: generating a price score for each variable of the current base based at least in part on the category of the variable using the pricing model; The price score is processed to select the one or more variables.
5. The method according to claim 1, characterized in that Processing the category data using the pricing model to obtain the update base includes: The category data is processed using the pricing model to: selecting one or more variables from the plurality of variables to be removed from the current basis; One or more variables from the plurality of variables are selected to be added to the current basis.
6. The method according to claim 5, characterized in that Selecting the one or more variables to be removed from the current basis and selecting the one or more variables to be added to the current basis includes: generating a price score for each variable of the current base based at least in part on the category of the variable using the pricing model; The price scores are processed to select the one or more variables to remove from the current base and to select the one or more variables to add to the current base.
7. The method according to any one of claims 1 to 6, characterized in that Generating the initial basis comprises: The initial basis is generated as a custom basis according to a plurality of known optimal basis of the LP problem of the predetermined type.
8. The method according to claim 7, characterized in that Generating the custom base includes: The variables in the subset are selected according to the statistical distribution of the variables of the plurality of known optimal bases in a plurality of categories.
9. The method according to any one of claims 1 to 6, characterized in that Generating the initial basis comprises: The initial basis as a custom basis is generated by the following operations: Obtaining a custom basis generation model, wherein the custom basis generation model is trained by machine learning to generate a custom basis for the predetermined type of LP problem; The LP problem definition is processed using the custom basis generation model to generate the initial basis.
10. The method according to claim 9, characterized in that The custom base generative model is trained by the following operations: Get custom base training data including multiple data samples, each data sample includes: Constraint data for the corresponding LP problem of the predetermined type; An optimal basis for the corresponding LP problem; For each data sample, the custom base generative model is trained using supervised learning by: Using the LP problem definition as input to the custom basis generation model; The optimal basis is used as training labels.
11. The method according to any one of claims 1 to 10, characterized in that The pricing model is trained using the following operations and reinforcement learning: performing the pricing step of the simplex algorithm in solving a plurality of LP problems of the predetermined type using the pricing model; A reward function is used that is based at least in part on the number of iterations of the simplex algorithm required to solve a given LP problem.
12. The method according to claim 11, characterized in that The reward function is also based at least in part on the objective function.
13. The method according to any one of claims 1 to 10, characterized in that The pricing model is trained by: Obtain pricing training data including multiple data samples, each data sample including: LP problem definition of the corresponding LP problem of the predetermined type; The current basis of the corresponding LP problem; For each data sample, supervised learning is used to train the pricing model by: using the LP problem definition and the current basis as inputs to the pricing model; Use the training labels including the estimated optimal update basis.
14. The method according to claim 13, characterized in that The estimated optimal update is based on expert opinion.
15. The method according to claim 13, characterized in that The estimated optimal update basis is generated using a simplex pricing heuristic that is restricted to a known optimal basis for the corresponding LP problem.
16. The method according to any one of claims 1 to 15, characterized in that The categories of a given variable are based on the corresponding source of that variable.
17. The method according to any one of claims 1 to 15, characterized in that The category of a given variable is based on one or more constraints of the constraint data relating to the variable.
18. The method according to any one of claims 1 to 17, characterized in that Also includes: Determine whether the optimization conditions are met; An optimal solution to the LP problem is output, wherein the optimal solution includes a set of optimal values of the plurality of variables corresponding to the optimal value of the objective function.
19. The method according to claim 2, characterized in that Generating the initial basis comprises: generating the initial basis as a custom basis according to a plurality of known optimal basis of the LP problem of the predetermined type; The method further comprises: Determine whether the optimization conditions are met; An optimal solution to the LP problem is output, wherein the optimal solution includes a set of optimal values of the plurality of variables corresponding to the optimal value of the objective function.
20. A non-transitory computer readable medium having instructions tangibly stored thereon, characterized in that: When the instructions are executed by a processing system of a computing system, the instructions cause the computing system to perform the following operations: A linear programming (LP) problem definition is obtained, wherein the LP problem definition is used to define a predetermined type of LP problem and includes: Specify variable data for multiple variables; objective function data specifying an objective function of the plurality of variables; Constraint data specifying a plurality of constraint conditions, each constraint condition being used to constrain a value of at least one variable among the plurality of variables; assigning categorical data of a corresponding category to each variable in the plurality of variables; Obtaining a pricing model, the pricing model being trained by machine learning to perform a pricing step of a simplex algorithm with respect to the predetermined type of LP problem; Solve the LP problem by doing the following: generating an initial basis including a subset of the plurality of variables, the initial basis being designated as a current basis; Performing one or more iterations of the simplex algorithm on the current basis, each iteration comprising: applying the simplex algorithm to the current basis to generate a set of values for the plurality of variables; generating a value of the objective function based on the set of values of the plurality of variables; An updated basis including a subset of the plurality of variables is obtained by processing the category data using the pricing model to perform the pricing step of the simplex algorithm, and the updated basis is designated as the current basis.
21. A system, characterized in that: include: one or more processing devices; a non-transitory memory storing software instructions that, when executed by the one or more processing devices, cause the system to: A linear programming (LP) problem definition is obtained, wherein the LP problem definition is used to define a predetermined type of LP problem and includes: Specify variable data for multiple variables; objective function data specifying an objective function of the plurality of variables; Constraint data specifying a plurality of constraint conditions, each constraint condition being used to constrain a value of at least one variable among the plurality of variables; Assigning category data of a corresponding category to each variable in the plurality of variables; obtaining a pricing model, the pricing model being trained by machine learning to perform a pricing step of a simplex algorithm with respect to the predetermined type of LP problem; Solve the LP problem by doing the following: generating an initial basis including a subset of the plurality of variables, the initial basis being designated as a current basis; Performing one or more iterations of the simplex algorithm on the current basis, each iteration comprising: applying the simplex algorithm to the current basis to generate a set of values for the plurality of variables; generating a value of the objective function based on the set of values of the plurality of variables; An updated basis including a subset of the plurality of variables is obtained by processing the category data using the pricing model to perform the pricing step of the simplex algorithm, and the updated basis is designated as the current basis.
22. The system according to claim 21, characterized in that Processing the category data using the pricing model to obtain the update base includes: One or more variables to be removed from the current basis are selected to obtain the updated basis.
23. The system according to claim 22, characterized in that Selecting the one or more variables to be removed from the current basis includes: using the pricing model to determine the categories to transfer out; The one or more variables are selected from the determined categories.
24. The system according to claim 2, characterized in that Selecting the one or more variables to be removed from the current basis includes: generating a price score for each variable of the current base based at least in part on the category of the variable using the pricing model; The price score is processed to select the one or more variables.
25. The system according to claim 21, characterized in that Processing the category data using the pricing model to obtain the update base includes: The category data is processed using the pricing model to: selecting one or more variables from the plurality of variables to be removed from the current basis; One or more variables from the plurality of variables are selected to be added to the current basis.
26. The system according to claim 25, characterized in that Selecting the one or more variables to be removed from the current basis and selecting the one or more variables to be added to the current basis includes: generating a price score for each variable of the current base based at least in part on the category of the variable using the pricing model; The price scores are processed to select the one or more variables to remove from the current base and to select the one or more variables to add to the current base.
27. A system according to any one of claims 21 to 26, characterized in that Generating the initial basis comprises: The initial basis is generated as a custom basis according to a plurality of known optimal basis of the LP problem of the predetermined type.
28. The system according to claim 27, characterized in that Generating the custom base includes: The variables in the subset are selected according to the statistical distribution of the variables of the plurality of known optimal bases in a plurality of categories.
29. The system according to any one of claims 21 to 26, characterized in that Generating the initial basis comprises: The initial basis as a custom basis is generated by the following operations: Obtaining a custom basis generation model, wherein the custom basis generation model is trained by machine learning to generate a custom basis for the predetermined type of LP problem; The LP problem definition is processed using the custom basis generation model to generate the initial basis.
30. The system according to claim 29, characterized in that The custom base generative model is trained by the following operations: Get custom base training data including multiple data samples, each data sample includes: Constraint data for the corresponding LP problem of the predetermined type; An optimal basis for the corresponding LP problem; For each data sample, the custom base generative model is trained using supervised learning by: Using the LP problem definition as input to the custom basis generation model; The optimal basis is used as training labels.
31. A system according to any one of claims 21 to 30, characterized in that The pricing model is trained using the following operations and reinforcement learning: performing the pricing step of the simplex algorithm in solving a plurality of LP problems of the predetermined type using the pricing model; A reward function is used that is based at least in part on the number of iterations of the simplex algorithm required to solve a given LP problem.
32. The system according to claim 31, characterized in that The reward function is also based at least in part on the objective function.
33. A system according to any one of claims 21 to 30, characterized in that The pricing model is trained by: Obtain pricing training data including multiple data samples, each data sample including: LP problem definition of the corresponding LP problem of the predetermined type; The current basis of the corresponding LP problem; For each data sample, supervised learning is used to train the pricing model by: using the LP problem definition and the current basis as inputs to the pricing model; Use the training labels including the estimated optimal update basis.
34. The system according to claim 33, characterized in that The estimated optimal update is based on expert opinion.
35. The system according to claim 33, characterized in that The estimated optimal update basis is generated using a simplex pricing heuristic that is restricted to a known optimal basis for the corresponding LP problem.
36. A system according to any one of claims 21 to 35, characterized in that The categories of a given variable are based on the corresponding source of that variable.
37. A system according to any one of claims 21 to 35, characterized in that The category of a given variable is based on one or more constraints of the constraint data relating to the variable.
38. A system according to any one of claims 21 to 37, characterised in that The software instructions, when executed by the one or more processing devices, cause the system to perform the following operations: Determine whether the optimization conditions are met; An optimal solution to the LP problem is output, wherein the optimal solution includes a set of optimal values of the plurality of variables corresponding to the optimal value of the objective function.
39. The system according to claim 22, characterized in that Generating the initial basis includes: generating the initial basis as a custom basis according to a plurality of known optimal bases of the LP problem of the predetermined type; and when the software instructions are executed by the one or more processing devices, the system performs the following operations: Determine whether the optimization conditions are met; An optimal solution to the LP problem is output, wherein the optimal solution includes a set of optimal values of the plurality of variables corresponding to the optimal value of the objective function.
