Data processing method, device and equipment for crude oil selection, purchase and production scheduling, and storage medium
By relaxing the 0-1 variables into p-norm constraint equations, generating the objective function, and solving iteratively, the problem of model oscillation and non-convergence in crude oil selection of the planning and scheduling software package is solved, achieving faster model convergence and more accurate crude oil selection results.
Patent Information
- Application Number
- CN202210986472.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-17
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-08-17
AI Technical Summary
Existing planning and scheduling software packages are prone to model oscillations and non-convergence when optimizing or solving crude oil procurement models, resulting in unreasonable crude oil procurement results and causing refinery profit losses.
The integer constraint equations with 0-1 variables are relaxed into p-norm constraint equations, and the objective function is generated by combining crude oil purchase and production scheduling parameters. The convergence speed of the model is accelerated by iterative solution, thus solving the problem of model oscillation and non-convergence.
It accelerated the model convergence speed, improved the accuracy of crude oil selection results, solved the problem of model oscillation and non-convergence, and improved the quality of understanding.
Smart Images

Figure CN117634122B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of crude oil processing and data processing, and in particular to a data processing method, apparatus, equipment and storage medium for crude oil selection and production scheduling. Background Technology
[0002] The external environment of the crude oil supply chain network is fraught with uncertainties, such as the political and economic instability of oil-producing countries, natural and security risks in maritime transport, inter-state competition, and price fluctuations. Different crude oils have different properties and prices. Blending several crude oils from a pool in specific proportions to ensure the composition and properties of the blend meet the requirements of certain production and processing techniques not only greatly enhances the stability and diversity of crude oil sources but is also an important means of improving production efficiency.
[0003] At present, when making decisions on the types of crude oil to be purchased and how to arrange production plans, refineries often use existing planning and scheduling software packages to optimize the purchase of single crude oil types or the blending of crude oil. However, when performing model optimization or solving, planning and scheduling software packages are prone to model oscillations and non-convergence, and the crude oil purchase results they provide are unreasonable, resulting in losses in refinery profits. Summary of the Invention
[0004] This application provides a data processing method, apparatus, equipment, and storage medium for crude oil procurement and scheduling, which solves the technical problem that the planning and scheduling software package is prone to model oscillation and non-convergence when performing model optimization or solving, resulting in unreasonable crude oil procurement results.
[0005] Firstly, this application provides a data processing method for crude oil procurement and production scheduling, including:
[0006] Obtain crude oil procurement and production scheduling parameters, corresponding data, and procurement and production scheduling constraints; the procurement and production scheduling constraints include constraints that limit the upper limit of crude oil procurement types and other constraints.
[0007] Based on the constraint of limiting the upper limit of crude oil procurement types, generate integer constraint equations with 0-1 variables;
[0008] By relaxing the integer constraint equations with respect to 0-1 variables, we obtain the corresponding constraint equations with respect to the p-norm.
[0009] Based on the crude oil purchase and production scheduling parameters, Lagrange multipliers, and constraint equations regarding the p-norm, the objective function in the crude oil purchase and production scheduling model is generated.
[0010] Based on other constraints, generate a set of constraint equations for the crude oil procurement and production scheduling model;
[0011] Based on the data corresponding to the crude oil procurement and production scheduling parameters, the crude oil procurement and production scheduling model is iteratively solved to obtain the crude oil procurement and production scheduling results.
[0012] Optionally, based on the data corresponding to the crude oil procurement and production scheduling parameters, the crude oil procurement and production scheduling model is iteratively solved to obtain the crude oil procurement and production scheduling results, specifically including:
[0013] Based on the Lagrange multiplier values corresponding to the current iteration number and the data corresponding to the crude oil procurement and production scheduling parameters, the optimal solution of the crude oil procurement and production scheduling model corresponding to the current iteration number is obtained. When the actual relaxation error corresponding to the optimal solution is greater than or equal to the preset allowable error, the Lagrange multiplier values corresponding to the next iteration number are calculated to obtain the optimal solution for the next iteration number, until the actual relaxation error is less than the preset allowable error. The optimal solution includes the target crude oil procurement set.
[0014] The optimal solution obtained in the last iteration is determined as the crude oil procurement and production scheduling result.
[0015] Optionally, the optimal solution also includes the procurement identifiers of all available crude oil; when the actual relaxation error corresponding to the optimal solution is greater than or equal to the preset allowable error, the Lagrange multiplier value corresponding to the next iteration number is calculated, specifically including:
[0016] Calculate the actual relaxation error based on the procurement identifiers of all available crude oil;
[0017] Based on the Lagrange multiplier values corresponding to the current iteration number, the update step size, the actual relaxation error, the preset tolerance error, and the Lagrange operator update formula, calculate the Lagrange multiplier values corresponding to the next iteration number; where, when the current iteration number is the k-th iteration, the Lagrange operator update formula specifically includes:
[0018]
[0019] Where, λ k-1 λ represents the value of the Lagrange multipliers used in the k-th iteration, i.e., the value of the Lagrange multipliers corresponding to the current iteration number; k The value of the Lagrange multiplier applied in the (k+1)th iteration is represented by the value of the Lagrange multiplier corresponding to the next iteration number; ∈′ represents the actual relaxation error corresponding to the kth iteration; ∈ represents the preset tolerance error; M k-1 This represents the update step size applied during the k-th iteration.
[0020] Optionally, the actual relaxation error is calculated based on the procurement identifiers of all available crude oil, specifically including:
[0021] Based on the procurement identifiers of all available crude oil and the relaxation actual error calculation formula, the relaxation actual error is calculated; where, when the current iteration number is k-th, the relaxation actual error calculation formula specifically includes:
[0022]
[0023] Where ∈′ represents the actual relaxation error, and o represents any crude oil in the set of crude oils available for purchase. This represents the purchase identifier for any crude oil during the k-th iteration.
[0024] Optionally, when calculating the Lagrange multiplier values corresponding to the next iteration number, the method further includes:
[0025] Based on the next iteration number, the initial update step size, and the update step size update formula, calculate the update step size corresponding to the next iteration number; where, when the next iteration number is the k-th iteration, the update step size update formula specifically includes:
[0026] M k =M 0 / k,
[0027] Among them, M k M represents the update step size applied during the k-th iteration; 0 This represents the initial update step size; k represents the iteration number, i.e., the next iteration number.
[0028] Optionally, based on the constraint of limiting the upper limit of crude oil procurement types, integer constraint equations with 0-1 variables are generated, specifically including:
[0029] Based on the procurement identifier of any crude oil in the available crude oil set and the upper limit of crude oil procurement type, generate an integer constraint equation with 0-1 variables; specifically, the integer constraint equation with 0-1 variables includes:
[0030]
[0031] Where O represents the set of crude oils available for purchase; o represents any crude oil in the set O; B o B represents the discrete identifier for the purchase of crude oil o. o ∈{0,1}; Q represents the upper limit of all types of crude oil that can be purchased.
[0032] Optionally, a relaxation operation is performed on the integer constraint equations with respect to 0-1 variables to obtain the corresponding constraint equations with respect to the p-norm, specifically including:
[0033] Relax the integer constraint equations about 0-1 variables into a continuous space to generate constraint equations corresponding to the relaxed variables in the form of p-norm;
[0034] The constraint equations specifically include:
[0035] ||B|| p -Q≤0,
[0036] Where O represents the set of crude oils available for purchase; o represents any crude oil in the set O. The p-th power represents the discrete identifier of crude oil o; Q represents the upper limit of all crude oil procurement types; ||B|| p Let B be the p-norm of B. o The relaxed variable p is relaxed to the continuous space [0, 1], and takes the value [1, ∞).
[0037] Optionally, based on the crude oil procurement and production scheduling parameters, Lagrange multipliers, and constraint equations regarding the p-norm, the objective function in the crude oil procurement and production scheduling model is generated, specifically including:
[0038] Based on the crude oil purchase and production scheduling parameters, the original objective function is generated; the crude oil purchase and production scheduling parameters include: sales revenue of products or utilities, procurement costs of raw materials or utilities, inventory change value, and equipment processing costs;
[0039] The objective function in the crude oil procurement and production scheduling model is obtained by adding the product of the Lagrange multipliers and the constraint equations with respect to the p-norm to the original objective function.
[0040] The objective function specifically includes:
[0041]
[0042]
[0043] in, Let J represent the sales revenue of products and / or utilities, J represent the set of products and / or utilities, j represent any product or utility in set J, and β represent the sales revenue of products and / or utilities. j W represents the selling price of any product or utility j. j sel This represents the sales volume of any product or utility j. Let I represent the cost of raw materials and / or utilities, where I represents the set of raw materials and / or utilities, and i represents any raw material or utility in set I. i W represents the procurement cost corresponding to any raw material or utility i. i buyThis represents the raw material purchase quantity corresponding to any raw material or utility project i; Let ξ represent the change in inventory value, S represent the set of inventory items, s represent any inventory item in the set S, and ξ represent the change in inventory value. s W represents the inventory value corresponding to any inventory material s. s inv This represents the change in inventory corresponding to any inventory item s; Let T represent the set of processing devices, t represent any processing device in the set T, and μ represent the processing cost of the device. t This represents the unit processing energy consumption of any processing device t. t represents the processing capacity of any processing unit t; O represents the set of crude oils available for purchase; o represents any crude oil in the set of crude oils O; represents the p-th power of the consecutive identifier for any crude oil o; Q represents the upper limit of all crude oil purchase types; ||B|| p Let B be the p-norm of B. o Relaxed variables are relaxed to the continuous space [0, 1].
[0044] In the above technical solution, the electronic device relaxes the 0-1 variables to a continuous space and rewrites the integer constraints on the 0-1 variables into the original objective function in the form of a p-norm Lagrange relaxation, thereby obtaining a Lagrange relaxation nonlinear programming (LR-NLP) problem. Due to the concave nature of the p-norm, the values in the obtained solution will naturally be close to 0 or 1, simplifying the model and reducing the comparison cost. The p-norm form accelerates the differentiation of integers towards the [0,1] boundary, thus accelerating the model convergence speed. Simultaneously, by solving large-scale mixed-integer nonlinear problems, the search range is expanded, improving the quality of the solution. Furthermore, the nonlinear variables of the model are preserved during the solution process, accelerating the model convergence speed and solving the model oscillation problem.
[0045] Secondly, this application provides a data processing device for crude oil procurement and production scheduling, comprising:
[0046] The acquisition module is used to obtain crude oil procurement and production scheduling parameters, the corresponding data for crude oil procurement and production scheduling parameters, and procurement and production scheduling constraints; the procurement and production scheduling constraints include constraints that limit the upper limit of crude oil procurement types and other constraints.
[0047] The processing module is used to generate integer constraint equations with 0-1 variables based on the constraint condition of limiting the upper limit of crude oil procurement types;
[0048] The processing module is also used to relax the integer constraint equations about 0-1 variables to obtain the corresponding constraint equations about the p-norm.
[0049] The processing module is also used to generate the objective function in the crude oil purchase and production scheduling model based on crude oil purchase and production scheduling parameters, Lagrange multipliers, and constraint equations about the p-norm;
[0050] The processing module is also used to generate a set of constraint equations for the crude oil procurement and production scheduling model based on other constraints.
[0051] The processing module is also used to iteratively solve the crude oil procurement and production scheduling model based on the data corresponding to the crude oil procurement and production scheduling parameters, and obtain the crude oil procurement and production scheduling results.
[0052] Thirdly, this application provides an electronic device, including: a processor and a memory communicatively connected to the processor;
[0053] The memory stores instructions that the computer executes;
[0054] The processor is used to implement the data processing method for crude oil procurement and production scheduling involved in the first aspect when executing computer execution instructions.
[0055] Fourthly, this application provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, are used to implement the data processing method for crude oil selection and production scheduling involved in the first aspect.
[0056] This application provides a data processing method, apparatus, equipment, and storage medium for crude oil procurement and scheduling. The electronic device obtains crude oil procurement and scheduling parameters, corresponding data, and constraints. Based on the constraint limiting the upper limit of crude oil procurement types, it generates integer constraint equations with 0-1 variables. After relaxing these integer constraint equations, it obtains corresponding constraint equations with p-norm. Then, based on the crude oil procurement and scheduling parameters, Lagrange multipliers, and the constraint equations with p-norm, it generates the objective function in the crude oil procurement and scheduling model. Combining the constraint equations of the crude oil procurement and scheduling model generated based on other constraints and the corresponding data, it iteratively solves the crude oil procurement and scheduling model to obtain the crude oil procurement and scheduling results. This accelerates the model convergence speed, solves the model oscillation and non-convergence problem, and improves the accuracy of solving the crude oil procurement results. Attached Figure Description
[0057] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0058] Figure 1 This is a flowchart illustrating a data processing method for crude oil procurement and production scheduling provided in an exemplary embodiment of this application;
[0059] Figure 2 This is a schematic diagram of the solution process for the crude oil procurement and production scheduling model provided in this application according to an exemplary embodiment;
[0060] Figure 3 This is a schematic diagram illustrating the solution process of the crude oil procurement and production scheduling model provided in this application according to another exemplary embodiment;
[0061] Figure 4 This is a schematic diagram of the data processing device for crude oil procurement and production scheduling provided in an embodiment of this application;
[0062] Figure 5 This application provides a schematic diagram of the structure of an electronic device according to an embodiment.
[0063] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0064] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0065] In the domestic crude oil procurement process, linear programming techniques are used to establish an optimization model for crude oil procurement and production scheduling. By comprehensively considering the impact of crude oil properties on plant load, yield, product quality, and product structure, the model effectively improves the accuracy of crude oil selection and provides quantitative indicators for crude oil selection.
[0066] The optimization model for domestic crude oil procurement and production scheduling can be applied to both single-oil-type procurement optimization and crude oil blending optimization. In single-oil-type procurement optimization, the adaptability of crude oil processing can be assessed by creating multiple cases within the scheduling software package to evaluate the impact of changes in the quantity of a single oil type on the overall plant efficiency. However, since creating multiple cases requires considering the consistency of the entire plant's processing settings, the operation of the scheduling software package is quite cumbersome. In crude oil blending optimization, the scheduling software package can optimize blending by relaxing various upper and lower limits on crude oil procurement and setting a constraint on the total crude oil processing volume. During the optimization solution process, initial guesses of the physical properties of each side of the crude oil and the properties of blended products need to be given for distributed recursive solution. When there are many recursive calculations of physical properties across the entire plant, unreasonable initial guesses of physical properties, and many property transfer structures, this linear programming solution algorithm is prone to getting trapped in local optima, resulting in loss of efficiency. The software scheduling package supports solving integer constraints and type upper limit constraints for crude oil procurement during the crude oil blending optimization process. It adopts a mixed integer programming algorithm, which first solves the linear programming model of the objective problem to obtain initial guesses of the relevant material quantities and properties. The material quantities and properties are then substituted into the mixed integer programming problem and solved using a branch and bound algorithm. However, in practical applications, when there are many constraints on the quantity and type of crude oil procurement, high nonlinearity, and large variable solution scale in the model, it is easy to fall into a situation of computational oscillation and non-convergence. This results in the crude oil quantity in the crude oil blending optimization result exceeding the upper limit of the procurement type constraint, which cannot meet the actual processing needs and causes a loss of benefits.
[0067] This application provides a data processing method, apparatus, equipment, and storage medium for crude oil procurement and scheduling, aiming to solve the technical problem that planning and scheduling software packages easily fall into model oscillation and non-convergence during model optimization or solution, resulting in unreasonable crude oil procurement results. The technical concept of this application is: relaxing the constraint equation limiting the upper limit of crude oil procurement types—an integer constraint equation about 0-1 variables—into a corresponding constraint equation about the p-norm; combining this with the original procurement and scheduling parameters to generate the objective function of the crude oil procurement and scheduling model; and iteratively solving the constraint equations corresponding to other procurement and scheduling constraints to obtain the original procurement and scheduling results. This accelerates the model convergence speed, solves the model oscillation and non-convergence problem, and improves the accuracy of the crude oil procurement results.
[0068] Figure 1 This application provides a flowchart illustrating a data processing method for crude oil procurement and production scheduling according to an exemplary embodiment, as follows: Figure 1 As shown, the method includes:
[0069] S101. Electronic equipment obtains crude oil purchase and production scheduling parameters, corresponding data and purchase and production scheduling constraints.
[0070] The crude oil purchase and production scheduling parameters are those related to the crude oil purchase and production scheduling model, including relevant parameters of refinery units related to crude oil purchase and production scheduling, as well as parameters related to financial attributes in the crude oil purchase and production scheduling process.
[0071] The refinery unit is a physical model constructed based on the various units within the refinery, which describes the logical relationships during unit operation. In one embodiment, this model can be based on the atmospheric and vacuum distillation unit, the secondary processing unit, the oil blending model, or the inventory model. Parameters related to the aforementioned refinery unit include: input and output material properties, input-output yields, and oil blending index parameters. Conversely, the data corresponding to the crude oil procurement and production scheduling parameters includes the data corresponding to the aforementioned parameters, including: input and output material properties, input-output yield data, and oil blending index data. This data can be data obtained by electronic equipment from its input units or data generated based on locally stored evaluation data.
[0072] Parameters related to financial attributes in the crude oil procurement and production scheduling process include, but are not limited to: raw material procurement parameters, product sales parameters, utility procurement and sales parameters, and beginning and ending inventory parameters. In practical applications, parameters related to financial attributes can be one or more of the above parameters, or other parameters.
[0073] The production scheduling constraints are conditions that limit the range of values for some or all of the crude oil production scheduling parameters mentioned above. These constraints include those limiting the upper limit of the types of crude oil to be purchased, and other constraints.
[0074] Other constraints include, but are not limited to: upper and lower limits of unit processing capacity, physical property protection conditions, crude oil selection range constraints, total crude oil processing volume constraints, and product sales type constraints. Among these, the physical property protection conditions define the tolerance range to prevent corrosion of the unit. Corrosive impurities such as sulfur and acids cause high-temperature sulfur and naphthenic acid corrosion on the unit materials at high temperatures. Corrosion intensifies with increasing temperature. Low-temperature areas of the unit may also experience corrosion caused by wet hydrogen sulfide. Corrosion in low-temperature areas can be protected and mitigated through process corrosion prevention measures. High-temperature sulfur and naphthenic acids corrode specific parts of the unit. For atmospheric and vacuum distillation units, the impact of crude oil sulfur content, acid value, salt content, and heavy metal content on the unit should be considered. For secondary processing units, such as catalytic cracking, coking, and hydrocracking, the impact of organochlorines, sulfur content, feedstock acid value, nitrogen oxides, and heavy metal content on the unit should be considered.
[0075] S102. The electronic equipment generates integer constraint equations about 0-1 variables based on the constraint condition of limiting the upper limit of crude oil procurement types.
[0076] In the crude oil procurement and production scheduling process, at least one type of crude oil resource is available for procurement. For each type of crude oil, its procureability can be indicated using 0 or 1. In one embodiment, 0 indicates that the crude oil of that type is not selected, and 1 indicates that the crude oil of that type is selected. The electronic device can construct integer constraint equations related to the identifiers of each selectable crude oil resource based on the constraint of the upper limit of crude oil procurement types.
[0077] More specifically, the electronic device generates an integer constraint equation with 0-1 variables based on the procurement identifier of any crude oil in the existing set of available crude oil and the upper limit of the crude oil procurement type; wherein, the integer constraint equation with 0-1 variables specifically includes:
[0078]
[0079] Where O represents the set of crude oils available for purchase; o represents any crude oil in the set O; B o B represents the discrete identifier for the purchase of crude oil o. o ∈{0,1}; Q represents the upper limit of all types of crude oil that can be purchased.
[0080] S103. The electronic device performs a relaxation operation on the integer constraint equations about 0-1 variables to obtain the corresponding constraint equations about the p-norm.
[0081] The electronic device performs a relaxation operation on the equation (1) generated in step S102, relaxing it to a continuous space, and generating constraint equations corresponding to the relaxation variables in the form of p-norm.
[0082] The constraint equations specifically include:
[0083]
[0084] Where O represents the set of crude oils available for purchase; o represents any crude oil in the set O. The p-th power represents the discrete identifier of crude oil o; Q represents the upper limit of all crude oil procurement types; ||B|| p Let B be the p-norm of B. o The relaxed variable p is relaxed to the continuous space [0, 1], and takes the value [1, ∞).
[0085] S104. The electronic equipment generates the objective function in the crude oil procurement and production scheduling model based on the crude oil procurement and production scheduling parameters, Lagrange multipliers, and constraint equations about the p-norm.
[0086] The electronic device generates the original objective function in the crude oil procurement and production scheduling based on the crude oil procurement and production scheduling parameters, and adds the original objective function to the product of the Lagrange multiplier λ and the constraint equation about the p-norm obtained in step S103 to generate the objective function in the crude oil procurement and production scheduling model.
[0087] More specifically, the electronic equipment generates the original objective function for crude oil procurement and production scheduling based on the sales volume of at least one product and / or utility and its corresponding sales price, the purchase volume of at least one raw material and / or utility and its corresponding purchase cost, the change in inventory and its corresponding inventory value, and at least one processing device and its corresponding processing energy consumption.
[0088] More specifically, the original objective function includes:
[0089]
[0090] Where Max:Obj1 indicates that the objective of solving the crude oil procurement and production scheduling model is to maximize profits; Let J represent the sales revenue of products and / or utilities, J represent the set of products and / or utilities, j represent any product or utility in set J, and β represent the sales revenue of products and / or utilities. j W represents the selling price of any product or utility j. j sel This represents the sales volume of any product or utility j. Let I represent the cost of raw materials and / or utilities, where I represents the set of raw materials and / or utilities, and i represents any raw material or utility in set I. i W represents the procurement cost corresponding to any raw material or utility i. i buy This represents the raw material purchase quantity corresponding to any raw material or utility project i; Let ξ represent the change in inventory value, S represent the set of inventory items, s represent any inventory item in the set S, and ξ represent the change in inventory value. s W represents the inventory value corresponding to any inventory material s. s inv This represents the change in inventory corresponding to any inventory item s; Let T represent the set of processing devices, t represent any processing device in the set T, and μ represent the processing cost of the device. t This represents the unit processing energy consumption of any processing device t. This represents the processing quantity of any processing device t.
[0091] Conversely, the objective function is:
[0092]
[0093]
[0094] Where O represents the set of crude oils available for purchase; o represents any crude oil in the set O. represents the p-th power of the consecutive identifier for any crude oil o; Q represents the upper limit of all crude oil purchase types; ||B|| p Let B be the p-norm of B. o Relaxed variables are relaxed to the continuous space [0, 1].
[0095] S105. Electronic equipment generates a set of constraint equations for the crude oil procurement and production scheduling model based on other constraints.
[0096] In one embodiment, other constraints include: component quantity constraints, property blending constraints, and upper and lower limits on purchase quantities related to crude oil procurement.
[0097] The electronic device generates corresponding constraint equations based on the above constraints, and integrates all constraint equations to obtain a set of constraint equations.
[0098] More specifically, the component quantity constraint equation generated by the electronic device based on the component quantity constraint condition is a linear constraint equation with respect to continuous variables, which includes:
[0099]
[0100] in, γ represents the component content of product m produced by the refinery. n This represents the component coefficient of feed n used in refinery processing, where n is an element in the feed set N used to generate product m. This represents the amount of component corresponding to feed n; where the feed set N is a subset of the set I of raw materials and / or utilities.
[0101] The harmonic constraint equations generated by the electronic device based on the harmonic constraint conditions are nonlinear constraints on continuous variables. These harmonic constraint equations include:
[0102]
[0103] in, This represents the physical property value of product m. This represents the physical property value of the feed n.
[0104] The electronic device generates purchase limit constraint equations based on the purchase quantity limits related to crude oil procurement. These equations are mixed-integer linear constraints involving continuous variables and 0-1 variables, and include:
[0105]
[0106] Where o is an element of the set O of crude oil available for purchase. B is a continuous variable, representing the crude oil purchase variable; oThe variable is 0-1, representing whether crude oil o is purchased. If B o A value of 1 indicates that crude oil is available for purchase. There are upper and lower bound constraints, otherwise =0; This indicates the lower limit constraint on the purchase volume of crude oil o. This indicates the upper limit constraint on the purchase volume of crude oil.
[0107] S106. The electronic equipment iteratively solves the crude oil procurement and production scheduling model based on the data corresponding to the crude oil procurement and production scheduling parameters, and obtains the crude oil procurement and production scheduling results.
[0108] The crude oil procurement and production scheduling model includes the objective function corresponding to equation (4) and the constraint equations consisting of equations (5) to (7).
[0109] The electronic device obtains the corresponding data based on the parameters involved in the crude oil procurement and production scheduling model, such as the parameters involved in equations (4) to (7), and substitutes the data into the objective function and constraint equations in the crude oil procurement and production scheduling model to solve for the optimal solution, so as to obtain the crude oil procurement and production scheduling model.
[0110] More specifically, the pseudocode for solving the original purchasing and production scheduling model is as follows, and its corresponding flowchart is as follows. Figure 2 As shown:
[0111] Step 1: Given an initial λ 0 M 0 Let k = 1;
[0112] Step 2: Solve the Lagrange relaxation nonlinear programming (LR-NLP) problem corresponding to the crude oil purchase and production scheduling model;
[0113] Step 3: Calculate the error caused by slack in the 0-1 variable.
[0114] if∈′<∈:
[0115] Update complete;
[0116] else:
[0117] Update the parameters, let k = k + 1, M k =M 0 / k;
[0118] Return to Step 2
[0119] In the above iterative solution process, the convergence condition is independent of the objective function; the main requirement is that the slack variables are stable.
[0120] More specifically, the solution process for the crude oil procurement and production scheduling model is as follows: Figure 3 As shown, steps S201 to S206 are included:
[0121] When the electronic device iteratively solves the crude oil procurement and production scheduling model, it needs to initialize the Lagrange multipliers and update the step size before proceeding to step S201.
[0122] S201. The electronic device solves for the optimal solution of the crude oil purchase and production scheduling model corresponding to the current iteration number based on the Lagrange multiplier value corresponding to the current iteration number and the data corresponding to the crude oil purchase and production scheduling parameters.
[0123] The number of iterations corresponds to different values of the Lagrange multipliers, and the crude oil procurement and production scheduling models that include the Lagrange multiplier values corresponding to each iteration number are also different.
[0124] The electronic device solves the crude oil procurement and production scheduling model corresponding to each iteration number. The solution of this model is a Lagrange relaxation nonlinear programming (LR-NLP) problem, which is existing technology and will not be elaborated here.
[0125] S202, The actual relaxation error of the electronic device in calculating the optimal solution.
[0126] The optimal solution includes the target set of crude oil to be purchased and the purchase identifiers of the crude oil available for purchase.
[0127] The electronic device calculates the actual relaxation error based on the optimal solution. When the current iteration number is k, the specific formula for calculating the actual relaxation error includes:
[0128]
[0129] Where k is a positive integer, ∈′ represents the relaxation error, and o represents any crude oil in the set of crude oils available for purchase. This represents the purchase identifier for any crude oil during the k-th iteration.
[0130] S203. The actual slack error of the electronic device is compared with the preset allowable error.
[0131] The preset tolerance error is the maximum error that the electronic device can tolerate when solving the optimal solution of the above crude oil selection and production scheduling model. This preset tolerance error is used to limit the purchase identifier of each crude oil to be infinitely close to 0 or infinitely close to 1, so as to determine whether each crude oil should be purchased.
[0132] If the actual relaxation error is greater than or equal to the preset allowable error, proceed to step S204; otherwise, proceed to step S206.
[0133] S204. The electronic device calculates the update step size value corresponding to the next iteration number based on the next iteration number, the initial update step size value, and the update step size update formula.
[0134] Specifically, when the next iteration number is the k-th iteration, the update step size update formula includes:
[0135] M k =M 0 / k, (9)
[0136] Among them, M k M represents the update step size applied during the k-th iteration; 0 This represents the initial update step size; k represents the iteration number, i.e., the next iteration number.
[0137] S205. The electronic device calculates the Lagrange multiplier value corresponding to the next iteration number based on the Lagrange multiplier value corresponding to the current iteration number, the update step size value, the actual relaxation error, the preset allowable error, and the Lagrange operator update formula.
[0138] Specifically, when the current iteration number is the k-th iteration, the Lagrange operator update formula includes:
[0139]
[0140] Where, λ k-1 λ represents the value of the Lagrange multipliers used in the k-th iteration, i.e., the value of the Lagrange multipliers corresponding to the current iteration number; k The value of the Lagrange multiplier applied in the (k+1)th iteration is represented by the value of the Lagrange multiplier corresponding to the next iteration number; ∈′ represents the actual relaxation error corresponding to the kth iteration; ∈ represents the preset tolerance error; M k-1 This represents the update step size applied during the k-th iteration.
[0141] After the current step is completed, proceed to step S201 to solve for the optimal solution of the crude oil procurement and production scheduling model corresponding to the next iteration number.
[0142] S206, Electronic equipment obtains crude oil procurement and production schedule results.
[0143] The optimal solution obtained in step S201 is determined as the final crude oil procurement and production schedule.
[0144] The following will explain the process of finding the optimal solution of the crude oil production scheduling model through specific examples:
[0145] The optimization scenario of the crude oil procurement and production scheduling model involves selecting no more than four types of crude oil from ten for processing. A refinery model including atmospheric and vacuum distillation units and secondary processing units is established in an electronic system. Upper and lower limits are set for the ten types of crude oil, the upper limit constraint for the number of crude oil procurement types is set to four, and other model parameters and corresponding data, such as total crude oil processing volume constraints, product sales type constraints, and unit processing capacity constraints, are input. From this, the electronic system obtains the corresponding model parameters and constraints. Based on the constraint of four crude oil procurement types, the electronic system generates integer constraint equations about 0-1 variables, relaxes them to continuous space, and obtains constraint equations about the p-norm. Based on the above parameters and the constraint equations about the p-norm, the electronic system generates the objective function of the crude oil procurement and production scheduling model, and then generates the corresponding set of constraint equations based on other constraints. The electronic device iteratively solves the crude oil procurement and production scheduling model based on the above constraint equations and objective function to obtain the crude oil procurement and production scheduling results. The optimized crude oil procurement and production scheduling results are one of the four result types: "processing only 1 type of crude oil, blending 2 types of crude oil, blending 3 types of crude oil, and blending 4 types of crude oil". If the result is the type of blended crude oil, the specific crude oil type, blending ratio, blending quantity and other parameters can be determined.
[0146] In the above technical solution, the electronic device relaxes the 0-1 variables to a continuous space and rewrites the integer constraints on the 0-1 variables into the original objective function in the form of a p-norm Lagrange relaxation, thereby obtaining a Lagrange relaxation nonlinear programming (LR-NLP) problem. Due to the concave nature of the p-norm, the values in the obtained solution will naturally be close to 0 or 1, simplifying the model and reducing the cost of comparison. The p-norm form accelerates the differentiation of integers towards the [0,1] boundary, thus accelerating the model convergence speed. Simultaneously, by solving large-scale mixed-integer nonlinear problems, the search range is expanded, and the quality of the solution is improved. The nonlinear variables of the model (e.g., the harmonic constraint equations of physical properties) are preserved during the solution process, accelerating the model convergence speed and solving the model oscillation problem.
[0147] Figure 4 This is a schematic diagram of a data processing device for crude oil procurement and production scheduling according to an embodiment of this application. The data processing device 300 for crude oil procurement and production scheduling includes an acquisition unit 301 and a processing unit 302, wherein...
[0148] The acquisition unit 301 is used to obtain crude oil purchase and production scheduling parameters, the corresponding data of crude oil purchase and production scheduling parameters, and purchase and production scheduling constraints; the purchase and production scheduling constraints include constraints that limit the upper limit of crude oil purchase types and other constraints.
[0149] Processing unit 302 is used to generate integer constraint equations about 0-1 variables based on the constraint condition of limiting the upper limit of crude oil procurement types.
[0150] The processing unit 302 is also used to perform relaxation operations on the integer constraint equations with respect to 0-1 variables to obtain the corresponding constraint equations with respect to the p-norm.
[0151] The processing unit 302 is also used to generate the objective function in the crude oil purchase and production scheduling model based on the crude oil purchase and production scheduling parameters, Lagrange multipliers, and constraint equations about the p-norm.
[0152] The processing module 302 is also used to generate a set of constraint equations for the crude oil procurement and production scheduling model based on other constraints.
[0153] The processing module 302 is also used to iteratively solve the crude oil procurement and production scheduling model based on the data corresponding to the crude oil procurement and production scheduling parameters, and obtain the crude oil procurement and production scheduling results.
[0154] In one embodiment, the processing module 302 is specifically used for:
[0155] Based on the Lagrange multiplier values corresponding to the current iteration number and the data corresponding to the crude oil procurement and production scheduling parameters, the optimal solution of the crude oil procurement and production scheduling model corresponding to the current iteration number is obtained. When the actual relaxation error corresponding to the optimal solution is greater than or equal to the preset allowable error, the Lagrange multiplier values corresponding to the next iteration number are calculated to obtain the optimal solution for the next iteration number, until the actual relaxation error is less than the preset allowable error. The optimal solution includes the target crude oil procurement set.
[0156] The optimal solution obtained in the last iteration is determined as the crude oil procurement and production scheduling result.
[0157] In one embodiment, the processing module 302 is specifically used for:
[0158] Calculate the actual relaxation error based on the procurement identifiers of all available crude oil;
[0159] Based on the Lagrange multiplier values corresponding to the current iteration number, the update step size, the actual relaxation error, the preset tolerance error, and the Lagrange operator update formula, calculate the Lagrange multiplier values corresponding to the next iteration number; where, when the current iteration number is the k-th iteration, the Lagrange operator update formula specifically includes:
[0160]
[0161] Where, λ k-1 λ represents the value of the Lagrange multipliers used in the k-th iteration, i.e., the value of the Lagrange multipliers corresponding to the current iteration number; kThe value of the Lagrange multiplier applied in the (k+1)th iteration is represented by the value of the Lagrange multiplier corresponding to the next iteration number; ∈′ represents the actual relaxation error corresponding to the kth iteration; ∈ represents the preset tolerance error; M k-1 This represents the update step size applied during the k-th iteration.
[0162] In one embodiment, the processing module 302 is specifically used for:
[0163] Based on the procurement identifiers of all available crude oil and the relaxation actual error calculation formula, the relaxation actual error is calculated; where, when the current iteration number is k-th, the relaxation actual error calculation formula specifically includes:
[0164]
[0165] Where ∈′ represents the actual relaxation error, and o represents any crude oil in the set of crude oils available for purchase. This represents the purchase identifier for any crude oil during the k-th iteration.
[0166] In one embodiment, the processing module 302 is specifically used for:
[0167] Based on the next iteration number, the initial update step size, and the update step size update formula, calculate the update step size corresponding to the next iteration number; where, when the next iteration number is the k-th iteration, the update step size update formula specifically includes:
[0168] M k =M 0 / k,
[0169] Among them, M k M represents the update step size applied during the k-th iteration; 0 This represents the initial update step size; k represents the iteration number, i.e., the next iteration number.
[0170] In one embodiment, the processing module 302 is specifically used for:
[0171] Based on the procurement identifier of any crude oil in the available crude oil set and the upper limit of crude oil procurement type, generate an integer constraint equation with 0-1 variables; specifically, the integer constraint equation with 0-1 variables includes:
[0172]
[0173] Where O represents the set of crude oils available for purchase; o represents any crude oil in the set O; B o Q represents the discrete identifier for the purchase of crude oil o; Q represents the upper limit for the purchase of all types of crude oil.
[0174] In one embodiment, the processing module 302 is specifically used for:
[0175] Relax the integer constraint equations about 0-1 variables into a continuous space to generate constraint equations corresponding to the relaxed variables in the form of p-norm;
[0176] The constraint equations specifically include:
[0177] ||B|| p -Q≤0,
[0178] Where O represents the set of crude oils available for purchase; o represents any crude oil in the set O. The p-th power represents the discrete identifier of crude oil o; Q represents the upper limit of all crude oil procurement types; ||B|| p Let B be the p-norm of B. o The relaxed variable p is relaxed to the continuous space [0, 1], and takes the value [1, ∞).
[0179] In one embodiment, the processing module 302 is specifically used for:
[0180] Based on the crude oil purchase and production scheduling parameters, the original objective function is generated; the crude oil purchase and production scheduling parameters include: sales revenue of products or utilities, procurement costs of raw materials or utilities, inventory change value, and equipment processing costs;
[0181] The objective function in the crude oil procurement and production scheduling model is obtained by adding the product of the Lagrange multipliers and the constraint equations with respect to the p-norm to the original objective function.
[0182] The objective function specifically includes:
[0183]
[0184]
[0185] in, Let J represent the sales revenue of products and / or utilities, J represent the set of products and / or utilities, j represent any product or utility in set J, and β represent the sales revenue of products and / or utilities. j W represents the selling price of any product or utility j. j sel This represents the sales volume of any product or utility j. Let I represent the cost of raw materials and / or utilities, where I represents the set of raw materials and / or utilities, and i represents any raw material or utility in set I. i W represents the procurement cost corresponding to any raw material or utility i. i buyThis represents the raw material purchase quantity corresponding to any raw material or utility project i; Let ξ represent the change in inventory value, S represent the set of inventory items, s represent any inventory item in the set S, and ξ represent the change in inventory value. s W represents the inventory value corresponding to any inventory material s. s inv This represents the change in inventory corresponding to any inventory item s; Let T represent the set of processing devices, t represent any processing device in the set T, and μ represent the processing cost of the device. t This represents the unit processing energy consumption of any processing device t. t represents the processing capacity of any processing unit t; O represents the set of crude oils available for purchase; o represents any crude oil in the set of crude oils O; represents the p-th power of the consecutive identifier for any crude oil o; Q represents the upper limit of all crude oil purchase types; ||B|| p Let B be the p-norm of B. o Relaxed variables are relaxed to the continuous space [0, 1].
[0186] Figure 5 This application provides a schematic diagram of the structure of an electronic device according to an embodiment. The electronic device 400 includes a memory 401 and a processor 402, wherein the memory 401 stores computer instructions executable by the processor.
[0187] When executing computer instructions, processor 402 implements each step of the crude oil procurement and scheduling data processing method in the above embodiments, which uses electronic devices as the execution entity. For details, please refer to the relevant descriptions in the foregoing method embodiments.
[0188] Optionally, the memory 401 can be either independent or integrated with the processor 402. When the memory 401 is configured independently, the controller 600 also includes a bus for connecting the memory 401 and the processor 402.
[0189] This application also provides a computer-readable storage medium storing computer instructions. When a processor executes the computer instructions, it implements each step of the data processing method for crude oil procurement and production scheduling described above.
[0190] This application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the various steps in the crude oil selection and production scheduling data processing method described above.
[0191] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0192] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A data processing method for crude oil procurement and production scheduling, characterized in that, include: Obtain crude oil procurement and production scheduling parameters, the data corresponding to the crude oil procurement and production scheduling parameters, and procurement and production scheduling constraints; The constraints on the selection and production scheduling include constraints that limit the upper limit of the types of crude oil to be purchased and other constraints. Based on the constraints limiting the upper limit of crude oil procurement types, generate integer constraint equations with 0-1 variables; Relaxation operations are performed on the integer constraint equations with respect to 0-1 variables to obtain the corresponding constraint equations with respect to the p-norm; Based on the crude oil procurement and production scheduling parameters, Lagrange multipliers, and the constraint equations regarding the p-norm, the objective function in the crude oil procurement and production scheduling model is generated. Based on the other constraints, generate the set of constraint equations for the crude oil procurement and production scheduling model; Based on the data corresponding to the crude oil procurement and production scheduling parameters, the crude oil procurement and production scheduling model is iteratively solved to obtain the crude oil procurement and production scheduling results.
2. The method according to claim 1, characterized in that, Based on the data corresponding to the crude oil procurement and production scheduling parameters, the crude oil procurement and production scheduling model is iteratively solved to obtain the crude oil procurement and production scheduling results, specifically including: Based on the Lagrange multiplier values corresponding to the current iteration number and the data corresponding to the crude oil procurement and production scheduling parameters, the optimal solution of the crude oil procurement and production scheduling model corresponding to the current iteration number is solved. When the actual relaxation error corresponding to the optimal solution is greater than or equal to the preset allowable error, the Lagrange multiplier values corresponding to the next iteration number are calculated to solve the optimal solution for the next iteration number, until the actual relaxation error is less than the preset allowable error; the optimal solution includes the target crude oil procurement set. The optimal solution obtained in the last iteration is determined as the crude oil procurement and production scheduling result.
3. The method according to claim 2, characterized in that, The optimal solution also includes the procurement identifiers of all available crude oil; when the actual relaxation error corresponding to the optimal solution is greater than or equal to the preset allowable error, the Lagrange multiplier value corresponding to the next iteration number is calculated, specifically including: The actual relaxation error is calculated based on the procurement identifiers of all available crude oil. Based on the Lagrange multiplier values corresponding to the current iteration number, the update step size, the actual relaxation error, the preset allowable error, and the Lagrange operator update formula, calculate the Lagrange multiplier values corresponding to the next iteration number; wherein, when the current iteration number is the kth iteration, the Lagrange operator update formula specifically includes: Where, λ k-1 λ represents the value of the Lagrange multipliers used in the k-th iteration, i.e., the value of the Lagrange multipliers corresponding to the current iteration number; k The value of the Lagrange multiplier applied in the (k+1)th iteration is represented by the value of the Lagrange multiplier corresponding to the next iteration number; ∈′ represents the actual relaxation error corresponding to the kth iteration; ∈ represents the preset tolerance error; M k -1 This represents the update step size applied during the k-th iteration.
4. The method according to claim 3, characterized in that, The actual relaxation error is calculated based on the procurement identifiers of all available crude oil, specifically including: The relaxation actual error is calculated based on the procurement identifiers of all available crude oil and the relaxation actual error calculation formula; wherein, when the current iteration number is the kth iteration, the relaxation actual error calculation formula specifically includes: Where ∈′ represents the actual relaxation error, and o represents any crude oil in the set of crude oils available for purchase. This represents the purchase identifier for any crude oil during the k-th iteration.
5. The method according to claim 2, characterized in that, When calculating the Lagrange multiplier values corresponding to the next iteration number, the method further includes: Based on the next iteration number, the initial update step size, and the update step size update formula, calculate the update step size corresponding to the next iteration number; wherein, when the next iteration number is the kth iteration, the update step size update formula specifically includes: M k =M 0 / k, Among them, M k M represents the update step size applied during the k-th iteration; 0 The initial update step size is represented by k; k represents the iteration number, i.e., the next iteration number.
6. The method according to claim 1, characterized in that, Based on the constraint condition limiting the upper limit of crude oil procurement types, an integer constraint equation with 0-1 variables is generated, specifically including: Based on the procurement identifier of any crude oil in the available crude oil set and the upper limit of crude oil procurement types, the integer constraint equation regarding 0-1 variables is generated; wherein, the integer constraint equation regarding 0-1 variables specifically includes: Where O represents the set of crude oils available for purchase; o represents any crude oil in the set O; B o B represents the discrete identifier for the purchase of crude oil o. o ∈{0,1}; Q represents the upper limit of all types of crude oil that can be purchased.
7. The method according to claim 1, characterized in that, Relaxing the integer constraint equations concerning 0-1 variables yields the corresponding constraint equations concerning the p-norm, specifically including: The integer constraint equations concerning 0-1 variables are relaxed to a continuous space to generate constraint equations corresponding to the relaxed variables in the form of p-norm. The constraint equations specifically include: Where O represents the set of crude oils available for purchase; o represents any crude oil in the set of crude oils O; The p-th power represents the discrete identifier of crude oil o; Q represents the upper limit of all crude oil procurement types; ||B|| p Let B be the p-norm of B. o The relaxed variable p is relaxed to the continuous space [0, 1], and takes the value [1, ∞).
8. The method according to claim 1, characterized in that, Based on the crude oil procurement and production scheduling parameters, Lagrange multipliers, and the constraint equations regarding the p-norm, the objective function in the crude oil procurement and production scheduling model is generated, specifically including: Based on the crude oil procurement and production scheduling parameters, an original objective function is generated; the crude oil procurement and production scheduling parameters include: sales revenue of products or utilities, procurement costs of raw materials or utilities, inventory change value, and equipment processing costs; The product of the Lagrange multiplier and the constraint equation with respect to the p-norm is added to the original objective function to obtain the objective function in the crude oil procurement and production scheduling model; The objective function specifically includes: in, Let J represent the sales revenue of products and / or utilities, J represent the set of products and / or utilities, j represent any product or utility in set J, and β represent the sales revenue of products and / or utilities. j W represents the product sales price corresponding to any of the products or public works j. j sel This represents the sales volume of any of the aforementioned products or public works projects; Let I represent the cost of raw materials and / or utilities, where I represents the set of raw materials and / or utilities, and i represents any raw material or utility in set I. i W represents the procurement cost corresponding to any of the raw materials or utilities i. i buy This represents the raw material purchase quantity corresponding to any of the raw materials or utility projects i; Let S represent the set of inventory items, s represent any inventory item in the set S, and ξ represent the change in inventory value. s W represents the inventory value corresponding to any one of the inventory materials s. s inv This represents the change in inventory corresponding to any one of the inventory materials s; Let T represent the set of processing devices, t represent any processing device in the set T, and μ represent the processing cost of the device. t This represents the unit processing energy consumption of any of the processing devices t. The amount processed by any of the processing devices t is indicated; O represents the set of crude oils available for purchase; o represents any crude oil in the set of crude oils O. Q represents the p-th power of the consecutive identifiers for any crude oil o; Q represents the upper limit of all crude oil procurement types; ||B|| p Let B be the p-norm of B. o Relaxed variables are relaxed to the continuous space [0, 1].
9. A data processing device for crude oil procurement and production scheduling, characterized in that, include: The acquisition module is used to obtain crude oil purchase and production scheduling parameters, the data corresponding to the crude oil purchase and production scheduling parameters, and purchase and production scheduling constraints. The constraints on the selection and production scheduling include constraints that limit the upper limit of the types of crude oil to be purchased and other constraints. The processing module is used to generate integer constraint equations about 0-1 variables based on the constraint conditions that limit the upper limit of crude oil procurement types. The processing module is also used to perform relaxation operations on the integer constraint equations about 0-1 variables to obtain the corresponding constraint equations about the p-norm. The processing module is also used to generate the objective function in the crude oil purchase and production scheduling model based on the crude oil purchase and production scheduling parameters, the Lagrange multipliers, and the constraint equations about the p-norm. The processing module is also used to generate a set of constraint equations for the crude oil procurement and production scheduling model based on the other constraints. The processing module is also used to iteratively solve the crude oil procurement and production scheduling model based on the data corresponding to the crude oil procurement and production scheduling parameters, and obtain the crude oil procurement and production scheduling results.
10. An electronic device, characterized in that, include: A processor and a memory communicatively connected to the processor; The memory stores computer-executed instructions; When executing the computer execution instructions, the processor is used to implement the data processing method for crude oil selection and production scheduling as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, which, when executed by a processor, are used to implement the data processing method for crude oil procurement and production scheduling as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Inventory path joint optimization method based on improved Lagrange relaxation algorithm
CN113361073A
Controller with Early Termination in Mixed-Integer Optimal Control Optimization
US20220137961A1