Intelligent modeling method for combinatorial optimization problem
By acquiring natural language demand descriptions, generating a disambiguated set of production constraints and discovering implicit constraints, constructing a mathematical optimization model and tracing conflicts, the blind spots and conflict resolution problems of semantic understanding and model building in existing technologies are solved, realizing efficient and intelligent modeling of combinatorial optimization problems and improving modeling efficiency and accuracy.
Patent Information
- Application Number
- CN202511256963.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-04
AI Technical Summary
Existing technologies suffer from gaps in semantic understanding, blind spots in model building, and broken links in conflict resolution when transforming real, original business requirements into high-quality, solvable optimization models. This results in low modeling efficiency, poor accuracy, reliance on expert experience, and difficulty in quickly obtaining optimization models that closely match actual business scenarios.
By obtaining the demand description in natural language form, a disambiguated set of production constraints is generated, implicit constraints are discovered, a complete set of production constraints is formed, and a mathematical optimization model is constructed. Conflicts are traced using a constraint tracing graph, and feasible production scheduling schemes are generated, reducing the reliance on expert experience.
It improves the automation and intelligence of modeling, quickly obtains feasible optimization models that closely match actual business scenarios, reduces reliance on expert experience, and improves modeling efficiency and accuracy.
Smart Images

Figure CN120806282A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of intelligent modeling, and particularly relates to an intelligent modeling method for a combinatorial optimization problem. BACKGROUND
[0002] In the development of intelligent manufacturing, how to quickly and accurately transform complex and dynamically changing production requirements into a solvable mathematical optimization model has become a core bottleneck for improving the intelligent decision-making ability of enterprises and realizing lean production. Therefore, researching an efficient and intelligent combinatorial optimization problem modeling method not only has great theoretical value, but also has practical significance in promoting industrial digital transformation and enhancing core competitiveness, and is a frontier topic that the academic and industrial circles are concerned about.
[0003] Currently, the modeling process of a combinatorial optimization problem largely depends on the deep participation of an operations research (OR) expert. The mainstream modeling methods include using an algebraic modeling language (such as AMPL, GAMS) or an optimization library integrated in a general programming language (such as Pyomo in Python). These methods require the modeler to have deep mathematical skills and be able to accurately translate business logic into mathematical constraints and objective functions. In recent years, with the development of natural language processing (NLP) technology, some researches have begun to try to use NLP technology to automatically extract entities and basic constraints from requirement documents to assist modeling. These methods are usually based on template matching or keyword recognition and can handle a part of structured and clearly expressed requirements and show certain automation potential in specific and mature application scenarios (such as the standardized description of the vehicle routing problem VRP), reducing the data entry and sorting work of the modeler.
[0004] However, the existing technology still faces several specific and deep technical challenges in the process of transforming real and original business requirements into high-quality and solvable optimization models. In summary, the existing technology mainly has three problems of semantic understanding gap, model construction blind area and conflict checking disconnection: in the front-end requirement understanding, it is difficult to effectively bridge the semantic gap between the ambiguous and colloquial natural language of business personnel and the strict and accurate mathematical form of the optimization model; in the middle model construction, there is a lack of active review and diagnosis mechanism, and there is a discovery blind area for the implicit constraints omitted by users due to habituation; in the back-end model debugging, due to the inability to trace the mathematical conflicts returned by the solver to their original business requirements, a checking disconnection from error positioning to root cause analysis is formed. SUMMARY
[0005] The application aims to provide an intelligent modeling method for a combinatorial optimization problem, so as to solve at least one technical problem in the prior art.
[0006] The technical scheme provides an intelligent modeling method for a combinatorial optimization problem, which comprises:
[0007] obtaining a requirement description in natural language form, generating a disambiguated production constraint set;
[0008] finding an implied constraint based on the disambiguated production constraint set, forming a complete production constraint set;
[0009] constructing and repairing a mathematical optimization model according to the complete production constraint set, obtaining a feasible production scheduling model;
[0010] solving the feasible production scheduling model, generating a production scheduling execution scheme.
[0011] Beneficial effects, the application can improve the automation and intelligent level of modeling, reduce the dependence on expert experience, and quickly obtain a feasible optimization model highly consistent with the actual business scenario. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 A step flowchart of an intelligent modeling method of a combinatorial optimization problem provided by an embodiment of the application.
[0013] Figure 2 A step flowchart of forming a complete production constraint set provided by an embodiment of the application.
[0014] Figure 3 A step flowchart of identifying an abnormal feature in a scheduling result provided by an embodiment of the application.
[0015] Figure 4 A step flowchart of reasoning out an implied constraint based on an abnormal feature provided by an embodiment of the application. DETAILED DESCRIPTION
[0016] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0017] It should be noted that the terms "comprising" and "having" and any variations thereof are intended to cover not exclusively including, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.
[0018] In the research, it is found that the semantic gap between the natural language description of the business personnel and the strict mathematical expression required by the optimization solver is huge. When describing the demand, the business personnel often uses fuzzy words such as about, as soon as possible, left and right, or omits the boundary conditions by default. The existing NLP technology stops at the surface entity extraction, and lacks a mechanism for effectively clarifying deep semantic ambiguity. This leads to the introduction of uncertainty from the source of model construction, and the modeling experts and business experts need to communicate for many rounds to reach a consensus, which prolongs the modeling cycle.
[0019] The blind spot of model construction is that the existing method is a passive modeling, that is, it completely depends on the explicit constraints provided by the user. However, in actual production, a large number of key constraints are implicit, which are rooted in industry conventions, unwritten regulations within the workshop, or physical dependencies between devices, and users often ignore them because they are accustomed to them. The existing modeling tools cannot actively and prospectively discover these missed implicit constraints, resulting in the initial model constructed often being inconsistent with reality, and the solution scheme based on the model will expose various abnormalities (such as serious imbalance of device load, excessive fatigue of personnel) in actual execution, lacking practical value.
[0020] The broken chain problem of conflict investigation is particularly prominent. When multiple constraints contradict each other, causing the model to be infeasible, the optimization solver can only return a minimal infeasible subset (IIS) composed of mathematical expressions. From this code-level conflict to the original demand at the business level where the root lies, there is a completely broken traceability chain. The existing technology cannot automatically map the mathematical conflict back to the specific and mutually contradictory natural language demand description, making the model debugging process like a blind man feeling an elephant, requiring multi-disciplinary experts to cooperate to conduct a large amount of manual investigation and logical reasoning, and the cost of positioning and repairing conflicts is extremely high.
[0021] As shown in Figure 1 An intelligent modeling method for combinatorial optimization problems is proposed, including the following steps:
[0022] Obtain the demand description in natural language form, and generate the disambiguated production constraint set.
[0023] Specifically, the system first receives the requirement description input by the user in natural language text form. For example, a piece of description can be: Order A needs 100 pieces of product P1, and must be completed before Friday. The production of product P1 needs to go through process G1 on device M1 first, and then process G2 on device M2. The capacity of device M1 is about 20 pieces per day, and the capacity of device M2 is 30 pieces per day. Both operators Xiao Wang and Xiao Li can operate device M1, but only Xiao Wang can operate device M2. After receiving the text, the system uses natural language processing techniques for analysis. For example, using rule-based named entity recognition techniques, the production factor entities such as order A, product P1, device M1, process G1, and operator Xiao Wang are identified. For ambiguous expressions in the text, such as completion before Friday or capacity about 20 pieces per day, the system will start an interactive disambiguation process. This process converts ambiguous expressions into precise, unambiguous constraints by asking clarifying questions to the user. For example, the system will ask if completion before Friday means including Friday. Finally, all original, ambiguous requirements are converted into a set of machine-understandable, precise production constraints.
[0024] Based on the disambiguated production constraint set, implicit constraints are discovered to form a complete production constraint set.
[0025] In this embodiment, after obtaining the preliminary, explicit constraint set, the system realizes that the user may have missed some industry conventions or potential rules within the workshop, i.e., implicit constraints. To discover these implicit constraints, the disambiguated production constraint set is used to build an initial, possibly incomplete scheduling model, and a quick solution is performed. The initial solution may have abnormal patterns, such as a device utilization rate much lower than other devices, or an operator's overtime being abnormally concentrated. Based on these abnormal characteristics, the system can infer potential implicit constraints. For example, an unbalanced device utilization rate may imply an unspoken process dependency or device specificity constraint. After these inferred implicit constraints are confirmed with the user or evaluated for confidence based on historical data, they are added to the constraint set, forming a more comprehensive and realistic complete production constraint set.
[0026] According to the complete production constraint set, a mathematical optimization model is constructed and repaired to obtain a feasible production scheduling model.
[0027] In this embodiment, the system automatically converts the complete set of production constraints into standard mathematical expressions. For example, time constraints are converted into linear inequalities, and resource allocation constraints are converted into 0-1 variable constraints. These mathematical expressions collectively form a mathematical optimization model, such as a mixed integer programming (MIP) model. While building the model, the system establishes a constraint traceability map. This map records the complete mapping link from the final mathematical constraints to their original natural language requirement descriptions. After the model is built, the solver may detect that the model is infeasible, i.e., all constraints cannot be satisfied simultaneously. At this time, the system uses this infeasibility to calculate the smallest infeasible subset (IIS) that causes the conflict. With the help of the constraint traceability map, the system can quickly locate which original requirement descriptions have conflicts. For example, it is located that the two original requirements of completing 100 products within 3 days and the daily production capacity of the equipment is only 20 have conflicts. Based on this, repair suggestions are generated, such as suggesting to extend the delivery period or suggesting to add temporary equipment, and the user-selected repair strategy is applied, and finally a mathematically feasible production scheduling model is obtained.
[0028] Solving the feasible production scheduling model to generate a production scheduling execution plan.
[0029] In this embodiment, after obtaining the feasible model, a professional optimization solver (such as Gurobi or CPLEX) is called to solve the feasible production scheduling model. The goal of the solving process is usually to optimize one or more key performance indicators (KPIs), such as minimizing total completion time, maximizing equipment utilization, etc. After the solving is completed, the system parses and converts the mathematical solution (i.e., a series of variable values) into a human-readable, directly executable production scheduling plan. This plan is usually presented in the form of a Gantt chart, a work list, etc., detailing which production task is performed by which worker on which equipment at which time period. In addition, an evaluation report is also attached, containing predicted values of key indicators such as equipment utilization, order completion rate, and personnel load balancing degree, for managers to evaluate and make decisions.
[0030] Optionally, the intelligent modeling method of combinatorial optimization problems can be applied to the fields of industrial manufacturing, logistics scheduling, resource allocation, etc., and executed by a computer program. For example, it can be deployed on a server or cloud platform, and users input their production scheduling requirements through a client interface, and the system automatically completes modeling and solving.
[0031] According to an aspect of the present application, a disambiguated production constraint set is generated, specifically including:
[0032] Calculate the ambiguity score for the constraint expressions in the requirement description, and identify ambiguous constraints based on the ambiguity score.
[0033] In this embodiment, after receiving the natural language demand description and extracting the preliminary constraint expression, the system needs to quantify the semantic uncertainty of each expression. Specifically, for each constraint expression extracted from the text, for example, the production capacity of equipment M1 is approximately 20 pieces per day, the system will use a pre-trained industrial domain language model (such as an industry variant of BERT) to encode it into a high-dimensional semantic vector. At the same time, the system will construct a candidate explanation set for this statement, for example, {production capacity ≤ 20 pieces / day, production capacity < 20 pieces / day, production capacity ∈ [18, 22] pieces / day}. Each candidate explanation will also be encoded as a semantic vector. The system calculates the cosine similarity between the vector of the original statement and each candidate explanation vector. Ambiguity score S ambi Defined as: S ambi = 1 - max(cos(V orig , V exp1 ), cos(V orig , V exp2 ), ...); where V orig is the semantic vector of the original expression, V expi is the semantic vector of the i-th candidate explanation, and cos() represents the cosine similarity calculation. The principle of this score is that if the original statement is highly similar to the semantics of a candidate explanation (similarity is close to 1), but very different from other explanations, then the statement is clear and the ambiguity score is close to 0. On the contrary, if the semantics of the original statement and multiple candidate explanations are relatively close, resulting in a low maximum similarity, then the statement is ambiguous and the ambiguity score is high. Set the ambiguity threshold, for example 0.6. When the S of a constraint statement ambi When the value is greater than the threshold, the constraint is identified as an ambiguous constraint and enters the subsequent processing flow.
[0034] Generate a set of candidate interpretations for ambiguous constraints.
[0035] Specifically, a set of multiple possible interpretations is generated for each identified ambiguous constraint. This process can be based on a predefined library of industrial ambiguity patterns. The library contains common ambiguity types, such as: quantity ambiguity: such as approximately and around, which can generate range interpretations based on percentages or absolute values; boundary ambiguity: such as before and within, which can generate two interpretations: including the boundary value (≤) and excluding the boundary value (<); range ambiguity: such as between A and B, which can generate interpretations that include the endpoints and exclude the endpoints. For example, if order A needs to be processed on equipment M1, if there are multiple models of M1 equipment (M1-a, M1-b) in the system knowledge base, the candidate interpretation set can be {processed on M1-a, processed on M1-b, and processed on both M1-a and M1-b}.
[0036] An information gain is calculated for each ambiguity constraint, and the ambiguity constraint with the largest information gain is selected to construct a discriminating question.
[0037] In the present embodiment, when there are multiple ambiguity constraints, the system needs to decide which one to clarify first. One preferred strategy is to select the one that will bring the most certain information to the entire constraint system after clarification. This is achieved by calculating an information gain. Specifically, the step of calculating an information gain for each ambiguity constraint includes: for each candidate interpretation in the candidate interpretation set, evaluating the degree of reduction in uncertainty of the constraint system if the candidate interpretation is adopted; and determining the information gain based on the degree of reduction. The formula for calculating the information gain I(Q) is: I(Q) = H(C) -∑ a p(a) * H(C|a); where Q represents a clarifying question for a certain ambiguity constraint; C is the state set of the entire constraint system at present H(C) is the information entropy of the entire constraint system, representing its overall uncertainty, which can be calculated as the sum of the ambiguity scores of all ambiguity constraints; a is a possible answer (i.e. selecting a candidate interpretation) of the question Q by the user; p(a) is the prior probability of the user selecting the answer a, which can be initially assumed to be equal; and H(C|a) is the conditional entropy of the remaining uncertainty of the system under the condition that the user answers a. That is, when an ambiguity is clarified, it can also eliminate the ambiguity of other related constraints, thereby reducing the total entropy of the system. The system will iterate through all ambiguity constraints to be clarified and calculate the information gain for each constraint. Selecting the ambiguity constraint with the largest I(Q) means that clarifying it can reduce the uncertainty of the entire system to the greatest extent. After selecting the constraint, the system will analyze the key differences between the candidate interpretations and construct a discriminating question. For example, if the candidate interpretations are {x≤100, x<100}, the system will generate the question: When you say no more than 100, do you include the case of equal to 100?
[0038] Obtaining user feedback for the discriminating question, and determining the constraint interpretation from the candidate interpretation set according to the user feedback to form a disambiguated production constraint set.
[0039] Specifically, the system presents the discriminating question constructed by the interface to the user and receives the user's selection or input. The user's feedback directly determines the final accurate interpretation of the ambiguity constraint. The interpretation is updated to the production constraint set, and its state is marked as confirmed.
[0040] Further, after obtaining the user feedback, it further includes:
[0041] Based on the user feedback, the user expression preference model is updated. Specifically, the system records the user's selection habits. For example, if a user has chosen an explanation containing a boundary value in the context of not more than several times, the system will build or update the user's preference model, recording his habit of using non-strict inequality expressions.
[0042] In the remaining ambiguous constraints, constraints with similar language structures to the clarified constraints are identified. This can be achieved by analyzing the structural similarity of the dependency syntax tree of the constraint expression.
[0043] The user expression preference model is applied to automatically determine constraint explanations for constraints with similar language structures, reducing the number of user interactions. For example, when the system subsequently encounters another constraint with inventory not higher than 50 pieces, and its language structure is similar to the previously clarified constraint with capacity not more than 100 pieces, the system will apply the user preference model to automatically interpret it as inventory ≤ 50 pieces without asking the user again. Through this propagation mechanism of disambiguation results, the user's interaction burden can be effectively reduced, and the modeling efficiency can be improved.
[0044] This embodiment can prioritize the questions that contribute most to the overall constraint system's certainty after clarification by calculating the information gain of each ambiguous constraint. This allows each user interaction to minimize the overall uncertainty of the system to the greatest extent. The user expression preference model established by the system can learn the user's language habits and automatically reason about ambiguous structures. Compared with traditional sequential questioning or random questioning methods, the number of user interactions is reduced, the modeling efficiency is improved, and the user's cognitive burden is further reduced through the propagation mechanism of disambiguation results.
[0045] As shown in Figure 2 According to one aspect of the present application, a complete production constraint set is formed, including:
[0046] According to the disambiguated production constraint set, an initial scheduling model is constructed and solved, and an initial scheduling scheme is derived.
[0047] Specifically, the disambiguated production constraint set obtained only contains explicit constraints explicitly given by the user, and is used to construct an initial mathematical optimization model, such as a linear programming or mixed integer programming model. In this model, decision variables x[i, j, k] can be defined, which represent order i processed on device j by worker k. The objective function can be set to a basic objective, such as minimizing the total completion time of all orders minimizeΣcompletion time. A commercial solver is called to quickly solve the initial model, without pursuing an optimal solution, but to quickly obtain a benchmark initial scheduling scheme. This scheme reflects the theoretical result of production scheduling under only the constraints explicitly proposed by the user.
[0048] Analyze the initial scheduling scheme and identify abnormal features in the scheduling result.
[0049] After obtaining the initial scheduling scheme, the system conducts a multi-dimensional rationality review to proactively find potential problems. In this embodiment, as shown in FIG. 6, abnormal features in the scheduling result are identified, specifically including: Figure 3
[0050] Based on the initial scheduling scheme, multi-dimensional abnormality detection indicators are calculated; wherein the multi-dimensional abnormality detection indicators include at least one of resource utilization balance, personnel continuous working time, and process waiting time.
[0051] As a preferred implementation, the system calculates six types of abnormality detection indicators to form an abnormal feature vector: resource utilization balance: calculate the ratio of standard deviation to average value of utilization rate of all similar resources (such as equipment or personnel): σ(utilization) / μ(utilization), the larger the ratio, the more unbalanced the load, wherein σ represents standard deviation, μ represents average value, and utilization represents resource utilization rate; personnel continuous working time: find the longest continuous uninterrupted working time of all personnel: max(continuous working hours); process waiting time: calculate the proportion of total invalid waiting time between processes of all orders to total production time: Σ(process waiting time) / total production time; order completion time dispersion: calculate the ratio of standard deviation to average value of similar or all order completion times: σ(completion time) / μ(completion time) to measure the stability of delivery; equipment idle rate: calculate the ratio of total idle time to total available time of key equipment: Σ(idle time) / total available time; batch switching frequency: calculate the number of product type switching on the equipment within the planning period: count(product switching) / total batch number, wherein count represents counting operation.
[0052] Compare the multi-dimensional abnormality detection indicators with the preset industry standard threshold to determine the abnormal features.
[0053] Specifically, the system has a configurable industry standard threshold library built-in. For example, if the calculated resource utilization balance is greater than 0.5, it is marked as load imbalance abnormality; if the personnel continuous working time exceeds 10 hours, it is marked as fatigue work abnormality; if the equipment idle rate of a certain key equipment is greater than 40%, it is marked as capacity configuration abnormality. For each type of triggered abnormality, the system also calculates its severity score, for example, severity score = (actual value - threshold value) / threshold value. Finally, an abnormal pattern set containing information such as abnormal type, occurrence location and severity is formed.
[0054] Inference of the implied constraint based on the abnormal feature, and merging the implied constraint with the disambiguated production constraint set to generate a complete production constraint set.
[0055] In the embodiment, as shown in Figure 4 Inference of the implied constraint based on the abnormal feature, and merging the implied constraint with the disambiguated production constraint set to generate a complete production constraint set.
[0056] An abnormal severity score is determined for the abnormal feature; based on the abnormal feature, a candidate implied constraint set is generated by applying a preset abnormal constraint inference rule library; wherein each rule in the abnormal constraint inference rule library is associated with a rule reliability.
[0057] Specifically, the system maintains an inference rule library, establishing a mapping relationship between abnormal patterns and possible missing constraints. Each rule is based on industry knowledge and expert experience, and is attached with a rule reliability calculated based on historical verification accuracy. For example, the rule library can include the following rules: Rule 1: If there is a load imbalance abnormality, and analysis finds that the utilization rate of certain specific equipment is continuously lower than 20%, it is inferred that there may be a lack of device capability difference constraint or there may be a specific matching constraint between process and device. Rule 2: If there is a fatigue work abnormality, it is inferred that there is a lack of daily working time upper limit constraint or a lack of shift system constraint. Rule 3: If the order completion time dispersion degree is abnormal, and the processing time difference with similar orders exceeds 50%, it is inferred that there is a lack of batch production optimization constraint.
[0058] In combination with the abnormal severity score and the rule reliability, a confidence score is calculated for each candidate implied constraint in the candidate implied constraint set, and the implied constraint is determined based on the confidence score.
[0059] In the embodiment, in order to evaluate the value of each candidate constraint and avoid introducing unnecessary constraints, the system calculates a confidence score C score for each candidate constraint: score = W s * S severe + W r * R rule + W c * C context ; wherein C score is the final confidence score; S severe is the abnormal severity score; R rule is the reliability of the rule triggering the inference; C context is the context relevance, which is calculated by analyzing whether there are relevant clues in the original problem description; W s , W r , W care weight coefficients of the three, and their sum is 1, which can be set to 0.4, 0.4, and 0.2, respectively. The system will filter out candidate constraints with a confidence score higher than a certain threshold (for example, 0.7) as high-value implicit constraints to be confirmed.
[0060] The embodiment can infer implicit constraints not explicitly expressed by the user from the abnormal patterns of the scheduling results by constructing an initial scheduling model and calculating a six-dimensional abnormal feature vector (resource utilization balance, worker continuous working time, process waiting time, etc.). Compared with the traditional method of relying on a predefined rule library, unique constraint requirements in specific production scenarios can be found. For example, when the system detects the pattern of abnormal concentration of most workers' daily working time, it automatically infers that the upper limit of the daily working time constraint is missing, avoiding unreasonable scheduling solutions caused by insufficient user experience or expression omissions. The accuracy and completeness of implicit constraint discovery are improved, and the dependence on domain experts is reduced.
[0061] Optionally, before the high-confidence implicit constraints are combined with the disambiguated production constraint set, a verification and calibration process is included:
[0062] Based on the received user feedback, the implicit constraints are classified into hard constraints that must be met and soft constraints that can be violated but must be taken into account as penalties.
[0063] Specifically, the system presents high-confidence candidate implicit constraints to the user in a visual manner. For example, it highlights the ultra-long working period caused by the lack of an upper limit on the daily working time on a Gantt chart. The user can label each constraint as: must be met (hard constraint), try to meet (soft constraint), or not needed.
[0064] For soft constraints, the user's preference intensity is obtained.
[0065] Specifically, for soft constraints labeled by the user as try to meet, the system further asks the user to give a preference intensity score of 1-10, which represents the user's acceptable degree of violating the constraint. The higher the score, the less likely it is to be violated.
[0066] A sensitivity analysis is performed on the soft constraint to quantify the impact of the soft constraint on the objective function of the initial scheduling model, obtaining a sensitivity index.
[0067] In the embodiment, the sensitivity analysis is performed by the parameter perturbation method. For example, for the soft constraint of trying to limit the daily working time to no more than 10 hours, the system tests the variation rate of the total objective function value when the upper limit is perturbed within a range of ±20% (such as 8 hours to 12 hours). The sensitivity index S sense is calculated as: S sense= ΔObjective / ΔParameter; where ΔObjective is the change of objective function value, and ΔParameter is the change of constraint parameter. sense The greater the absolute value of S is, the greater the impact of the soft constraint on the final solution is.
[0068] The penalty weight of the soft constraint is determined by combining the user preference intensity and the sensitivity index.
[0069] Specifically, the penalty weight W is used to penalize the behavior of violating the soft constraint in the objective function of the final mathematical model. The calculation formula of the penalty weight is: penalty = I pref * S norm * W base ; where I pref is the user's preference intensity (e.g. 1-10 points); S norm is the normalized sensitivity index, ensuring its value in the range [0, 1]; W base is a benchmark weight coefficient, used to adjust the overall magnitude of all soft constraint penalties. Each implicit constraint is processed finely, hard constraints are directly added to the model, and soft constraints are added to the objective function in the form of weighted penalty terms, finally forming a complete production constraint set with complete constraints and reasonable parameter calibration.
[0070] In this embodiment, by combining the user preference intensity score, the normalized sensitivity index obtained by sensitivity analysis, and the benchmark weight, the system can automatically calculate the penalty weight of the soft constraint. The traditional qualitative preference (such as trying not to work overtime) is converted into an accurate numerical parameter in the optimization model. Sensitivity analysis accurately evaluates the impact of the constraint on the objective function through parameter perturbation, enabling the optimization solver to find the optimal balance between completing production tasks and meeting soft constraints. Compared with manually setting weights, the comprehensive satisfaction of the scheduling scheme is improved, and the solution deviation problem caused by improper weight setting is avoided.
[0071] According to one aspect of the present application, a feasible production scheduling model is obtained, comprising:
[0072] According to the complete production constraint set, a mathematical optimization model and a constraint trace map are constructed; wherein the constraint trace map records the mapping relationship from the mathematical constraint in the mathematical optimization model to the original requirement description of the mathematical constraint.
[0073] Specifically, the system reads the complete production constraint set and converts each constraint in it into a standard mathematical form. For example: time constraint: converted to Σ(x[i, j, k] * t[i, j])≤T max , where t[i, j] is the task processing time, and T maxis the maximum allowed completion time. Capacity constraints: translated into Σx[i, j, k]≤ Cap[j], where Cap[j] is the upper limit of the capacity of device j. Skill matching constraints: translated into x[i, j, k]≤ skill[k, i], where skill[k, i] is a 0-1 parameter indicating whether worker k has the required skills to perform order i. These mathematical constraints, together with the objective function F = aΣcompletion time + βΣdelay penalty + γΣsoft constraint violation penalty, which contains soft constraint penalty terms, constitute the complete mixed integer programming model, where a, β and γ represent different weight coefficients.
[0074] Preferably, the constraint traceability map is constructed, comprising:
[0075] For each mathematical constraint in the mathematical optimization model, a three-layer mapping structure including a semantic layer, a model layer and a code layer is established; wherein the semantic layer is associated to the original requirement description, the model layer is associated to the decision variables and parameters of the mathematical constraint, and the code layer is associated to the mathematical expression of the mathematical constraint.
[0076] Specifically, the system creates a unique constraint identifier (CID) for each constraint in the model. And around this CID, a hash table structure is constructed to store its three-layer mapping information: Code Layer: records the internal identifier of the constraint in the solver and its standard mathematical expression. For example: <CID_101, C1, x1+x2≤10>. Model Layer: records the constraint associated decision variable set, parameter set and its constraint type (such as equality, inequality). For example: <CID_101, {x1, x2}, {10}, upper bound constraint>. Semantic Layer: records the original natural language description corresponding to the constraint, disambiguation history and generation timestamp. For example: <CID_101, The total production of product A and product B cannot exceed 10, User confirms that 'not more than' includes 'equal to', 2025-07-30 07:00:00>.
[0077] Based on the three-layer mapping structure, the dependency relationship between mathematical constraints is recorded, and the dependency relationship is included in the constraint traceability map.
[0078] In this embodiment, the system analyzes all constraints, identifies the dependencies among them, and constructs a directed graph G = (V, E), where the nodes V are the constraints and the edges E represent the dependencies. The dependency types can include: variable dependency: two constraints share the same decision variable; parameter dependency: a constraint's parameter (e.g., the right-hand side term) is the result of the calculation of another constraint; logical dependency: the validity of one constraint depends on the validity of another constraint, such as the sequence of processes depending on the allocation of equipment constraints. This overall structure, which includes the three-layer mapping structure and the dependency graph, constitutes a queryable and traceable constraint trace graph.
[0079] When a mathematical optimization model is detected as infeasible, an irreducible infeasible subset (IIS) is identified, and the original requirement descriptions corresponding to the mathematical constraints in the IIS are located using the constraint trace graph.
[0080] Specifically, when the solver returns an infeasible state, it means that there is a conflict in the constraints in the model. The system automatically calls the IIS algorithm built into the solver. This algorithm can identify the smallest, mutually conflicting constraint subset that causes the overall model to be infeasible. A model can contain multiple IISs. For each conflicting constraint in an IIS, the system uses the constraint trace graph to trace back from the code layer to the semantic layer, accurately locating which original natural language requirement descriptions are in conflict with each other. For example, the system can generate a conflict source analysis report indicating that the three original requirements of working 8 hours a day, completing 100 products in 3 days, and each product taking 2 hours to complete collectively cause the conflict.
[0081] Based on the located original requirement descriptions, a repair strategy is generated and applied to obtain a feasible production scheduling model.
[0082] This embodiment achieves complete tracing from solver bottom-layer errors to original natural language requirements by establishing a three-layer mapping structure including semantic, model, and code layers for each mathematical constraint and constructing a dependency graph among the constraints. When a mixed integer programming model is in an infeasible state, the system can quickly and accurately locate the conflict source through the constraint trace graph. For example, when the IIS algorithm identifies conflicting constraints, the system can immediately trace back to the original requirement conflict between the production quantity requirement and the equipment capacity limit. This shortens the time-consuming manual troubleshooting process in traditional methods and improves the accuracy of error location, enabling non-specialist users to understand and solve model conflict problems.
[0083] Preferably, generating and applying the repair strategy includes:
[0084] For each conflict constraint identified by the original requirement description, a repair cost is calculated by evaluating its semantic deviation degree, model influence degree and implementation difficulty.
[0085] Further, the repair cost is calculated, specifically:
[0086] The semantic deviation degree, model influence degree and implementation difficulty of the conflict constraint are calculated respectively; the repair cost is determined by comprehensively considering the semantic deviation degree, model influence degree and implementation difficulty.
[0087] In the embodiment, the repair cost C repair is calculated according to the formula: C repair = w1 * D sem + w2 * I mod +w3 * D imp ; wherein D sem (semantic deviation degree) is a measure of the deviation between the modified constraint and the original intention of the user, which can be calculated by the cosine similarity of the semantic vectors of the two expressions before and after modification; I mod (model influence degree) is a measure of the influence range of modifying the constraint on other constraints and objective functions in the model, which can be evaluated by its out-degree in the constraint dependency graph; D imp (implementation difficulty) is an evaluation of the difficulty of executing the modification in real production, which can be set by the user in advance for different types of modifications (such as extending working hours, adding equipment); w1, w2, w3 are the weight coefficients of the three, and their sum is 1, for example, they can be set to 0.4, 0.3, 0.3 respectively.
[0088] Based on the repair cost, a repair suggestion is generated, and the repair suggestions are arranged in ascending order of repair cost to form a hierarchical repair suggestion sequence.
[0089] Specifically, the hierarchical repair suggestion sequence includes at least one of the following levels: parameter fine-tuning level suggestion: used to adjust the numerical parameter of the conflict constraint; this is the lowest cost modification, for example, relaxing the limit of 8 hours of daily working time to 9 hours. Constraint relaxation level suggestion: used to change the constraint type of the conflict constraint or add a slack variable to the conflict constraint; for example, changing the equality constraint that device M1 must be exclusive to a soft constraint that device M1 is preferred. Structure adjustment level suggestion: used to increase production resources or adjust delivery time; this is the highest cost modification, for example, adding a device to the process or extending the order delivery period by 2 days. The system generates repair suggestions containing these three levels for each IIS and arranges them in ascending order of C repair from low to high.
[0090] A repair strategy is selected and applied from the hierarchical repair suggestion sequence.
[0091] Specifically, the system presents the ranked repair suggestions to the user. After the user selects one suggestion, the system automatically makes the corresponding modification to the model. For example, if the user selects parameter tuning, the system modifies the corresponding parameter value; if the user selects constraint relaxation, the system changes the constraint type or adds a slack variable to the constraint and sets a penalty term. After the modification, the system re-solves the model. If the model becomes feasible, the repair is successful, and the feasible production scheduling model is output; if the model is still infeasible, the system backtracks to the previous step and prompts the user to try the next repair suggestion until a feasible solution is obtained.
[0092] By calculating the repair cost of each conflicting constraint, the embodiment can generate a sequence of repair suggestions containing three levels of parameter tuning, constraint relaxation, and structure adjustment. The three dimensions of semantic deviation, model impact, and implementation difficulty are fully considered to ensure that the repair scheme with the minimum cost is recommended first. For example, when facing the conflict between the working hour constraint and the delivery time constraint, the system will prefer to suggest parameter tuning rather than changing the production structure. This improves the success rate of model repair, reduces the repair cost, and effectively improves the practicality and economy of modeling, making the production scheduling scheme more executable in practice.
[0093] In a specific embodiment, assume the production scenario as follows: order information: one urgent order O1, which needs to produce 120 products. Resource information: only one available worker W1 and one available device M1. Production capacity: the efficiency of worker W1 producing the product on device M1 is 10 pieces / hour. Original constraint: order O1 must be completed. Based on the above original constraint, the system constructs an initial model with the objective of minimizing the total completion time of order O1. Solving the model obtains the most direct initial scheduling scheme: worker W1 must work continuously on device M1 for 120 pieces / 10 pieces / hour = 12 hours to complete the order. The system then reviews the reasonableness of the initial scheme. Calculate the continuous working time index, which is 12 hours. Assume that the system presets the industry standard threshold value as 10 hours, and since 12 hours > 10 hours, the system identifies the abnormal fatigue work. Based on this abnormality, the abnormal-constraint reasoning rule is applied to infer the candidate implicit constraint: there is an upper limit to the daily working time of the worker.
[0094] The candidate implicit constraint is suggested to set an upper limit to the daily working time of worker W1 (currently 12 hours, not more than 10 hours) to the production supervisor. The production supervisor feeds back according to the actual situation: since it is an urgent order, it is acceptable to work overtime under the condition of being unable to increase the number of workers, but it is still hoped to reduce as much as possible. Therefore, this constraint is classified as try to meet, i.e., a soft constraint. Ask the supervisor to rate the importance of this soft constraint. The supervisor gives a user preference intensity I pref= 8 (scoring range 1-10, higher scores mean less likely to violate). In order to quantify the impact of violating this soft constraint on the quality of the entire production plan, the system performs a sensitivity analysis. The quality here is reflected by the objective function value of the final optimization model. The system uses the soft constraint parameter T limit (Daily working hours upper limit) is a disturbance variable, and its change affects the final model objective function value. Assume that the final objective function includes a penalty for excessive working hours, in the form of F total = F base + W penalty * max(0, T work -T limit ), where F base is the basic cost associated with production time, T work is the actual working time. The goal of sensitivity analysis is to determine W penalty Execute parameter perturbation and re-solve: Perturbation point A (tightening constraint): The system temporarily sets the limit value of the soft constraint to T limit_A = 9 hours. Under this condition, to complete 12 hours of work, workers must work for two days (for example, 9 hours on the first day and 3 hours on the second day), which will extend the total completion time and increase the related costs. The system re-solves this model and obtains the comprehensive objective function value, such as Z A = 150. Disturbance point B (relaxation constraint): The system temporarily sets the limit value of the soft constraint to T limit_B = 11 hours. Under this condition, the worker only needs one day to complete the task, but still needs to work overtime for 1 hour. The system re-solves this model and obtains the comprehensive objective function value, such as Z B = 110. Calculate the sensitivity index S sense :S sense =|ΔObjective / ΔParameter| = |(Z A - Z B ) / (T limit_A - T limit_B )|Substitute the value: S sense = |(150 - 110) / (9 - 11)| = |40 / (-2)| = 20. This result shows that within this parameter range, tightening the upper limit of working hours by one hour will lead to an increase of 20 units in the comprehensive target (which can be understood as cost).
[0095] After obtaining the sensitivity index, the system combines the user preference strength to calculate the final penalty weight. In order to eliminate the dimensionality effect, the system needs to convert S sense Normalize. Assume that through historical data or analysis of multiple constraints, the system knows the maximum possible value S of the sensitivity index in this scenario.max about 50. Then the normalized sensitivity S norm is: norm = S sense / S max = 20 / 50 = 0.4. The system sets a global reference weight W base for adjusting the overall magnitude of all soft constraint penalty terms, ensuring their numerical comparability with other terms in the objective function (such as production cost, delay penalty). Here, W base = 100 is set. The final penalty weight W penalty is calculated as: penalty = I pref * S norm * W base Substitute the numerical values: W penalty = 8 * 0.4 * 100 = 320.
[0096] Through the above steps, the initially vague user preference that workers should not be too tired is successfully and reproducibly quantified into a specific penalty weight value of 320. In the final constructed mathematical optimization model, the objective function will contain the penalty term +320 * max(0, T work - 10). The optimization solver, when solving, will actively seek a more humane and reasonable scheduling scheme that can both complete the production task and make the overtime of the workers as short as possible because of the existence of this penalty term, rather than simply making the workers work continuously for 12 hours. This fully proves the effectiveness and operability of the present embodiment in handling and quantifying complex and vague real-world constraints.
[0097] According to an aspect of the present application, the ambiguity score is calculated for the constraint expression, comprising:
[0098] encoding each candidate interpretation in the candidate interpretation set of the constraint expression into a semantic vector to construct a candidate interpretation vector matrix; and calculating the ambiguity score based on the similarity between the semantic vectors in the candidate interpretation vector matrix.
[0099] In this embodiment, a pre-trained language model based on deep learning is used to generate semantic vectors, for example, a BERT-wwm-ext model trained on a large amount of Chinese corpus. When a vector needs to be generated for a sentence (whether it is the original expression or a candidate explanation), the system first constructs the sentence into the format of [CLS] + sentence text + [SEP]. The constructed sequence is input into the BERT model for forward propagation calculation. The model outputs a hidden layer state vector corresponding to each token. This embodiment preferably uses the output vector corresponding to the special token [CLS] in the last hidden layer (usually with a dimension of 768) as the semantic vector representing the global semantics of the entire sentence. For an identified ambiguity constraint, it is assumed to have N candidate explanations. The system generates a D-dimensional semantic vector (e.g. D = 768) for each of the N candidate explanations. Stack the N D-dimensional vectors to form an N x D matrix, which is the candidate explanation vector matrix. This matrix completely stores the quantitative semantic information of all possible explanations of an ambiguity constraint.
[0100] According to an aspect of the present application, identifying constraints with similar language structures includes:
[0101] Generating dependency syntax trees for ambiguity constraints and clarified constraints respectively; and identifying constraints with similar language structures by comparing the similarity of the dependency syntax trees.
[0102] In this embodiment, the system can call mature natural language processing toolkits (such as spaCy, Stanza or Baidu DDParser) to analyze the constraint text and generate its corresponding dependency syntax tree. The nodes of the tree are words, and the edges are the syntactic relationships between words (such as subject-predicate, verb-object, and modifier). Preferably, the tree edit distance (Tree Edit Distance) algorithm is used to quantify the structural similarity of two dependency syntax trees. This algorithm calculates the minimum number of editing operations required to convert one tree T1 to another tree T2. The basic editing operations are defined as: insertion (Insertion): inserting a new node in T1; deletion (Deletion): deleting a node from T1; substitution (Substitution): replacing the label (i.e. word or part of speech) of a node in T1 with the label of the corresponding node in T2. Each operation is assigned a cost (usually 1). The edit distance between the two trees is the minimum total cost. The smaller the distance, the more similar the structure of the two trees. The system can set a distance threshold, and when the edit distance of the dependency syntax trees of two constraints is less than the threshold, it is determined that they have similar language structures.
[0103] According to an aspect of the present application, the context relevance C in the confidence score calculation formula contextThe goal is to measure how much a candidate constraint is related to the full requirement description text input by the user. One possible way to compute this is to treat the full requirement description text input by the user as a long document D; extract the core entity words (e.g. device M1, speciality) in the candidate implicit constraint (e.g. device M1 has speciality constraint) to be evaluated as a query Q; compute the relevance score of query Q to document D. Specifically, one can first get the word vector of each word in query Q and the word vector of all words in document D. Then, the final vector V Q of query Q is defined as the average of all word vectors in query Q; the final vector V D of document D is defined as the average of all word vectors in document D. The cosine similarity between V Q and V D is computed, and this similarity score is the value of C context . The closer the score is to 1, the more relevant the candidate constraint is to the original context.
[0104] Further, in order to achieve O(1) time complexity query on the constraint information, the system stores the information in a hash table (in Python, it is a dictionary dict, in Java, it is HashMap). The hash table data structure is as follows: Key: the unique identifier CID of each constraint, which is a string or integer generated when the constraint is created, for example, constraint_001; Value: a JSON object containing the complete information of the constraint or a custom class instance, which contains at least three attributes corresponding to the three-layer mapping structure: semantic_layer: stores an object containing original_text, disambiguation_history, etc. fields; model_layer: stores an object containing variables, parameters, type, etc. fields; code_layer: stores an object containing solver_id, expression, etc. fields. Through hashtable[CID], all the traceable information of the constraint can be obtained at one time.
[0105] In optional embodiments, the construction process of the abnormal constraint reasoning rule base preferably integrates the following methods:
[0106] Association rule mining based on historical data: The system can perform offline analysis on the historical production data accumulated by the enterprise. Data sources include: historical scheduling records in the production planning system (MES), problem reports, and the actual execution scheme finally adjusted by manual. Through data preprocessing, the abnormal characteristics of the initial scheme (such as the utilization rate of some equipment being below 30% for a long time) and the newly added constraints in the final scheme (such as adding specific material matching constraints to these equipment) are taken as transaction items. By applying association rule mining algorithms (such as Apriori or FP-Growth), strong association rules such as {abnormal A, abnormal B} = {constraint C} can be found. These mined rules form the basis of the rule base.
[0107] Knowledge engineering based on expert knowledge: Through structured interviews with domain experts (such as experienced production managers, dispatchers), their tacit knowledge in the brain is transformed into explicit, machine-readable rules. For example, the interview can revolve around the question "When you see the situation in the scheduling results, what rules or restrictions do you usually suspect are missing?" The collected expert experience is formatted as IF-THEN rules, and the expert subjectively evaluates an initial rule reliability for it.
[0108] Verification and iteration of rules: The rule set obtained through the above two ways is tested on an independent verification data set. By evaluating the prediction accuracy, recall rate and F1 score of each rule on the verification set, the rule reliability parameter is objectively calibrated and updated. Rules with low reliability may be corrected or removed, thereby ensuring the quality and effectiveness of the rule base.
[0109] According to an aspect of the present application, a visual interface is provided for interactive constraint impact, specifically: the interactive interface can be a web-based application. The front-end can use mainstream JavaScript frameworks such as Vue.js or React to achieve componentized development and efficient state management. The data visualization part, especially the rendering of the Gantt chart, can use powerful chart libraries such as ECharts, D3.js, or specialized Gantt chart components. The backend can be implemented by any language that can handle data and provide APIs (such as Python, Java). When user confirmation of candidate constraints is needed, the backend first encapsulates the current scheduling scheme (including the IDs of all tasks, start and end times, allocated resources, etc.) and the list of candidate constraints to be confirmed (including constraint text, confidence, and the list of task IDs mainly affected by the constraint) into a JSON object. This JSON object is sent to the front-end through a RESTful API (for example, POST / api / constraints / validate). After the front-end receives the JSON data, it calls the chart library to render a Gantt chart of the scheduling scheme. The front-end traverses the list of candidate constraints and, according to the list of tasks affected by each constraint, finds the corresponding task bar in the Gantt chart and highlights it specially (for example, changes its color to orange or adds a flashing border to it). When the user's mouse hovers over a highlighted task bar, a tooltip is displayed, showing the corresponding constraint text and its confidence score (for example, suggest adding constraint: each worker's daily working hours ≤ 9 hours (confidence: 0.85)). When the user clicks on the highlighted area, a modal dialog is popped up, providing three option buttons: must be met (hard constraint), try to meet (soft constraint), and not needed. After the user clicks one of the buttons, the front-end sends the user's choice (along with the constraint ID being operated) back to the back-end through another API (for example, PUT / api / constraints / confirm). The back-end updates the state of the constraint according to the user's choice and continues the subsequent process.
[0110] According to an aspect of the present application, after the feasible production scheduling model is solved and the values of each decision variable are extracted from the solution, the processing equipment, responsible worker, start time, and end time of each order are analyzed, the system will solve the feasible production scheduling model to generate a production scheduling execution scheme, the process is as follows:
[0111] The scheduling solution is refined to consider practical factors. The goal is to transform the scheduling result output by the solver, which only considers the core logic, into an execution plan that is closer to the actual operation of the workshop by supplementing the necessary auxiliary operation time. Specifically, the system traverses the pairs of tasks that are executed sequentially on the same device in the optimized scheduling solution. If the product mold or tooling fixture required by the latter task is different from the former task, the system queries the corresponding mold change time from the preset device mold change database. A non-production task of the type mold change with the corresponding duration is inserted between the two production tasks. The first production task in each work shift of each device is checked. If the properties of the device (recorded in the device information table) indicate that it needs to be preheated before starting work, the system queries the required preheating time and inserts a non-production task of the type preheat with the corresponding duration before the start of the first production task. By inserting these necessary buffer times, the generated production scheduling execution plan has higher realistic executability.
[0112] Before generating the final report, the system conducts a comprehensive rationality test on the refined plan to actively identify potential execution risks. Specifically, a continuity test is conducted to ensure that different processes of the same order are reasonably connected in time, for example, the start time of the latter process must be later than the end time of the former process. A resource conflict test is conducted to verify again that at any time point, there is no device or personnel assigned to two or more tasks at the same time. A load balancing test is conducted to calculate the resource utilization rate of key devices or personnel in different time periods and analyze the fluctuation, for example, the standard deviation of the utilization rate. Through the above tests, the system can identify high-risk points. For example, if the test finds that the planned utilization rate of a key device exceeds 95% within a continuous 2-hour period, the system will generate a risk warning message indicating that the period lacks buffer to respond to unexpected events (such as temporary device failure, material delay), which is a high-risk plan.
[0113] Integrating all the analysis results, automatically generating a structured scheduling scheme evaluation report. The specific format and content of the report can include: final execution scheme: show the final production scheduling execution scheme in an intuitive form. For example: generate a job schedule table for each workstation: the table clearly marks the order number, product specification, quantity and process requirements that the workstation needs to handle in each time period in hours; generate a personal work schedule table for each worker: the table lists the equipment and specific processing tasks that the worker needs to operate in each work period. Key performance indicator (KPI) quantitative analysis: the core part of the report is based on the simulation execution results of the scheduling scheme, a series of key performance indicators are calculated, and can be compared with the benchmark value before optimization, to quantify the improvement effect brought by this method. These indicators preferably include: equipment overall equipment effectiveness (OEE): the calculation formula is: OEE = Σ (actual processing time) / Σ (available time); order on time delivery rate (OTD): the calculation formula is: OTD = (on time completed order number) / (total order number); personnel load balancing degree (LB): the calculation formula is: LB = 1 - (standard deviation σ of personnel working time) / (average value μ of personnel working time). Risk warning and improvement suggestions: the report will clearly list all the risk warning information. For these risk points, the report can also provide corresponding improvement suggestions combined with the preset rule library, for example, for high load risk, consider diverting part of the task to off-peak hours or outsourcing processing.
[0114] According to an aspect of the present application, an intelligent modeling system for a combinatorial optimization problem includes an information summarization module, a mathematical modeling module, a coding module, and an evaluation module. The information summarization module is responsible for extracting structured information from the problem in the initial generation process, including three parts: naming and structured extraction of coefficients, description of constraints, and description of the objective function. In this process, some auxiliary constraints (such as the relationship between integer variables and corresponding binary variables) and hidden constraints (such as decision variables being non-negative integers) need to be explicitly extracted. The essence of coefficient extraction is numerical mapping, which facilitates subsequent tasks for modules to focus on logical relationships and avoid errors in numerical values. In the error correction process, the information is re-extracted according to the prompts of the evaluation module (evaluator). The mathematical modeling module needs to model each constraint and objective extracted in the initial generation process. In this process, RAG (Retrieval Augmented Generation) is used to retrieve the most relevant examples for the current constraint to assist modeling. In the error correction process, the incorrect modeling needs to be re-modeled according to the prompts of the evaluation module. The coding module is responsible for code generation and execution. In the initial generation process, gurobipy code (a commercial solver) is generated according to the modeling given by the mathematical modeling module. In the error correction process, the incorrect code is modified according to the prompts of the evaluation module. The evaluation module is mainly responsible for analyzing errors that occur during code execution and feeding back the diagnosis results to the relevant modules for correction. In this process, rules based on error statistics are used to effectively narrow down the range of possible error causes that need to be explored, improving the efficiency of problem diagnosis and speeding up the problem-solving process. Further, when the user provides a specific problem description, the information summarization module summarizes the structured information; the mathematical modeling module constructs the corresponding mathematical expression for each constraint and objective function in the structured information based on RAG technology; after summarizing all the mathematical expressions, the coding module generates the corresponding solving code using the summarized mathematical modeling; the evaluation module runs the code, and if the code runs normally, the algorithm ends; if an error occurs, the possible error prompts are analyzed based on rules, and the coding module points out the part that needs to be modified and the module that performs the modification based on the prompts given by the coding module. The specified module modifies the corresponding error and passes the improved information to the next module. This process is repeated for a specified number of times until the code is error-free.
[0115] The preferred embodiments of the present application are described in detail above, but the present application is not limited to the specific details in the above-described embodiments. Within the technical concept of the present application, various equivalent transformations of the technical solutions of the present application can be made, and these equivalent transformations all belong to the protection scope of the present application.
Claims
1. An intelligent modeling method for combinatorial optimization problems, characterized in that: include: Obtain the requirements description in natural language and generate a disambiguated production constraint set; Discover implicit constraints based on the disambiguated production constraint set to form a complete production constraint set; Construct and repair a mathematical optimization model based on a complete set of production constraints to obtain a feasible production scheduling model; Solve the feasible production scheduling model and generate the production scheduling execution plan.
2. The method according to claim 1, characterized in that Form a complete set of production constraints, including: Construct and solve the initial scheduling model based on the disambiguated production constraint set and derive the initial scheduling plan; Analyze the initial scheduling plan and identify abnormal features in the scheduling results; Implicit constraints are inferred based on abnormal features and merged with the disambiguated production constraint set to generate a complete production constraint set.
3. The method according to claim 2, characterized in that Identify abnormal characteristics in scheduling results, including: Based on the initial scheduling plan, calculate a multi-dimensional anomaly detection indicator; wherein the multi-dimensional anomaly detection indicator includes at least one of resource utilization balance, personnel continuous working hours, and process waiting time; Compare multi-dimensional anomaly detection metrics to preset industry standard thresholds to identify anomaly signatures.
4. The method according to claim 2, characterized in that Infer implicit constraints based on abnormal characteristics, including: Determining an abnormality severity score for the abnormal feature; Based on the abnormal characteristics, a preset abnormal constraint reasoning rule library is applied to generate a candidate implicit constraint set; each rule in the abnormal constraint reasoning rule library is associated with a rule reliability; Combining the anomaly severity score with the rule reliability, a confidence score is calculated for each candidate implicit constraint in the candidate implicit constraint set, and the implicit constraint is determined accordingly.
5. The method according to claim 2, characterized in that Before merging the implicit constraints with the disambiguated set of production constraints, also include: Based on the received user feedback, implicit constraints are classified into hard constraints that must be met and soft constraints that can be violated but must be penalized; For soft constraints, obtain the user preference strength; Perform sensitivity analysis on soft constraints to quantify their impact on the objective function of the initial scheduling model and obtain sensitivity indicators; The penalty weights for soft constraints are determined by combining user preference strength and sensitivity indicators.
6. The method according to claim 1, characterized in that Obtain a feasible production scheduling model, including: Based on the complete set of production constraints, a mathematical optimization model and a constraint traceability graph are constructed. The constraint traceability graph records the mapping relationship between the mathematical constraints in the mathematical optimization model and their original demand descriptions. When it is detected that the mathematical optimization model is infeasible, the minimum infeasible subset is identified, and the constraint traceability graph is used to trace back and locate the original requirement description corresponding to the mathematical constraints in the minimum infeasible subset; Based on the located original demand description, a repair strategy is generated and applied to obtain a feasible production scheduling model.
7. The method according to claim 6, characterized in that Construct a constraint traceability graph, including: For each mathematical constraint in the mathematical optimization model, a three-layer mapping structure consisting of a semantic layer, a model layer, and a code layer is established. The semantic layer is associated with the original requirement description, the model layer is associated with the decision variables and parameters of the mathematical constraint, and the code layer is associated with the mathematical expression of the mathematical constraint. Based on the three-layer mapping structure, the dependencies between mathematical constraints are recorded and incorporated into the constraint traceability graph.
8. The method according to claim 6, characterized in that Generate and apply a remediation strategy, including: For each conflicting constraint identified by the original requirement description, the repair cost is calculated by evaluating its semantic deviation, model impact, and implementation difficulty. Generate repair suggestions based on the repair cost and sort them in ascending order of repair cost to form a hierarchical repair suggestion sequence; A repair strategy is selected and applied from a hierarchical sequence of repair suggestions.
9. The method according to claim 8, characterized in that The hierarchical sequence of repair recommendations includes at least one of the following levels: Parameter fine-tuning level suggestions for adjusting the numerical parameters of conflicting constraints; Constraint relaxation level suggestions, used to change the constraint type of conflicting constraints or add slack variables to them; Structural adjustment level recommendations for increasing production resources or adjusting delivery deadlines.
10. The method according to claim 8, characterized in that Calculate the cost of repair, including: Calculate the semantic deviation, model impact and implementation difficulty of the conflicting constraints respectively; The repair cost is determined by comprehensively considering the semantic deviation, model impact and implementation difficulty.
Citation Information
Patent Citations
Load control method, system and equipment for power equipment and storage medium
CN118472947A
Precast beam field production scheduling analysis management method and system based on large model
CN119721596A
Large model-based operation problem solving method and device
CN119962653A
User demand driven distributed energy supply system capacity configuration method based on large language model
CN120278340A
Intelligent course arrangement method and system based on multi-objective optimization and deep learning
CN120298172A