A parallel object-level minimal relaxation diagnosis method based on IIS files
By adopting a parallel object-level minimum relaxation diagnostic method, the quantitative repair problem of infeasible subsystems in linear programming models is solved. It realizes quantitative diagnosis of object-level minimum repair magnitude and efficient diagnostic result output, which is applicable to scenarios such as power market, production scheduling and logistics scheduling.
Patent Information
- Application Number
- CN202611431055.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies struggle to achieve object-level quantitative repair of infeasible subsystems in linear programming or mixed-integer programming models. Furthermore, existing methods are inefficient and yield uncertain results, failing to effectively address infeasible scenarios caused by rule conflicts and variable boundary errors.
A parallel object-level minimal relaxation diagnostic method based on IIS files is adopted. By parsing irreducible and infeasible subsystem files, object types are identified, and relaxation variables are introduced into independent solver model instances to construct parallel diagnostic tasks, solve the object-level minimal relaxation models, and output structured results.
It achieves quantitative diagnosis with minimal repair at the object level, improving diagnostic efficiency and providing complete and stable JSON results for easy automated integration and business backtracking.
Smart Images

Figure CN123178149A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of linear programming model optimization technology, specifically to a parallel object-level minimum relaxation diagnostic method based on IIS files. Background Technology
[0002] Currently, in scenarios such as electricity market clearing, production scheduling, resource allocation, and logistics scheduling, linear programming or mixed-integer programming models typically contain a large number of variables, constraints, and boundary conditions. Overlapping business rules, data anomalies, or boundary configuration conflicts can all render the model infeasible. Irreducible Infeasible Subsystem (IIS) analysis is an important tool for locating the causes of model infeasibility. The solver can output an IIS file, which lists a set of constraints and variable boundaries involved in infeasibility conflicts, helping engineers narrow down the scope of their investigations.
[0003] Existing methods generally perform conflict analysis on infeasible models through the solver's IIS interface. The implementation is as follows: the IIS analysis method is to make a single call to an infeasible model and output the set of constraints and variable boundaries involved in the conflict; the overall feasibility relaxation method is to uniformly introduce relaxation variables into multiple elements in the model and solve for them, outputting a feasible solution that makes the model feasible as a whole; in addition, there is a manual item-by-item analysis method, in which engineers copy the model item by item based on experience, modify a certain constraint or boundary individually, and then solve it repeatedly to determine the impact of each element on feasibility.
[0004] However, the above methods are all difficult to solve the problem of object-level quantitative diagnosis because: IIS analysis only outputs a set of conflicting elements, lacking quantitative repair range for individual constraints or variables; overall feasibility relaxation treats multiple elements uniformly, and its results make it difficult to distinguish the independent repair capabilities of a specific object, and cannot answer whether feasibility can be restored by relaxing only one object and how much to relax at the minimum; manual item-by-item approach relies on experience, is inefficient and prone to misjudgment, constraint names and variable names need to be manually distinguished, and batch diagnosis operations are complex; and when performing full item-by-item analysis, the single-process repeated construction and solution of object-level relaxation models is time-consuming, and the results are not easy to archive in a structured manner.
[0005] Therefore, a new object-level minimal relaxation diagnostic method based on IIS files is urgently needed to solve the above-mentioned technical problems. Summary of the Invention
[0006] This application aims to address the problems of IIS only locating conflicts without providing object-level quantitative repair coverage, low efficiency of parallel diagnosis, and uncertain results.
[0007] To achieve this objective, the present invention adopts the following technical solution:
[0008] A parallel object-level minimal relaxation diagnostic method based on IIS files includes the following steps:
[0009] S101, obtain the irreducible infeasible subsystem files and the set of objects to be analyzed for the infeasible model, parse the irreducible infeasible subsystem files to extract conflicting model elements, and reconstruct the benchmark diagnostic model based on the model elements;
[0010] S102, based on the benchmark diagnostic model, identify the object type of each object to be analyzed in the set of objects to be analyzed, and assign an original sequence number to each object to be analyzed, so as to construct a set of parallel diagnostic tasks containing the object type and the original sequence number;
[0011] S103, for each diagnostic task in the set of parallel diagnostic tasks, a corresponding solver model instance is independently created based on the immutable description of the benchmark diagnostic model, and according to the object type corresponding to the diagnostic task, the corresponding relaxation variables are introduced into the solver model instance to construct an object-level minimum relaxation model for a single object to be analyzed.
[0012] S104, solve each of the object-level minimum relaxation models in parallel, obtain the minimum relaxation amount and solution state of each object to be analyzed, sort and summarize the solution results according to the original sequence number, and output the parallel object-level minimum relaxation diagnosis result of the infeasible model.
[0013] Furthermore, step S101, which involves parsing the irreducible and infeasible subsystem file to extract conflicting model elements, specifically includes:
[0014] The irreducible and infeasible subsystem file is parsed according to the segment mapping rules, and the contents before and after the colon in the Subject To segment, the upper and lower bounds of the Bounds segment, and the infinity processing flag are extracted.
[0015] Based on the extracted content, obtain the constraint name, left-hand expression, relational operator, right-hand value, and variable boundaries, and archive the objective function as metadata.
[0016] Furthermore, the reconstruction of the benchmark diagnostic model based on the model elements in step S101 specifically involves:
[0017] Based on the extracted model elements, a normalized model description, an object index table, a constraint relation table, and a variable boundary table are generated.
[0018] The solution objective in the normalized model description is uniformly replaced with the relaxation quantity minimization objective to construct the benchmark diagnostic model.
[0019] Furthermore, step S102, identifying the object type of each object to be analyzed in the set of objects to be analyzed, includes the following sub-steps:
[0020] It accepts mixed input containing constraint names and variable names, or accepts the keyword "all" for full analysis;
[0021] The object type is identified based on the received object, and the object type includes constraint, variable, and unknown;
[0022] When the object type is unknown, a result containing the not_found status is generated without interrupting the execution of other diagnostic tasks.
[0023] Furthermore, when the object type is constraint, step S103 involves introducing corresponding relaxation variables into the solver model instance based on the object type corresponding to the diagnostic task, thereby constructing an object-level minimum relaxation model for a single object to be analyzed. Specifically:
[0024] Based on the relational operator of the original constraint, one-sided or two-sided slack variables are introduced according to the three cases of less than or equal to, greater than or equal to, and equal to respectively.
[0025] With the goal of minimizing the one-sided slack variable (min s) or minimizing the sum of the two-sided slack variables (min (s_plus + s_minus)), an object-level minimum relaxation model for a single constraint is constructed.
[0026] Furthermore, when the object type is variable, step S103 involves introducing corresponding relaxation variables into the solver model instance based on the object type corresponding to the diagnostic task, thereby constructing an object-level minimum relaxation model for a single object to be analyzed. Specifically:
[0027] For the boundary condition lb<=x<=ub, a lower bound slack variable s_lb and an upper bound slack variable s_ub are introduced;
[0028] By minimizing the sum of the lower bound slack variables and the upper bound slack variables, i.e., min(s_lb + s_ub), an object-level minimum relaxation model for a single variable is constructed.
[0029] Furthermore, step S104, obtaining the minimum relaxation amount and solution state for each object to be analyzed, specifically involves:
[0030] When the object-level minimum relaxation model is successfully solved, the solution state is recorded as optimal, and the corresponding minimum relaxation amount is obtained.
[0031] When the model is still infeasible after relaxation for a single object to be analyzed, the solution state is denoted as infeasible_after_single_relax, and the minimum relaxation amount is denoted as infinity inf.
[0032] When an error occurs during the solution process, the solution status is recorded as solver_error or timeout.
[0033] Furthermore, in step S103, the corresponding solver model instance is independently created based on the immutable description of the benchmark diagnostic model, specifically as follows:
[0034] For each diagnostic task, an independent immutable task description is generated, which includes the IIS file identifier, object name, object type, original sequence number, relaxation direction, and solution parameters.
[0035] When processes are scheduled in parallel, each process independently creates a solver model instance based on the immutable task description to avoid the cross-influence of relaxation variables in the solution process of multiple object-level minimum relaxation models.
[0036] Furthermore, step S104 involves parallel solving of each of the object-level minimum relaxation models and sorting and summarizing the solution results according to the original sequence number, including the following sub-steps:
[0037] Determine whether the number of tasks in the set of parallel diagnostic tasks has reached a preset threshold:
[0038] If the preset threshold is not reached, the minimum relaxation model of each object level is solved in a serial manner.
[0039] If the preset threshold is reached, a multi-process parallel approach is used to solve each of the object-level minimum relaxation models.
[0040] The aggregator performs deterministic sorting of the obtained solution results based on the original sequence number.
[0041] Furthermore, the output of the parallel object-level minimum relaxation diagnostic result of the infeasible model specifically includes:
[0042] The sorted and summarized solution results are output as a structured result containing complete fields and with a stable order, and the structured result is archived and output in JSON format.
[0043] The technical solution provided by this invention may include the following beneficial effects:
[0044] (1) Extend the conflict location capability of IIS to the object-level minimum repair range quantification capability, so that engineers can determine whether an object can be repaired individually and its minimum adjustment amount.
[0045] (2) It simultaneously covers constraint relaxation and variable boundary relaxation, and is applicable to infeasible scenarios caused by rule conflicts, variable boundary errors or both.
[0046] (3) Multiple object-level relaxation solutions under the same IIS are split into independent model instances and executed in parallel. The main process is only responsible for parsing and generating immutable model descriptions. Each working process independently rebuilds or loads model copies, which can avoid the long diagnostic waiting time caused by solving each item in a single process. At the same time, the uncertainty of the concurrent return order is eliminated by summarizing the sequence numbers.
[0047] (4) Provides complete, stable, and archiveable JSON results, which can clearly distinguish between states such as optimal repairable, single relaxation still not feasible, object not found, solver exception and timeout, which facilitates integration with automated diagnosis, visualization and business configuration backtracking processes. Attached Figure Description
[0048] Figure 1 This is a flowchart of the steps of the parallel object-level minimal relaxation diagnostic method based on IIS files provided in the embodiments of the present invention. Detailed Implementation
[0049] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that the specific embodiments described herein are for illustrative and explanatory purposes only and are not intended to limit the present invention.
[0050] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the steps of the parallel object-level minimal relaxation diagnostic method based on IIS files provided in this embodiment of the invention. The parallel object-level minimal relaxation diagnostic method based on IIS files includes the following steps:
[0051] S101, obtain the irreducible infeasible subsystem files of the infeasible model and the set of objects to be analyzed, parse the irreducible infeasible subsystem files to extract conflicting model elements, and reconstruct the benchmark diagnostic model based on the model elements.
[0052] S102, based on the benchmark diagnostic model, identify the object type of each object to be analyzed in the set of objects to be analyzed, and assign an original sequence number to each object to be analyzed, so as to construct a set of parallel diagnostic tasks containing the object type and the original sequence number.
[0053] S103, for each diagnostic task in the set of parallel diagnostic tasks, a corresponding solver model instance is independently created based on the immutable description of the benchmark diagnostic model, and according to the object type corresponding to the diagnostic task, the corresponding relaxation variables are introduced into the solver model instance to construct an object-level minimum relaxation model for a single object to be analyzed.
[0054] S104, solve each of the object-level minimum relaxation models in parallel, obtain the minimum relaxation amount and solution state of each object to be analyzed, sort and summarize the solution results according to the original sequence number, and output the parallel object-level minimum relaxation diagnosis result of the infeasible model.
[0055] In this embodiment, the Irreducible Infeasible Subsystem (IIS) file refers to the conflict subsystem description file derived by the solver for the infeasible model, which lists a set of constraints and variable boundaries involved in the infeasibility conflict.
[0056] In step S101, the system receives the IIS filename input by the user. If the user does not input a filename, a default file is used. The IIS file preferably refers to an LP / IIS text file exported by the solver or a conflict subsystem file that can be converted into an LP structure. It includes at least the sections Subject To, Bounds, Binaries / Generals (if any), and End. The objective function sections Minimize / Maximize may or may not be present. An example segment is: Subject To; c_balance: P_G1 + P_G2 + P_TIE = 700; c_g1_ub: P_G1 <= 180; Bounds; 0 <= P_G1 <= 180; 0 <= P_TIE <= 20; End.
[0057] Furthermore, step S101, which involves parsing the irreducible and infeasible subsystem file to extract conflicting model elements, specifically includes:
[0058] The irreducible and infeasible subsystem file is parsed according to the segment mapping rules, and the contents before and after the colon in the Subject To segment, the upper and lower bounds of the Bounds segment, and the infinity processing flag are extracted.
[0059] Based on the extracted content, obtain the constraint name, left-hand expression, relational operator, right-hand value, and variable boundaries, and archive the objective function as metadata.
[0060] The specific design purpose and implementation method of the segment mapping rule are as follows:
[0061] In the Subject To section, the text before the colon is mapped to the constraint name, the left side of the linear expression after the colon is mapped to the expression on the left side of the constraint, and <=, >=, or = are mapped to the relational operator. The constant on the right side of the relational operator is mapped to the value on the right side.
[0062] In the Bounds section, variable identifiers are mapped to variable names, and the numerical values before and after the variable name or + / - infinity are mapped to the lower and upper bounds, respectively. Variable boundaries that are not explicitly shown are recorded according to the solver's default boundaries or the user-configured default boundaries.
[0063] If the IIS file contains an objective function, the system only parses and archives the objective function expression, objective direction, and name; if the IIS file does not contain an objective function, a diagnostic model description with zero or empty objectives is created, which does not affect the subsequent minimum relaxation solution.
[0064] Furthermore, the reconstruction of the benchmark diagnostic model based on the model elements in step S101 specifically involves:
[0065] Based on the extracted model elements, a normalized model description, an object index table, a constraint relation table, and a variable boundary table are generated.
[0066] The solution objective in the normalized model description is uniformly replaced with the relaxation quantity minimization objective to construct the benchmark diagnostic model.
[0067] In this embodiment, the specific method for reconstructing the baseline diagnostic model is as follows: the system creates variables and sets upper and lower bounds based on the analysis results, creates linear constraints based on constraint expressions and relational operators, and forms a feasible domain model consistent with the infeasible subsystem represented by the IIS file. The original objective function is only stored as metadata and does not participate in subsequent object-level relaxation solutions. When performing minimum relaxation diagnosis later, the solution objective is uniformly replaced with the relaxation minimization objective of the corresponding object, such as min s or min(s_plus + s_minus), and the original objective function is not fixed as a constraint by default. The design purpose is to avoid changing the meaning of the feasibility diagnosis of the IIS subsystem; only when the user explicitly chooses to keep the original objective value mode can the original objective function value be used as an additional constraint in the diagnosis.
[0068] Furthermore, step S102, identifying the object type of each object to be analyzed in the set of objects to be analyzed, includes the following sub-steps:
[0069] It accepts mixed input containing constraint names and variable names, or accepts the keyword "all" for full analysis;
[0070] The object type is identified based on the received object, and the object type includes constraint, variable, and unknown;
[0071] When the object type is unknown, a result containing the not_found status is generated without interrupting the execution of other diagnostic tasks.
[0072] In this embodiment, the method for receiving the objects to be analyzed is as follows: the user can input one or more constraint names and variable names, and constraint names and variable names can be input in combination; when the keyword "all" is entered, the system automatically adds all constraint names and all variable names in the IIS file to the set to be analyzed in sequence.
[0073] The specific method for identifying object types is as follows: the system matches each input name against the constraint set and variable set. A match is marked as "constraint," a match as "variable," and no match is marked as "unknown." For unknown objects, the system does not construct relaxation variables or call the solver for object-level relaxation. Instead, it returns a "not found" status in the result and records the object name, input order, error message, and empty relaxation value. This approach is designed to ensure that spelling errors in user input, objects that have been preprocessed and deleted, or non-IIS objects do not interrupt the parallel diagnostics of other valid objects.
[0074] Furthermore, when the object type is constraint, step S103 involves introducing corresponding relaxation variables into the solver model instance based on the object type corresponding to the diagnostic task, thereby constructing an object-level minimum relaxation model for a single object to be analyzed. Specifically:
[0075] Based on the relational operator of the original constraint, one-sided or two-sided slack variables are introduced according to the three cases of less than or equal to, greater than or equal to, and equal to respectively.
[0076] With the goal of minimizing the one-sided slack variable (min s) or minimizing the sum of the two-sided slack variables (min (s_plus + s_minus)), an object-level minimum relaxation model for a single constraint is constructed.
[0077] In this embodiment, the constraint-level minimum relaxation model is constructed as follows:
[0078] For a given constraint of the form L(x) <= b, a non-negative relaxation variable s is introduced, and the constraint is transformed into L(x) <= b + s. The solution is performed with the objective of min s, and the relaxation direction is denoted as increase_rhs.
[0079] For L(x) >= b, the transformation is L(x) >= b - s, and the solution is made with min s as the objective. The relaxation direction is denoted as decrease_rhs.
[0080] For the equality constraint L(x) = b, two non-negative relaxation variables s_plus >= 0 and s_minus >= 0 are introduced, and the standard expression L(x) = b + s_plus - s_minus is used, which is equivalent to b - s_minus <= L(x) <= b + s_plus. The solution aims to minimize (s_plus + s_minus), and the relaxation direction is denoted as two_sided. If the solution is feasible, the optimal objective value is the minimum relaxation amount of the constraint; if it is still infeasible after relaxing the constraint alone, the result is inf, and the solution state infeasible_after_single_relax is recorded.
[0081] Furthermore, when the object type is variable, step S103 involves introducing corresponding relaxation variables into the solver model instance based on the object type corresponding to the diagnostic task, thereby constructing an object-level minimum relaxation model for a single object to be analyzed. Specifically:
[0082] For the boundary condition lb<=x<=ub, a lower bound slack variable s_lb and an upper bound slack variable s_ub are introduced;
[0083] By minimizing the sum of the lower bound slack variables and the upper bound slack variables, i.e., min(s_lb + s_ub), an object-level minimum relaxation model for a single variable is constructed.
[0084] In this embodiment, the variable-level minimum relaxation model is constructed as follows:
[0085] For a given variable in the original boundary condition lb <= x <= ub, nonnegative relaxation variables s_lb and s_ub are introduced to relax the boundary to lb - s_lb <= x <= ub + s_ub, and the solution is obtained with the objective of min(s_lb + s_ub). If relaxing the boundary of this variable alone still does not make the model feasible, the result is inf.
[0086] Furthermore, step S104, obtaining the minimum relaxation amount and solution state for each object to be analyzed, specifically involves:
[0087] When the object-level minimum relaxation model is successfully solved, the solution state is recorded as optimal, and the corresponding minimum relaxation amount is obtained.
[0088] When the model is still infeasible after relaxation for a single object to be analyzed, the solution state is denoted as infeasible_after_single_relax, and the minimum relaxation amount is denoted as infinity inf.
[0089] When an error occurs during the solution process, the solution status is recorded as solver_error or timeout.
[0090] In this embodiment, the above-mentioned state differentiation mechanism can clearly distinguish between situations such as optimal repairability, single relaxation still not feasible, object not found, solver error, and timeout. When a task returns not_found, solves an error, or times out, only the state of that task is marked, without affecting the completion of other tasks.
[0091] Furthermore, in step S103, the corresponding solver model instance is independently created based on the immutable description of the benchmark diagnostic model, specifically as follows:
[0092] For each diagnostic task, an independent immutable task description is generated, which includes the IIS file identifier, object name, object type, original sequence number, relaxation direction, and solution parameters.
[0093] When processes are scheduled in parallel, each process independently creates a solver model instance based on the immutable task description to avoid the cross-influence of relaxation variables in the solution process of multiple object-level minimum relaxation models.
[0094] In this embodiment, the specific method for constructing the parallel diagnostic task is as follows:
[0095] For each constraint or variable to be analyzed in the IIS file, the system generates an independent task description. The task description includes at least the IIS file identifier, object name, object type, original sequence number, boundary side or relation, relaxation direction, and solution parameters.
[0096] The rule for determining the relaxation direction is:
[0097] <= constraints correspond to increase_rhs, >= constraints correspond to decrease_rhs, and = constraints correspond to two_sided; variables with only a lower bound correspond to decrease_lower, variables with only an upper bound correspond to increase_upper, and variables with both upper and lower bounds correspond to two_sided_bounds.
[0098] In terms of process architecture, the main process handles IIS parsing and normalized model description generation. Each parallel process independently creates a solver model instance based on this immutable model description, or loads a copy of the model distributed by the main process when the solver supports secure serialization. Processes must not share the same mutable solver model instance; relaxation is only allowed on the constraint side or variable boundary of its corresponding object. This design aims to prevent relaxation variables of different objects from canceling each other out or interacting with each other.
[0099] Furthermore, step S104 involves parallel solving of each of the object-level minimum relaxation models and sorting and summarizing the solution results according to the original sequence number, including the following sub-steps:
[0100] Determine whether the number of tasks in the set of parallel diagnostic tasks has reached a preset threshold:
[0101] If the preset threshold is not reached, the minimum relaxation model of each object level is solved in a serial manner.
[0102] If the preset threshold is reached, a multi-process parallel approach is used to solve each of the object-level minimum relaxation models.
[0103] The aggregator performs deterministic sorting of the obtained solution results based on the original sequence number.
[0104] In this embodiment, when the number of objects to be analyzed is no greater than a preset threshold, the system executes sequentially; when it exceeds the preset threshold, the scheduler uses multi-process parallel execution, and the number of processes can be set to max(cpu_count - 1, 1). Each process completes model instance creation, object-level relaxation solving, status return, and exception handling, respectively; the aggregator sorts the tasks according to their original sequence numbers and outputs deterministic results consistent with the user input and the order in which IIS appears. It should be noted that this step implements parallel computation of multiple object-level diagnostic tasks based on the same IIS parsing result, rather than repeatedly calling a single IIS interface for the same model.
[0105] Furthermore, the output of the parallel object-level minimum relaxation diagnostic result of the infeasible model specifically includes:
[0106] The sorted and summarized solution results are output as a structured result containing complete fields and with a stable order, and the structured result is archived and output in JSON format.
[0107] In this embodiment, JSON refers to JavaScript Object Notation (JSON). The system outputs object-level diagnostic results using both terminal information and a JSON file. The complete fields for each result include:
[0108] task_id (task number), source_iis (IIS file identifier), original_order (object's sequence number in IIS or user input), name (constraint name or variable name), object_type (constraint, variable, or unknown), relation_or_bound (constraint relation or variable boundary), relax_direction (increase_rhs, decrease_rhs, two_sided, decrease_lower, increase_upper, or two_sided_bounds), relax_value e (minimum relaxation amount, inf if it cannot be repaired alone, empty if unknown), unit (business unit, such as MW, empty if it cannot be identified), solve_status (optimal, infeasible_after_single_relax, not_found, solver_error or timeout), feasible_after_relax (boolean value), objective_value (relaxed model objective value), elapsed_ms (solution time), solver_name (solver name), model_hash (diagnostic model description summary), and message (exception or explanatory information).
[0109] The following example illustrates the complete process of this embodiment. It takes the feasibility verification of continuous output during the period t=18 of a day-ahead Security Constrained Unit Commitment (SCUC) as an example. Assume the unit start-up and shutdown states are given, and the net load balance constraint to be verified is:
[0110] P_G1 + P_G2 + P_G3 + P_G4 + P_G5 + P_BAT + P_TIE = 700 MW. The corresponding upper bounds of output are:
[0111] P_G1 <= 180 MW, P_G2 <= 150 MW, P_G3 <= 120 MW, P_G4 <= 100 MW, P_G5 <= 70 MW, P_BAT <= 20 MW and P_TIE <= 20 MW.
[0112] The sum of the maximum available supply capacity of the above resources is 660 MW, which is 40 MW lower than the net load demand, therefore the scheduling sub-model for this period is not feasible.
[0113] The solver generates an IIS file, scuc_t18.iis, for the infeasible sub-model. This file contains eight objects: net load balance constraint E_BALANCE(18), upper limits for output of five generating units, upper limits for energy storage discharge, and upper limits for tie-line input. After the user inputs "all," the system creates eight object-level diagnostic tasks based on the order of appearance in the IIS. Because the number of objects exceeds a preset threshold, the scheduler creates independent model instances for each task and solves them in parallel.
[0114] For E_BALANCE(18), the system allows a downward adjustment of the right-hand side of the equation from 700 MW using a single-term relaxation method, resulting in a minimum relaxation of 40 MW. This result corresponds to a net load balance requirement that needs to be adjusted by at least 40 MW while keeping other output upper limits unchanged. For any output upper limit of P_G1, P_G2, P_G3, P_G4, or P_G5, the system only relaxes the upper limit of that unit, resulting in a minimum relaxation of 40 MW. For the upper limits of P_BAT or P_TIE, the minimum relaxation is also 40 MW when relaxing the energy storage discharge capacity or tie-line input capacity, respectively.
[0115] After the parallel tasks return, the aggregator outputs the results in the original IIS order, for example: {task_id: 1, source_iis: scuc_t18.iis, original_order: 1, name: E_BALANCE(18), object_type:constraint, relation_or_bound: =, relax_direction: two_sided, relax_value:40, unit: MW, solve_status: optimal, feasible_after_relax: true}. Dispatchers can use this to confirm that the infeasibility is caused by a 40 MW supply-demand gap during the t=18 time period, and further combine this with operational rules to adjust load forecasting, increase available unit output, increase energy storage discharge limits, or expand tie-line input limits. This example is only for illustrating the object-level minimum relaxation and parallel diagnostic process and does not represent real market data, unit parameters, or operational performance.
[0116] In other embodiments, the above solution can also be implemented using the following alternative methods:
[0117] By parsing the adaptation layer, it supports IIS, LP, MPS, or conflict analysis files output by different solvers;
[0118] Multiple candidate IISs are discovered in parallel by employing different constraint masking, object grouping, or randomization filtering strategies on multiple model replicas. The object-level relaxation results of the candidate IISs are then uniformly merged to achieve the capability of discovering multiple IISs.
[0119] Extend a single relaxation into a combined relaxation of multiple specified objects, and use the total relaxation amount, maximum relaxation amount, or relaxation target with business weights;
[0120] Extend to mixed integer programming, quadratic programming, or linearized models, and diagnose different relaxation methods such as integer field relaxation and fixed value removal;
[0121] The command-line interaction is encapsulated as a web service, a graphical interface, or an integrated development environment (IDE) plugin, and the results can be exported in formats such as CSV, Excel, HTML, or database.
[0122] The technical solution provided by this invention may include the following beneficial effects:
[0123] (1) Extend the conflict location capability of IIS to the object-level minimum repair range quantification capability, so that engineers can determine whether an object can be repaired individually and its minimum adjustment amount.
[0124] (2) It simultaneously covers constraint relaxation and variable boundary relaxation, and is applicable to infeasible scenarios caused by rule conflicts, variable boundary errors or both.
[0125] (3) Multiple object-level relaxation solutions under the same IIS are split into independent model instances and executed in parallel. The main process is only responsible for parsing and generating immutable model descriptions. Each working process independently rebuilds or loads model copies, which can avoid the long diagnostic waiting time caused by solving each item in a single process. At the same time, the uncertainty of the concurrent return order is eliminated by summarizing the sequence numbers.
[0126] (4) Provides complete, stable, and archiveable JSON results, which can clearly distinguish between states such as optimal repairable, single relaxation still not feasible, object not found, solver exception and timeout, which facilitates integration with automated diagnosis, visualization and business configuration backtracking processes.
[0127] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0128] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0129] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a multimedia terminal device (which may be a mobile phone, computer, television receiver, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0130] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A parallel object-level minimal relaxation diagnostic method based on IIS files, characterized in that, Includes the following steps: S101, obtain the irreducible infeasible subsystem files and the set of objects to be analyzed for the infeasible model, parse the irreducible infeasible subsystem files to extract conflicting model elements, and reconstruct the benchmark diagnostic model based on the model elements; S102, based on the benchmark diagnostic model, identify the object type of each object to be analyzed in the set of objects to be analyzed, and assign an original sequence number to each object to be analyzed, so as to construct a set of parallel diagnostic tasks containing the object type and the original sequence number; S103, for each diagnostic task in the set of parallel diagnostic tasks, a corresponding solver model instance is independently created based on the immutable description of the benchmark diagnostic model, and according to the object type corresponding to the diagnostic task, the corresponding relaxation variables are introduced into the solver model instance to construct an object-level minimum relaxation model for a single object to be analyzed. S104, solve each of the object-level minimum relaxation models in parallel, obtain the minimum relaxation amount and solution state of each object to be analyzed, sort and summarize the solution results according to the original sequence number, and output the parallel object-level minimum relaxation diagnosis result of the infeasible model.
2. The parallel object-level minimal relaxation diagnostic method based on IIS files according to claim 1, characterized in that, Step S101, which involves parsing the irreducible and infeasible subsystem file to extract conflicting model elements, specifically includes: The irreducible and infeasible subsystem file is parsed according to the segment mapping rules, and the contents before and after the colon in the Subject To segment, the upper and lower bounds of the Bounds segment, and the infinity processing flag are extracted. Based on the extracted content, obtain the constraint name, left-hand expression, relational operator, right-hand value, and variable boundaries, and archive the objective function as metadata.
3. The parallel object-level minimal relaxation diagnostic method based on IIS files according to claim 2, characterized in that, Step S101, which involves reconstructing the benchmark diagnostic model based on the model elements, specifically includes: Based on the extracted model elements, a normalized model description, an object index table, a constraint relation table, and a variable boundary table are generated. The solution objective in the normalized model description is uniformly replaced with the relaxation quantity minimization objective to construct the benchmark diagnostic model.
4. The parallel object-level minimal relaxation diagnostic method based on IIS files according to claim 1, characterized in that, Step S102, identifying the object type of each object to be analyzed in the set of objects to be analyzed, includes the following sub-steps: It accepts mixed input containing constraint names and variable names, or accepts the keyword "all" for full analysis; The object type is identified based on the received object, and the object type includes constraint, variable, and unknown; When the object type is unknown, a result containing the not_found status is generated without interrupting the execution of other diagnostic tasks.
5. The parallel object-level minimal relaxation diagnostic method based on IIS files according to claim 4, characterized in that, When the object type is constraint, step S103 involves introducing corresponding relaxation variables into the solver model instance based on the object type corresponding to the diagnostic task, thereby constructing an object-level minimum relaxation model for a single object to be analyzed. Specifically: Based on the relational operator of the original constraint, one-sided or two-sided slack variables are introduced according to the three cases of less than or equal to, greater than or equal to, and equal to respectively. With the goal of minimizing the one-sided slack variable (min s) or minimizing the sum of the two-sided slack variables (min (s_plus + s_minus)), an object-level minimum relaxation model for a single constraint is constructed.
6. The parallel object-level minimal relaxation diagnostic method based on IIS files according to claim 4, characterized in that, When the object type is variable, step S103 involves introducing corresponding relaxation variables into the solver model instance based on the object type corresponding to the diagnostic task, thereby constructing an object-level minimum relaxation model for a single object to be analyzed. Specifically: For the boundary condition lb<=x<=ub, a lower bound slack variable s_lb and an upper bound slack variable s_ub are introduced; By minimizing the sum of the lower bound slack variables and the upper bound slack variables, i.e., min(s_lb + s_ub), an object-level minimum relaxation model for a single variable is constructed.
7. A parallel object-level minimal relaxation diagnostic method based on IIS files according to claim 5 or 6, characterized in that, Step S104, obtaining the minimum relaxation amount and solution state for each object to be analyzed, specifically involves: When the object-level minimum relaxation model is successfully solved, the solution state is recorded as optimal, and the corresponding minimum relaxation amount is obtained. When the model is still infeasible after relaxation for a single object to be analyzed, the solution state is denoted as infeasible_after_single_relax, and the minimum relaxation amount is denoted as infinity inf. When an error occurs during the solution process, the solution status is recorded as solver_error or timeout.
8. The parallel object-level minimal relaxation diagnostic method based on IIS files according to claim 1, characterized in that, Step S103, which involves independently creating corresponding solver model instances based on the immutable description of the benchmark diagnostic model, specifically involves: For each diagnostic task, an independent immutable task description is generated, which includes the IIS file identifier, object name, object type, original sequence number, relaxation direction, and solution parameters. When processes are scheduled in parallel, each process independently creates a solver model instance based on the immutable task description to avoid the cross-influence of relaxation variables in the solution process of multiple object-level minimum relaxation models.
9. The parallel object-level minimal relaxation diagnostic method based on IIS files according to claim 1, characterized in that, Step S104 involves parallel solving of each object-level minimum relaxation model and sorting and summarizing the solution results according to the original sequence number, including the following sub-steps: Determine whether the number of tasks in the set of parallel diagnostic tasks has reached a preset threshold: If the preset threshold is not reached, the minimum relaxation model of each object level is solved in a serial manner. If the preset threshold is reached, a multi-process parallel approach is used to solve each of the object-level minimum relaxation models. The aggregator performs deterministic sorting of the obtained solution results based on the original sequence number.
10. The parallel object-level minimal relaxation diagnostic method based on IIS files according to claim 9, characterized in that, The output of the parallel object-level minimum relaxation diagnostic result of the infeasible model is specifically as follows: The sorted and summarized solution results are output as a structured result containing complete fields and with a stable order, and the structured result is archived and output in JSON format.
