Crude oil resource scheduling method and device and electronic equipment
By establishing a crude oil scheduling model and using an optimized algorithm driven by inspirational rules, the problem of low crude oil scheduling efficiency in existing technologies is solved, and the effect of quickly obtaining the optimal scheduling scheme is achieved.
Patent Information
- Application Number
- CN202310919533.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art scheduling scheme that is difficult to quickly obtain the optimal target value in crude oil scheduling, resulting in the crude oil scheduling of refineries relies on manual experience and is inefficient.
By establishing a crude oil scheduling model and using inspiration rules to determine the optimization algorithm, including competitive particle group algorithms and adaptive differential evolution algorithms to solve the optimal crude oil scheduling scheme.
During a reasonable calculation time, quickly solve a satisfactory and flexible crude oil scheduling solution, which improves the scientific and efficient scientificity.
Smart Images

Figure CN119378832A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of crude oil scheduling optimization, and in particular to a method, device, electronic equipment and storage medium for scheduling crude oil resources. Background Art
[0002] Crude oil scheduling, as the upstream link of the entire oil refining scheduling process, directly affects the stability and economy of the subsequent production process. It is the most critical and challenging scheduling task in the entire refining process.
[0003] The decision-making process of crude oil scheduling includes crude oil loading and unloading, crude oil blending, processing in atmospheric and vacuum units, and inventory management. The decision space of this type of optimization problem involves high-dimensional discrete variables and continuous variables, and is subject to nonlinear constraints caused by physical property calculations and component tracking. It belongs to a large-scale mixed integer nonlinear optimization problem. The huge computational scale has limited the performance of traditional optimization methods, making it difficult to obtain a feasible scheduling plan within a reasonable computing time. Therefore, the crude oil scheduling plan of existing refineries relies heavily on manual experience. However, with the gradual expansion of the scheduling scale of refineries, the manual scheduling method is not only time-consuming and labor-intensive, but also difficult to form a scientific and efficient scheduling plan. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for scheduling crude oil resources, which can quickly obtain a crude oil scheduling plan with an optimal target value.
[0005] In order to achieve the above-mentioned purpose, an embodiment of the present invention provides a method for crude oil resource scheduling, which includes: establishing a crude oil scheduling model according to a scheduling process; determining an optimization algorithm for the crude oil scheduling model using heuristic rules; obtaining scheduling parameters, importing the scheduling parameters into the crude oil scheduling model, solving it through the optimization algorithm, and obtaining a crude oil scheduling plan with an optimal target value.
[0006] Optionally, establishing a crude oil scheduling model according to the scheduling process includes:
[0007] Determine decision variables, objective functions and constraints according to the scheduling process to establish a crude oil scheduling model;
[0008] The scheduling process at least includes a crude oil loading and unloading process, a crude oil transfer process and a crude oil processing process.
[0009] Optionally, the decision variables include at least: the receiving oil tank and its receiving oil volume, the delivering oil tank and its delivering oil volume and residual oil processing data; the objective function is the switching operation cost of the entire scheduling time period;
[0010] The constraints include: unloading operation constraints, feeding operation constraints, processing constraints, material balance constraints, tank area inventory constraints and processing load constraints.
[0011] Optionally, the using heuristic rules to determine the optimization algorithm for the crude oil scheduling model includes:
[0012] Initialize the decision variables to obtain the initial population;
[0013] Performing global optimization on the initial population by using a competitive particle swarm algorithm to obtain an optimization result;
[0014] An infeasible solution in the optimization result is obtained, and local variables of the infeasible solution are optimized by using an adaptive differential evolution algorithm.
[0015] Optionally, the initializing the decision variables to obtain an initial population includes:
[0016] Establishing selection rules for receiving and paying oil tanks based on experience, wherein the selection rules include a selection rule for receiving oil tanks and a selection rule for paying oil tanks;
[0017] Initialize the oil quantity to obtain the initial value of the oil quantity;
[0018] Determine the set of fuel tanks according to the fuel tank selection rule and the initial value of fuel quantity;
[0019] Determine the oil receiving tank according to the oil receiving tank selection rule, and calculate the oil unloading amount according to the oil receiving tank capacity and the oil unloading rate;
[0020] Construct fully coded individuals based on the decision variables.
[0021] Optionally, the initial population is globally optimized by a competitive particle swarm algorithm to obtain an optimization result including:
[0022] Calculating the fitness function of individuals in the population;
[0023] According to the fitness function, randomly grouping individuals in the population, each group including at least two individuals, and comparing the fitness values of the individuals;
[0024] The population is adjusted according to the fitness value and enters the next generation population until the termination condition is met, and then the optimization result is output.
[0025] Optionally, the calculating the fitness function of the individuals in the population includes:
[0026]
[0027]
[0028]
[0029]
[0030] Among them, g i (x) represents the i-th equality constraint, h i (x) represents the i-th inequality constraint of individual x, p represents the number of equality constraints, q represents the total number of constraints, CV i (x) is the i-th constraint violation degree of individual x, CVN i (x) is whether individual x violates the i-th constraint. If the constraint is violated, it is 1, otherwise it is 0. CVN(x) is the number of constraints violated by individual x, and CV(x) is the total constraint violation degree of individual x.
[0031] Optionally, obtaining an infeasible solution from the optimization result and performing local variable optimization on the infeasible solution through an adaptive differential evolution algorithm includes: fixing the decision variable for the oil delivery tank unchanged according to the optimization result, initializing the oil delivery amount variable in the decision vector, and obtaining an initial population for the local optimization process; calculating the fitness of individuals in the population; for each individual in the initial population, generating three test individuals based on three test vector generation strategies, and determining the fitness of the test individuals; selecting individuals with the best fitness to enter the next generation until the termination condition is met, and outputting the optimal result; the test vector is a vector of offspring individuals generated after the mutation and crossover of any two individuals from the same generation.
[0032] Optionally, the scheduling parameters include at least a scheduling time period, tanker information, crude oil tank area information, residual oil tank area information, atmospheric and vacuum unit processing information and crude oil information.
[0033] On the other hand, the present invention also proposes a device for crude oil resource scheduling, which includes: an initial module, used to establish a crude oil scheduling model according to the scheduling process; a first processing module, used to determine an optimization algorithm for the crude oil scheduling model using heuristic rules; a second processing module, used to obtain scheduling parameters and import the scheduling parameters into the crude oil scheduling model, and solve the final scheduling model through the optimization algorithm to obtain a crude oil scheduling plan with an optimal target value.
[0034] Optionally, the use of heuristic rules to determine the optimization algorithm for the crude oil scheduling model includes: initializing decision variables to obtain an initial population; globally optimizing the initial population through a competitive particle swarm algorithm to obtain an optimization result; obtaining an infeasible solution in the optimization result, and performing local variable optimization on the infeasible solution through an adaptive differential evolution algorithm.
[0035] Optionally, the initialization of the decision variables to obtain the initial population includes: establishing selection rules for receiving and paying oil tanks based on experience, the selection rules include receiving oil tank selection rules and paying oil tank selection rules; initializing the paying oil quantity to obtain an initial value of the paying oil quantity; determining the paying oil tank set based on the paying oil tank selection rules and the initial value of the paying oil quantity; determining the receiving oil tank based on the receiving oil tank selection rules, and calculating the unloading oil quantity based on the receiving oil tank capacity and the unloading rate; and constructing fully coded individuals based on the decision variables.
[0036] Optionally, the initial population is globally optimized by a competitive particle swarm algorithm to obtain an optimization result, including: calculating the fitness function of the individuals in the population; randomly grouping the individuals in the population according to the fitness function, each group including at least two individuals, and comparing the fitness values of the individuals; adjusting the population according to the fitness value and entering the next generation population until the termination condition is met, and then outputting the optimization result.
[0037] Optionally, obtaining an infeasible solution from the optimization result and performing local variable optimization on the infeasible solution through an adaptive differential evolution algorithm includes: fixing the decision variable for the oil delivery tank unchanged according to the optimization result, initializing the oil delivery amount variable in the decision vector, and obtaining an initial population for the local optimization process; calculating the fitness of individuals in the population; for each individual in the initial population, generating three test individuals based on three test vector generation strategies, and determining the fitness of the test individuals; selecting individuals with the best fitness to enter the next generation until the termination condition is met, and outputting the optimal result; the test vector is a vector of offspring individuals generated after the mutation and crossover of any two individuals from the same generation.
[0038] On the other hand, the present invention also proposes an electronic device comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the above-mentioned method of crude oil resource scheduling by executing the instructions stored in the memory.
[0039] On the other hand, the present invention further proposes a machine-readable storage medium storing machine instructions, which, when executed on a machine, enables the machine to execute the above-mentioned method for scheduling crude oil resources.
[0040] A method for scheduling crude oil resources of the present invention comprises: establishing a crude oil scheduling model according to a scheduling process; determining an optimization algorithm for the crude oil scheduling model using heuristic rules; obtaining scheduling parameters, importing the scheduling parameters into the crude oil scheduling model, solving through the optimization algorithm, and obtaining a crude oil scheduling plan with an optimal target value. The method establishes a large-scale crude oil scheduling optimization model and combines a two-stage evolutionary optimization algorithm driven by heuristic rules, and finally quickly solves a satisfactory and flexible crude oil scheduling plan within a reasonable computing time.
[0041] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0043] Figure 1 It is a flow chart of a method for scheduling crude oil resources of the present invention;
[0044] Figure 2 It is a schematic diagram of the physical resources constituting the crude oil scheduling topology structure of the present invention;
[0045] Figure 3 is a schematic diagram of a heuristic rule-driven two-stage evolutionary optimization algorithm of the present invention;
[0046] Figure 4 is a schematic diagram of the coding structure of the scheduling period of the present invention;
[0047] Figure 5 It is a schematic diagram of global optimization performed by the competitive particle swarm algorithm of the present invention;
[0048] Figure 6 It is a schematic diagram of the adaptive differential evolution algorithm of the present invention for performing the second stage local variable optimization. DETAILED DESCRIPTION
[0049] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0050] Embodiment 1
[0051] Figure 1 is a flow chart of a method for scheduling crude oil resources of the present invention, such as Figure 1As shown, step S101 is to establish a crude oil scheduling model according to the scheduling process. Specifically, the establishment of the crude oil scheduling model according to the scheduling process includes: determining decision variables, objective functions and constraints according to the scheduling process to establish the crude oil scheduling model; the scheduling process at least includes a crude oil loading and unloading process, a crude oil transfer process and a crude oil processing process.
[0052] The decision variables at least include: receiving oil tanks and their receiving oil volume, delivering oil tanks and their delivering oil volume and residual oil processing data. The decision variables are the variables that need to be optimized in the optimization problem, and the values of these variables have an impact on the optimality of the target value. The objective function is the switching operation cost of the entire scheduling time period; the constraints include: unloading operation constraints, feeding operation constraints, processing constraints, material balance constraints, tank area inventory constraints and processing load constraints. The constraints are used to constrain the decision variables, and the values of the decision variables need to meet these conditions.
[0053] According to a specific implementation method, establishing a large-scale crude oil scheduling model based on discrete time representation specifically includes the following steps:
[0054] Step 1-1, determine the decision variables, including: 1) the oil receiving tank that receives the oil unloaded by the oil tanker; 2) the flow rate of crude oil from the oil tanker to the oil receiving tank; 3) the oil supply tank that supplies the atmospheric and vacuum unit; 4) the flow rate of crude oil from the oil supply tank to the atmospheric and vacuum unit; 5) the residual oil processing plan of the atmospheric and vacuum unit;
[0055] Step 1-2, determine the optimization objective function:
[0056]
[0057] Formula (1) indicates that the optimization objective is to minimize the switching operation cost of the atmospheric and vacuum distillation unit during the entire scheduling period; in the objective function, CO u,n represents the total number of times the auxiliary oil tank switching and residual oil processing plan switching occurred in the u-th atmospheric and vacuum unit in the n-th scheduling cycle; ω represents the operating cost of switching the atmospheric and vacuum unit once;
[0058] Step 1-3, determine the constraints, including:
[0059] (1) Constraints on tanker unloading operations
[0060] a. In order to avoid unloading a large amount of crude oil of different qualities into the same oil tank, formula (2) defines that a crude oil tank can only receive one type of crude oil from a tanker during the scheduling period:
[0061]
[0062] In formula (2), VU v,c,t,nis a binary variable, which indicates whether the vth tanker unloads the cth crude oil into the tth tank in the nth scheduling period. If unloading, it is 1, otherwise it is 0;
[0063] b. The oil receiving and delivering operations of each oil tank cannot be carried out at the same time:
[0064]
[0065] In formula (3), TC t,u,n is a binary variable, which indicates whether the t-th oil tank delivers oil to the u-th atmospheric and vacuum device in the n-th scheduling period. If it delivers oil, it is 1, otherwise it is 0;
[0066] (2) Constraints on feeding operation of atmospheric and vacuum devices
[0067] a. A crude oil tank can supply oil to two atmospheric and vacuum devices at most at the same time:
[0068]
[0069] b. One atmospheric and vacuum tank can receive oil from five crude oil tanks at most at the same time:
[0070]
[0071] c. Constraints on switching of auxiliary oil tanks feeding the atmospheric and vacuum devices:
[0072]
[0073]
[0074]
[0075]
[0076] CTU in formula (6a)-(6d) t,u,n is a binary variable, which indicates whether the connection status between the t-th oil tank and the u-th device changes between the n-1-th to the n-th scheduling period. If it changes, it is 1, otherwise it is 0;
[0077] (3) Constraints on processing and operation of atmospheric and vacuum devices
[0078] a. The atmospheric and vacuum unit can only produce one type of residual oil in one scheduling cycle:
[0079]
[0080] In formula (7) UR u,r,n is a binary variable, which indicates that the u-th atmospheric and vacuum unit produces the r-th type of residual oil in the n-th scheduling period;
[0081] b. Constraints on the switching process of the atmospheric and vacuum device:
[0082]
[0083]
[0084]
[0085]
[0086] In formulas (8a)-(8d), CUR u,r,n is a binary variable, which indicates whether the type of residual oil r produced by the u-th atmospheric and vacuum unit changes between the n-1th and nth scheduling periods. If it changes, it is 1, otherwise it is 0;
[0087] c. The switching operation of the atmospheric and vacuum distillation device in a scheduling cycle is defined as follows:
[0088]
[0089]
[0090]
[0091] (4) Material balance constraints
[0092] a. Material balance constraints for tankers, crude oil tank farms and residual oil tank farms:
[0093]
[0094]
[0095]
[0096]
[0097] Formulas (10)-(13) represent the material balance constraints of the tanker, the material balance constraints of the crude oil tank area, the material balance constraints of each component in the crude oil tank, and the material balance constraints of the residual oil tank area, respectively; where IV v,c,n and ITC t,c,n FV represents the storage volume of the cth crude oil in the vth tanker and the tth oil tank in the nth scheduling period; v,c,t,n represents the volume of crude oil of type c delivered from the vth tanker to the tth tank in the nth scheduling period; FR u,r,n It represents the quality of the rth residual oil produced by the uth atmospheric and vacuum unit in the nth scheduling period; CR r It represents the consumption rate of the rth residual oil; IT t,n and IR r,nThey represent the inventory of the tth oil tank and the rth residual oil tank at the end of the nth scheduling period respectively;
[0098] b. The concentration of each component oil in the crude oil tank should be consistent with the concentration of the component oil fed to the atmospheric and vacuum device:
[0099]
[0100] In equation (14) FT t,u,n Indicates the amount of oil delivered from the t-th oil tank to the u-th atmospheric and vacuum device in the n-th scheduling cycle; FTC t,c,u,n It represents the volume of the cth crude oil delivered by the tth oil tank to the uth atmospheric and vacuum unit in the nth scheduling period;
[0101] (5) Tank farm inventory and processing load constraints
[0102] a. Upper and lower limit constraints of crude oil tank area liquid level:
[0103]
[0104] In formula (15), P c,′den′ represents the density of the cth crude oil; and Respectively represent the upper and lower limits of the liquid level of the t-th oil tank; TS t represents the bottom area of the t-th oil tank;
[0105] b. Upper and lower limit constraints of residual oil tank inventory:
[0106]
[0107] In formula (16) and They represent the upper and lower limits of the inventory of the rth type of residual oil tank respectively;
[0108] c. Upper and lower limits of processing load of atmospheric and vacuum devices:
[0109]
[0110] In formula (17) FU u,n It represents the processing load of the uth atmospheric and distillation unit in the nth scheduling period; and They represent the upper and lower limits of the processing load of the uth atmospheric and vacuum distillation device respectively;
[0111] (6) Processing constraints of atmospheric and vacuum devices
[0112] a. Constraints on key attributes of feed to atmospheric and vacuum units (i.e., sulfur content, acid value, and density):
[0113]
[0114] In formula (18) FUC u,c,n represents the volume of the cth crude oil delivered by the oil tank to the uth atmospheric and vacuum unit in the nth scheduling period; P c,k represents the kth key attribute value of the cth crude oil; and They represent the upper and lower limits of the kth key property of the feed of the uth atmospheric and vacuum unit respectively;
[0115] b. Constraints on the side lines of the atmospheric and vacuum unit (i.e. naphtha, normal line, diesel, wax oil and washing oil) and residual oil yields:
[0116]
[0117]
[0118]
[0119] In formula (19), yield u,c,s represents the yield of the sth side product of the cth crude oil processed by the uth atmospheric and vacuum unit; FO u,s,n represents the quality of the sth side product produced by the uth atmospheric and vacuum distillation unit in the nth scheduling period; FR in formula (20) u,r,n represents the quality of the rth residual oil produced by the uth atmospheric and vacuum unit in the nth scheduling period, RC r represents the set of crude oil types that produce the rth type of residual oil. In formula (21) and They respectively represent the upper and lower limits of the flow rate of the s-th side line product of the u-th constant pressure reduction unit.
[0120] This method establishes a large-scale crude oil scheduling optimization model that conforms to the crude oil scheduling scale structure and actual needs of refineries.
[0121] Step S102 is to determine the optimization algorithm for the crude oil scheduling model using heuristic rules. Specifically, the determination of the optimization algorithm for the crude oil scheduling model using heuristic rules includes: initializing the decision variables to obtain an initial population; performing global optimization on the initial population through a competitive particle swarm algorithm to obtain an optimization result; obtaining an infeasible solution in the optimization result, and performing local variable optimization on the infeasible solution through an adaptive differential evolution algorithm.
[0122] According to a specific implementation method, the initialization of the decision variables to obtain the initial population includes: establishing selection rules for receiving and paying oil tanks based on experience, the selection rules include receiving oil tank selection rules and paying oil tank selection rules; initializing the paying oil quantity to obtain an initial value of the paying oil quantity; determining the paying oil tank set based on the paying oil tank selection rules and the initial value of the paying oil quantity; determining the receiving oil tank based on the receiving oil tank selection rules, and calculating the unloading oil quantity based on the receiving oil tank capacity and the unloading rate; and constructing a fully coded individual based on the decision variables.
[0123] The global optimization of the initial population by means of a competitive particle swarm algorithm to obtain the optimization result comprises: calculating the fitness function of the individuals in the population; randomly grouping the individuals in the population according to the fitness function, each group including at least two individuals, and comparing the fitness values of the individuals; adjusting the population according to the fitness value and entering the next generation population until the termination condition is met, and then outputting the optimization result.
[0124] The calculating the fitness function of individuals in the population comprises:
[0125]
[0126]
[0127]
[0128]
[0129] Among them, g i (x) represents the i-th equality constraint, h i (x) represents the i-th inequality constraint of individual x, p represents the number of equality constraints, q represents the total number of constraints, CV i (x) is the i-th constraint violation degree of individual x, CVN i (x) is whether individual x violates the i-th constraint. If the constraint is violated, it is 1, otherwise it is 0. CVN(x) is the number of constraints violated by individual x, and CV(x) is the total constraint violation degree of individual x.
[0130] Specifically, the fitness function value of individual x is recorded as (CVN(x), CV(x), f(x)); two individuals are randomly selected from the population and recorded as X1 and X2; the fitness function values of X1 and X2 are compared. If the following formula is satisfied, X1 is better than X2; otherwise, X2 is better than X1:
[0131]
[0132] The method of obtaining an infeasible solution from the optimization result and performing local variable optimization on the infeasible solution through an adaptive differential evolution algorithm includes: fixing the decision variable of the oil tank payment unchanged according to the optimization result, initializing the oil payment amount variable in the decision vector, and obtaining an initial population of the local optimization process; calculating the fitness of individuals in the population; generating three test individuals for each individual in the initial population based on three test vector generation strategies, and determining the fitness of the test individuals; selecting individuals with the best fitness to enter the next generation until the termination condition is met, and then outputting the best result; the test vector is a vector of offspring individuals generated after the mutation and crossover of any two individuals from the same generation.
[0133] According to a specific implementation, solving the large-scale crude oil scheduling optimization model according to the optimization algorithm specifically includes the following steps:
[0134] Step 2-1, parameter initialization: set the population size and the maximum number of evaluations;
[0135] Step 2-2, population initialization, the specific steps are as follows:
[0136] (1) Based on empirical knowledge, the selection rules for receiving and paying oil tanks are established. The specific rules are as follows:
[0137] a. Oil receiving tank selection rules:
[0138] i. Prioritize unloading oil into empty tanks;
[0139] ii. If condition i is not met, the crude oil to be unloaded and the residual oil produced by the tank bottom oil are calculated according to the similarity calculation formula defined in formula (22), and the crude oil tank with high similarity is selected as the oil receiving tank selection range;
[0140]
[0141] In formula (22), R v,c,t Indicates the similarity between the crude oil to be unloaded and the residual oil produced by the tank bottom oil; CP c Indicates the type of residual oil produced by the cth crude oil; UJ v represents the set of crude oil types unloaded from the vth tanker; BJ t Represents the crude oil type set of the bottom oil of the t-th oil tank;
[0142] iii. Select the tank with the largest capacity among the crude oil tanks with the highest similarity to unload the oil;
[0143] b. Subsidiary oil tank selection rule: Considering that selecting a crude oil tank that can produce relatively few types of residual oil in the early stage of scheduling can ensure a larger feasible domain in the later stage of scheduling, the selection probability of the supplementary oil tank is defined as follows:
[0144]
[0145] In formula (23), AT represents the set of oil tanks that meet the inventory lower limit;
[0146] (2) Initialize the fuel delivery amount according to equations (24) and (25):
[0147]
[0148]
[0149] In formula (24), rand represents a random number generated based on uniform distribution in [0,1]; X u,p,n represents the random number of the p-th oil tank of the u-th device in the n-th scheduling period; CF in formula (25) u,p,n It represents the oil delivery amount of the pth oil delivery tank of the uth device in the nth scheduling period; and They respectively represent the upper and lower limits of the processing load of the u-th atmospheric and vacuum distillation device.
[0150] (3) determining a set of fuel delivery tanks based on the fuel delivery tank selection rule and the initial value of the fuel delivery amount;
[0151] (4) determining an oil receiving tank based on the oil receiving tank set selection rule, and calculating the oil unloading amount according to the capacity of the selected oil receiving tank and the oil unloading rate;
[0152] (5) Construct individuals with complete coding based on the decision variables; if the total number of individuals in the population does not meet the population size, repeat steps (1)-(4); otherwise, end;
[0153] Step 2-3, based on the initial population obtained in step 2-2, a competitive particle swarm algorithm is used for global optimization (particle swarm algorithm is also called particle swarm optimization algorithm or bird flock foraging algorithm), including: calculating the fitness function of the individuals in the population; according to the fitness function, randomly grouping the individuals in the population, each group includes at least two individuals, and comparing the fitness values of the individuals; adjusting the population according to the fitness value and entering the next generation population until the termination condition is met, and then outputting the optimization result. The specific steps are as follows:
[0154] (1) Evaluate the fitness function values of all individuals in the population according to equations (26)-(29). The fitness function value of individual x is recorded as (CVN(x), CV(x), f(x));
[0155]
[0156]
[0157]
[0158]
[0159] In formula (26), g i (x) represents the i-th equality constraint; h i (x) represents the i-th inequality constraint of individual x; p represents the number of equality constraints; q represents the total number of constraints; CV i (x) represents the i-th constraint violation degree of individual x; CVN in formula (27) i (x) indicates whether individual x violates the i-th constraint, if the constraint is violated, it is 1, otherwise it is 0; in formula (28), CVN(x) indicates the number of constraints violated by individual x; in formula (29), CV(x) indicates the total constraint violation degree of individual x;
[0160] (2) Randomly select two individuals from the population, denoted as X1 and X2;
[0161] (3) Compare the fitness function values of X1 and X2. If they satisfy equation (30), then X1 is better than X2; otherwise, X2 is better than X1.
[0162]
[0163] (4) The individuals with better fitness function values of X1 and X2 enter the next generation population, and the individuals with worse fitness function values enter the next generation population after being updated by equations (31) and (32), and the fitness function values are calculated according to step (1);
[0164]
[0165] X l,n (g+1)=X l,n (g)+V l,n (g+1) (32)
[0166] (5) If the first stage optimization does not reach the maximum number of evaluations, repeat steps (2)-(4); otherwise, end.
[0167] Step 2-4: Based on the first-stage optimization results obtained in step 2-3, an adaptive differential evolution algorithm is used to optimize the local variables in the second stage for infeasible solutions. The specific steps are as follows:
[0168] (1) Based on the optimization results of step 2-3, the optimization value of the decision variable for the oil tank payment is fixed, and only the oil payment amount variable in the decision vector is initialized. The initialization process is consistent with step 2-2;
[0169] (2) Evaluate the population fitness function value. The evaluation mechanism is consistent with step 2-3(1);
[0170] (3) For each individual x in the second-stage initial population obtained in step (2), i , three corresponding test vectors u are generated through three test vector generation strategies i1 、u i2 and u i3 , and evaluate u i1 、u i2 and u i3 The fitness function value of , the evaluation mechanism is consistent with step 2-3 (1); among them, the three trial vector generation strategies are defined as follows:
[0171] a. “rand / 1 / bin” strategy
[0172]
[0173] b. "rand / 2 / bin" strategy
[0174]
[0175] c. "current-to-rand / 1" strategy
[0176] u i,g =x i,g +rand·(x r1,g -x i,g )+F·(x r2,g -x r3,g ) (35)
[0177] In formulas (33)-(35), x i,g represents individual i in the gth generation; u i,g represents the test vector after crossover mutation of individual i in the gth generation; u i,j,g represents its jth component; r1, r2, r3, r4 and r5 represent five individuals randomly selected from the g-th generation population; F represents the mutation factor; CR represents the crossover probability;
[0178] (4) Evaluate and compare the fitness function values of the test vectors according to steps 2-3 (1) and (3), and select the test vector with the best fitness value, denoted as u i ;
[0179] (5) Compare x according to step 2-3(3) i and u i The fitness function value of x i Better than u i , then x i Enter the next generation population; otherwise, u i Enter the next generation of population;
[0180] (6) If the algorithm has not reached the maximum number of evaluations, repeat steps (3)-(5); otherwise, terminate.
[0181] This method first uses empirical knowledge to form heuristic rules, and constructs an initial solution set with good performance based on the rules to perform global optimization in the first stage; then, the infeasible solutions in the evolution process are repaired in the second stage to guide the infeasible solutions to evolve towards the feasible domain.
[0182] Step S103 is to obtain scheduling parameters, import the scheduling parameters into the crude oil scheduling model, solve them through the optimization algorithm, and obtain a crude oil scheduling plan with an optimized target value. The scheduling parameters at least include scheduling time period, tanker information, crude oil tank area information, residual oil tank area information, atmospheric and vacuum unit processing information and crude oil information.
[0183] According to a specific implementation method, scheduling parameters such as scheduling time period, tanker information (including tanker arrival time, crude oil loading and unloading rate), crude oil tank area and residual oil tank area information (including quantity, initial inventory and capacity upper and lower limits), atmospheric and vacuum unit processing information (including processing load upper and lower limits, feed key attribute upper and lower limits and side line flow rate upper and lower limits) and crude oil information (including key attribute values, yield and output residual oil type) are configured based on the crude oil scheduling model; and the scheduling parameters are imported into the optimization model, and the model is solved by a heuristic rule-driven two-stage evolutionary optimization algorithm to obtain a crude oil scheduling plan with an optimal target value.
[0184] Embodiment 2
[0185] The flowchart of the heuristic-based crude oil resource scheduling method provided by the present invention comprises the following steps:
[0186] Step 1: Establish a large-scale crude oil scheduling optimization model based on discrete time representation, which specifically includes:
[0187] Step 1-1, determine the decision variables, the specific physical resources constitute the crude oil scheduling topology structure as follows Figure 2 As shown, it specifically includes: 1) an oil receiving tank for receiving oil unloaded by an oil tanker; 2) the flow rate of crude oil transported from the oil tanker to the oil receiving tank; 3) a feeder tank for supplying materials to a constant pressure reduction unit; 4) the flow rate of crude oil transported from the feeder tank to the constant pressure reduction unit; 5) a residual oil processing plan for the constant pressure reduction unit.
[0188] Step 1-2, determine the optimization objective function:
[0189]
[0190] Formula (36) indicates that the optimization objective is to minimize the switching operation cost of the atmospheric and vacuum distillation unit during the entire scheduling time period; in the objective function, CO u,nIt represents the total number of times the auxiliary oil tank switching and residual oil processing plan switching occurred in the u-th atmospheric and vacuum distillation unit in the n-th scheduling cycle; ω represents the operating cost of one switching of the atmospheric and vacuum distillation unit.
[0191] Step 1-3, determine the constraints, including:
[0192] (1) Constraints on tanker unloading operations
[0193] a. In order to avoid unloading a large amount of crude oil of different qualities into the same oil tank, formula (37) defines that a crude oil tank can only receive one type of crude oil from a tanker during the scheduling period:
[0194]
[0195] In formula (37), VU v,c,t,n is a binary variable, which indicates whether the vth tanker unloads the cth crude oil into the tth tank in the nth scheduling period. If unloading, it is 1, otherwise it is 0;
[0196] b. The oil receiving and delivering operations of each oil tank cannot be carried out at the same time:
[0197]
[0198] In formula (38), TC t,u,n is a binary variable, which indicates whether the t-th oil tank delivers oil to the u-th atmospheric and vacuum device in the n-th scheduling period. If it delivers oil, it is 1, otherwise it is 0;
[0199] (2) Constraints on feeding operation of atmospheric and vacuum devices
[0200] a. A crude oil tank can supply oil to two atmospheric and vacuum devices at most at the same time:
[0201]
[0202] b. One atmospheric and vacuum tank can receive oil from five crude oil tanks at most at the same time:
[0203]
[0204] c. Constraints on switching of auxiliary oil tanks feeding the atmospheric and vacuum devices:
[0205]
[0206]
[0207]
[0208]
[0209] CTU in formula (41)-(42) t,u,nis a binary variable, which indicates whether the connection status between the t-th oil tank and the u-th device changes between the n-1-th to the n-th scheduling period. If it changes, it is 1, otherwise it is 0;
[0210] (3) Constraints on processing and operation of atmospheric and vacuum devices
[0211] a. The atmospheric and vacuum unit can only produce one type of residual oil in one scheduling cycle:
[0212]
[0213] In formula (45) UR u,r,n is a binary variable, which indicates that the u-th atmospheric and vacuum unit produces the r-th type of residual oil in the n-th scheduling period;
[0214] b. Constraints on the switching process of the atmospheric and vacuum device:
[0215]
[0216]
[0217]
[0218]
[0219] In formulas (46)-(49), CUR u,r,n is a binary variable, which indicates whether the type of residual oil r produced by the u-th atmospheric and vacuum unit changes between the n-1th and nth scheduling periods. If it changes, it is 1, otherwise it is 0;
[0220] c. The switching operation of the atmospheric and vacuum distillation device in a scheduling cycle is defined as follows:
[0221]
[0222]
[0223]
[0224] (4) Material balance constraints
[0225] a. Material balance constraints for tankers, crude oil tank farms and residual oil tank farms:
[0226]
[0227]
[0228]
[0229]
[0230] Formulas (53)-(56) represent the material balance constraints of the tanker, the material balance constraints of the crude oil tank area, the material balance constraints of each component in the crude oil tank, and the material balance constraints of the residual oil tank area, respectively; where IV v,c,n and ITC t,c,n FV represents the storage volume of the cth crude oil in the vth tanker and the tth oil tank in the nth scheduling period; v,c,t,n represents the volume of crude oil of type c delivered from the vth tanker to the tth tank in the nth scheduling period; FR u,r,n It represents the quality of the rth residual oil produced by the uth atmospheric and vacuum unit in the nth scheduling period; CR r It represents the consumption rate of the rth residual oil; IT t,n and IR r,n They represent the inventory of the tth oil tank and the rth residual oil tank at the end of the nth scheduling period respectively;
[0231] b. The concentration of each component oil in the crude oil tank should be consistent with the concentration of the component oil fed to the atmospheric and vacuum device:
[0232]
[0233] In equation (14) FT t,u,n Indicates the amount of oil delivered from the t-th oil tank to the u-th atmospheric and vacuum device in the n-th scheduling cycle; FTC t,c,u,n It represents the volume of the cth crude oil delivered by the tth oil tank to the uth atmospheric and vacuum unit in the nth scheduling period;
[0234] (5) Tank farm inventory and processing load constraints
[0235] a. Upper and lower limit constraints of crude oil tank area liquid level:
[0236]
[0237] In formula (15), P c,′den′ represents the density of the cth crude oil; and Respectively represent the upper and lower limits of the liquid level of the t-th oil tank; TS t represents the bottom area of the t-th oil tank;
[0238] b. Upper and lower limit constraints of residual oil tank inventory:
[0239]
[0240] In formula (16) and They represent the upper and lower limits of the inventory of the rth type of residual oil tank respectively;
[0241] c. Upper and lower limits of processing load of atmospheric and vacuum devices:
[0242]
[0243] In formula (17) FU u,n It represents the processing load of the uth atmospheric and distillation unit in the nth scheduling period; and They represent the upper and lower limits of the processing load of the uth atmospheric and vacuum distillation device respectively;
[0244] (6) Processing constraints of atmospheric and vacuum devices
[0245] a. Constraints on key attributes of feed to atmospheric and vacuum units (i.e., sulfur content, acid value, and density):
[0246]
[0247] In formula (18) FUC u,c,n represents the volume of the cth crude oil delivered by the oil tank to the uth atmospheric and vacuum unit in the nth scheduling period; P c,k represents the kth key attribute value of the cth crude oil; and They represent the upper and lower limits of the kth key property of the feed of the uth atmospheric and vacuum unit respectively;
[0248] b. Constraints on the side lines of the atmospheric and vacuum unit (i.e. naphtha, normal line, diesel, wax oil and washing oil) and residual oil yields:
[0249]
[0250]
[0251]
[0252] yield u,c,s represents the yield of the sth side product of the cth crude oil processed by the uth atmospheric and vacuum unit; FO u,s,n represents the quality of the sth side product produced by the uth atmospheric and vacuum distillation unit in the nth scheduling period; FR in formula (20) u,r,n represents the quality of the rth residual oil produced by the uth atmospheric and vacuum unit in the nth scheduling period, RC r Represents the set of crude oil types that produce the rth type of residual oil. and They represent the upper and lower limits of the flow rate of the s-th side product of the u-th atmospheric and vacuum distillation unit respectively;
[0253] Step 2, design Figure 3 The heuristic rule-driven two-stage evolutionary optimization algorithm shown in the figure solves the large-scale crude oil scheduling optimization model, and specifically includes the following steps:
[0254] Step 2-1, parameter initialization: set the population size and the maximum number of evaluations;
[0255] Step 2-2, population initialization, the specific steps are as follows:
[0256] (1) Based on empirical knowledge, the selection rules for receiving and paying oil tanks are established. The specific rules are as follows:
[0257] a. Oil receiving tank selection rules:
[0258] i. Prioritize unloading oil into empty tanks;
[0259] ii. If condition i is not met, the crude oil to be unloaded and the residual oil produced by the tank bottom oil are calculated according to the similarity calculation formula defined in formula (22), and the crude oil tank with high similarity is selected as the oil receiving tank selection range;
[0260]
[0261] R v,c,t Indicates the similarity between the crude oil to be unloaded and the residual oil produced by the tank bottom oil; CP c Indicates the type of residual oil produced by the cth crude oil; UJ v represents the set of crude oil types unloaded from the vth tanker; BJ t Represents the crude oil type set of the bottom oil of the t-th oil tank;
[0262] iii. Select the tank with the largest capacity among the crude oil tanks with the highest similarity to unload the oil;
[0263] b. Subsidiary oil tank selection rule: Considering that selecting a crude oil tank that can produce relatively few types of residual oil in the early stage of scheduling can ensure a larger feasible domain in the later stage of scheduling, the selection probability of the supplementary oil tank is defined as follows:
[0264] AT represents the set of oil tanks that meet the inventory lower limit;
[0265] (2) Initialize the fuel supply:
[0266]
[0267]
[0268] rand represents a random number generated based on a uniform distribution within [0,1]; X u,p,n The random number representing the pth oil tank of the uth device in the nth scheduling period; CF u,p It represents the oil delivery amount of the pth oil delivery tank of the uth device in the nth scheduling period;
[0269] (3) determining a set of fuel delivery tanks based on the fuel delivery tank selection rule and the initial value of the fuel delivery amount;
[0270] (4) determining an oil receiving tank based on the oil receiving tank selection rule, and calculating the oil unloading amount according to the capacity of the selected oil receiving tank and the oil unloading rate;
[0271] (5) The decision variables described in step 1-1 constitute individuals with complete coding, and the coding structure corresponding to a scheduling cycle is as follows: Figure 4 As shown; if the total number of individuals in the population does not meet the population size, repeat steps (1)-(4); otherwise, end;
[0272] Step 2-3, based on the initial population obtained in step 2-2, use Figure 5 The competitive particle swarm algorithm shown in the figure performs global optimization. The specific steps are as follows:
[0273] (1) Evaluate the fitness function values of all individuals in the population. The fitness function value of individual x is recorded as (CVN(x), CV(x), f(x));
[0274]
[0275]
[0276]
[0277]
[0278] g i (x) represents the i-th equality constraint; h i (x) represents the i-th inequality constraint of individual x; p represents the number of equality constraints; q represents the total number of constraints; CV i (x) represents the i-th constraint violation degree of individual x; CVN in formula (27) i (x) indicates whether individual x violates the i-th constraint, if the constraint is violated, it is 1, otherwise it is 0; in formula (28), CVN(x) indicates the number of constraints violated by individual x; in formula (29), CV(x) indicates the total constraint violation degree of individual x;
[0279] (2) Randomly select two individuals from the population, denoted as X1 and X2;
[0280] (3) Compare the fitness function values of X1 and X2. If they satisfy equation (30), then X1 is better than X2; otherwise, X2 is better than X1.
[0281]
[0282] (4) The individuals with better fitness function values of X1 and X2 enter the next generation population, and the individuals with worse fitness function values enter the next generation population after being updated by equations (31) and (32), and the fitness function values are calculated according to step (1);
[0283]
[0284] X l,n (g+1)=X l,n (g)+V l,n (g+1) (32)
[0285] (5) If the first stage optimization does not reach the maximum number of evaluations, repeat steps (2)-(4); otherwise, end;
[0286] Step 2-4: Based on the first-stage optimization results obtained in step 2-3, for infeasible solutions, use the following Figure 6 The adaptive differential evolution algorithm shown in Figure 1 performs the second-stage local variable optimization. The specific steps are as follows:
[0287] (1) Based on the optimization results of step 2-3, the optimization value of the decision variable for the oil tank payment is fixed, and only the oil payment amount variable in the decision vector is initialized. The initialization process is consistent with step 2-2;
[0288] (2) Evaluate the population fitness function value. The evaluation mechanism is consistent with step 2-3(1);
[0289] (3) For each individual x in the second-stage initial population obtained in step (2), i , three corresponding test vectors u are generated through three test vector generation strategies i1 、u i2 and u i3 , and evaluate u i1 、u i2 and u i3 The fitness function value of , the evaluation mechanism is consistent with step 2-3 (1); among them, the three trial vector generation strategies are defined as follows:
[0290] a. “rand / 1 / bin” strategy
[0291]
[0292] b. “rand / 2 / bin” strategy
[0293]
[0294] c. "current-to-rand / 1" strategy
[0295] u i,g =x i,g +rand·(x r1,g -x i,g )+F·(x r2,g -x r3,g), x i,g represents individual i in the gth generation; u i,g represents the test vector after crossover mutation of individual i in the gth generation; u i,j,g represents its jth component; r1, r2, r3, r4 and r5 represent 5 individuals randomly selected from the g-th generation population; F represents the mutation factor; CR represents the crossover probability;
[0296] (4) Evaluate and compare the fitness function values of the test vectors according to steps 2-3 (1) and (3), and select the test vector with the best fitness value, denoted as u i ;
[0297] (5) Compare x according to step 2-3(3) i and u i The fitness function value of x i Better than u i , then x i Enter the next generation population; otherwise, u i Enter the next generation of population;
[0298] (6) If the algorithm has not reached the maximum number of evaluations, repeat steps (3)-(5); otherwise, end;
[0299] Step 3, data acquisition: Based on the large-scale crude oil scheduling optimization model described in step 1, configure the scheduling time period, tanker information (including tanker arrival time, crude oil loading and unloading rate), crude oil tank area and residual oil tank area information (including quantity, initial inventory and capacity upper and lower limits), atmospheric and vacuum unit processing information (including processing load upper and lower limits, feed key attribute upper and lower limits and side line flow rate upper and lower limits) and crude oil information (including key attribute values, yield and output residual oil type);
[0300] This example solves a real case of crude oil scheduling process of a certain refinery. The total scheduling time of this example is 10 days, including 4 tankers (unloading rate is 5000t / h), 21 crude oil tanks, 3 atmospheric and vacuum units, 5 atmospheric and vacuum unit side products (naphtha, atmospheric line, diesel, wax oil and washing oil), 4 residual oil tanks (coking material, asphalt material, catalytic material and residual feed);
[0301] a. Get the tanker data information as shown in Table 1:
[0302] Table 1:
[0303] Tanker Name Oil type name Oil capacity(t) Arrival time (day) Tanker 1 C11 260000 2 Tanker 2 C12 65000 5 Tanker 3 C13 260000 7 Tanker 4 C3 80000 9
[0304] b. Get the crude oil tank data information as shown in Table 2:
[0305] Table 2:
[0306]
[0307]
[0308] c. Obtain the residual oil tank data information as shown in Table 3:
[0309] Table 3:
[0310] Residue oil tank name Initial inventory (t) Inventory lower limit (t) Inventory limit (t) Consumption rate (t / day) Coking tank 13984 4000 16000 5110 Catalytic tank 27702 4000 35000 1920 Asphalt tank 25388 10000 45000 5817 Slag feeding tank 8093 4000 16000 4680
[0311] d. Obtain the processing data information of the atmospheric and vacuum distillation device as shown in Table 4:
[0312] Table 4:
[0313]
[0314]
[0315] e. Obtain crude oil data information as shown in Table 5:
[0316] Table 5:
[0317]
[0318] Step 4: Import the data obtained in step 3 into the optimization model, set the time interval of a scheduling sub-cycle to 12 hours, and solve the model through the heuristic rule-driven two-stage evolutionary optimization algorithm described in step 2. After optimization, the optimal number of switching times is 11 times, and the average running time is 98 seconds.
[0319] The present invention establishes a large-scale crude oil scheduling optimization model based on discrete time representation; based on the large-scale crude oil scheduling optimization model, a two-stage evolutionary optimization algorithm is designed using heuristic rules; based on the large-scale crude oil scheduling optimization model, the scheduling parameters of the scheduling time period, tanker, tank area and constant pressure reduction device are obtained; the acquired data is imported into the optimization model, and the model is solved by the two-stage evolutionary optimization algorithm driven by the heuristic rules to obtain a crude oil scheduling plan with an optimal target value. In view of the limitations of existing optimization technologies in solving large-scale crude oil scheduling optimization problems in terms of low efficiency, the present invention establishes a large-scale crude oil scheduling optimization model based on the scale structure and actual needs of crude oil scheduling of oil refining enterprises, and proposes a two-stage evolutionary optimization algorithm driven by heuristic rules, and finally quickly solves a satisfactory and flexible crude oil scheduling plan within a reasonable computing time.
[0320] Embodiment 3
[0321] The present invention also proposes a device for scheduling crude oil resources, which includes: an initial module, used to establish a crude oil scheduling model according to a scheduling process; a first processing module, used to determine an optimization algorithm for the crude oil scheduling model using heuristic rules; a second processing module, used to obtain scheduling parameters and import the scheduling parameters into the crude oil scheduling model, and solve the final scheduling model through the optimization algorithm to obtain a crude oil scheduling plan with an optimal target value.
[0322] Optionally, the use of heuristic rules to determine the optimization algorithm for the crude oil scheduling model includes: initializing decision variables to obtain an initial population; globally optimizing the initial population through a competitive particle swarm algorithm to obtain an optimization result; obtaining an infeasible solution in the optimization result, and performing local variable optimization on the infeasible solution through an adaptive differential evolution algorithm.
[0323] Optionally, the initialization of the decision variables to obtain the initial population includes: establishing selection rules for receiving and paying oil tanks based on experience, the selection rules include receiving oil tank selection rules and paying oil tank selection rules; initializing the paying oil quantity to obtain an initial value of the paying oil quantity; determining the paying oil tank set based on the paying oil tank selection rules and the initial value of the paying oil quantity; determining the receiving oil tank based on the receiving oil tank selection rules, and calculating the unloading oil quantity based on the receiving oil tank capacity and the unloading rate; and constructing fully coded individuals based on the decision variables.
[0324] Optionally, the global optimization of the initial population by competitive particle swarm algorithm to obtain the optimization result includes: calculating the fitness function of the individuals in the population; randomly grouping the individuals in the population according to the fitness function, each group includes at least two individuals, and comparing the fitness values of the individuals; adjusting the population according to the fitness value and entering the next generation population until the termination condition is met, and then outputting the optimization result. Optionally, the acquisition of the infeasible solution in the optimization result and the local variable optimization of the infeasible solution by adaptive differential evolution algorithm include: fixing the decision variable of the oil tank payment unchanged according to the optimization result, initializing the oil payment amount variable in the decision vector, and obtaining the initial population of the local optimization process; calculating the fitness of the individuals in the population; generating three test individuals for each individual in the initial population based on three test vector generation strategies, and determining the fitness of the test individuals; selecting the individual with the best fitness to enter the next generation until the termination condition is met, and then outputting the best result; the test vector is the offspring individual vector generated by any two individuals from the same generation after mutation and crossover.
[0325] The device first uses empirical knowledge to form heuristic rules, and based on the rules, constructs an initial solution set with good performance to perform the first stage of global optimization; then the second stage of repair is performed on the infeasible solutions in the evolution process, guiding the infeasible solutions to evolve to the feasible domain. By introducing empirical rules and a two-stage evolutionary optimization framework, the method overcomes the limitations of existing algorithms in solving such problems, such as low efficiency, and improves the algorithm's computational efficiency and solution stability in large-scale crude oil scheduling optimization problems.
[0326] A method for scheduling crude oil resources of the present invention comprises: establishing a crude oil scheduling model according to a scheduling process; determining an optimization algorithm for the crude oil scheduling model using heuristic rules; obtaining scheduling parameters, importing the scheduling parameters into the crude oil scheduling model, solving the optimization algorithm, and obtaining a crude oil scheduling plan with an optimized target value. The method establishes a large-scale crude oil scheduling optimization model and combines a two-stage evolutionary optimization algorithm driven by heuristic rules, and finally quickly solves a satisfactory and flexible crude oil scheduling plan within a reasonable computing time.
[0327] On the other hand, the present invention also provides an electronic device, which includes: at least one processor; a memory connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the above-mentioned method of crude oil resource scheduling by executing the instructions stored in the memory.
[0328] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the crude oil scheduling plan is obtained by adjusting kernel parameters.
[0329] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0330] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the method for scheduling crude oil resources is implemented.
[0331] An embodiment of the present invention provides a processor, which is used to run a program, wherein the method for scheduling crude oil resources is executed when the program is running.
[0332] The embodiment of the present invention provides a device, the device includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements the following steps when executing the program: establishing a crude oil scheduling model according to the scheduling process; determining an optimization algorithm for the crude oil scheduling model using heuristic rules; obtaining scheduling parameters, importing the scheduling parameters into the crude oil scheduling model, solving through the optimization algorithm, and obtaining a crude oil scheduling plan with an optimized target value. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0333] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: establishing a crude oil scheduling model according to a scheduling process; determining an optimization algorithm for the crude oil scheduling model using heuristic rules; obtaining scheduling parameters, importing the scheduling parameters into the crude oil scheduling model, solving it through the optimization algorithm, and obtaining a crude oil scheduling plan with an optimal target value.
[0334] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0335] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0336] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0337] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0338] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0339] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0340] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0341] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0342] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for scheduling crude oil resources, characterized in that: The method includes: Establish a crude oil scheduling model based on the scheduling process; Determining an optimization algorithm for the crude oil scheduling model using heuristic rules; Obtain scheduling parameters, import the scheduling parameters into the crude oil scheduling model, solve the model through the optimization algorithm, and obtain a crude oil scheduling plan with an optimal target value.
2. The method according to claim 1, characterized in that The crude oil scheduling model is established according to the scheduling process, including: Determine decision variables, objective functions and constraints according to the scheduling process to establish a crude oil scheduling model; The scheduling process at least includes a crude oil loading and unloading process, a crude oil transfer process and a crude oil processing process.
3. The method according to claim 2, characterized in that The decision variables include at least: the receiving oil tank and its receiving oil volume, the delivering oil tank and its delivering oil volume and residual oil processing data; the objective function is the switching operation cost of the entire scheduling time period; The constraints include: unloading operation constraints, feeding operation constraints, processing constraints, material balance constraints, tank area inventory constraints and processing load constraints.
4. The method according to claim 1, characterized in that: The method of using heuristic rules to determine an optimization algorithm for the crude oil scheduling model includes: Initialize the decision variables to obtain the initial population; Performing global optimization on the initial population by using a competitive particle swarm algorithm to obtain an optimization result; An infeasible solution in the optimization result is obtained, and local variables of the infeasible solution are optimized by using an adaptive differential evolution algorithm.
5. The method according to claim 4, characterized in that Initializing the decision variables to obtain the initial population includes: Establishing selection rules for receiving and paying oil tanks based on experience, wherein the selection rules include a selection rule for receiving oil tanks and a selection rule for paying oil tanks; Initialize the oil quantity to obtain the initial value of the oil quantity; Determine the set of fuel tanks according to the fuel tank selection rule and the initial value of fuel quantity; Determine the oil receiving tank according to the oil receiving tank selection rule, and calculate the oil unloading amount according to the oil receiving tank capacity and the oil unloading rate; Construct fully coded individuals based on the decision variables.
6. The method according to claim 4, characterized in that The initial population is globally optimized by a competitive particle swarm algorithm to obtain the optimization results including: Calculating the fitness function of individuals in the population; According to the fitness function, randomly grouping individuals in the population, each group including at least two individuals, and comparing the fitness values of the individuals; The population is adjusted according to the fitness value and enters the next generation population until the termination condition is met, and then the optimization result is output.
7. The method according to claim 6, characterized in that The calculating the fitness function of individuals in the population comprises: Among them, g i (x) represents the i-th equality constraint, h i (x) represents the ith inequality constraint of individual x, p represents the number of equality constraints, q represents the total number of constraints, CV i (x) is the i-th constraint violation degree of individual x, CVN i (x) is whether individual x violates the i-th constraint. If it violates the constraint, it is 1, otherwise it is 0. CVN(x) is the number of constraints violated by individual x, CV(x) is the total constraint violation of individual x.
8. The method according to claim 4, characterized in that The obtaining of an infeasible solution in the optimization result and performing local variable optimization on the infeasible solution by using an adaptive differential evolution algorithm comprises: According to the optimization result, the decision variable of the oil tank payment is fixed unchanged, and the oil payment amount variable in the decision vector is initialized to obtain the initial population of the local optimization process; Calculating the fitness of individuals in the population; For each individual in the initial population, three test individuals are generated respectively based on three test vector generation strategies, and the fitness of the test individuals is determined; Select the individual with the best fitness to enter the next generation until the termination condition is met, and then output the optimal result; The test vector is a vector of offspring individuals generated after the mutation and crossover of any two individuals from the same generation.
9. The method according to claim 1, characterized in that: The scheduling parameters at least include scheduling time period, tanker information, crude oil tank area information, residual oil tank area information, atmospheric and vacuum unit processing information and crude oil information.
10. A crude oil resource scheduling device, characterized in that: The device includes: The initial module is used to establish a crude oil scheduling model based on the scheduling process; A first processing module, used for determining an optimization algorithm for the crude oil scheduling model using heuristic rules; The second processing module is used to obtain scheduling parameters and import the scheduling parameters into the crude oil scheduling model, solve the final scheduling model through the optimization algorithm, and obtain a crude oil scheduling plan with an optimal target value.
11. The device according to claim 10, characterized in that The method of using heuristic rules to determine an optimization algorithm for the crude oil scheduling model includes: Initialize the decision variables to obtain the initial population; Performing global optimization on the initial population by using a competitive particle swarm algorithm to obtain an optimization result; An infeasible solution in the optimization result is obtained, and local variables of the infeasible solution are optimized by using an adaptive differential evolution algorithm.
12. The device according to claim 11, characterized in that Initializing the decision variables to obtain the initial population includes: Establishing selection rules for receiving and paying oil tanks based on experience, wherein the selection rules include a selection rule for receiving oil tanks and a selection rule for paying oil tanks; Initialize the oil quantity to obtain the initial value of the oil quantity; Determine the set of fuel tanks according to the fuel tank selection rule and the initial value of fuel quantity; Determine the oil receiving tank according to the oil receiving tank selection rule, and calculate the oil unloading amount according to the oil receiving tank capacity and the oil unloading rate; Construct fully coded individuals based on the decision variables.
13. The device according to claim 11, characterized in that The initial population is globally optimized by a competitive particle swarm algorithm to obtain the optimization results including: Calculating the fitness function of individuals in the population; According to the fitness function, randomly grouping individuals in the population, each group including at least two individuals, and comparing the fitness values of the individuals; The population is adjusted according to the fitness value and enters the next generation population until the termination condition is met, and then the optimization result is output.
14. The device according to claim 11, characterized in that The obtaining of an infeasible solution in the optimization result and performing local variable optimization on the infeasible solution by using an adaptive differential evolution algorithm comprises: According to the optimization result, the decision variable of the oil tank payment is fixed unchanged, and the oil payment amount variable in the decision vector is initialized to obtain the initial population of the local optimization process; Calculating the fitness of individuals in the population; For each individual in the initial population, three test individuals are generated respectively based on three test vector generation strategies, and the fitness of the test individuals is determined; Select the individual with the best fitness to enter the next generation until the termination condition is met, and then output the optimal result; The test vector is a vector of offspring individuals generated after the mutation and crossover of any two individuals from the same generation.
15. An electronic device, characterized in that: The electronic device includes: at least one processor; a memory connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the method for crude oil resource scheduling as described in any one of claims 1 to 9 by executing the instructions stored in the memory.
16. A machine-readable storage medium, characterized in that: Machine instructions are stored, and when the machine instructions are executed on the machine, the machine executes the method for scheduling crude oil resources as described in any one of claims 1 to 9.