Iron and steel enterprise coal distribution method and system based on particle swarm optimization

The particle swarm algorithm is used to allocate coal for ironmaking, which solves the problem that a single type of coal cannot meet the needs of ironmaking and the neural network coal blending has no feasible solution. It realizes the output of multiple sets of alternatives and the correction of constraint conditions, and reduces the cost of ironmaking. .

CN118863115APending Publication Date: 2024-10-29SHANGHAI BAOSIGHT SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410699606.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing technology In the field of iron and steelmaking, a single type of coal cannot meet production needs. When using the neural network method to blend coal, there will be no feasible solution due to new coal types or too many constraints, which is difficult to troubleshoot and modify, and is time-consuming. , applicable scenarios are limited.

Method used

Particle swarm algorithm is used to allocate coal for steel enterprises. By configuring model parameters, testing constraint conditions, modifying constraint conditions and using particle swarm algorithm to output solution results, dynamic labeling, constraint matrix management and particle swarm optimization are implemented to find multiple sets of alternative solutions. for ease of comparison.

Benefits of technology

Output multiple sets of alternatives in high-dimensional optimization problems to facilitate comparison, locate and modify conflict constraints, solve problems with no feasible solutions, reduce coal blending costs, and achieve low-cost ironmaking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118863115A_ABST
    Figure CN118863115A_ABST
Patent Text Reader

Abstract

The invention provides an iron and steel enterprise coal distribution method and system based on a particle swarm algorithm. The method comprises the following steps: S1, configuring parameter information required by a model; s2, testing constraint conditions of the model; s3, modifying constraint conditions and re-checking; and S4, outputting a scheme result by using a particle swarm algorithm. By using the blended coal, the use requirement can be met, the coal resource can be reasonably utilized, and meanwhile, the product quality can be improved; the coal blending can also prevent the side expansion pressure generated in the coking process of the coal in the carbonization chamber from exceeding the limit load of the furnace wall, avoid the occurrence of difficult coke pushing and the like, and can reduce the coal blending cost by using reasonable coal blending, thereby realizing low-cost ironmaking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of coking coal blending, and in particular to a method and system for allocating coal for a steel enterprise based on a particle swarm algorithm. Background Art

[0002] At present, in the field of iron and steel making, a single type of coal can no longer meet the production requirements, and it is necessary to use a reasonable combination of coal to improve economic efficiency and practicality. Therefore, how to blend coal has become a top priority. Due to the excessive number of coal varieties, coal is generally blended as a whole based on dimensions such as properties. Of course, models, machine learning, deep learning and other methods are also used to optimize the entire problem.

[0003] The Chinese patent application number CN116307245A discloses an "automatic coal blending method and system", which uses a neural network model to predict coal blending quality indicators, and through algorithm optimization of the neural network model, it can predict comprehensive indicators such as nonlinear data and linear data in the coal blending process; build a coal blending optimization model based on the predicted value of coal blending quality, integrate the coal blending problem into the constraint model, and combine factors such as cost and quality to optimize the coal configuration based on economy and optimal ratio requirements. However, this method uses a neural network to cause variables to be fixed. If a new type of coal is added, a new neural network training needs to be rebuilt. In addition, there will be a situation where there is no feasible solution when there are too many types of coal and too many constraints. If this happens, it will be difficult to find and modify the problematic constraints, which is time-consuming and has limited applicable scenarios. Summary of the invention

[0004] In view of the defects in the prior art, the purpose of the present invention is to provide a method and system for allocating coal for steel enterprises based on particle swarm algorithm.

[0005] According to the present invention, a coal allocation method for a steel enterprise based on a particle swarm algorithm comprises:

[0006] Step S1: configure the parameter information required by the model;

[0007] Step S2: Check model constraints;

[0008] Step S3: modify the constraint conditions and re-check;

[0009] Step S4: Use the particle swarm algorithm to output the solution results.

[0010] Preferably, in step S1:

[0011] Configuration business indicators include annual coal control indicators, hot metal production and power generation;

[0012] Configuration technical indicators include coking rate, coal-to-electricity ratio and power generation coal consumption;

[0013] The upper and lower limit information includes the price information, coal quality information, upper and lower limits of proportion, upper and lower limits of dimension proportion and matching coal quality of each type of coal;

[0014] According to the data type, it is divided into two data dimensions: annual and monthly, and managed separately. The information of each configuration is retained for users to use or edit.

[0015] Preferably, in step S2:

[0016] The model determines whether there is a feasible domain based on the configured information:

[0017] Step S2.1: Dynamically mark the coal types used by the model. The coal types used each time are different. The model uniquely and dynamically marks the coal types used according to the major categories, properties and sources.

[0018] Step S2.2: Use dynamic tags to construct dynamic parameters corresponding to coal types, including price, coal quality, resource quantity, and upper and lower limits of proportion;

[0019] Step S2.3: construct a constraint coefficient matrix and manage the constraint conditions, convert the constraint conditions into a coefficient matrix or a calculation formula, construct a constraint condition management dataframe, and collect the information of each constraint condition in the process of constructing the constraint matrix;

[0020] Step S2.4: Check the feasible domain of the model, configure the constraint matrix of the equality constraints, the constraint matrix of the inequality constraints and the coefficient matrix of the target, check whether there is a feasible domain and whether the constraints are reasonable;

[0021] The constraints are sorted according to their importance, and a verification function is designed based on Python's cvxpy library to verify whether there is a feasible domain for the whole. If there is no feasible domain, a cyclic verification is performed starting from the first constraint and all conflicting constraints are found.

[0022] Preferably, in step S3:

[0023] Design test function: def judge_solution_exist(e1,f1);

[0024] Judge whether the current overall constraint is reasonable success = judge_solution_exist (e1 = Y, f1 = M);

[0025] If it does not meet the preset reasonable standards, start from the left side of the first inequality constraint of y0 and the right side of the first inequality constraint of m0, and continue to splice new y and m into the test function in a loop;

[0026] After the model returns unreasonable constraints and the corresponding front-end coordinates, modify them and re-verify whether the constraints are reasonable;

[0027] Unreasonable constraints include: whether there is a conflict between the resource quantity and production target of each type of coal, the upper and lower limits of the allocation percentage of each type of coal, the upper and lower limits of the percentage of the trait source dimension, and whether there is a conflict between the upper and lower limits of the final coal quality; if there is a conflict and there is no optimal solution, the constraints are unreasonable and need to be modified.

[0028] Preferably, in step S4:

[0029] The model constructs the initial particle position information in the feasible domain according to the configured information, and uses the particle swarm algorithm to output multiple sets of solution results: design multiple initial particle construction functions def build_chushi, construct the initial position, and randomly select the initial particle position of this time; in the first iteration, select the best particle among the current particles as the global optimal position. The historical optimal position of each particle at this time is itself, and the whole moves to the global optimal position. After the movement, it is judged whether the position of the particle exceeds the boundary and whether it does not meet the current constraints. Adjustments are made, and all historical positions of all particles that meet the conditions are re-judged to find a new global optimal position; in each subsequent iteration, the direction is adjusted according to the historical optimal position of the current particle and the global historical optimal position, and the optimal position is continuously iterated;

[0030] Step S4.1: construct the initial position of the particle swarm and construct a preset number of particles in the feasible domain;

[0031] Step S4.2: construct the particle swarm dimension and reduce the particle swarm dimension according to whether there is an equality constraint;

[0032] Step S4.3: construct other parameters of the particle swarm, including the boundary, the maximum velocity of particles, the inertia factor and the learning factor;

[0033] Step S4.4: Use the particle swarm algorithm to output the optimization plan. By iterating the particle swarm algorithm, the optimal position of each particle is output, and the corresponding results are sorted before outputting the plan.

[0034] Each particle changes its direction of movement according to the historical optimal point and the optimal point of the global particle, restricts its movement when it touches the boundary or does not meet the constraints, stops when the optimal solution is found or the maximum number of iterations is reached, and outputs the optimal solution of all particles globally at this time.

[0035] According to the present invention, a coal allocation system for a steel enterprise based on a particle swarm algorithm is provided, comprising:

[0036] Module M1: parameter information required to configure the model;

[0037] Module M2: Check model constraints;

[0038] Module M3: Modify the constraints and re-check;

[0039] Module M4: Use particle swarm algorithm to output solution results.

[0040] Preferably, in the module M1:

[0041] Configuration business indicators include annual coal control indicators, hot metal production and power generation;

[0042] Configuration technical indicators include coking rate, coal-to-electricity ratio and power generation coal consumption;

[0043] The upper and lower limit information includes the price information, coal quality information, upper and lower limits of proportion, upper and lower limits of dimension proportion and matching coal quality of each type of coal;

[0044] According to the data type, it is divided into two data dimensions: annual and monthly, and managed separately. The information of each configuration is retained for users to use or edit.

[0045] Preferably, in the module M2:

[0046] The model determines whether there is a feasible domain based on the configured information:

[0047] Module M2.1: Dynamically mark the coal types used in the model. The coal types used each time are different. The model uniquely and dynamically marks the coal types used according to the major categories, properties and sources.

[0048] Module M2.2: Use dynamic tags to construct dynamic parameters corresponding to coal types, including price, coal quality, resource quantity, and upper and lower limits of proportions;

[0049] Module M2.3: Construct constraint coefficient matrix and manage constraint conditions, convert constraint conditions into coefficient matrix or calculation formula, construct constraint condition management dataframe, and collect information of each constraint condition in the process of constructing constraint matrix;

[0050] Module M2.4: Test the feasible domain of the model, configure the constraint matrix of the equality constraint, the constraint matrix of the inequality constraint and the coefficient matrix of the target, and test whether there is a feasible domain and whether the constraint conditions are reasonable;

[0051] The constraints are sorted according to their importance, and a verification function is designed based on Python's cvxpy library to verify whether there is a feasible domain for the whole. If there is no feasible domain, a cyclic verification is performed starting from the first constraint and all conflicting constraints are found.

[0052] Preferably, in the module M3:

[0053] Design test function: def judge_solution_exist(e1,f1);

[0054] Judge whether the current overall constraint is reasonable success = judge_solution_exist (e1 = Y, f1 = M);

[0055] After the model returns unreasonable constraints and the corresponding front-end coordinates, modify them and re-verify whether the constraints are reasonable;

[0056] Unreasonable constraints include: whether there is a conflict between the resource quantity and production target of each type of coal, the upper and lower limits of the allocation percentage of each type of coal, the upper and lower limits of the percentage of the trait source dimension, and whether there is a conflict between the upper and lower limits of the final coal quality; if there is a conflict and there is no optimal solution, the constraints are unreasonable and need to be modified.

[0057] Preferably, in the module M4:

[0058] The model constructs the initial particle position information in the feasible domain according to the configured information, and uses the particle swarm algorithm to output multiple sets of solution results: design multiple initial particle construction functions def build_chushi, construct the initial position, and randomly select the initial particle position of this time; in the first iteration, select the best particle among the current particles as the global optimal position. The historical optimal position of each particle at this time is itself, and the whole moves to the global optimal position. After the movement, it is judged whether the position of the particle exceeds the boundary and whether it does not meet the current constraints. Adjustments are made, and all historical positions of all particles that meet the conditions are re-judged to find a new global optimal position; in each subsequent iteration, the direction is adjusted according to the historical optimal position of the current particle and the global historical optimal position, and the optimal position is continuously iterated;

[0059] Module M4.1: Construct the initial position of the particle swarm and construct a preset number of particles in the feasible domain;

[0060] Module M4.2: Construct the particle swarm dimension and reduce the particle swarm dimension according to whether there is an equality constraint;

[0061] Module M4.3: Construct other parameters of particle swarm, including boundary, maximum particle velocity, inertia factor and learning factor;

[0062] Module M4.4: Use the particle swarm algorithm to output the optimization plan. By iterating the particle swarm algorithm, the optimal position of each particle is output, and the corresponding results are sorted before outputting the plan.

[0063] Each particle changes its direction of movement according to the historical optimal point and the optimal point of the global particle, restricts its movement when it touches the boundary or does not meet the constraints, stops when the optimal solution is found or the maximum number of iterations is reached, and outputs the optimal solution of all particles globally at this time.

[0064] Compared with the prior art, the present invention has the following beneficial effects:

[0065] 1. The present invention adopts the particle swarm algorithm to solve high-dimensional optimization problems and output multiple sets of alternative solutions for easy comparison. In such high-dimensional optimization problems, due to the high dimension and many constraints, it is easy to have no feasible solution. It usually takes many experiments to find conflicting constraints. This model provides a constraint verification function, which can easily locate the constraints that need to be modified, and provides a solution for solving similar high-dimensional optimization problems.

[0066] 2. The use of a single type of coal cannot meet the needs of coking, injection, power generation, and sintering. For example, it is difficult for coking to meet the quality requirements of blast furnaces for coke, and the coal resources of various countries cannot meet the demand for a single type of coal. The use of blended coal in the present invention can meet the use requirements, and can reasonably utilize coal resources, while increasing the quality of products; the use of blended coal can also prevent the lateral expansion pressure generated during the coking process of coal in the carbonization chamber from exceeding the limit load of the furnace wall, avoiding the occurrence of difficulties in pushing coke, etc. The use of reasonable blended coal can reduce the cost of blending coal, thereby achieving low-cost ironmaking. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0068] Figure 1 Schematic diagram of the system of the present invention. DETAILED DESCRIPTION

[0069] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0070] Embodiment 1:

[0071] The present invention generates dynamic tags according to the detailed coal varieties and the major categories, properties, sources, etc. of the alternative varieties, and constructs dynamic variables for the corresponding parameters such as proportion, price, coal quality, etc. according to the dynamic tags, and then constructs a constraint coefficient matrix according to the variables and manages the constraints. The model can determine whether there is a feasible domain according to the constraints. If there is no feasible solution, it will be traversed and checked according to the management of the constraints, find all the constraints that lead to the absence of feasible solutions, and return the coordinates corresponding to the front-end configuration constraint page for highlighting for users to modify until the model has a feasible domain. Construct information such as the initial particle position in the feasible domain, use the particle swarm algorithm to sort the output results, and obtain multiple groups of optimization scheme outputs.

[0072] According to a coal allocation method for a steel enterprise based on a particle swarm algorithm provided by the present invention, Figure 1 As shown, including:

[0073] Step S1: configure the parameter information required by the model;

[0074] Specifically, in step S1:

[0075] Configuration business indicators include annual coal control indicators, hot metal production and power generation;

[0076] Configuration technical indicators include coking rate, coal-to-electricity ratio and power generation coal consumption;

[0077] The upper and lower limit information includes the price information, coal quality information, upper and lower limits of proportion, upper and lower limits of dimension proportion and matching coal quality of each type of coal;

[0078] According to the data type, it is divided into two data dimensions: annual and monthly, and managed separately. The information of each configuration is retained for users to use or edit.

[0079] Step S2: Check model constraints;

[0080] Specifically, in step S2:

[0081] The model determines whether there is a feasible domain based on the configured information:

[0082] Step S2.1: Dynamically mark the coal types used by the model. The coal types used each time are different. The model uniquely and dynamically marks the coal types used according to the major categories, properties and sources.

[0083] Step S2.2: Use dynamic tags to construct dynamic parameters corresponding to coal types, including price, coal quality, resource quantity, and upper and lower limits of proportion;

[0084] Step S2.3: construct a constraint coefficient matrix and manage the constraint conditions, convert the constraint conditions into a coefficient matrix or a calculation formula, construct a constraint condition management dataframe, and collect the information of each constraint condition in the process of constructing the constraint matrix;

[0085] Step S2.4: Check the feasible domain of the model, configure the constraint matrix of the equality constraints, the constraint matrix of the inequality constraints and the coefficient matrix of the target, check whether there is a feasible domain and whether the constraints are reasonable;

[0086] The constraints are sorted according to their importance, and a verification function is designed based on Python's cvxpy library to verify whether there is a feasible domain for the whole. If there is no feasible domain, a cyclic verification is performed starting from the first constraint and all conflicting constraints are found.

[0087] Step S3: modify the constraint conditions and re-check;

[0088] Specifically, in step S3:

[0089] Design test function: def judge_solution_exist(e1,f1);

[0090] Judge whether the current overall constraint is reasonable success = judge_solution_exist (e1 = Y, f1 = M);

[0091] If it does not meet the preset reasonable standards, start from the left side of the first inequality constraint of y0 and the right side of the first inequality constraint of m0, and continue to splice new y and m into the test function in a loop;

[0092] After the model returns unreasonable constraints and the corresponding front-end coordinates, modify them and re-verify whether the constraints are reasonable;

[0093] Unreasonable constraints include: whether there is a conflict between the resource quantity and production target of each type of coal, the upper and lower limits of the allocation percentage of each type of coal, the upper and lower limits of the percentage of the trait source dimension, and whether there is a conflict between the upper and lower limits of the final coal quality; if there is a conflict and there is no optimal solution, the constraints are unreasonable and need to be modified.

[0094] Step S4: Use the particle swarm algorithm to output the solution results.

[0095] Specifically, in step S4:

[0096] The model constructs the initial particle position information in the feasible domain according to the configured information, and uses the particle swarm algorithm to output multiple sets of solution results: design multiple initial particle construction functions def build_chushi, construct the initial position, and randomly select the initial particle position of this time; in the first iteration, select the best particle among the current particles as the global optimal position. The historical optimal position of each particle at this time is itself, and the whole moves to the global optimal position. After the movement, it is judged whether the position of the particle exceeds the boundary and whether it does not meet the current constraints. Adjustments are made, and all historical positions of all particles that meet the conditions are re-judged to find a new global optimal position; in each subsequent iteration, the direction is adjusted according to the historical optimal position of the current particle and the global historical optimal position, and the optimal position is continuously iterated;

[0097] Step S4.1: construct the initial position of the particle swarm and construct a preset number of particles in the feasible domain;

[0098] Step S4.2: construct the particle swarm dimension and reduce the particle swarm dimension according to whether there is an equality constraint;

[0099] Step S4.3: construct other parameters of the particle swarm, including the boundary, the maximum velocity of particles, the inertia factor and the learning factor;

[0100] Step S4.4: Use the particle swarm algorithm to output the optimization plan. By iterating the particle swarm algorithm, the optimal position of each particle is output, and the corresponding results are sorted before outputting the plan.

[0101] Each particle changes its direction of movement according to the historical optimal point and the optimal point of the global particle, restricts its movement when it touches the boundary or does not meet the constraints, stops when the optimal solution is found or the maximum number of iterations is reached, and outputs the optimal solution of all particles globally at this time.

[0102] Embodiment 2:

[0103] Embodiment 2 is a preferred example of Embodiment 1, and is used to illustrate the present invention in more detail.

[0104] The present invention also provides a coal allocation system for steel enterprises based on a particle swarm algorithm. The coal allocation system for steel enterprises based on a particle swarm algorithm can be realized by executing the process steps of the coal allocation method for steel enterprises based on a particle swarm algorithm, that is, those skilled in the art can understand the coal allocation method for steel enterprises based on a particle swarm algorithm as a preferred implementation of the coal allocation system for steel enterprises based on a particle swarm algorithm.

[0105] According to the present invention, a coal allocation system for a steel enterprise based on a particle swarm algorithm is provided, comprising:

[0106] Module M1: parameter information required to configure the model;

[0107] Specifically, in the module M1:

[0108] Configuration business indicators include annual coal control indicators, hot metal production and power generation;

[0109] Configuration technical indicators include coking rate, coal-to-electricity ratio and power generation coal consumption;

[0110] The upper and lower limit information includes the price information, coal quality information, upper and lower limits of proportion, upper and lower limits of dimension proportion and matching coal quality of each type of coal;

[0111] According to the data type, it is divided into two data dimensions: annual and monthly, and managed separately. The information of each configuration is retained for users to use or edit.

[0112] Module M2: Check model constraints;

[0113] Specifically, in the module M2:

[0114] The model determines whether there is a feasible domain based on the configured information:

[0115] Module M2.1: Dynamically mark the coal types used in the model. The coal types used each time are different. The model uniquely and dynamically marks the coal types used according to the major categories, properties and sources.

[0116] Module M2.2: Use dynamic tags to construct dynamic parameters corresponding to coal types, including price, coal quality, resource quantity, and upper and lower limits of proportions;

[0117] Module M2.3: Construct constraint coefficient matrix and manage constraint conditions, convert constraint conditions into coefficient matrix or calculation formula, construct constraint condition management dataframe, and collect information of each constraint condition in the process of constructing constraint matrix;

[0118] Module M2.4: Test the feasible domain of the model, configure the constraint matrix of the equality constraint, the constraint matrix of the inequality constraint and the coefficient matrix of the target, and test whether there is a feasible domain and whether the constraint conditions are reasonable;

[0119] The constraints are sorted according to their importance, and a verification function is designed based on Python's cvxpy library to verify whether there is a feasible domain for the whole. If there is no feasible domain, a cyclic verification is performed starting from the first constraint and all conflicting constraints are found.

[0120] Module M3: Modify the constraints and re-check;

[0121] Specifically, in the module M3:

[0122] Design test function: def judge_solution_exist(e1,f1);

[0123] Judge whether the current overall constraint is reasonable success = judge_solution_exist (e1 = Y, f1 = M);

[0124] After the model returns unreasonable constraints and the corresponding front-end coordinates, modify them and re-verify whether the constraints are reasonable;

[0125] Unreasonable constraints include: whether there is a conflict between the resource quantity and production target of each type of coal, the upper and lower limits of the allocation percentage of each type of coal, the upper and lower limits of the percentage of the trait source dimension, and whether there is a conflict between the upper and lower limits of the final coal quality; if there is a conflict and there is no optimal solution, the constraints are unreasonable and need to be modified.

[0126] Module M4: Use particle swarm algorithm to output solution results.

[0127] Specifically, in the module M4:

[0128] The model constructs the initial particle position information in the feasible domain according to the configured information, and uses the particle swarm algorithm to output multiple sets of solution results: design multiple initial particle construction functions def build_chushi, construct the initial position, and randomly select the initial particle position of this time; in the first iteration, select the best particle among the current particles as the global optimal position. The historical optimal position of each particle at this time is itself, and the whole moves to the global optimal position. After the movement, it is judged whether the position of the particle exceeds the boundary and whether it does not meet the current constraints. Adjustments are made, and all historical positions of all particles that meet the conditions are re-judged to find a new global optimal position; in each subsequent iteration, the direction is adjusted according to the historical optimal position of the current particle and the global historical optimal position, and the optimal position is continuously iterated;

[0129] Module M4.1: Construct the initial position of the particle swarm and construct a preset number of particles in the feasible domain;

[0130] Module M4.2: Construct the particle swarm dimension and reduce the particle swarm dimension according to whether there is an equality constraint;

[0131] Module M4.3: Construct other parameters of particle swarm, including boundary, maximum particle velocity, inertia factor and learning factor;

[0132] Module M4.4: Use the particle swarm algorithm to output the optimization plan. By iterating the particle swarm algorithm, the optimal position of each particle is output, and the corresponding results are sorted before outputting the plan.

[0133] Each particle changes its direction of movement according to the historical optimal point and the optimal point of the global particle, restricts its movement when it touches the boundary or does not meet the constraints, stops when the optimal solution is found or the maximum number of iterations is reached, and outputs the optimal solution of all particles globally at this time.

[0134] Embodiment 3:

[0135] Embodiment 3 is a preferred example of Embodiment 1, and is used to illustrate the present invention in more detail.

[0136] Step 1: Configure the parameter information required by the model.

[0137] This model needs to be configured with business indicators including annual coal control index, molten iron output, power generation, etc., technical indicators such as coking rate, coal-electricity ratio, power generation coal consumption, as well as price information, coal quality information, upper and lower limits of proportions, upper and lower limits of dimension proportions, and upper and lower limits of matching coal quality for each type of coal. According to the data type, it is divided into two data dimensions, annual and monthly, and managed separately. The information configured each time is retained and can be directly used or edited by users.

[0138] Step 2: The model checks whether the constraints are reasonable. The model determines whether there is a feasible domain based on the configured information.

[0139] Step 3: Modify the constraints and re-check. After the model returns the unreasonable constraints and the corresponding front-end coordinates are highlighted, modify them and re-check whether the constraints are reasonable.

[0140] Step 4: Use the particle swarm algorithm to output the solution results. The model constructs information such as the initial particle position in the feasible domain based on the configured information, and uses the particle swarm algorithm to output multiple sets of solution results.

[0141] Wherein said step 2 comprises the following steps:

[0142] Step 2.1: Dynamically mark the type of coal used in the model. The type of coal used each time will be different, and the model will uniquely and dynamically mark the type of coal used this time based on the type, properties, source and other dimensions.

[0143] Step 2.2: Use dynamic tags to construct dynamic parameters corresponding to coal types, including price, coal quality, resource quantity, upper and lower limits of proportions, etc.

[0144] Step 2.3: Build the constraint coefficient matrix and manage the constraints. Convert the constraints into a coefficient matrix or calculation formula so that they can be recognized by the optimization program. Build a constraint management dataframe and collect the information of each constraint in the process of building the constraint matrix.

[0145] Step 2.4: Check the feasible domain of the model. Configure the constraint matrix of the equality constraints, the constraint matrix of the inequality constraints, the coefficient matrix of the target and other information to check whether there is a feasible domain, that is, whether the constraints are reasonable.

[0146] Wherein said step 4 comprises the following steps:

[0147] Design a variety of initial particle construction functions def build_chushi. If the number of particles is 100, more than 300 initial positions will be constructed, and 100 of them will be randomly selected as the initial particle positions for this time. In the first iteration, the best particle among the current 100 particles is selected as the global optimal position. The historical optimal position of each particle at this time is itself, so it will move to the global optimal position as a whole. After the movement, it is necessary to determine whether the position of the particle exceeds the boundary and whether it does not meet the current constraints. A slight adjustment will be made, and all historical positions of all particles that meet the conditions will be re-judged to find a new global optimal position. In each subsequent iteration, the direction will be weighted according to the historical optimal position of the current particle and the global historical optimal position to continuously iterate and find the optimal position.

[0148] Step 4.1: Construct the initial position of the particle swarm. Construct an appropriate number of particles in the feasible region.

[0149] Step 4.2: Construct a suitable particle swarm dimension. Depending on whether there is an equality constraint, appropriately reduce the particle swarm dimension. Because the particle swarm algorithm is not very suitable for equality constraints, it will easily exceed the set boundaries during the iteration process.

[0150] Step 4.3: Construct other appropriate parameters of the particle swarm, including boundaries, maximum particle speed, inertia factor, learning factor, etc.

[0151] Step 4.4: Use the particle swarm algorithm to output the optimization solution. By iterating the particle swarm algorithm, the optimal position of each particle will be output, and after sorting the corresponding results, multiple solutions will be output.

[0152] The present invention focuses on how to use alternative varieties of four different types of coal to economically replace them under the premise of meeting production requirements under the restrictions of Shanghai's coal control indicators.

[0153] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0154] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A coal allocation method for steel enterprises based on particle swarm algorithm, characterized in that: include: Step S1: configure the parameter information required by the model; Step S2: Check model constraints; Step S3: modify the constraint conditions and re-check; Step S4: Use the particle swarm algorithm to output the solution results.

2. The coal allocation method for steel enterprises based on particle swarm algorithm according to claim 1 is characterized in that: In step S1: Configuration business indicators include annual coal control indicators, hot metal production and power generation; Configuration technical indicators include coking rate, coal-to-electricity ratio and power generation coal consumption; The upper and lower limit information includes the price information, coal quality information, upper and lower limits of proportion, upper and lower limits of dimension proportion and matching coal quality of each type of coal; According to the data type, it is divided into two data dimensions: annual and monthly, and managed separately. The information of each configuration is retained for users to use or edit.

3. The coal allocation method for steel enterprises based on particle swarm algorithm according to claim 1, characterized in that: In step S2: The model determines whether there is a feasible domain based on the configured information: Step S2.1: Dynamically mark the coal types used by the model. The coal types used each time are different. The model uniquely and dynamically marks the coal types used according to the major categories, properties and sources. Step S2.2: Use dynamic tags to construct dynamic parameters corresponding to coal types, including price, coal quality, resource quantity, and upper and lower limits of proportion; Step S2.3: construct a constraint coefficient matrix and manage the constraint conditions, convert the constraint conditions into a coefficient matrix or a calculation formula, construct a constraint condition management dataframe, and collect the information of each constraint condition in the process of constructing the constraint matrix; Step S2.4: Check the feasible domain of the model, configure the constraint matrix of the equality constraints, the constraint matrix of the inequality constraints and the coefficient matrix of the target, check whether there is a feasible domain and whether the constraints are reasonable; The constraints are sorted according to their importance, and a verification function is designed based on Python's cvxpy library to verify whether there is a feasible domain for the whole. If there is no feasible domain, a cyclic verification is performed starting from the first constraint and all conflicting constraints are found.

4. The coal allocation method for steel enterprises based on particle swarm algorithm according to claim 1, characterized in that: In step S3: Design test function: def judge_solution_exist(e1,f1); Judge whether the current overall constraint is reasonable success = judge_solution_exist (e1 = Y, f1 = M); If it does not meet the preset reasonable standards, start from the left side of the first inequality constraint of y0 and the right side of the first inequality constraint of m0, and continue to splice new y and m into the test function in a loop; After the model returns unreasonable constraints and the corresponding front-end coordinates, modify them and re-verify whether the constraints are reasonable; Unreasonable constraints include: whether there is a conflict between the resource quantity and production target of each type of coal, the upper and lower limits of the allocation percentage of each type of coal, the upper and lower limits of the percentage of the trait source dimension, and whether there is a conflict between the upper and lower limits of the final coal quality; if there is a conflict and there is no optimal solution, the constraints are unreasonable and need to be modified.

5. The coal allocation method for steel enterprises based on particle swarm algorithm according to claim 1, characterized in that: In step S4: The model constructs the initial particle position information in the feasible domain according to the configured information, and uses the particle swarm algorithm to output multiple sets of solution results: design multiple initial particle construction functions def build_chushi, construct the initial position, and randomly select the initial particle position of this time; in the first iteration, select the best particle among the current particles as the global optimal position. The historical optimal position of each particle at this time is itself, and the whole moves to the global optimal position. After the movement, it is judged whether the position of the particle exceeds the boundary and whether it does not meet the current constraints. Adjustments are made, and all historical positions of all particles that meet the conditions are re-judged to find a new global optimal position; in each subsequent iteration, the direction is adjusted according to the historical optimal position of the current particle and the global historical optimal position, and the optimal position is continuously iterated; Step S4.1: construct the initial position of the particle swarm and construct a preset number of particles in the feasible domain; Step S4.2: construct the particle swarm dimension and reduce the particle swarm dimension according to whether there is an equality constraint; Step S4.3: construct other parameters of the particle swarm, including the boundary, the maximum velocity of particles, the inertia factor and the learning factor; Step S4.4: Use the particle swarm algorithm to output the optimization plan. By iterating the particle swarm algorithm, the optimal position of each particle is output, and the corresponding results are sorted before outputting the plan. Each particle changes its direction of movement according to the historical optimal point and the optimal point of the global particle, restricts its movement when it touches the boundary or does not meet the constraints, stops when the optimal solution is found or the maximum number of iterations is reached, and outputs the optimal solution of all particles globally at this time.

6. A coal allocation system for steel enterprises based on particle swarm algorithm, characterized in that: include: Module M1: parameter information required to configure the model; Module M2: Check model constraints; Module M3: Modify the constraints and re-check; Module M4: Use particle swarm algorithm to output solution results.

7. The coal allocation system for steel enterprises based on particle swarm algorithm according to claim 6 is characterized in that: In the module M1: Configuration business indicators include annual coal control indicators, hot metal production and power generation; Configuration technical indicators include coking rate, coal-to-electricity ratio and power generation coal consumption; The upper and lower limit information includes the price information, coal quality information, upper and lower limits of proportion, upper and lower limits of dimension proportion and matching coal quality of each type of coal; According to the data type, it is divided into two data dimensions: annual and monthly, and managed separately. The information of each configuration is retained for users to use or edit.

8. The coal allocation system for steel enterprises based on particle swarm algorithm according to claim 6, characterized in that: In the module M2: The model determines whether there is a feasible domain based on the configured information: Module M2.1: Dynamically mark the coal types used in the model. The coal types used each time are different. The model uniquely and dynamically marks the coal types used according to the major categories, properties and sources. Module M2.2: Use dynamic tags to construct dynamic parameters corresponding to coal types, including price, coal quality, resource quantity, and upper and lower limits of proportions; Module M2.3: Construct constraint coefficient matrix and manage constraint conditions, convert constraint conditions into coefficient matrix or calculation formula, construct constraint condition management dataframe, and collect information of each constraint condition in the process of constructing constraint matrix; Module M2.4: Test the feasible domain of the model, configure the constraint matrix of the equality constraint, the constraint matrix of the inequality constraint and the coefficient matrix of the target, and test whether there is a feasible domain and whether the constraint conditions are reasonable; The constraints are sorted according to their importance, and a verification function is designed based on Python's cvxpy library to verify whether there is a feasible domain for the whole. If there is no feasible domain, a cyclic verification is performed starting from the first constraint and all conflicting constraints are found.

9. The coal allocation system for steel enterprises based on particle swarm algorithm according to claim 6, characterized in that: In the module M3: Design test function: def judge_solution_exist(e1,f1); Judge whether the current overall constraint is reasonable success = judge_solution_exist (e1 = Y, f1 = M); After the model returns unreasonable constraints and the corresponding front-end coordinates, modify them and re-verify whether the constraints are reasonable; Unreasonable constraints include: whether there is a conflict between the resource quantity and production target of each type of coal, the upper and lower limits of the allocation percentage of each type of coal, the upper and lower limits of the percentage of the trait source dimension, and whether there is a conflict between the upper and lower limits of the final coal quality; if there is a conflict and there is no optimal solution, the constraints are unreasonable and need to be modified.

10. The coal allocation system for steel enterprises based on particle swarm algorithm according to claim 6, characterized in that: In the module M4: The model constructs the initial particle position information in the feasible domain according to the configured information, and uses the particle swarm algorithm to output multiple sets of solution results: design multiple initial particle construction functions def build_chushi, construct the initial position, and randomly select the initial particle position of this time; in the first iteration, select the best particle among the current particles as the global optimal position. The historical optimal position of each particle at this time is itself, and the whole moves to the global optimal position. After the movement, it is judged whether the position of the particle exceeds the boundary and whether it does not meet the current constraints. Adjustments are made, and all historical positions of all particles that meet the conditions are re-judged to find a new global optimal position; in each subsequent iteration, the direction is adjusted according to the historical optimal position of the current particle and the global historical optimal position, and the optimal position is continuously iterated; Module M4.1: Construct the initial position of the particle swarm and construct a preset number of particles in the feasible domain; Module M4.2: Construct the particle swarm dimension and reduce the particle swarm dimension according to whether there is an equality constraint; Module M4.3: Construct other parameters of particle swarm, including boundary, maximum particle velocity, inertia factor and learning factor; Module M4.4: Use the particle swarm algorithm to output the optimization plan. By iterating the particle swarm algorithm, the optimal position of each particle is output, and the corresponding results are sorted before outputting the plan. Each particle changes its direction of movement according to the historical optimal point and the optimal point of the global particle, restricts its movement when it touches the boundary or does not meet the constraints, stops when the optimal solution is found or the maximum number of iterations is reached, and outputs the optimal solution of all particles globally at this time.

Citation Information

Patent Citations

  • Automatic coal blending method and system

    CN116307245A