Method for evaluating solving difficulty of nonlinear model containing analysis suggestions
By evaluating the model size, constraint correlation, number of variables and number of nonlinear terms of the nonlinear planning model, calculating the comprehensive score and relative score, providing specific suggestions, solving the problem of difficult to evaluate the solution difficulty of nonlinear planning models in the prior art, and achieving more comprehensive difficulty evaluation and model improvement.
Patent Information
- Application Number
- CN202510086455.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-27
AI Technical Summary
The prior art is difficult to effectively evaluate the difficulty of solving nonlinear programming models, especially when the constraint correlation is high, the number of variables and the number of nonlinear times, resulting in challenges in resource allocation, time management and algorithm selection.
A nonlinear model solution difficulty evaluation method with analysis suggestions is proposed. By constructing a nonlinear programming model, the model size, constraint correlation, number of variables and number of nonlinear terms are evaluated, the comprehensive score and relative score are calculated, and specific suggestions are provided to reduce the solution difficulty.
This method can more comprehensively evaluate the solution difficulty of nonlinear scale models, provide targeted suggestions, and help model builders identify and improve errors in model construction, reduce the solution difficulty, and improve solution efficiency.
Smart Images

Figure CN120045820A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of industrial modeling, and specifically relates to a method for evaluating the solution difficulty of a non-linear model with analysis suggestions. Background Art
[0002] (1) Definition of Nonlinear Programming
[0003] Nonlinear Programming (NLP) is an important branch of operations research, mainly studying optimization problems in which at least one of the objective function or constraint conditions is a non-linear function. In practical applications, many problems such as engineering design, economic management, resource allocation, etc. can be abstracted into non-linear programming models. The following is a non-linear programming problem:
[0004] min x 1 +x 2 +x 3 +x 4 +x 5
[0005]
[0006] Where x i represents a variable, and cons i represents a constraint condition. That is, under these condition restrictions, how to take the value of x i to ensure that x 1 +x 2 +x 3 +x 4 +x 5 reaches the minimum.
[0007] (2) Importance of Evaluating Solution Difficulty
[0008] For an actual industrial problem, the actual problem should first be abstracted into a non-linear programming model. Then, through a solution algorithm, the optimal variable value is found to ensure that the objective reaches the best (maximum or minimum).
[0009] However, if the non-linear model is directly solved by a solution algorithm after the model is constructed, some problems usually occur.
[0010] Such as:
[0011] 1. For the solution difficulty of non-linear scale models, the current technical solutions are very simple. The scale of the programming model is divided by the number of constraints and the number of variables. This method can only cover very few models. For types with high constraint correlation, many variables in the constraints, high non-linear degree, etc., they cannot be characterized;
[0012] 2. The difficulty of model solution is a relative issue and requires comparison based on a large number of classical-scale models;
[0013] 3. The evaluation of the difficulty of model solution can provide corresponding analysis suggestions for model builders, and check for errors in model construction and reduce the difficulty of model solution through the suggestions.
[0014] Since the solution difficulties of different problems vary greatly. For example, under the same configuration, an easily solvable problem may only take a few milliseconds, while a particularly complex problem may take several days. Therefore, before model solution, it is necessary to evaluate the solution difficulty of the model to achieve the following effects:
[0015] ● Resource allocation: Reasonable resource allocation can avoid waste and improve the solution efficiency. For example, for the problem to be solved, allocate the most reasonable number of CPUs and memory;
[0016] ● Time management: Estimating the solution time is helpful for project progress management and decision-making. For example, for the problem to be solved, allocate the most reasonable solution time. Allocating a shorter time may not find the optimal solution, while allocating a longer time may affect subsequent plans;
[0017] ● Algorithm selection: Different nonlinear programming problems may require different solution algorithms. Evaluating the difficulty helps to select the appropriate algorithm. Some algorithms are suitable for solving small-scale problems, while others are suitable for solving large-scale problems. Select the best solution algorithm according to the problem scale;
[0018] ● Understanding of problem complexity: By evaluating the solution difficulty, the complexity of the problem can be better understood, providing a basis for problem simplification or decomposition.
[0019] To evaluate the solution difficulty of a nonlinear model, the current technology usually considers the following aspects:
[0020] (1) Number of variables
[0021] The number of variables is an important factor affecting the solution difficulty. The more variables there are, the higher the complexity of the model and the greater the computational amount in the solution process. In a nonlinear model, the interaction between variables may be very complex, so the increase in the number of variables will significantly increase the solution difficulty.
[0022] (2) Number of constraints
[0023] The number of constraints will also affect the solution difficulty. The more constraint conditions there are, the smaller the feasible region of the model, and the solver needs to find the optimal solution in a smaller search space.
[0024] (3) Highest degree of nonlinearity
[0025] The non - linear highest degree refers to the highest degree of non - linear terms in the model. The higher the non - linear degree, the stronger the non - linear characteristics of the model, and the greater the challenges in the solution process. For example, the quadratic term (quadratic non - linearity) is more complex than the linear term, and the non - linearity of the cubic term or higher - order terms is even more difficult to handle.
[0026] The solution difficulty of a non - linear model is jointly determined by many aspects. If only evaluated from aspects such as the number of variables, the number of constraints, and the non - linear highest degree, it is too one - sided. For example:
[0027] (1) The correlation between constraint conditions is not considered.
[0028] If a certain variable appears in multiple constraints at the same time, a slight change in the value of this variable will affect multiple constraint conditions, and thus affect other variables involved in these constraints. The higher the correlation between constraints, the more complex the model solution.
[0029] For example, both groups of constraint conditions have 3, and both involve x 1 ~x 3 a total of 3 variables. However, in the left - hand group, each variable only involves one constraint, that is, the three groups of constraints do not affect each other. In the right - hand group, each variable involves three constraints. For cons4, a set of solutions is found: x 1 =x 2 =x 3 =6. However, when substituting into cons5, the left - hand term of cons5 is 6 + 2*6 + 3*6 = 36, which does not satisfy cons5. Therefore, a new set of solutions needs to be found. Obviously, the right - hand group is more complex.
[0030]
[0031] (2) The number of variables involved in the constraint conditions is not considered.
[0032] The more variables involved in a constraint, the more variables need to be optimized simultaneously, and the more complex the model solution.
[0033] For example, cons1 only involves 3 variables, and cons involves 20 variables. Obviously, the latter has a greater solution difficulty because cons2 needs to consider the influence of the changes of 20 variables on other variables simultaneously.
[0034] cons1:x 1 +x 2 +x 3 ≤10
[0035] cons2:x 1 +x 2 +…+x 19 +x 20 ≤10
[0036] (3) Other non - linear term degrees in the constraint conditions are not considered
[0037] In non - linear programming, the higher the degree and the more high - degree terms, the more complex the model solution.
[0038] For example, both cons1 and cons2 contain five terms, but cons1 has only one fifth - degree term and the others are all first - degree terms, while cons2 consists of all fourth - degree terms.
[0039]
[0040] In actual solution, cons2 is more difficult than cons1. Summary of the Invention
[0041] In view of the problems existing in the evaluation of the model solution difficulty in the background technology, the present invention proposes an evaluation method for the solution difficulty of a non - linear model with analysis suggestions.
[0042] Technical Solution:
[0043] An evaluation method for the solution difficulty of a non - linear model with analysis suggestions, which includes the following steps:
[0044] S1. Construct a non - linear programming model for a specific industrial problem;
[0045] S2. Solve the scale evaluation value g(Scale) of the non - linear programming model;
[0046] S3. Solve the evaluation quantile indicators of the non - linear programming model, including: the 80th percentile of the constraint condition correlation M i is P 80 (M), the number of variables N j of the constraint conditions, and its 80th percentile is P 80 (N), the comprehensive degree of non - linear terms T j of the constraint conditions, and its 80th percentile is P 80 (T);
[0047] S4. Solve the model comprehensive score Score = g(Scale) * P 80 (M) * P 80 (N) * P 80 (T)
[0048] S5. Determine the reference values of each index, including the model scale, constraint condition correlation, number of variables of the constraint conditions, comprehensive degree of non - linear terms of the constraint conditions, and the average value of the comprehensive score of each scale model;
[0049] S6. Calculate the relative score r of the model to be evaluated based on the comprehensive score of the model to be evaluated and the average value of the comprehensive scores of each scale model
[0050] S7. Give specific suggestions for the model to be evaluated based on the relative score r.
[0051] Specifically, the scale evaluation value g(Scale) is determined by the following formula:
[0052]
[0053] In the formula, Scale represents the model scale, Scale = N + M, N represents the number of variables in the model, and M represents the number of constraint conditions in the model.
[0054] Specifically, in S5, the reference values of each index are shown in the following table:
[0055] Problem scale Average Scale <![CDATA[Average M i > <![CDATA[Average N j > <![CDATA[Average T j > Average comprehensive score Small scale (S) 46 9.0 20.8 6.6 57 Medium scale (M) 572 15.9 23.0 6.6 1376 Large scale (L) 4431 14.8 24.1 7.4 39907 Extra-large scale (XL) 26987 17.0 25.8 7.1 2571259 .
[0056] Preferably:
[0057] When Scale ≤ 100, the current model is a small-scale problem;
[0058] When 100 < Scale ≤ 1000, the current model is a medium-scale problem;
[0059] When 1000 < Scale ≤ 10000, the current model is a large-scale problem;
[0060] When Scale > 10000, the current model is an extra-large-scale problem.
[0061] Specifically, in S6, the formula for the relative score r is:
[0062]
[0063] Among them, the smaller r is, the lower the model solving difficulty; the larger r is, the higher the model solving difficulty.
[0064] Preferably:
[0065] When r < 1, it indicates that the model solving difficulty is lower than the average difficulty;
[0066] When r ≈ 1, it indicates that the model solving difficulty is equivalent to the average difficulty;
[0067] When r > 1, it indicates that the model solving difficulty is higher than the average difficulty.
[0068] Specifically, according to the current model scale, compare with the model indexes of the same specification, that is, the average values of the constraint condition correlation, the number of variables in the constraint condition, and the comprehensive number of non-linear terms in the constraint condition, and obtain specific suggestions:
[0069] If the relevance of the constraints of the current model is greater than the average relevance of the constraints, it indicates that for this metric, the current model exceeds the average score, the relevance of the constraints of this model is relatively high, and there is a risk of unreasonable model construction. Specifically check the relevance of the constraints of the model; otherwise, consider this metric reasonable and no suggestions are required.
[0070] If the number of variables in the constraints of the current model is greater than the average number of variables in the constraints, it indicates that for this metric, the current model exceeds the average score, the number of variables in the constraints of this model is relatively large, and there is a risk of unreasonable model construction. Specifically check the number of variables in the constraints of the model; otherwise, consider this metric reasonable and no suggestions are required.
[0071] If the combined degree of the non - linear terms of the constraints of the current model is greater than the average combined degree of the non - linear terms of the constraints, it indicates that for this metric, the current model exceeds the average score, the combined degree of the non - linear terms of the constraints of this model is relatively high, and there is a risk of unreasonable model construction. Specifically check the combined degree of the non - linear terms of the constraints of the model; otherwise, consider this metric reasonable and no suggestions are required.
[0072] Advantages of the present invention
[0073] 1. Consider problem estimation, constraint relevance, number of variables in constraints, non - linear degree, etc. simultaneously, and more comprehensively evaluate the solution difficulty of non - linear scale models;
[0074] 2. Statistically analyze a large number of classical scale models, convert the model solution difficulty into a relative problem, and intuitively understand the magnitude of the solution difficulty;
[0075] 3. Provide analysis suggestions for model constructors to check errors in model construction and reduce the model solution difficulty through the suggestions. Description of the drawings
[0076] Figure 1 It is a flowchart of the evaluation method of the present invention.
[0077] Figure 2 It is a function graph of the model scale function g(Scale) of the present invention.
[0078] Figure 3 For Figure 2 Local enlarged view. Detailed implementation manners
[0079] The following further illustrates the present invention in conjunction with embodiments, but the protection scope of the present invention is not limited thereto:
[0080] The present invention aims at the difficult evaluation of the solution difficulty of non - linear models constructed when abstracting an actual industrial problem into a programming problem and solving it.
[0081] Combined with Figure 1 Based on the flow chart of the present invention given below, the evaluation method specifically includes:
[0082] Step S1: Construct a non - linear programming model for a specific industrial problem;
[0083] In almost all industries, the challenges faced can be abstracted as planning problems. Especially for those key problems involving complex interactions of multiple factors, non - linear programming provides the necessary tools to accurately characterize and solve these challenges. For example:
[0084] 1. In the chemical industry, the design and operation of chemical reactors are crucial for product quality, production volume, and cost control. Among them, the chemical reactions in the reactor are usually highly non - linear, involving complex kinetic processes. This problem can be abstracted as: how to optimize the operating parameters of the reactor (such as temperature, pressure, raw material flow rate, etc.) to maximize the production volume or purity of the product, while minimizing energy consumption and raw material consumption.
[0085] 2. In the energy industry, the economic dispatch of power systems needs to adjust the output power of generating units according to real - time demand to ensure the stable operation of the power grid and reduce costs. Among them, the efficiency curve of generating units is non - linear and will be superimposed with other generating units. This problem can be abstracted as: how to arrange the output of multiple generating units to minimize the total generation cost, while meeting the load demand and complying with the technical and environmental limitations of each unit.
[0086] 3. In the machinery industry, structural design is important for the performance, safety, and economy of mechanical parts or the overall system. Among them, the relationship between stress distribution, material properties, and geometric shape is often non - linear. This problem can be abstracted as: how to optimize the geometric parameters of the mechanical structure (such as thickness, length, width, etc.) to minimize the structural weight, while ensuring that its strength and stiffness meet the engineering requirements and complying with manufacturing processes and technical standards.
[0087] 4. In supply chain management, inventory control needs to balance costs and service levels simultaneously. Among them, the selection of reorder point and order quantity involves complex supply - demand relationships and cost structures, and these relationships are usually non - linear. This problem can be abstracted as: how to formulate an optimal inventory strategy (including reorder point and order quantity) to reduce holding costs and stock - out risks, while maintaining a high level of customer service and complying with budget and storage space limitations.
[0088] 5. In the field of financial investment, portfolio optimization is a key issue for achieving maximum return and minimum risk. Among them, the correlations between different assets and market fluctuations lead to complex risk-return relationships, which are usually non-linear. This problem can be abstracted as: how to select the investment proportions of various assets to construct a portfolio with the highest expected return and the lowest risk, while complying with constraints such as fixed investment amount, upper limit of individual stock weights, and industry diversification.
[0089] Abstracting a practical industrial problem into a programming problem and solving it usually involves the following steps:
[0090] 1. Problem Definition and Understanding
[0091] 1.1 Determine the Objectives
[0092] Clarify what the core of the problem you want to solve is. This step includes determining the optimization objectives (such as minimizing costs, maximizing profits, etc.).
[0093] 1.2 Identify the Decision Variables
[0094] Identify all the key factors that affect the objective function and define them as decision variables. These variables are the parts that you can adjust in the model to achieve the optimal solution.
[0095] 1.3 Understand the Constraints
[0096] List all the restrictions or conditions that must be satisfied for the solution to be valid. For example, resource limitations, time windows, regulatory requirements, etc.
[0097] 2. Model Construction
[0098] 2.1 Representation of Decision Variables
[0099] Represent the decision variables using mathematical symbols. For example, xi may represent the production quantity of the i-th product.
[0100] 2.2 Construct the Objective Function
[0101] Construct the objective function according to the objective of the problem. If the objective is to minimize, the form is:
[0102] min z=c 1 x 1 +c 2 x 2 +…+c n x n
[0103] max z=c 1 x 1 +c 2 x 2 +…+cn x n
[0104] If it is maximization, then the form is:
[0105] 2.3 Add constraint conditions
[0106] Convert all constraint conditions into mathematical expressions. Ensure that each constraint is linear (for linear programming), and consider non - negativity constraints (i.e., all decision variables should be greater than or equal to zero). For example:
[0107] a 11 x 1 +a 12 x 2 +...+a 1n x n ≤b 1
[0108] a 21 x 1 +a 22 x 2 +...+a 2n x n ≤b 2
[0109] a m1 x 1 +a m2 x 2 +...+a mn x n ≤b m
[0110] x 1 ,x 2 ,...,x n ≥0
[0111] 3. Model standardization
[0112] Ensure that the model meets the requirements of the standard form. This means that all inequality constraints should be converted into equality constraints (by introducing slack variables or surplus variables), and all decision variables should be non - negative.
[0113] 4. Select a solution method
[0114] Select a suitable solution method according to the characteristics of the problem. For linear programming problems, common methods include the Simplex Method, Interior Point Method, etc. Modern solvers such as Gurobi, CPLEX or open - source tools such as GLPK, PuLP can automatically handle these problems.
[0115] For any non - linear programming model, its basic evaluation indicators include:
[0116] (1) Model scale
[0117] In the known non - linear programming model:
[0118] Variables: x i , i = 1, 2,..., N, that is, there are a total of N variables;
[0119] Constraints: cons j , j = 1, 2,..., M, that is, there are a total of M constraint conditions;
[0120] Model scale: Scale = N + M
[0121] (2) Correlation of constraint conditions M i
[0122] For any variable x i , count the number of constraints M that involve the quantity of this variable i , where M i ≤M.
[0123] (3) Number of variables in constraint conditions N j
[0124] For any constraint cons j , count the number of different variables N j , where N j ≤N. Here, only different variables are counted. If a variable is a polynomial term multiple times, it is only counted once. For example, the N corresponding to cons1 and cons2 respectively 1 = 5, N 2 = 5.
[0125]
[0126] (4) Comprehensive degree of non - linear terms in constraint conditions T j
[0127] For any constraint, the higher the degree of a single variable, the greater the impact on the model solving difficulty, and a higher coefficient should be assigned. However, all non - linear terms will increase the solving difficulty, so all non - linear terms need to be considered (the degree of linear terms is only 1 and is not considered).
[0128] Degree coefficient: p k , k is the degree, k≥2.
[0129] For any constraint cons j , the comprehensive degree of non - linear terms T j :
[0130] Nonlinear term synthesis degree T j = Σ (Nonlinear constraint degree * Degree coefficient)
[0131] For example, the nonlinear term synthesis degree T of cons1 1 = 5 * 5 + 3 * 3 + 2 * 2 = 37, T 2 = 4 * 4 + 2 * 2 + 3 * 3 + 4 * 4 + 4 * 4 = 61,
[0132]
[0133] The scale of the mathematical programming model can usually be divided according to the "number of constraints", "number of variables" in the following table, and by comprehensively considering the "number of constraints and number of variables".
[0134] Problem scale Number of constraints Number of variables Number of constraints + number of variables Small scale 0-100 0-100 0-100 Medium scale 100-1000 100-1000 100-1000 Large scale 1000-10000 1000-10000 1000-10000 Extra-large scale >10000 >10000 >10000
[0135] When solving the nonlinear programming model, the model scale Scale plays a crucial role. When the model scale is small, the influence of other factors on the solution complexity is relatively small and can even be ignored; when the model scale is large, the model scale Scale should grow nonlinearly. A quadratic equation is selected for characterization, that is
[0136] g(Scale) = a(Scale - b) 2 + c
[0137] Set the lower limit corresponding score of the large-scale problem Scale to 1, that is, g(1000) = 1; set the upper limit corresponding score of the large-scale problem Scale to 100, that is, g(10000) = 100. It can be seen that 10000 is 10 times that of 1000, but the score is 100, thus characterizing the nonlinear growth of the model scale Scale. Thus, we can obtain
[0138] a = 1.222×10 -6 , b = 1000, c = 1
[0139] Therefore, in step S2: Construct the model scale function g(Scale) as follows:
[0140]
[0141] The complete graph of this function is as shown in Figure 2 shown, and the partial enlarged view is as shown in Figure 3 shown. For medium-scale and small-scale problems, the model scale function g(Scale) is linear with Scale and ≤ 1, that is, when Scale = 1000, g = 0; when Scale = 0, g = 1;
[0142] When dealing with large-scale and extra-large-scale problems, the model scale function g(Scale) shows a parabolic relationship with Scale, and the larger the Scale, the higher the increment of g(Scale). For example, g(10000) = 100 and g(5000) = 20.552. That is, Scale = 10000 is twice that of Scale = 5000, but g(10000) is actually four times that of g(5000).
[0143] Step S3: Solve the evaluation quantile index using the non-linear programming model.
[0144] For the three statistical indicators (the correlation of constraint conditions M i , the number of variables in the constraint conditions N j , and the comprehensive degree of non-linear terms in the constraint conditions T j ), a model will have multiple sets of the above data. The number of M i is the same as the number of variables, that is, N; the number of N j and T j is the same as the number of constraints, that is, M.
[0145] To characterize a set of data, "average" is usually used in statistics. That is, if the average M i of model A > the average M i of model B, then it is considered that the constraint condition correlation of model A is higher.
[0146] M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 Average Model A 1 1 4 1 1 1 1 8 1 1 1.8 Model B 2 2 2 2 2 2 2 2 2 2 2
[0147] However, for the solution of non-linear scale models, it is often that some relatively extreme statistical indicators can better reflect the solution difficulty. In the above table, the average constraint condition correlation of model A is 1.7, and that of model B is 2. In actual solution, M 3 and M 8 of model A play a key role. For the 3rd and 8th variables, they are respectively related to 4 and 6 constraints, and the solution difficulty is much higher than that of model B where all 10 groups have 2 constraints. Therefore, we choose an appropriate quantile to characterize a set of data.
[0148] According to the "80 / 20 rule", only a small part, about 20%, often affects the solution speed. In the above table for model A, there are a total of 10 constraint condition correlations M 1 -M 10 . Sorted from small to large, that is, [1,1,1,1,1,1,1,1,4,6]. The higher the constraint condition correlation, the greater the impact on the solution speed. Therefore, the 20% here refers to the largest 20% numbers in this column of data, which are 4 and 6. So, the smaller of the two, 4, is the 80th quantile. That is, among all the constraint condition correlations of model A, 80% of the data is less than 4. Therefore, the 80th quantile is used to characterize this set of data.
[0149] Here is a popular explanation: Quantiles are values used in statistics to divide a dataset such that the data points below each quantile account for a specific proportion of the total data points. For example, the 80th quantile means that 80% of the data points are below or equal to that value, and the 60th quantile means that 60% of the data points are below or equal to that value.
[0150] For example, if the scores of 20 people are arranged in ascending order as [45, 50, 55, 60, 63, 67, 70, 72, 75, 78, 80, 82, 85, 88, 90, 92, 94, 96, 100], the 4 people with the highest scores, which is 20 * 20% = 4 people, are shown in bold. So, 94 points is their 80th quantile because 80% of the people, that is, 20 * 80% = 16 people, have scores lower than 94.
[0151] According to the "Pareto principle", we choose the 80th quantile to characterize a set of data. In the above table, the 80th quantile of the constraint condition correlation M i is 4, and the 80th quantile of Model A is 2. Denote the 80th quantile as P 80 (), so:
[0152] The 80th quantile of the constraint condition correlation M i is P 80 (M);
[0153] The 80th quantile of the number of variables N j of the constraint condition is P 80 (N);
[0154] The 80th quantile of the comprehensive degree T j of the non - linear terms of the constraint condition is P 80 (T).
[0155] Step S4: Model comprehensive score Score.
[0156] The model scale, constraint condition correlation, number of variables of the constraint condition, and comprehensive degree of non - linear terms of the constraint condition are all positively correlated with the model solving difficulty. Therefore, define the model comprehensive score:
[0157] Score = g(Scale) * P 80 (M) * P 80 (N) * P 80 (T)
[0158] Step S5: Basic reference index statistics.
[0159] For any model, the comprehensive score of the calculator can be calculated based on the model scale, the relevance of the constraints, the number of variables in the constraints, the number of times the non-linear terms in the constraints are combined, etc. However, without reference benchmark data, it is impossible to distinguish the magnitude of this score.
[0160] Referring to the classical planning problem, The Benchmark Set, a total of 240 planning problems of different scales are provided. According to different problem scales, the average Scale, M i 80th percentile of, N j 80th percentile of, T j 80th percentile of, average comprehensive score Score are calculated for all models, and then averaged as follows:
[0161]
[0162]
[0163] For ease of representation, the average Score of the small-scale planning problem model is denoted as S(Score), the medium-scale as M(Score), the large-scale as L(Score), and the extra-large and extra-large-scale as XL(Score), i.e., S(Score) = 57, M(Score) = 1376, L(Score) = 39907, XL(Score) = 2571259.
[0164] At the same time, record the relevance of the constraints, the number of variables in the constraints, and the non-linear terms of the constraints for models of different scales, i.e., S(M i ) = 9, S(N j ) = 20.8, S(T j ) = 6.6, M(M i ) = 15.9, M(N j ) = 23, M(T j ) = 6.6, L(M i ) = 14.8, L(N j ) = 24.1, L(T j ) = 7.4, XL(M i ) = 17, XL(N j ) = 25.8, XL(T j ) = 7.1.
[0165] Step S6: Calculate the comprehensive relative score of the model to be evaluated.
[0166] For any non-linear programming model, calculate the comprehensive score of the model as Score and the problem scale Scale, and calculate the comprehensive relative score according to the problem scale to which it belongs:
[0167]
[0168] Among them, the smaller the r, the lower the difficulty of solving the model; the larger the r, the higher the difficulty of solving the model.
[0169] When r < 1, it indicates that the difficulty of solving this model is lower than the average difficulty.
[0170] When r ≈ 1, it indicates that the difficulty of solving this model is equivalent to the average difficulty.
[0171] When r > 1, it indicates that the difficulty of solving this model is higher than the average difficulty.
[0172] For example, r = 0.2 indicates that the difficulty of solving this model is extremely low; r = 5 indicates that the difficulty of solving this model is extremely high.
[0173] Step S7: Give specific suggestions for the model to be evaluated:
[0174] The above comprehensive relative score r is a comprehensive evaluation of the entire model. According to the correlation of constraint conditions, the number of variables in constraint conditions, and the non - linear terms of constraint conditions of different models, suggestions can be given respectively. If a certain index of the current model is higher than the average value in the problem scale it belongs to, it is considered that this index of the current model exceeds the average value, and this information is fed back to the user, which is convenient for analyzing whether the current model construction is correct and whether a simpler model can be constructed through technical means, so as to reduce the difficulty of solving the model.
[0175] For example, there are currently three models, and the statistical data is as follows:
[0176]
[0177]
[0178] For model C, the model scale Scale = 345, which is a medium - sized model. r = 0.61, indicating that the difficulty of solving is lower than the average level of medium - sized models, and the overall difficulty of solving is relatively low. However, the number of variables in the constraint conditions P 80 (M) = 26.7, slightly higher than the average index 23.0 of all medium - sized models. If the model exceeds expectations during actual solution, it is recommended that the user focus on checking this part;
[0179] Similarly, for model E, the model scale Scale = 16588, which is an extra - large model. r = 1.05, indicating that the difficulty of solving is at the average level of extra - large models. However, the number of variables in the constraint conditions P 80 (M) = 36.2, much higher than the average index 25.8 of all extra - large models; the non - linear term of the constraint condition P 80(T) = 16.1, which is also far beyond the average index of 7.1. Before solving, it is recommended that the user focus on checking whether there are errors in the construction of this model.
[0180] The specific embodiments described in this document are merely illustrative of the spirit of the present invention. Those skilled in the art to which the present invention pertains may make various modifications or supplements to the described specific embodiments or use similar means for substitution, but will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
Claims
1. A method for evaluating the difficulty of solving a nonlinear model with analytical suggestions, characterized in that It includes the following steps: S1. Construct a non - linear programming model for a specific industrial problem; S2. Solve the scale evaluation value g(Scale) of the non - linear programming model; S3, evaluation quantile index for solving nonlinear programming models, including: constraint correlation M i The 80th percentile is P 80 (M), the number of variables N of the constraints j The 80th percentile is P 80 (N), the comprehensive number of nonlinear terms of constraint conditions T j The 80th percentile is P 80 (T); S4. Calculate the comprehensive score of the model Score = g(Scale)*P 80 (M)*P 80 (N)*P 80 (T) S5. Determine the reference values of each index, including the model scale of each scale model, the correlation of constraint conditions, the number of variables in the constraint conditions, the comprehensive degree of non - linear terms in the constraint conditions, and the average value of the comprehensive score; S6. Calculate the relative score r of the model to be evaluated based on the comprehensive score of the model to be evaluated and the average value of the comprehensive scores of each scale model; S7. Give specific suggestions for the model to be evaluated based on the relative score r.
2. The method according to claim 1, characterized in that In S2, the scale evaluation value g(Scale) is determined by the following formula: In the formula, Scale represents the model scale, Scale = N + M, N represents the number of variables in the model, and M represents the number of constraint conditions in the model.
3. The method according to claim 1, characterized in that In S5, the reference values of each index are shown in the following table: 。 4. The method according to claim 3, wherein: When Scale ≤ 100, the current model is a small - scale problem; When 100 < Scale ≤ 1000, the current model is a medium - scale problem; When 1000 < Scale ≤ 10000, the current model is a large - scale problem; When Scale > 10000, the current model is an extra - large - scale problem.
5. The method according to claim 1, characterized in that In S6, the formula for the relative score r is: Among them, the smaller r is, the lower the model solving difficulty; the larger r is, the higher the model solving difficulty.
6. The method according to claim 5, wherein: When r < 1, it indicates that the model solving difficulty is lower than the average difficulty; When r ≈ 1, it indicates that the model solving difficulty is equivalent to the average difficulty; When r > 1, it indicates that the model solving difficulty is higher than the average difficulty.
7. The method according to claim 6, characterized in that Compare according to the current model scale and the model indicators of the same specification, that is, the average values of the correlation of constraint conditions, the number of variables in the constraint conditions, and the comprehensive degree of non - linear terms in the constraint conditions, and obtain specific suggestions: If the correlation of the constraint conditions of the current model is greater than the average correlation of the constraint conditions, it means that for this index, the current model exceeds the average score, the correlation of the constraint conditions of this model is relatively high, and there is a risk of unreasonable model construction. Check the correlation of the constraint conditions of the model specifically; Otherwise, it is considered that this index is reasonable and no suggestions are required; If the number of variables in the constraint conditions of the current model is greater than the average number of variables in the constraint conditions, it means that for this index, the current model exceeds the average score, the number of variables in the constraint conditions of this model is relatively large, and there is a risk of unreasonable model construction. Check the number of variables in the constraint conditions of the model specifically; otherwise, it is considered that this index is reasonable and no suggestions are required; If the comprehensive degree of non - linear terms in the constraint conditions of the current model is greater than the average comprehensive degree of non - linear terms in the constraint conditions, it means that for this index, the current model exceeds the average score, the comprehensive degree of non - linear terms in the constraint conditions of this model is relatively high, and there is a risk of unreasonable model construction. Check the comprehensive degree of non - linear terms in the constraint conditions of the model specifically; otherwise, it is considered that this index is reasonable and no suggestions are required.