Data processing method and system for crude oil dispatching
Through the iterative method of feasibility correction and layer-by-layer optimization stage, the problem of insufficient computing complexity and accuracy in oil scheduling is solved, and efficient and accurate crude oil scheduling scheme generation is achieved to meet the processing requirements of the refinery.
Patent Information
- Application Number
- CN202510349443.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-08-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When faced with large-scale and complex scheduling problems, existing oil scheduling technologies have high computational complexity, insufficient accuracy, and insufficient model assumptions, making it difficult to effectively deal with complex oil refining processes, resulting in insufficient feasibility of reconciliation due to low computational efficiency.
The feasibility correction stage and layer-by-layer optimization stage are used to gradually correct and adjust the segmentation accuracy of the McCormick envelope method through iterative optimization model to ensure the feasibility and accuracy of the solution. Combined with the fast iteration stage to fix the oil storage ratio of the oil tank to generate a feasible solution, and adjust the distribution strategy of the oil tank area in the layer-by-layer optimization stage to meet the physical properties harmony and operation constraints.
The accuracy of the solution efficiency and solution of the crude oil scheduling model is significantly improved, the feasibility and quality of the scheduling scheme is ensured, the impact of linearization error is reduced, and the complexity and calculation difficulty during global optimization are avoided.
Smart Images

Figure CN120471314A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent petroleum decision-making, and in particular to a data processing method and system for crude oil scheduling. Background Art
[0002] Crude oil scheduling is a key component of oil supply chain management, involving the planning of transportation from production sites to refineries. The complexity of this process stems primarily from the need to coordinate multiple modes of transportation (e.g., tankers and pipelines) and account for differences in locally produced and imported oil. Typically, locally produced crude oil is transported from offshore platforms to land via pipelines or tankers, while imported crude oil arrives at seaports via tankers. The crude oil is then either exported or sent to refineries for processing. At refineries, crude oil processing plans are typically implemented through crude oil distillation units (e.g., atmospheric and vacuum units), and these plans are determined based on the consumption rates of different oil types and the timelines for completing these activities.
[0003] The challenges of crude oil scheduling lie not only in the sheer size of the network but also in the complexity of the planning cycle. Due to the widespread distribution of pipeline networks and long planning cycles, traditional scheduling methods must employ significant simplifications, often resulting in suboptimal operations. In this context, information flows within the supply chain are not properly accounted for at a low level, hindering overall efficiency.
[0004] Technical solutions to the crude oil scheduling problem primarily focus on handling the blending of different types of crude oil, controlling the blending quality, and optimizing the supply process. In traditional refinery scheduling, it is often assumed that crude oil is blended in batches or in tanks. Each blending tank receives different types of crude oil, which are mixed in a certain proportion before being fed into the Crude Distillation Unit (CDU). However, since the blending process may be affected by multiple factors, such as the characteristics of different crude oils and changes in the oil content within the tank during the blending process, scheduling is complex. To ensure that the blended crude oil meets quality requirements, the composition of each blending tank must be monitored in real time, and the supply volume must be adjusted as needed.
[0005] Research on the scheduling of a single atmospheric and vacuum unit (CDU) focuses on optimizing crude oil supply through an inline blending station. In this scenario, multiple filling tanks are typically used to sequentially supply crude oil to the CDU. Each tank continuously and uninterruptedly supplies crude oil to the transmission pipeline. Therefore, the scheduling method must rationally arrange the emptying sequence and crude oil flow rate of each filling tank while ensuring quality.
[0006] To optimize these scheduling problems, common solutions include metaheuristic algorithms based on two-level optimization and mixed-integer nonlinear programming (MINLP) models. Metaheuristic algorithms such as Tabu search and differential evolution are widely used to solve large-scale problems. They can find optimal scheduling solutions by optimizing across different decision-making levels. Another approach uses a MINLP model to optimize the order in which oil tanks are drained and to synchronize the timing of multiple oil tanks simultaneously supplying crude oil to a single transmission pipeline, effectively improving scheduling efficiency and quality.
[0007] Although these methods have been successful in many applications, they still face challenges such as computational complexity and scalability when faced with complex refining processes.
[0008] The shortcomings of existing technologies in crude oil scheduling problems are mainly reflected in the following aspects:
[0009] Computational complexity and solution difficulty: Most existing solutions involve nonlinear, nonconvex mixed-integer nonlinear programming (MINLP) models, which are very difficult to solve, especially as the problem size increases. Commercial optimization solvers often struggle with these problems, typically requiring specialized algorithms or large-scale approximation algorithms. For example, while the McCormick envelope method can provide tight linear relaxations for bilinear terms, solving these relaxations remains very time-consuming, especially for large-scale scheduling problems.
[0010] Hybrid models and reliance on relaxation: Many existing solutions rely on reducing the computational complexity of bilinear constraints through piecewise McCormick relaxation or other relaxation techniques. While this approach can provide effective lower bounds, its strength is limited by the granularity and choice of partitions, and increasing the number of partitions requires more binary variables, increasing the complexity of the model. Therefore, while this approach can improve the accuracy of the relaxation, it can lead to higher computational overhead and longer solution times in practical applications.
[0011] Limitations of temporal modeling: In existing technologies, oil scheduling problems are often modeled using both discrete-time and continuous-time models. Discrete-time models simplify material balances and flow constraints by using fixed time intervals, but they introduce a large number of time intervals when representing the problem, potentially making the solution untractable. Conversely, while continuous-time models allow for more precise use of the temporal domain, they require more complex material balances to be handled during optimization, and it is difficult to predefine the required number of time events, making the solution more challenging.
[0012] Computational efficiency and problem size: Many existing scheduling methods, particularly those based on continuous-time MINLP models, are capable of handling more sophisticated scheduling and optimization, but they suffer from low computational efficiency. This is especially true for large-scale scheduling problems, where computational time can significantly increase. To address large-scale problems, existing solutions often rely on approximate algorithms or heuristics, which may not guarantee a globally optimal solution and often present a trade-off between solution quality and computational efficiency.
[0013] Existing oil scheduling technology faces problems such as high computational complexity, insufficient precision, and inflexible model assumptions when solving large-scale and complex scheduling problems. It is necessary to further improve algorithms and models to improve computational efficiency, solution accuracy, and better cope with uncertainties in actual production. Summary of the Invention
[0014] In order to solve the problems of low computational efficiency, inaccurate constraint processing and insufficient feasibility of solutions in existing models, the present application provides a method.
[0015] In a first aspect, embodiments of the present application provide a data processing method for crude oil scheduling, which is executed by at least one processor and includes a feasibility correction stage and a layer-by-layer optimization stage.
[0016] The feasibility correction stage includes executing at least one round of iteration until a correction result is obtained, wherein each round of iteration includes: solving a first scheduling model to obtain a first solution result, the first scheduling model including a physical property harmonic constraint based on the McCormic envelope method and excluding at least part of the objectives in the objective function; checking whether the first solution result is feasible; if the first solution result is feasible, correcting the first solution result according to the nonlinear physical property harmonic constraint, and verifying whether the corrected first solution result satisfies the processing constraint of the atmospheric and vacuum device; if the corrected first solution result does not satisfy the processing constraint of the atmospheric and vacuum device, performing a first adjustment operation on the first scheduling model; if the corrected first solution result satisfies the processing constraint of the atmospheric and vacuum device, determining the first solution result as the correction result; if the first solution result is not feasible, performing a second adjustment operation on the first scheduling model.
[0017] The layer-by-layer optimization stage includes multiple rounds of iterations corresponding to multiple layers of the topological structure of the oil flow direction, wherein each round of iteration includes: optimizing the relevant variables of the current layer nodes in the second scheduling model to obtain the optimization results of this round, wherein the second scheduling model includes physical property reconciliation constraints based on the McCormic envelope method and includes all objectives in the objective function; correcting the optimization results of this round according to the nonlinear physical property reconciliation constraints, and verifying whether the corrected optimization results of this round meet the processing constraints of the constant pressure reduction device. In the first round of iteration, the iteration starting point of the second scheduling model is the correction result; in subsequent iterations, the iteration starting point of the second scheduling model is the previous round of optimization results, and the relevant variables of the previous layer nodes are fixed according to the previous round of optimization results. The target optimization result of the layer-by-layer optimization stage is used to generate a crude oil scheduling plan, wherein the target optimization result is the optimization result of the latest round that meets the processing constraints of the constant pressure reduction device after correction.
[0018] In some embodiments, the first adjustment operation includes: determining the fixable variables and the unfixable variables based on the corrected first solution result; hard fixing the 0-1 variables among the fixable variables and soft fixing the continuous variables among the fixable variables; increasing the segmentation accuracy of the unfixable variables and updating the physical property harmony constraints based on the McCormic envelope method based on the increased segmentation accuracy; reducing the maximum allowable deviation of the upper and lower bounds of the crude oil components and updating the processing limit constraints of the atmospheric and vacuum distillation unit based on the reduced maximum allowable deviation. The second adjustment operation includes: determining the value of the 0-1 variables among the fixable variables and canceling the hard fixation of the 0-1 variables that have a value of 0.
[0019] In some embodiments, the first adjustment operation further includes: maintaining or increasing the piecewise accuracy of the fixable variable, and updating the physical property harmonic constraint based on the McCormic envelope method according to the increased piecewise accuracy, wherein the piecewise accuracy increment of the fixable variable is smaller than the piecewise accuracy increment of the unfixable variable.
[0020] In some embodiments, the fixable variables and the non-fixable variables are determined based on the corrected first solution result, including: determining a target binary set based on the corrected first solution result, the target binary set including multiple binary sets (d, t) that meet a first condition, the first condition being that the constant pressure reduction device d violates the processing constraint at time step t; determining a parent node set based on the target binary set, the parent node set including multiple binary sets (o, t) that meet a second condition, the second condition being that node o is the parent node of the constant pressure reduction device d when it violates the processing constraint; The parent node set divides the target quadruple set into a fixable subset and an unfixable subset, wherein the target quadruple set includes multiple quadruples that need to be linearized, wherein each quadruple includes a starting point, an end point, a time, and an oil type; the quadruple (o, d, t, i) in the unfixable subset meets the third condition, wherein the third condition is that (o, t) belongs to the parent node set, d is a child node of o, and (o, d, t, i) belongs to the target quadruple set; determine the fixed variables corresponding to the fixable subset; determine the unfixable variables corresponding to the unfixable subset.
[0021] In some embodiments, the method also includes a rapid iteration stage, which includes: sorting the multiple miscible oil tanks according to the number of oil types and the amount of oil in the tanks in the initial state, and screening out a target oil tank combination based on the sorting results, the target oil tank combination including the frontmost part of the oil tanks in the sorting results, and the oil tanks with more oil types and larger oil amounts in the tanks are ranked higher in the sorting results.
[0022] The rapid iteration phase further includes, for each of the plurality of miscible tanks, performing the following steps:
[0023] Determining whether the oil tank belongs to the target oil tank combination;
[0024] If the oil tank belongs to the target oil tank combination, the basic scheduling model is adjusted as follows: the inventory ratio of each oil type in the oil tank at each time step in the preset multiple time steps is fixed to the inventory ratio of each oil type in the oil tank in the initial state; based on the ratio of each crude oil component in the oil tank in the initial state, the upper and lower bounds of each crude oil component in the oil tank in each time step in the multiple time steps are determined; based on the upper and lower bounds of each crude oil component in the oil tank in each time step in the multiple time steps, corresponding component upper and lower bound constraints are added;
[0025] If the oil tank does not belong to the target oil tank combination, the basic scheduling model is adjusted as follows: only the inventory ratio of each oil type in the oil tank at the first time step is fixed to the inventory ratio of each oil type in the oil tank at the initial state, wherein the first time step is the earliest time step among the multiple time steps; based on the ratio of each crude oil component in the oil tank at the initial state, the upper and lower bounds of each crude oil component in the oil tank at the first time step are determined; based on the upper and lower bounds of each crude oil component in the oil tank at the first time step, corresponding component upper and lower bound constraints are added;
[0026] The rapid iteration stage also includes: solving the adjusted basic scheduling model to obtain an initial feasible solution, the basic scheduling model does not include the physical property reconciliation constraint and at least part of the objectives in the objective function; correcting the initial feasible solution according to the nonlinear physical property reconciliation constraint, and verifying whether the corrected initial feasible solution satisfies the processing constraint of the constant pressure reduction device; if the corrected initial feasible solution does not satisfy the processing constraint of the constant pressure reduction device, entering the feasibility correction stage; if the corrected initial feasible solution satisfies the processing constraint of the constant pressure reduction device, skipping the feasibility correction stage and directly entering the layer-by-layer optimization stage. Accordingly, in the first round of iteration of the layer-by-layer optimization stage, the iteration starting point of the second scheduling model is adjusted to the initial feasible solution.
[0027] In some embodiments, the correction process of the model solution includes:
[0028] Traverse the nodes in topological order according to the oil flow direction;
[0029] For a given node, traverse the time steps from earliest to latest;
[0030] For a given node and a given time step, determining whether the node is involved in crude oil mixing at the time step;
[0031] If the node involves crude oil mixing at this time step, then: based on the actual transmission volume of each oil type of each receiving pipeline at this node at this time step and the actual inventory of each oil type at this node in the previous time step, calculate the actual inventory of each oil type and the actual total inventory of all oil types at this node at this time step; based on the actual inventory of each oil type and the actual total inventory of all oil types at this node at this time step and the planned transmission volume of each oil pipeline at this node at this time step, calculate the actual transmission volume of each oil type of each oil pipeline at this node at this time step according to the physical property harmony constraint;
[0032] If the node is not involved in crude oil mixing at this time step, the actual oil transmission volume of each oil type of the oil pipeline of the node at this time step is determined from the solution results of the model.
[0033] In some embodiments, the objective function includes an operation change objective, a stability objective, and a special operation objective. The operation change objective is used to minimize operation changes during a scheduling period, the stability objective is used to minimize changes in physical properties of oil collected by the atmospheric and vacuum distillation device during a scheduling period, and the special operation objective is used to minimize simultaneous collection and payment operations during a scheduling period. The at least partial objective includes the operation change objective and the special operation objective.
[0034] In a second aspect, an embodiment of the present application provides a data processing system for crude oil scheduling, comprising a feasibility correction module for executing the feasibility correction phase and a layer-by-layer optimization module for executing the layer-by-layer optimization phase.
[0035] In some embodiments, the system further comprises a fast iteration module for performing the fast iteration phase.
[0036] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the data processing method for crude oil scheduling as described in the first aspect.
[0037] In a fourth aspect, the present application provides a computer-readable storage medium comprising a program code. When the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute the data processing method for crude oil scheduling as described in the first aspect.
[0038] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; when a processor of an electronic device obtains the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the electronic device executes the data processing method for crude oil scheduling as described in the first aspect.
[0039] The technical solution provided in the embodiments of the present application has the following advantages:
[0040] (1) In the crude oil scheduling model, the complex combination and scheduling of oil tanks results in a long solution time. This solution quickly generates a preliminary feasible solution by fixing the oil storage ratio in the tanks and introducing upper and lower bound constraints on the components in the initial stage. This avoids the need to involve complex nonlinear physical property reconciliation constraints at an early stage, thereby accelerating the solution process.
[0041] (2) The McCormick envelope method cannot guarantee complete accuracy in linear approximation of nonlinear constraints, which can easily lead to inaccurate solutions. This solution improves the segmented accuracy of the McCormick envelope layer by layer and gradually corrects and updates it in subsequent stages, ensuring a more accurate approximation and effectively reducing the impact of linearization errors.
[0042] (3) Because oil scheduling involves complex physical property reconciliation constraints, existing models may produce infeasible solutions. This solution uses multiple iterations in the second phase to gradually adjust soft and hard constraints, correcting the feasibility of the solution. Constraints are continuously tightened based on actual production limitations to ensure that the final solution meets all physical and operational requirements.
[0043] (4) This solution gradually adjusts the tank farm's distribution strategy through a layer-by-layer optimization approach, ensuring that the physical property harmony and operational constraints are met while optimizing the objective function. This hierarchical optimization strategy effectively avoids the complexity and computational difficulty of global optimization.
[0044] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0046] Figure 1 A schematic diagram of the phase division of the data processing method for crude oil scheduling provided in an embodiment of the present application.
[0047] Figure 2 A schematic diagram of the iterative process of the rapid iteration phase provided in an embodiment of the present application.
[0048] Figure 3 A schematic diagram of the iterative process of the feasibility revision stage provided in an embodiment of the present application.
[0049] Figure 4 A flowchart of a first adjustment operation and a second adjustment operation performed on a first scheduling model provided in an embodiment of the present application.
[0050] Figure 5 A schematic diagram of the layer-by-layer optimization stage provided in an embodiment of the present application.
[0051] Figure 6 Schematic diagram of the topological structure of oil flow.
[0052] Figure 7 Schematic diagram of the process for solving the calibration model.
[0053] Figure 6 The topology shown includes a sea transport portion and a land transport portion.
[0054] During the calibration process, follow Figure 6 The topological sort shown traverses the nodes.
[0055] For a given node and a given time step, the correction process is as follows Figure 7 shown.
[0056] Figure 8 An exemplary block diagram of a data processing system for crude oil scheduling provided in an embodiment of the present application.
[0057] Figure 9 An exemplary block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other in any way. In addition, although a logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0059] The terms "first," "second," and the like in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein.
[0060] The crude oil scheduling model consists of parameters, decision variables (variables), variable constraints (constraints), and an objective function. Constraints define conditions that variables must satisfy, such as their range of values or the relationships between them. The objective function is a core concept in optimization problems, guiding the optimization process toward the desired direction. It defines the metric to be maximized or minimized. A model solution is considered feasible when it satisfies all of its constraints.
[0061] Crude oil scheduling involves complex physical property reconciliation constraints, which are inherently nonlinear. Some models use the McCormick envelope method to linearly approximate these nonlinear constraints. To facilitate understanding of the present embodiments, the following provides an exemplary definition of a crude oil scheduling model based on McCormick relaxation.
[0062] 1. Symbol Definition
[0063] 1.1 The following is a set of parameters that need to be considered in the model:
[0064] V: the set of all nodes (oil tanks, special pipelines considered as nodes, docks, atmospheric and vacuum devices, etc.);
[0065] V pl : A collection of special pipelines that are considered as nodes;
[0066] V cdu : Atmospheric and vacuum device assembly;
[0067] V source : Based on a given oil transportation plan, the refinery is fed with a set of nodes (terminals, incoming oil pipelines, etc.) where crude oil is to be dispatched.
[0068] V ope : A set of nodes (such as oil tanks) that need to make decisions on their operating status;
[0069] V pure : A set of nodes where mixing of crude oil in the tank is not allowed;
[0070] V bsbf : A collection of nodes that can pay and receive simultaneously;
[0071] The set of parent nodes of node o (nodes that can pay oil to node o), o∈V;
[0072] The set of child nodes of node o (nodes that can receive fuel from node o), o∈V;
[0073] T: the set of time steps requiring decision making;
[0074] I: The set of oil types to be considered;
[0075] S: node state set, S = {deliver oil, receive oil, stand still, receive and deliver oil at the same time};
[0076] E: The set of crude oil components limited by the atmospheric and vacuum unit;
[0077] R i,e : The content of component e in oil type i, i∈I, e∈E, 0≤R i,e ≤1;
[0078] Valid pipe,time : All the starting-end-times that need to be considered, that is, {(o, d, t)|o, d∈V, t∈T}, the relevant variables of (o, d, t) are the variables that need to be decided in the model;
[0079] Valid tank,time,oil : All the tank-time-oil types that need to be considered, that is, {(o, t, i)|o∈V, t∈T, I∈I}, (o, t, i) related variables are the variables that need to be decided in the model;
[0080] Valid detail : All the starting points, ending points, times, and oil types that need to be considered, that is, {(o, d, t, i)|o, d∈V, t∈T, i∈I}, the relevant variables of (o, t, i) are the variables that need to be decided in the model;
[0081] The upper limit of the amount of fuel delivered from the starting point o to the end point d in one time step,
[0082] The upper limit of the oil volume collected by node o in one time step,
[0083] The upper limit of the fuel payment of node o in one time step,
[0084] The upper limit of the number of nodes that receive oil from node o in one time step,
[0085] The upper limit of the number of nodes to which node o can pay oil in one time step,
[0086] The upper limit of oil storage at node o in one time step,
[0087] DT o : Node o standing time requirement after oil collection,
[0088] Plan o,t,i : The planned oil supply of oil type i at node o at time step t,
[0089] IR: Tank-pipe-tank paths {(tank1,pl,tanh2,t)|tank1,tank2,pl∈V,t∈T,pl is a special pipe treated as a node} should not be used.
[0090] 1.2 The following are the linear variables that need to be considered in the model:
[0091] x o,d,t : 0-1 variable, indicating whether the pipeline from the starting point o to the end point d is open at time step t;
[0092] A continuous variable representing the amount of oil transported by the pipeline from the starting point o to the end point d at time step y;
[0093] A continuous variable representing the amount of oil of type i transported by the pipeline from the starting point o to the end point d at time step y;
[0094] Continuous variable, representing the total stock of all oil types at node o at time step t;
[0095] Continuous variable, representing the inventory of oil type i at node o at time step t;
[0096] zs o,t,s : 0-1 variable, indicating whether the oil tank o is in state s at time step t, s∈S={deliver oil, collect oil, stand still, collect and pay at the same time};
[0097] zq o,t,i : 0-1 variable, indicating whether tank o has oil type i at time step t;
[0098] r d,t,e : A continuous variable representing the amount of crude oil component e received by the atmospheric and vacuum unit d at time step t.
[0099] 2. Model
[0100] 2.1 The following are the linear constraints considered in the model:
[0101] a. Limitation of oil volume transmitted through pipeline:
[0102]
[0103] Used to control the sum of the oil volumes transported by all types of oil in the pipeline.
[0104] b. Node oil receiving and delivery volume limits:
[0105]
[0106] The oil receipt and delivery of the node is subject to upper limits.
[0107] Node oil capacity limit:
[0108]
[0109] The amount of oil a node can hold is subject to an upper limit.
[0110] c. Limitation on the number of nodes where oil is received or delivered:
[0111]
[0112] The source of oil received and the destination of oil delivered by a node are limited by the number of nodes. d. Limitation of the number of oil types at a node:
[0113]
[0114] The number of oil types on a node is subject to an upper limit.
[0115] e. Node operation status restrictions:
[0116] a) State characterization:
[0117]
[0118] A node has at least one state.
[0119]
[0120] If oil flows from o to d, the state of o is oil supply.
[0121]
[0122] If oil flows from o to d, the state of d is oil collection.
[0123]
[0124] If there are oil receiving and oil payment status at the same time, the status is receiving and paying at the same time.
[0125]
[0126] The state of receiving or delivering oil cannot exist at the same time as the static state.
[0127] b) Pay-as-you-go can only take place on permitted tanks:
[0128]
[0129] Only some oil pipelines allow payment while receiving.
[0130] c) Oil types cannot be mixed when collecting and paying:
[0131]
[0132] In the above constraints, M is equal to the number of oil types that node o can theoretically accommodate in the model minus 1.
[0133] d) Standing time requirements:
[0134]
[0135] There is a time interval between receiving oil and the next oil delivery.
[0136] g. Restrictions on crude oil sources:
[0137]
[0138] Restrictions are imposed based on the source of planned crude oil.
[0139] h. Restrictions on crude oil transportation between tanks:
[0140]
[0141] Because there are several special pipelines between the two tank farms in the refinery, these pipelines have no defined volumes but are subject to transport efficiency constraints and restrictions on the number of source and destination nodes. The sum of the number of source and destination nodes cannot exceed 1, so these pipelines are described as nodes. This means that within time step t, tank 1 cannot flow through pl and then into tank 2.
[0142] i. Processing restrictions of atmospheric and vacuum devices:
[0143]
[0144] The processing volume of the constant pressure reduction device is subject to upper and lower limit controls.
[0145] 2.2 The following is the objective function of the model:
[0146] min:ω1·OperationChangeObj+ω2·StableObj+ω3·SpecialObj (22)
[0147] The OperationChangeObj objective is used to minimize operational changes during scheduling:
[0148]
[0149] In order to minimize the symmetry of the model, the penalty weights for operation changes of different nodes o at different time steps t are different.
[0150] Since even if the operation of node o at time t changes, zs o,t,s In the LP relaxation model, it is also possible to have zs o,t,s -zs o,t-1,s = 0, so in order to make the operation change directly reflected in the target value of the LP relaxation problem of the model, the target term |y is addedo,d,t,i -y o,d,t-1,i |.
[0151] b. The StableObj objective is used to minimize the changes in the physical properties of the oil collected by the atmospheric and vacuum units during the scheduling period:
[0152] StableObj=∑ d,t,e |r d,t,e -r d,t-1,e | (24)
[0153] c. The SpecialOpeObj objective is used to minimize the use of special operations during dispatch, which are inevitable and have a negative impact on the stability of crude oil properties:
[0154] SpecialOpeObj=∑ o,t zs o,t,边收边付 (25)
[0155] 3. Handling physical property harmony constraints through McCormic envelope method
[0156] Physical property reconciliation constraint: For an oil tank, if there are two or more types of crude oil in the tank, when delivering oil, the delivery ratio of a certain oil type must be equal to the inventory ratio of that oil type in the tank.
[0157]
[0158] 3.1 New parameter definition
[0159] The following data are used in the linearization process:
[0160] Valid mc :All starting points, end points, time and oil types that need to be linearized,
[0161] PWL v o,d,t,i:Given (o,d,t,i)∈Validmc, The number of segments when performing piecewise approximation;
[0162] PWL y o,d,t,i:Given (o,d,t,i)∈Validmc, The number of segments when performing piecewise approximation;
[0163] The upper bound of the amount of oil transported by the pipeline from the starting point o to the end point d at time t;
[0164] The lower bound of the amount of oil transported by the pipeline from the starting point o to the end point d at time step t;
[0165] The upper bound of the amount of oil of type i transported by the pipeline from the starting point o to the end point d at time step t;
[0166] The lower bound of the amount of oil of type i transported by the pipeline from the starting point o to the end point d at time step t;
[0167] The upper bound of the total stock of all oil types at node o at time step t;
[0168] The lower bound of the total stock of all oil types at node o at time step t;
[0169] The upper bound of the inventory of oil type i at node o at time step t;
[0170] The lower bound of the inventory of oil type i at node o at time step t.
[0171] 3.2 For nonlinear constraints, use McCormick envelope method to perform linear fitting on nonlinear constraints:
[0172] a.Yes Make a linear approximation:
[0173]
[0174]
[0175] These constraints use known upper bound solutions to Perform linear approximation fitting.
[0176] b.Yes Make a linear approximation:
[0177] The structure is exactly the same as the previous part, just replace the variables and upper and lower bound parameters.
[0178] c. Linear approximation of physical property harmony constraint:
[0179]
[0180] Fit the left and right ends of the nonlinearity with linear variables.
[0181] Figure 1 Schematic diagram of the phase division of the data processing method for crude oil scheduling provided in the embodiment of the present application. The method is executed by at least one processor. Figure 1 As shown, the method includes a rapid iteration phase, a feasibility correction phase and a layer-by-layer optimization phase which are executed in sequence.
[0182] During the rapid iteration phase, a basic scheduling model is established, ignoring at least some of the objectives in the objective function (such as operational change objectives) and physical property reconciliation constraints. The oil storage ratios in some tanks within the basic scheduling model are fixed. Furthermore, upper and lower bound constraints are added to maintain the relative stability of the components in the tanks, ensuring the relative stability of the oil type and ensuring that the physical property reconciliation constraints are met as much as possible. This allows for a rapid generation of a robust starting point for the iteration.
[0183] In an alternative embodiment, the fast iteration phase may be omitted, that is, the feasibility revision phase and the layer-by-layer optimization phase may be directly executed.
[0184] For more details about the rapid iteration phase, please refer to Figure 2 and its related descriptions.
[0185] During the feasibility revision phase, at least some of the objectives in the objective function are still ignored, and physical property reconciliation constraints based on the McCormick envelope method are considered. The model at this stage is called the first scheduling model. During this phase, the first scheduling model is iteratively solved. After each round of solving, the feasibility of the current solution is checked. If a feasible solution is found, the current solution is corrected based on the nonlinear physical property reconciliation constraints, and the corrected solution is verified to meet the processing constraints of the atmospheric and vacuum distillation unit. If the corrected solution does not meet the processing constraints of the atmospheric and vacuum distillation unit, the first scheduling model is adjusted accordingly to optimize the feasibility of the solution. For example, the solution space is constrained by updating the information of soft and hard fixed variables and increasing the piecewise accuracy of the McCormick envelope. As the iterations proceed, the tolerance of the soft constraints is gradually reduced, while the hard constraints are gradually tightened, thereby optimizing the feasibility of the solution. If a feasible solution is found, the composition constraints of the atmospheric and vacuum distillation unit can be further tightened by adjusting the upper and lower component bounds to ensure that the model solution meets all physical and operational requirements. Through the feasibility revision phase, the model gradually approaches a feasible and optimized solution.
[0186] For more details on the feasibility revision phase, please refer to Figure 3 、 Figure 4 and its related descriptions.
[0187] In some embodiments, during the rapid iteration phase and the feasibility correction phase, referring to expression (22), the complete objective function includes an operation change objective (OperationChangeObj), a stability objective (pecialOpeObj), and a special operation objective (SpecialOpeObj). The operation change objective is used to minimize the operation changes during the scheduling period, the stability objective is used to minimize the changes in the physical properties of the oil received by the constant pressure reduction device during the scheduling period, and the special operation objective is used to minimize the collection and payment operations during the scheduling period. The objectives missing in the basic scheduling model and the first scheduling model include the operation change objective and the special operation objective.
[0188] During the layer-by-layer optimization phase, all objectives in the objective function and the physical property reconciliation constraints based on the McCormick envelope method are considered. The model in this phase is called the second scheduling model. The optimization in the layer-by-layer optimization phase uses the solution from the feasibility revision phase as its starting point. Due to the difficulty of overall optimization, the second scheduling model is optimized layer by layer in the third phase. Based on the topological structure of oil flows, the crude oil delivery strategy (related variables) at the upper layer is optimized first. Based on the optimization results of the previous layer, the crude oil delivery strategy (related variables) at the lower layer is optimized. Starting from the second layer, each optimization layer undergoes soft and hard fixing operations based on the results of the previous round.
[0189] For more details about the layer-by-layer optimization stage, please refer to Figure 5 、 Figure 6 and its related descriptions.
[0190] Since the McCormick envelope is used to linearly approximate the physical property harmony constraints during data processing, the approximate result cannot guarantee that the crude oil scheduling plan in all cases satisfies the physical property harmony constraints. Therefore, after all model solution processes in data processing, the current solution can be corrected according to the nonlinear physical property harmony constraints (refer to formula (26)), and it is determined whether the corrected solution satisfies the processing constraints of the atmospheric and vacuum distillation unit to ensure the feasibility of the solution.
[0191] For more details about the correction model solution, please refer to Figure 6 、 Figure 7 and its related descriptions.
[0192] Figure 2 Schematic diagram of the iterative process of the rapid iteration phase provided by the embodiment of this application. Figure 2 As shown, the rapid iteration phase includes the following steps.
[0193] Step 210 : sorting the multiple miscible oil tanks according to the number of oil types and the amount of oil in the tanks in the initial state, and determining a target oil tank combination according to the sorting result.
[0194] Only oil tanks that allow mixing will involve violations of physical property reconciliation constraints, so only the oil storage ratio of the miscible oil tanks needs to be fixed. The target oil tank combination includes the oil tanks at the front of the sorting results. The more oil types there are in the tanks and the larger the oil volume in the tanks (the total storage volume of all oil types), the higher the oil tanks are in the sorting results. Prioritizing the fixing of tanks with more complex oil types and larger oil storage volumes can improve the efficiency of model solving. As an example only, the oil tanks with a preset proportion (such as the top 10%) at the front of the sorting results can be determined as the target oil tank combination.
[0195] In practical applications, an oil tank that allows mixing and has an oil volume greater than 0 can be screened out as one of the multiple miscible oil tanks.
[0196] In some embodiments, the tanks may be sorted based on the number of oil types in the tanks. If the number of oil types in the tanks is the same, the tanks may be sorted based on the oil volume. For example, if tank 1 and tank 2 both store three types of crude oil, i.e., the number of oil types in tank 1 and tank 2 is three, and the oil volume in tank 1 is greater than that in tank 2, then tank 1 is sorted ahead of tank 2.
[0197] For each oil tank (denoted as o) in the plurality of miscible oil tanks, steps 220 to 230 are performed.
[0198] Step 220: Determine whether the oil tank o belongs to the target oil tank combination.
[0199] If the oil tank o belongs to the target oil tank combination, the basic model is adjusted accordingly, that is, step 230, step 242 and step 244 are executed.
[0200] In step 230 , the inventory ratio of each oil type in the oil tank o at each time step in the preset multiple time steps is fixed to the inventory ratio of each oil type in the oil tank o in the initial state.
[0201] With reference to the foregoing, the multiple time steps can be all elements (t) in the set of time steps requiring a decision (T). For example, if each time step is half a day, and the set of time steps requiring a decision consists of 14 time steps corresponding to the next week, then the multiple time steps constitute the 14 time steps of the next week.
[0202] The initial state refers to the state before the first time step among the multiple time steps, for example, the state of the second half of the day (12:00-00:00). Data for the initial state (such as inventory percentage) can be obtained from a real production environment using professional testing methods.
[0203] The inventory ratio of any oil type refers to the ratio of the inventory of that oil type to the total inventory of all oil types. Based on the above content, the inventory ratio of oil type i in tank o at time step t can be expressed as By adding variable constraints, you can fix variables or the relationship between variables. For example, to fix Can build about The equations of are used as variable constraints.
[0204] Step 242 : determining the upper and lower bounds of each crude oil component in the oil tank o at each time step in the plurality of time steps based on the ratio of each crude oil component in the oil tank o at the initial state.
[0205] Specifically, for each oil type i in tank o, we first determine the proportion of each component within oil type i. Then, we perform a weighted summation of the proportions of the same component within each oil type based on the inventory percentage of each oil type in tank o to obtain the proportion of each component in tank o. Furthermore, by increasing or decreasing the proportions of each component in tank o by a certain amount, we can obtain the upper and lower bounds for each crude oil component.
[0206] Step 244 : adding corresponding component upper and lower bound constraints based on the upper and lower bounds of each crude oil component in the oil tank o at each time step in the plurality of time steps.
[0207] In practical applications, the upper and lower bounds of components can be stored in a dictionary format. Based on this, the upper and lower bounds dictionary of crude oil components is first initialized, and then the upper and lower bounds dictionary is updated according to the upper and lower bounds determined in step 242 to add corresponding upper and lower bound constraints of the components.
[0208] If the oil tank o does not belong to the target oil tank combination, the basic scheduling model is adjusted accordingly, that is, steps 250, 262 and 264 are executed.
[0209] In step 250, only the inventory ratio of each oil type in the oil tank o at the first time step is fixed to the inventory ratio of each oil type in the oil tank o in the initial state.
[0210] The first time step is the earliest (first) time step among the multiple time steps.
[0211] For complex tanks (i.e., those belonging to the target pipeline assembly), fixing the tank's variables at all time steps can help speed up the model solution. For common tanks, fixing only the variables at the first time step allows for adjustment of the variables at subsequent time steps, thus avoiding the inability to find a feasible solution after fixing all variables at all time steps.
[0212] Step 262 : Based on the ratio of each crude oil component in the oil tank o at the initial state, determine the upper and lower bounds of each crude oil component in the oil tank o at the first time step.
[0213] Step 264 , based on the upper and lower bounds of each crude oil component in the oil tank o at the first time step, add corresponding component upper and lower bound constraints.
[0214] For more details about step 262 and step 264 , please refer to the relevant descriptions of step 242 and step 244 .
[0215] Step 270 , solving the adjusted basic scheduling model to obtain an initial feasible solution.
[0216] The model can be solved by a solver. The solution of the model is the value of each decision variable, and the process of solving the model is the process of searching for the value of each decision variable.
[0217] Step 282: Correct the initial feasible solution according to the nonlinear physical property harmonic constraints.
[0218] Step 284 : Verify whether the corrected initial feasible solution satisfies the processing constraints of the atmospheric and vacuum distillation device.
[0219] If the corrected initial feasible solution does not meet the processing constraints of the atmospheric and vacuum distillation unit, the feasibility correction stage is entered.
[0220] If the corrected initial feasible solution satisfies the processing constraints of the atmospheric and vacuum unit, the feasibility correction phase is skipped and the layer-by-layer optimization phase is entered directly (as indicated by the dashed arrow). Accordingly, in the first iteration of the layer-by-layer optimization phase, the starting point of the iteration of the second scheduling model is adjusted to the initial feasible solution. It is worth noting that the optimization problem of crude oil scheduling is very complex, and the probability of obtaining a high-quality initial feasible solution (corrected to meet the processing constraints of the atmospheric and vacuum unit) during the rapid iteration phase is very low.
[0221] Figure 3 This is a schematic diagram of the iterative process of the feasibility revision phase provided by the embodiment of the present application. Figure 3 As shown, the feasibility correction phase includes at least one iteration. The input solution (i.e., the starting point of the iteration) of the feasibility correction phase can be the output solution of the rapid iteration phase. The output solution of the feasibility correction phase is called the correction result. When the current solution after correction satisfies the processing constraints of the atmospheric and vacuum distillation device, the current solution is determined as the correction result. In the feasibility correction phase, each iteration includes the following steps.
[0222] Step 310: Solve the first scheduling model to obtain a first solution result.
[0223] Step 320: Check whether the first solution is feasible.
[0224] If the first solution is feasible, step 332 and step 334 are executed.
[0225] Step 332: Correct the first solution according to the nonlinear physical property harmonic constraint.
[0226] Step 334 : Determine whether the corrected first solution satisfies the processing constraints of the atmospheric and vacuum distillation device.
[0227] It's important to note that the feasibility of the first solution means that it satisfies the physical property harmony constraints based on the McCormick envelope method. However, differences between the first solution and its correction may result in violations of the processing constraints of the atmospheric and vacuum distillation unit. The feasibility check before correction is relative to models involving linear approximations (such as the first and second scheduling models). Post-correction verification aims to ensure the feasibility of the solution in real-world situations.
[0228] For more details on correcting the first solution, see Figure 7 and its related descriptions.
[0229] If the corrected first solution does not satisfy the processing constraints of the atmospheric and vacuum distillation device, step 340 is executed. If any variable in the solution violates the processing constraints of the atmospheric and vacuum distillation device, the solution is considered to not satisfy the processing constraints of the atmospheric and vacuum distillation device.
[0230] Step 340: Perform a first adjustment operation on the first scheduling model.
[0231] For the specific implementation of the first adjustment operation, please refer to Figure 4 and its related descriptions.
[0232] If the corrected first solution satisfies the processing constraints of the atmospheric and vacuum distillation device, step 350 is executed.
[0233] Step 350: determine the first solution result as the revised result.
[0234] If the first solution is not feasible, step 360 is executed.
[0235] Step 360: Perform a second adjustment operation on the first scheduling model.
[0236] For the specific implementation of the first adjustment operation, please refer to Figure 4 and its related descriptions.
[0237] Figure 4 This is a flowchart of a first adjustment operation and a second adjustment operation performed on a first scheduling model provided in an embodiment of the present application.
[0238] like Figure 4 As shown, the first adjustment operation 340 may include the following steps.
[0239] Step 342: Determine the fixable variables and the non-fixable variables based on the corrected first solution result.
[0240] Fixable variables are variables that need to be fixed, and non-fixable variables refer to related variables whose processing limits of the atmospheric and vacuum distillation unit may be violated due to the difference between the solution results and the actual oil type and oil quantity calculation results.
[0241] In step 344 , hard-fixing is performed on the 0-1 variables among the fixed variables, and soft-fixing is performed on the continuous variables among the fixed variables.
[0242] Hard fixation corresponds to hard constraints, which refer to constraints that variables must satisfy, for example, constraining 0-1 variables to be equal to 0 or 1. In step 344, the 0-1 variables in the fixed variables may be fixed to current values.
[0243] Soft fixing corresponds to soft constraints, which are constraints that allow a certain degree of violation, but the degree of violation must be minimized by introducing a penalty term in the objective function. In step 344, slack variables can be introduced and soft constraints can be established based on the slack variables.
[0244] Step 346a: Increase the segmentation accuracy of the unfixable variables, and update the physical property harmonic constraints based on the McCormic envelope method according to the increased segmentation accuracy.
[0245] In some embodiments, step 340 also includes step 346b.
[0246] In step 346b, the piecewise precision of the fixable variables is maintained or increased, and the physical property harmonic constraints based on the McCormic envelope method are updated according to the increased piecewise precision. In step 346b, the piecewise precision increment of the fixable variables is less than the piecewise precision increment of the non-fixable variables.
[0247] In some embodiments, fixed variables and non-fixable variables are determined as follows: a target binary set is determined, the target binary set includes multiple binary sets (d, t) that meet a first condition, the first condition being that the constant pressure reduction device d violates the processing constraint at time step t; a parent node set is determined based on the target binary set, the parent node set includes multiple binary sets (o, t) that meet a second condition, the second condition being that node o is the parent node of the constant pressure reduction device d when it violates the processing constraint; a target quadruple set is divided into a fixable subset and a non-fixable subset based on the parent node set, the target quadruple set includes multiple quadruples that need to be linearized, wherein each quadruple includes a starting point, an end point, a time, and an oil type, and the quadruple (o, d, t, i) in the non-fixable subset meets a third condition, the third condition being that (o, t) belongs to the parent node set, d is a child node of o, and (o, d, t, i) belongs to the target quadruple set; fixed variables corresponding to the fixable subset are determined; and non-fixable variables corresponding to the non-fixable subset are determined.
[0248] For ease of understanding, the following describes the process of determining fixed and unfixable variables and the subsequent model adjustment operations using symbols. First, the target binary set (denoted as N) is obtained based on the corrected first solution result, where N = {(d, t) | d∈V cdu ,t∈T,d violates the processing constraint at time step t}. Then, the parent node set (denoted as N) is determined based on the target tuple set N. change ), That is, the set N parent Including the oil tank of the atmospheric and vacuum device that violates the processing constraint when violating the constraint. Then, based on the parent node set N parent Determine the non-fixable subset (denoted as N change ), That is, the set N change Including set N parent All oil types and oil delivery objects (atmospheric and vacuum devices) affected. Then, based on the non-fixable subset N change and the target quadruple set (ie Valid mc ) can determine the fixed subset (denoted as N fix ),
[0249] Furthermore, in the process of adjusting the first scheduling model, for all (o, d, t, i)∈N fix , fix the corresponding 0-1 variable zq in the first scheduling model o,t,i ,x o,d,t The value of; for all (o, d, t, i) ∈ N fix , based on the slack variables Add the following constraints:
[0250]
[0251] in, Refers to the y solved in this round o,d,t,i The value of, in the next round of solution, for all (o, d, t, i) ∈ N fix , requiring y o,d,t,i The value of is as close as possible to the value solved in this round. The slack variable is added to the objective function in the form of a penalty term.
[0252] Regarding the update of McCormick envelope, before adjusting the first scheduling model, all McCormick envelope related constraints are cleared. During the adjustment of the first scheduling model, for all (o, d, t, i) ∈ N fix ,Will All increase δ1; for all (o, d, t, i)∈N change ,Will All increase δ2, where δ1≤δ2, for example, δ1 is 0.02 and δ2 is 0.04. That is, the linear approximation accuracy of fixed variables can remain unchanged or only increase slightly after the update; the linear approximation accuracy of non-fixable variables needs to increase more after the update. Then, according to the updated Rebuild McCormick envelope related constraints.
[0253] Step 348: Reduce the maximum allowable deviations between the upper and lower bounds of the crude oil composition, and update the processing constraints of the atmospheric and vacuum distillation unit based on the reduced maximum allowable deviations.
[0254] The influence of linear approximation error is offset by reducing the maximum allowable deviation of the upper and lower bounds of crude oil composition in the processing constraints of the atmospheric and vacuum unit.
[0255] The processing constraints of a vacuum unit involve upper and lower bounds for crude oil components. When determining whether a variable violates a vacuum unit's processing constraints, the variable's value is allowed to slightly cross the bounds. For example, the deviation between the two is allowed to not exceed ∈. ∈ can be set to the same value for all components in all vacuum units.
[0256] like Figure 4 As shown, the second adjustment operation 360 may include the following steps.
[0257] Step 362: Determine the value of the 0-1 variable in the fixed variable.
[0258] Step 364: cancel the hard fixation of the 0-1 variable whose value is 0.
[0259] If the first solution is not feasible, all currently fixed 0-1 variables zq can be determined o,t,i ,x o,d,t , thereby canceling the hard fixation of the 0-1 variable with a value of 0, and only retaining the hard fixation of the 0-1 variable with a value of 1.
[0260] In addition, if the first solution is not feasible, the settings of the McCormick envelope (such as segmentation accuracy) and the settings of the atmospheric and vacuum unit constraints (such as component upper and lower bounds) in the first scheduling model will not be modified.
[0261] Figure 5 This is a schematic diagram of the layer-by-layer optimization stage provided in the embodiment of the present application. Figure 5 As shown, the layer-by-layer optimization stage includes multiple rounds of iterations corresponding to the multiple layers of the topological structure of the oil flow direction. Figure 6 The topology of the oil flow consists of a sea transport component and a land transport component. The sea transport component consists of the terminal, the terminal tank farm, the plant tank farm, and the atmospheric and vacuum unit. The land transport component consists of the pipeline, the plant tank farm, and the atmospheric and vacuum unit. The two components share the last two layers (the plant tank farm and the atmospheric and vacuum unit). In the layer-by-layer optimization phase, each iteration includes the following steps.
[0262] Step 510: Optimize the relevant variables of the current layer node in the second scheduling model to obtain the optimization results of this round.
[0263] The second scheduling model includes physical property reconciliation constraints based on the McCormic envelope method and includes all objectives in the objective function. In the first round of iteration, the iteration starting point of the second scheduling model is the feasibility correction result. In subsequent iterations, the iteration starting point of the second scheduling model is the optimization result of the previous round, and the relevant variables of the upper layer nodes are fixed according to the optimization result of the previous round. Specifically, in this round of optimization, the variable y o,d,t,i 、x o,d,t 、zq o,t,i The values of are equal to the values of the corresponding variables in the previous layer optimization results.
[0264] Step 520: Correct the optimization results of this round according to the nonlinear physical property harmonic constraints.
[0265] Step 530: Determine whether the corrected optimization result of this round satisfies the processing constraints of the atmospheric and vacuum distillation device.
[0266] The target optimization result of the layer-by-layer optimization phase is used to generate the crude oil scheduling plan. The target optimization result is the final optimization result from the latest round that satisfies the processing constraints of the atmospheric and vacuum units after correction. Specifically, the final optimization result is first checked to see if it satisfies the processing constraints of the atmospheric and vacuum units. If so, the final optimization result is used as the target optimization result. Otherwise, the penultimate optimization result is checked to see if it satisfies the processing constraints of the atmospheric and vacuum units. If so, the penultimate optimization result is used as the target optimization result. Otherwise, the penultimate optimization result is checked to see if it satisfies the processing constraints of the atmospheric and vacuum units after correction. This process is repeated until the target optimization result is determined.
[0267] In some embodiments, in each round of iteration of the layer-by-layer optimization stage, if the corrected optimization results of this round do not meet the processing limit constraints of the constant pressure reduction device, the variable constraints can be adjusted. For example, the fixing operation of the relevant variables of the previous layer nodes according to the results of the previous round of optimization is adjusted from a hard fixing method to a soft fixing method.
[0268] For more details on correcting the results of this round of optimization, please refer to Figure 7 and its related descriptions.
[0269] Figure 7 This is a flow chart for correcting the model solution results. The model solution result can be the initial feasible solution in the rapid iteration phase, the first solution result in any iteration of the feasibility correction phase, or the optimization result in any round of the layer-by-layer optimization phase. During the correction process, the actual oil volume of the planned oil type is calculated to ensure that it meets the physical property harmony constraints. Calculating the actual oil volume is to calculate the actual oil volume in the model solution results. As a premise of real scheduling plan, solve the real situation During the calibration process, refer to Figure 6 , traverse the nodes in topological order of oil flow. In addition, for a given node, traverse the time steps in order from earliest to latest. Figure 7 As shown, for a given node (denoted as o) and a given time step (denoted as t), the following steps are performed.
[0270] Step 710 , determining whether node o is involved in crude oil mixing at time step t (denoted as (o, t)).
[0271] If (o, t) involves crude oil mixing, then steps 720 to 730 are executed.
[0272] Step 720, based on the actual oil transmission volume of each oil type of each oil type of each receiving pipeline of node o at time step t and the actual inventory of each oil type of node o at the previous time step, calculate the actual inventory of each oil type of node o at time step t and the actual total inventory of all oil types.
[0273] The actual oil volume of each oil receiving pipeline at node o at time step t (denoted as ) has already been calculated at its receiving node (i.e., parent node o'). For the same oil type (denoted as i), the actual inventory of oil type i at node o at time step t is calculated by adding the actual oil volume transferred by each receiving pipeline at node o at time step t. The total actual inventory of all oil types at node o at time step t is equal to the sum of the actual inventory of each oil type at node o at time step t.
[0274] Step 730, based on the actual inventory of each oil type at node o at time step t and the actual total inventory of all oil types and the planned oil transmission volume of each oil pipeline at node o at time step t, calculate the actual oil transmission volume of each oil type at node o by each oil pipeline at time step t according to the physical property reconciliation constraint.
[0275] Referring to formula (26), for the same oil type (denoted as i), based on the actual inventory of oil type i at node o at time step t and the total real stocks of all oil types And the planned oil delivery volume of the oil pipeline at node o at time step t The actual oil volume transmitted by the oil pipeline at node o at time step t can be calculated The planned oil delivery volume of the oil pipeline at node o at time step t It can be determined from the model solution results.
[0276] If (o, t) does not involve crude oil mixing, step 740 is executed.
[0277] Step 740: Determine the actual oil volume of each oil type transmitted by the oil delivery pipeline at node o at time step t from the model solution results.
[0278] In particular, since source nodes (such as terminals and pipelines) do not involve crude oil mixing, the actual oil transmission volume of each oil type in the delivery pipeline of source node o at time step t is directly determined from the model solution results in the first round of calculation.
[0279] Figure 8 This is an exemplary block diagram of a data processing system for crude oil scheduling provided in an embodiment of the present application. Figure 8 As shown, the system 800 includes a fast iteration module 810, a feasibility correction module 820, and a layer-by-layer optimization module 830, which are respectively used to perform the fast iteration phase, the feasibility correction phase, and the layer-by-layer optimization phase. In some embodiments, the fast iteration module 810 can be omitted.
[0280] More details about system 800 and its modules can be found elsewhere in this document and will not be repeated here.
[0281] refer to Figure 8 The present invention also provides an electronic device 900. The electronic device 900 includes a processor 910 and a memory 920. The memory stores program code. When the program code is executed by the processor 910, the processor 910 executes the data processing method for crude oil scheduling provided in the present invention.
[0282] An embodiment of the present application also provides a computer-readable storage medium, which includes program code. When the storage medium is run on an electronic device, the program code is used to enable the electronic device to execute the data processing method for crude oil scheduling provided in an embodiment of the present application.
[0283] An embodiment of the present application also provides a computer program product, which includes computer instructions, which are stored in a computer-readable storage medium; when a processor of an electronic device obtains the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the electronic device executes the data processing method for crude oil scheduling provided in an embodiment of the present application.
[0284] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A data processing method for crude oil scheduling, characterized in that: The method is executed by at least one processor, and includes a feasibility correction stage and a layer-by-layer optimization stage; The feasibility revision phase includes performing at least one round of iteration until a revision result is obtained, wherein each round of iteration includes: Solving a first scheduling model to obtain a first solution result, wherein the first scheduling model includes a physical property reconciliation constraint based on a McCormic envelope method and does not include at least part of the objective function; Check whether the first solution is feasible; If the first solution result is feasible, correcting the first solution result according to the nonlinear physical property harmonic constraint, and verifying whether the corrected first solution result satisfies the processing restriction constraint of the atmospheric and vacuum distillation device; If the corrected first solution does not satisfy the processing constraint of the atmospheric and vacuum distillation device, performing a first adjustment operation on the first scheduling model; If the corrected first solution result satisfies the processing constraint of the atmospheric and vacuum distillation device, determining the first solution result as the corrected result; If the first solution result is not feasible, performing a second adjustment operation on the first scheduling model; The layer-by-layer optimization stage includes multiple rounds of iterations corresponding to the multiple layers of the topological structure of the oil flow direction, wherein each round of iteration includes: Optimizing the relevant variables of the current layer nodes in the second scheduling model to obtain the optimization results of this round, where the second scheduling model includes physical property harmony constraints based on the McCormic envelope method and includes all objectives in the objective function; in the first round of iteration, the iteration starting point of the second scheduling model is the revised result; in subsequent iterations, the iteration starting point of the second scheduling model is the previous round of optimization results, and the relevant variables of the previous layer nodes are fixed according to the previous round of optimization results; Correct the optimization results of this round according to the nonlinear physical property harmony constraints, and verify whether the corrected optimization results of this round meet the processing constraints of the atmospheric and vacuum distillation device; The target optimization result of the layer-by-layer optimization stage is used to generate a crude oil scheduling plan, wherein the target optimization result is the optimization result of the latest round that satisfies the processing constraints of the atmospheric and vacuum distillation unit after correction.
2. The method according to claim 1, wherein The first adjustment operation includes: determining fixable variables and unfixable variables based on the corrected first solution result; Hard fixing is performed on 0-1 variables among the fixable variables, and soft fixing is performed on continuous variables among the fixable variables; Increasing the piecewise precision of the non-fixable variable, and updating the physical property harmonic constraint based on the McCormic envelope method according to the increased piecewise precision; Reduce the maximum allowable deviations between the upper and lower bounds of the crude oil composition, and update the processing constraints of the atmospheric and vacuum units based on the reduced maximum allowable deviations; The second adjustment operation includes: determining the value of the 0-1 variable among the fixable variables, and canceling the hard fixation of the 0-1 variable whose value is 0.
3. The method according to claim 2, wherein: The first adjustment operation further includes: The segmentation accuracy of the fixable variable is maintained or increased, and the physical property harmonic constraint based on the McCormic envelope method is updated according to the increased segmentation accuracy, wherein the segmentation accuracy increment of the fixable variable is smaller than the segmentation accuracy increment of the non-fixable variable.
4. The method according to claim 2, wherein Determining the fixable variables and the unfixable variables based on the corrected first solution result includes: Determining a target binary set based on the corrected first solution result, the target binary set including a plurality of binary sets (d, t) that satisfy a first condition, wherein the first condition is that the atmospheric and vacuum distillation device d violates a processing constraint at time step t; Determining a parent node set based on the target two-tuple set, the parent node set including a plurality of two-tuples (o, t) that satisfy a second condition, wherein the second condition is that node o is a parent node of the atmospheric and vacuum distillation device d when the processing constraint is violated; Dividing a target quadruple set into a fixable subset and a non-fixable subset based on the parent node set, the target quadruple set including a plurality of quadruples requiring linearization, wherein each quadruple includes a start point, an end point, a time, and an oil type; a quadruple (o, d, t, i) in the non-fixable subset meets a third condition, wherein (o, t) belongs to the parent node set, d is a child node of o, and (o, d, t, i) belongs to the target quadruple set; determining fixed variables corresponding to the fixable subset; The unfixable variables corresponding to the unfixable subset are determined.
5. The method according to claim 1, wherein The method further includes a rapid iteration phase, which includes: sorting the multiple miscible oil tanks according to the number of oil types and the amount of oil in the tanks in an initial state, and screening a target oil tank combination based on the sorting result; the target oil tank combination includes the oil tanks at the front of the sorting result, and the oil tanks with more oil types and larger oil amounts are ranked higher in the sorting result; For each tank in the plurality of miscible tanks, perform the following steps: Determining whether the oil tank belongs to the target oil tank combination; If the oil tank belongs to the target oil tank combination, the basic scheduling model is adjusted as follows: the inventory ratio of each oil type in the oil tank at each time step in the preset multiple time steps is fixed to the inventory ratio of each oil type in the oil tank in the initial state; based on the ratio of each crude oil component in the oil tank in the initial state, the upper and lower bounds of each crude oil component in the oil tank in each time step in the multiple time steps are determined; based on the upper and lower bounds of each crude oil component in the oil tank in each time step in the multiple time steps, corresponding component upper and lower bound constraints are added; If the oil tank does not belong to the target oil tank combination, the basic scheduling model is adjusted as follows: only the inventory ratio of each oil type in the oil tank at the first time step is fixed to the inventory ratio of each oil type in the oil tank at the initial state, wherein the first time step is the earliest time step among the multiple time steps; based on the ratio of each crude oil component in the oil tank at the initial state, the upper and lower bounds of each crude oil component in the oil tank at the first time step are determined; based on the upper and lower bounds of each crude oil component in the oil tank at the first time step, corresponding component upper and lower bound constraints are added; Solving the adjusted basic scheduling model to obtain an initial feasible solution, wherein the basic scheduling model does not include the physical property reconciliation constraint and at least part of the objective function; Correcting the initial feasible solution according to the nonlinear physical property harmonic constraint, and verifying whether the corrected initial feasible solution satisfies the processing constraint of the atmospheric and vacuum distillation device; If the corrected initial feasible solution does not satisfy the processing constraints of the atmospheric and vacuum distillation device, the feasibility correction stage is entered; If the corrected initial feasible solution satisfies the processing constraints of the constant pressure reduction device, the feasibility correction stage is skipped and the layer-by-layer optimization stage is directly entered. Accordingly, in the first round of iteration of the layer-by-layer optimization stage, the iteration starting point of the second scheduling model is adjusted to the initial feasible solution.
6. The method according to claim 1 or 5, wherein: The correction process of the model solution includes: Traverse the nodes in topological order according to the oil flow direction; For a given node, traverse the time steps from earliest to latest; For a given node and a given time step, determining whether the node is involved in crude oil mixing at the time step; If the node involves crude oil mixing at this time step, then: based on the actual transmission volume of each oil type of each receiving pipeline at this node at this time step and the actual inventory of each oil type at this node in the previous time step, calculate the actual inventory of each oil type and the actual total inventory of all oil types at this node at this time step; based on the actual inventory of each oil type and the actual total inventory of all oil types at this node at this time step and the planned transmission volume of each oil pipeline at this node at this time step, calculate the actual transmission volume of each oil type of each oil pipeline at this node at this time step according to the physical property harmony constraint; If the node is not involved in crude oil mixing at this time step, the actual oil transmission volume of each oil type of the oil pipeline of the node at this time step is determined from the solution results of the model.
7. The method according to claim 1 or 5, wherein: The objective function includes an operation change objective, a stability objective, and a special operation objective. The operation change objective is used to minimize the operation changes during the scheduling period. The stability objective is used to minimize the changes in the physical properties of the oil collected by the atmospheric and vacuum distillation device during the scheduling period. The special operation objective is used to minimize the number of simultaneous collection and payment operations during the scheduling period. The at least part of the targets includes the operation change target and the special operation target.
8. A data processing system for crude oil scheduling, characterized in that: It includes a feasibility correction module for executing the feasibility correction phase and a layer-by-layer optimization module for executing the layer-by-layer optimization phase; The feasibility revision phase includes performing at least one round of iteration until a revision result is obtained, wherein each round of iteration includes: Solving a first scheduling model to obtain a first solution result, wherein the first scheduling model includes a physical property reconciliation constraint based on a McCormic envelope method and does not include at least part of the objective function; Check whether the first solution is feasible; If the first solution result is feasible, correcting the first solution result according to the nonlinear physical property harmonic constraint, and verifying whether the corrected first solution result satisfies the processing restriction constraint of the atmospheric and vacuum distillation device; If the corrected first solution does not satisfy the processing constraint of the atmospheric and vacuum distillation device, performing a first adjustment operation on the first scheduling model; If the corrected first solution result satisfies the processing constraint of the atmospheric and vacuum distillation device, determining the first solution result as the corrected result; If the first solution result is not feasible, performing a second adjustment operation on the first scheduling model; The layer-by-layer optimization stage includes multiple rounds of iterations corresponding to the multiple layers of the topological structure of the oil flow direction, wherein each round of iteration includes: Optimizing the relevant variables of the current layer nodes in the second scheduling model to obtain the optimization results of this round, where the second scheduling model includes physical property harmony constraints based on the McCormic envelope method and includes all objectives in the objective function; in the first round of iteration, the iteration starting point of the second scheduling model is the revised result; in subsequent iterations, the iteration starting point of the second scheduling model is the previous round of optimization results, and the relevant variables of the previous layer nodes are fixed according to the previous round of optimization results; Correct the optimization results of this round according to the nonlinear physical property harmony constraints, and verify whether the corrected optimization results of this round meet the processing constraints of the atmospheric and vacuum distillation device; The target optimization result of the layer-by-layer optimization stage is used to generate a crude oil scheduling plan, wherein the target optimization result is the optimization result of the latest round that satisfies the processing constraints of the atmospheric and vacuum distillation unit after correction.
9. The system according to claim 8, wherein Also included is a fast iteration module for executing a fast iteration phase, wherein the fast iteration phase includes: sorting the multiple miscible oil tanks according to the number of oil types and the amount of oil in the tanks in an initial state, and screening a target oil tank combination based on the sorting result; the target oil tank combination includes the oil tanks at the front of the sorting result, and the oil tanks with more oil types and larger oil amounts are ranked higher in the sorting result; For each tank in the plurality of miscible tanks: Determine the inventory ratio of each oil type in the oil tank in the initial state, where the inventory ratio is the ratio of the inventory of the corresponding oil type to the total inventory of all oil types; Determining whether the oil tank belongs to the target oil tank combination; If the oil tank belongs to the target oil tank combination, the basic scheduling model is adjusted as follows: the inventory ratio of each oil type in the oil tank at each time step in the preset multiple time steps is fixed to the inventory ratio of each oil type in the oil tank in the initial state; the proportion of the same crude oil component of each oil type in the oil tank in the initial state is accumulated to determine the upper and lower bounds of each crude oil component in the oil tank at each time step in the multiple time steps; based on the upper and lower bounds of each crude oil component in the oil tank at each time step in the multiple time steps, corresponding component upper and lower bound constraints are added; If the oil tank does not belong to the target oil tank combination, the basic scheduling model is adjusted as follows: only the inventory ratio of each oil type in the oil tank at the first time step is fixed to the inventory ratio of each oil type in the oil tank at the initial state, wherein the first time step is the earliest time step among the multiple time steps; based on the ratio of each crude oil component in the oil tank at the initial state, the upper and lower bounds of each crude oil component in the oil tank at the first time step are determined; based on the upper and lower bounds of each crude oil component in the oil tank at the first time step, corresponding component upper and lower bound constraints are added; Solving the adjusted basic scheduling model to obtain an initial feasible solution, wherein the basic scheduling model does not include the physical property reconciliation constraint and at least part of the objective function; Correcting the initial feasible solution according to the nonlinear physical property harmonic constraint, and verifying whether the corrected initial feasible solution satisfies the processing constraint of the atmospheric and vacuum distillation device; If the corrected initial feasible solution does not satisfy the processing constraints of the atmospheric and vacuum distillation device, the feasibility correction stage is entered; If the corrected initial feasible solution satisfies the processing constraints of the constant pressure reduction device, the feasibility correction stage is skipped and the layer-by-layer optimization stage is directly entered. Accordingly, in the first round of iteration of the layer-by-layer optimization stage, the iteration starting point of the second scheduling model is adjusted to the initial feasible solution.
10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the data processing method for crude oil scheduling according to any one of claims 1 to 7.