Crude oil dispatching and production scheduling method and apparatus, and medium and electronic device

By converting the delayed conveying of long-distance pipelines into real-time conveying, building a mixed integer planning model, optimizing the crude oil scheduling solution, solving the problems of low crude oil scheduling efficiency and delayed conveying of long-distance pipelines, and achieving rapid automatic orchestration and productivity of crude oil scheduling promote.

WO2025002266A1PCT designated stage expired Publication Date: 2025-01-02CHINA PETROLEUM & CHEMICAL CORP +1

Patent Information

Application Number
PCT/CN2024/102040
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-27
Filing Date
2024-06-27
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

The prior art is difficult to optimize crude oil scheduling plans within a limited time, resulting in the problem of delayed berthing and unloading of oil by tankers. The manual preparation plan is inefficient, making it difficult to cope with market changes and the characteristics of delayed conveying of long-term pipelines.

Method used

By converting the delayed conveying characteristics of long-distance pipelines into real-time transportation, a hybrid integer planning model is constructed, and the time changes of crude oil entering and leaving the pipeline are optimized, and a high-quality crude oil scheduling and scheduling plan is generated.

Benefits of technology

It realizes rapid and automatic arrangement of crude oil scheduling plans to ensure stable feeding of distillation equipment and rapid oil discharge of tankers, lowers the dispatch threshold, improves productivity, reduces personnel work intensity, and solves problems such as corrosion in long-term pipelines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024102040_02012025_PF_FP_ABST
    Figure CN2024102040_02012025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to a crude oil dispatching and production scheduling method and apparatus, and a medium and an electronic device. The method comprises: acquiring basic data of a crude oil dispatching system comprising a long-distance pipeline; constructing a mixed integer programming model having corresponding constraint conditions by means of conversion processing of the long-distance pipeline from a delayed conveying characteristic to a quasi-instantaneous conveying characteristic; and on the basis of the basic data and the mixed integer programming model, generating operation parameters of the crude oil dispatching system during crude oil dispatching and production scheduling according to an optimization objective. By converting a "delayed conveying" characteristic of a long-distance pipeline into a "quasi-instantaneous conveying" characteristic, crude oil entering the pipeline and crude oil leaving the pipeline are the same within the same time slice. The present disclosure simplifies a data processing process of a long-distance pipeline, and greatly improves the model application performance, such that a high-quality crude oil dispatching scheme can be quickly and automatically formulated, thereby achieving objectives such as stable feeding to a distillation apparatus and rapid oil unloading of an oil tanker.
Need to check novelty before this filing date? Find Prior Art

Description

Crude oil scheduling method, device, medium and electronic equipment Technical Field

[0001] The present disclosure relates to the field of crude oil production scheduling, and in particular, to a crude oil scheduling method, device, medium and electronic equipment. Background Art

[0002] As we all know, production scheduling is the production command center of an oil refinery, serving as a crucial link between higher-level planning and scheduling departments and lower-level workshops and unit operations. Production scheduling is responsible for comprehensive production management, ensuring stable and efficient production and maximizing economic returns across the entire plant. Crude oil scheduling primarily involves developing plans for crude oil unloading, storage, transportation, blending, and processing, from tanker unloading at the port to feed processing into the distillation unit. This link is the "head" of the production scheduling process, and therefore, mastering crude oil scheduling is crucial to achieving safe, stable, sustained, full, and high-quality production across the entire plant.

[0003] Currently, oil refineries primarily rely on manual scheduling to plan crude oil production. This method requires high-level technical skills from dispatchers, and plans compiled by different dispatchers can vary significantly. Furthermore, the planning cycle is long, making it difficult to respond promptly to unexpected situations such as delayed tanker arrivals and changes in market demand. Furthermore, the planning process requires collaboration across multiple departments, and due to difficulties in aligning positions, dispatchers' efficiency is significantly reduced.

[0004] In real-world scenarios, crude oil scheduling is extremely complex, especially for long-distance pipelines, which are characterized by delayed delivery. This significantly increases the model size (number of variables and constraints), a significant factor affecting the model's performance in practical applications. Existing methods for long-distance pipeline crude oil scheduling are unable to achieve an optimized crude oil scheduling solution within a limited timeframe (e.g., 30 minutes), leading to problems such as delayed tanker berthing and unloading.

[0005] Therefore, there is a need in the art for an improved intelligent production scheduling method for crude oil scheduling.

[0006] Summary of the Invention

[0007] In response to the crude oil scheduling problem with long-distance pipeline transportation, the present disclosure proposes to transform the "delayed transportation" feature of the long-distance pipeline into "quasi-instant transportation", that is, in the same time slice, the crude oil entering the pipeline is the same as the crude oil leaving the pipeline. Through constraints, the time changes of crude oil entering and leaving the pipeline are focused on, and the relationship between the change of crude oil distribution in the pipeline and the type of crude oil output as the crude oil enters is no longer described. In other words, only the time changes of the input and output crude oil of the pipeline are considered, and the changes of the output and input oil types in the same time slice are not considered. The present disclosure has the characteristics of small model scale, and can quickly and automatically compile high-quality crude oil scheduling plans to achieve the goals of stable feeding of distillation units and rapid unloading of oil by tankers. In order to overcome the problems existing in the relevant technology, the present disclosure provides a novel crude oil scheduling method, device, medium and electronic equipment.

[0008] To achieve the above objectives, in a first aspect, the present disclosure provides a method for crude oil scheduling, comprising: obtaining basic data of a crude oil scheduling system including a long-distance pipeline; constructing a mixed integer programming model with corresponding constraints by converting the long-distance pipeline from delayed delivery characteristics to quasi-instantaneous delivery characteristics; and generating operating parameters of the crude oil scheduling system during the crude oil scheduling period based on the basic data and the mixed integer programming model and an optimization objective.

[0009] According to an embodiment of the present disclosure, the conversion process or the corresponding constraint condition is used to characterize the change between the time when the crude oil enters the long-distance pipeline and the time when the crude oil leaves the long-distance pipeline, so that after the conversion process, at the same time slice, the type and amount of crude oil entering and leaving the long-distance pipeline are the same.

[0010] According to an embodiment of the present disclosure, the conversion process is achieved by the following steps: determining a first relationship between the start time of the crude oil leaving the long-distance pipeline and the start time of the crude oil entering the long-distance pipeline; and determining a second relationship between the end time of the crude oil leaving the long-distance pipeline and the start time of the crude oil entering the long-distance pipeline.

[0011] According to an embodiment of the present disclosure, the basic data includes distribution information of crude oil inventory at the beginning of the long-distance pipeline, the volume of the long-distance pipeline, and an upper limit on the delivery rate. Determining the first relationship includes: constructing a constraint regarding the start time of the crude oil leaving the long-distance pipeline based on the distribution information of the crude oil inventory at the beginning of the pipeline, the volume, and the upper limit on the delivery rate. According to one example, the following constraint is constructed regarding the start time of the crude oil leaving the long-distance pipeline:

[0012] The long-distance pipeline includes one or more long-distance pipelines represented by a natural number p; PL represents the set of long-distance pipelines involved in the current crude oil scheduling project; the initial pipeline oil inventory of the long-distance pipeline is divided into different pipeline segments according to the oil type, and the pipeline segments are numbered 1, 2, ..., NPS according to the distance from the outlet of the long-distance pipeline. p , natural number NPS p represents the initial number of pipeline sections of the p-th long-distance pipeline; LP is a parameter representing the scheduling time span of the current crude oil scheduling project; the scheduling time span is sliced ​​into one or more time slices represented by natural numbers s′ or s″, and SL is a set of time slices; an integer s, when s ≥ 1, s∈SL, represents the time slice corresponding to the current scheduling time span; when s∈[1-NPS p ,2-NPS p ,...,0], it represents the time slice corresponding to the historical scheduling time span; when s=1-NPS p When, it represents the NPS of the p-th long-distance pipeline p The time slice number when the oil in the pipeline enters the pipeline at the beginning of the period, when s=2-NPS p When, it represents the NPS of the p-th long-distance pipeline p -1 is the time slice number when the oil in the pipeline enters the pipeline at the beginning of the first period, and so on; l is a natural number, indicating the oil in the pipeline at the beginning of the first period; VLPL p,l is a parameter representing the volume of crude oil in the first section of the long-distance pipeline p; VUPL p is a parameter representing the volume of the long-distance pipeline p; max_FPL s′,p is a parameter representing the upper limit of the transport rate of the long-distance pipeline p in the s′th time slice; tsopl s,p is a continuous variable, indicating the start time of the crude oil entering the long-distance pipeline p in the sth time slice leaving the long-distance pipeline p; tsipl s′,p is a continuous variable, indicating the start time of crude oil entering the long-distance pipeline p at the s′th time slice; vipl s ″ ,p is a continuous variable, indicating the transport capacity of the long-distance pipeline p in the s″th time slice; FUPL s′,p represents the transport rate of the long-distance pipeline p in the s′th time slice. When FUPL s′,p When the parameters are known, it means that the long-distance pipeline p is transporting at a constant rate. s′,pWhen it is a continuous variable, it means that the long-distance pipeline p is transporting at a changing rate; when the crude oil entering the long-distance pipeline at the sth time slice begins to leave the pipeline at the s′th time slice, bsopl s,s′,p =1, otherwise, bsopl s,s′,p =0; max() means taking the maximum value operation.

[0013] According to an embodiment of the present disclosure, determining the second relationship includes: constructing a constraint regarding the end time of the crude oil leaving the long-distance pipeline based on the distribution information of the initial pipeline oil inventory, the volume, and the upper limit of the delivery rate. According to a specific example, the following constraint is constructed regarding the end time of the crude oil leaving the long-distance pipeline:

[0014] The long-distance pipeline includes one or more long-distance pipelines represented by a natural number p; PL represents the set of long-distance pipelines involved in the current crude oil scheduling project; the initial pipeline oil inventory of the long-distance pipeline is divided into different pipeline segments according to the oil type, and the pipeline segments are numbered 1, 2, ..., NPS according to the distance from the outlet of the long-distance pipeline. p , natural number NPS p represents the initial number of pipeline sections of the p-th long-distance pipeline; LP is a parameter representing the scheduling time span of the current crude oil scheduling project; the scheduling time span is sliced ​​into one or more time slices represented by natural numbers s′ or s″, and SL is a set of time slices; an integer s, when s ≥ 1, s∈SL, represents the time slice corresponding to the current scheduling time span; when s∈[1-NPS p ,2-NPS p ,...,0], it represents the time slice corresponding to the historical scheduling time span; when s=1-NPS p When, it represents the NPS of the p-th long-distance pipeline p The time slice number when the oil in the pipeline enters the pipeline at the beginning of the period, when s=2-NPS p When, it represents the NPS of the p-th long-distance pipeline p -1 is the time slice number when the oil in the pipeline enters the pipeline at the beginning of the first period, and so on; l is a natural number, indicating the oil in the pipeline at the beginning of the first period; VLPL p,l is a parameter representing the volume of crude oil in the first section of the long-distance pipeline p; VUPL p is a parameter representing the volume of the long-distance pipeline p; max_FPL s′,p is a parameter, which represents the upper limit of the transmission rate of the long-distance pipeline p in the s′th time slice; teopls,p is a continuous variable, indicating the end time of the crude oil entering the long-distance pipeline p at the sth time slice leaving the long-distance pipeline p; tsipl s′,p is a continuous variable, indicating the start time of crude oil entering the long-distance pipeline p at the s′th time slice; vipl s ″ ,p is a continuous variable, indicating the transport capacity of the long-distance pipeline p in the s″th time slice; FUPL s′,p represents the transport rate of the long-distance pipeline p in the s′th time slice. When FUPL s′,p When the parameters are known, it means that the long-distance pipeline p is transporting at a constant rate. s′,p When it is a continuous variable, it means that the long-distance pipeline p is transporting at a changing rate; when the crude oil entering the long-distance pipeline p at the sth time slice completely leaves the long-distance pipeline p at the s′th time slice, beopl s,s′,p =1, otherwise, beopl s,s′,p =0; max() means taking the maximum value.

[0015] According to an embodiment of the present disclosure, the crude oil scheduling system also includes upstream equipment located before the long-distance pipeline and downstream equipment located after the long-distance pipeline, wherein the basic data includes oil collection and delivery operation restrictions of the upstream equipment and the downstream equipment, and the construction is also based on the oil collection and delivery operation restrictions, and wherein the time when the upstream equipment delivers crude oil to the long-distance pipeline is based on the start time of entering the long-distance pipeline, and the time when the downstream equipment receives crude oil from the long-distance pipeline is based on the start time of the crude oil leaving the long-distance pipeline.

[0016] According to an embodiment of the present disclosure, the crude oil scheduling system also includes upstream equipment located before the long-distance pipeline and downstream equipment located after the long-distance pipeline, wherein the basic data includes the distribution information of the initial pipeline oil inventory in the long-distance pipeline, the oil collection and delivery operation restrictions of the upstream equipment and the downstream equipment, and the construction is also based on the oil collection and delivery operation restrictions.

[0017] According to an embodiment of the present disclosure, the conversion process is achieved by the following steps: determining the time required to empty the initial pipeline oil, and setting the upstream equipment to a first time system and the downstream equipment to a second time system, wherein the second time system is delayed in time by the determined time compared to the first time system.

[0018] According to an embodiment of the present disclosure, the basic data also includes the initial inventory information of the storage tanks in the downstream equipment and the operating limitations of the distillation unit in the downstream equipment, wherein the determination includes: determining the time required to empty the initial pipeline oil storage based on the basic data through a program simulation method or by establishing a mathematical programming sub-model, and obtaining the first operating parameters of the downstream equipment during the emptying of the initial pipeline oil storage.

[0019] According to an embodiment of the present disclosure, the basic data also includes oil delivery operation constraints of the long-distance pipeline, and the mathematical programming sub-model is based on the oil delivery operation constraints, wherein the oil delivery operation constraints include: the long-distance pipeline transports crude oil at a variable or constant rate; and the long-distance pipeline delivers the initial pipeline oil to the storage tank according to the first-in-first-out principle.

[0020] According to an embodiment of the present disclosure, the method further includes: updating the initial inventory information of the storage tank based on the first operating parameter; and obtaining the second operating parameters of the long-distance pipeline, the upstream equipment and the downstream equipment during the crude oil scheduling and production scheduling based on the updated initial inventory information of the storage tank and the mixed integer programming model.

[0021] According to an embodiment of the present disclosure, the method further includes: utilizing the oil collection plan and the destination plan of the incoming oil of the long-distance pipeline included in the second operating parameter, combined with the distribution information of the initial pipeline oil inventory, to adjust the oil delivery operation plan of the long-distance pipeline, wherein the oil collection plan includes at least one of the following: the start and end time of oil collection, the volume of oil collected, the delivery rate and the type of delivered oil; the destination plan of the incoming oil includes at least one of the following: the destination of the storage tank, the volume of oil collected by the storage tank and the type of oil collected; and the oil delivery operation plan includes at least one of the following: the start and end time of the crude oil leaving the long-distance pipeline, the volume of oil delivered, the delivery rate, the destination of oil delivered and the type of oil delivered.

[0022] According to an embodiment of the present disclosure, the oil receiving and delivery operation restrictions of the non-long-distance pipeline in the upstream equipment include at least one of the following: material balance restrictions of the non-long-distance pipeline; and delivery rate restrictions of the non-long-distance pipeline.

[0023] According to an embodiment of the present disclosure, the oil receiving and delivery operation restrictions of the oil tanker in the upstream equipment include at least one of the following: the oil tanker can only dock at one berth, and the berth has a capacity of one oil tanker; the oil tanker can only berth and unload oil after arriving at the port; the oil tanker's oil unloading rate is limited by the capacity of the oil tanker's oil pump. The oil receiving and delivery operation restrictions of the storage tank in the upstream equipment and / or downstream equipment include at least one of the following: the storage tank cannot perform oil receiving and delivery operations simultaneously; the oil receiving and delivery rate of the storage tank is limited by the capacity of the storage tank's oil pump; the storage tank must be stationary for at least a reference time after receiving oil before it can deliver oil; the inventory of the storage tank is between its corresponding preset tank bottom volume and preset tank capacity and is less than its corresponding safety inventory threshold; the tank can only store its corresponding storable oil type; the tank can only receive oil from its corresponding upstream equipment and deliver oil to its corresponding downstream equipment. The oil receiving and delivery operation restrictions of the distillation unit in the downstream equipment include at least one of the following: the distillation unit can only process its corresponding processable oil type; the processing volume of the distillation unit is consistent with its corresponding planned processing volume; the distillation unit processes continuously and uninterruptedly.

[0024] According to an embodiment of the present disclosure, when the long-distance pipeline stops or slows down its transportation, the following constraints are established based on the fact that the storage tank must remain stationary for at least a target period of time after receiving oil before delivering oil:

[0025] Among them, boct s,j is a binary variable. When tank j delivers oil in the sth time slice, boct s,j =1, when tank j is not delivering oil in the sth time slice, boct s,j =0; thdct s-1,j thdct represents the time it takes for tank j to deliver oil at the end of the s-1 time slice; s,j represents the waiting time for tank j to deliver oil at the end of the sth time slice; THDCT represents the shortest static time after the tank receives oil; tect s,j Indicates the end time of the sth time slice of tank j; tspl s,p Indicates the start time of the sth time slice of the long-distance pipeline p; tepl s,p Indicates the end time of the sth time slice of the long-distance pipeline p; bectpl s,j,p is a binary variable. When the operation of storage tank j before the start of time slice s is to receive oil from long-distance pipeline p, bectpl s,j,p = 1, when the operation of storage tank j before the start of time slice s is not to receive oil from long-distance pipeline p, bectpl s,j,p=0; the scheduling time span is sliced ​​into one or more time slices represented by natural numbers s, s′, or s″, and SL is a set of time slices; the long-distance pipelines include one or more long-distance pipelines represented by natural numbers p; PL represents the set of long-distance pipelines involved in the current crude oil scheduling project; CT represents the set of storage tanks involved in the current crude oil scheduling project.

[0026] According to an embodiment of the present disclosure, the mixed integer programming model includes an objective function, wherein the objective function is constructed based on the optimization objective, wherein the optimization objective includes at least one of the following: the demurrage duration of the oil tanker in the upstream equipment is shortest; the inventory cost of the storage tank is lowest, wherein the storage tank includes the plant tank, transfer tank and / or terminal tank located in the downstream equipment and / or the upstream equipment; the number of feed switching times of the distillation unit in the downstream equipment is minimized; the cost of processing crude oil by the distillation unit is minimized; the number of switching times of the oil receiving and delivery operations of the storage tank is minimized; and the transportation time of the long-distance pipeline is longest.

[0027] In a second aspect, the present disclosure provides a crude oil scheduling and production scheduling device, comprising: an acquisition module for acquiring basic data of a crude oil scheduling system including a long-distance pipeline; a construction module for constructing a mixed integer programming model with corresponding constraints through a conversion process of the long-distance pipeline from delayed delivery characteristics to quasi-instantaneous delivery characteristics; and a generation module for generating operating parameters of the crude oil scheduling system during the crude oil scheduling and production scheduling period based on the basic data and the mixed integer programming model and according to an optimization objective.

[0028] In a third aspect, the present disclosure provides a non-temporary computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the crude oil scheduling method provided in the first aspect of the present disclosure.

[0029] In a fourth aspect, the present disclosure provides an electronic device comprising: a memory on which a computer program is stored; and a processor for executing the computer program in the memory to implement the steps of the crude oil scheduling method provided in the first aspect of the present disclosure.

[0030] In a fifth aspect, the present disclosure provides a computer program product having a computer program stored thereon, which, when executed by a processor, implements the steps of the crude oil scheduling method provided in the first aspect of the present disclosure.

[0031] By converting the "delayed delivery" characteristic of long-distance pipelines into "quasi-instantaneous delivery," whereby the crude oil entering and leaving the pipeline is identical within the same time slice, the present disclosure simplifies the data processing process for long-distance pipelines (e.g., reducing the corresponding number of variables and constraints), significantly improving model application performance. This allows for the rapid and automatic compilation of high-quality crude oil scheduling plans, achieving goals such as stable feeding of distillation units and rapid unloading of oil from tankers. For example, by using constraints to focus on the temporal changes in crude oil entering and leaving the pipeline, rather than on the relationship between crude oil distribution within the pipeline and the changes in crude oil output types as crude oil enters, the "quasi-instantaneous delivery" method for long-distance pipelines disclosed herein achieves comparable performance and results to immediate delivery without significantly increasing the model size and computing resources, ensuring stable processing in distillation units and rapid unloading of oil from tankers. Furthermore, the "quasi-instantaneous delivery method" for long-distance pipelines disclosed herein has the potential to ensure efficient model application performance in real-world scenarios (for example, taking into account scenarios such as variable delivery rates, stoppages or reduced delivery, and simultaneous receipt of oil from or delivery to multiple devices on long-distance pipelines), ultimately enabling intelligent crude oil scheduling. This allows for the rapid and automatic compilation of crude oil scheduling plans without manual intervention, which not only lowers the scheduling threshold but also reduces personnel workload and improves enterprise productivity, thus being of great significance for achieving stable and economical production. Furthermore, the aforementioned modeling method simplifies the long-distance pipeline modeling process, resulting in a small model size and high efficiency, making it easier to solve complex crude oil scheduling problems. Furthermore, the present disclosure can solve the problem of crude oil transportation in long-distance pipelines and achieve efficient crude oil transportation in long-distance pipelines. Furthermore, since crude oil is generally corrosive, prolonged residence in long-distance pipelines can corrode the pipeline, thus also solving technical problems such as suppressing long-distance pipeline corrosion. In addition, the above modeling method does not require long-distance pipelines to continuously transport crude oil at a stable rate, nor does it require the number of crude oil sections that can be stored in the pipeline. This is because the above modeling method is highly versatile and can adapt to situations such as pipeline variable speed transportation, pipeline suspension, and the storage of any number of crude oil sections in the pipeline.

[0032] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following detailed description, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0034] FIG1 is a flow chart showing a crude oil scheduling process of a refinery according to an exemplary embodiment.

[0035] FIG2 is a flow chart showing a method for scheduling crude oil production according to an exemplary embodiment.

[0036] FIG3 is a schematic diagram showing a planned oil unloading scheme for an oil tanker according to an exemplary embodiment.

[0037] FIG4 is a schematic diagram showing a dock tank planning operation scheme according to an exemplary embodiment.

[0038] FIG5 is a schematic diagram showing a transfer tank planning operation scheme according to an exemplary embodiment.

[0039] FIG6 is a schematic diagram showing a plant tank planning operation scheme according to an exemplary embodiment.

[0040] FIG. 7 is a schematic diagram illustrating a planned processing procedure of a distillation apparatus according to an exemplary embodiment.

[0041] FIG8 is a schematic diagram showing a planned transportation process of a non-long-distance pipeline according to an exemplary embodiment.

[0042] FIG9 is a schematic diagram showing a planned transportation process of a long-distance pipeline according to an exemplary embodiment.

[0043] FIG10 is a block diagram of a crude oil scheduling and production arrangement device according to an exemplary embodiment.

[0044] Fig. 11 is a block diagram of an electronic device according to an exemplary embodiment.

[0045] FIG12 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0046] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Like reference numerals in the drawings represent like or similar parts, and thus repetitive description thereof will be omitted.

[0047] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, it will be appreciated by those skilled in the art that the technical solutions of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present application. In the following description, “some embodiments” are related to a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.

[0048] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0049] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0050] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of the concepts of the present application. As used herein, the term "and / or" and similar terms include all combinations of any one, multiple, and all of the associated listed items. In the following description, the terms "first\second\third" involved are merely to distinguish similar objects and do not represent a specific order for the objects. It is understandable that "first\second\third" can be interchanged with a specific order or precedence where permitted, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein.

[0051] Those skilled in the art will understand that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present application, and therefore cannot be used to limit the scope of protection of the present application.

[0052] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the corresponding data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art in the art of the present disclosure. The terms used herein are only for the purpose of describing the embodiments of the present disclosure and are not intended to limit the present disclosure.

[0054] Before introducing the embodiments of the present application in detail, some related concepts are first explained for the sake of clarity.

[0055] Crude oil scheduling is a problem with strong temporal and spatial coupling. It primarily determines the timeframe within which each piece of equipment in the process will receive or deliver oil, as well as the nature (i.e., type or grade) and volume (i.e., quantity) of the crude oil being processed. Mixed integer programming (MIP) models are the mainstream model for crude oil scheduling optimization, consisting of variables, constraints, and an objective function. Variables include, for example, time variables, operation type variables (binary variables), operation volume variables, inventory variables, and property variables, all of which are required to determine the scheduling solution. Constraints, for example, include numerous factors that influence the development of scheduling plans, such as time constraints, process flow constraints (e.g., characterization of multivariate process networks and multi-component blending), operational safety constraints (e.g., feed defense values, tank safety stocks), operational constraints (tankers can only unload oil after berthing, sequential unloading of tankers, dedicated tanks, support for inactive tank operations, in-tank mixing operations, tank oil collection and quiescence operations, specific processed oil types, delayed delivery of long pipelines, blending constraints), operational capacity constraints (e.g., processing capacity, unloading capacity, delivery capacity, storage capacity), scheduling constraints (e.g., executing pipeline oil delivery plans, executing distillation unit processing plans), and environmental constraints (e.g., tidal effects). In a mixed integer programming model, the scheduling cycle is simplified into N time slices. In a discrete-time model, the position of each time slice is fixed, and operations can only be started or stopped at discrete time points. In a continuous-time model, constraints define the relationship between time slices, and the position of slices is not fixed. Therefore, the latter model provides more flexible operational plans. Objective functions include, for example, operational stability objectives (such as minimizing changes in feed properties, minimizing operation switching, minimizing fluctuations in delivery rate, etc.), cost reduction and efficiency improvement objectives (such as rapid oil unloading from tankers, minimizing inventory costs, maximizing production profits, etc.), and plan execution assurance objectives (such as maximizing the completion rate of the delivery plan, maximizing the completion rate of the processing plan, ensuring the crude oil dehydration effect, etc.), etc.

[0056] Real-time delivery: Crude oil enters and leaves the pipeline at the same time, that is, the crude oil entering the pipeline leaves the pipeline immediately.

[0057] Quasi-instantaneous delivery: Within the same time slice, the crude oil entering the pipeline is the same as the crude oil leaving the pipeline. That is, only the time changes of the input and output crude oil of the pipeline are considered, and the changes of the output and input oil types within the same time slice are not considered.

[0058] Delayed delivery: After crude oil enters the pipeline, some of it will remain in the pipeline, resulting in the crude oil entering the pipeline and the crude oil leaving the pipeline at the same time being different.

[0059] The pipelines may include, for example, non-long-distance pipelines, where the delivery delay effect of crude oil in the non-long-distance pipelines is ignored; and long-distance pipelines, where it takes a long time to leave the long-distance pipelines and thus has a delivery delay effect.

[0060] The operation parameters or plans may include, for example, the start time, end time, crude oil operation amount (i.e., volume), crude oil type (i.e., oil type), crude oil destination, crude oil source and / or delivery rate of the operation.

[0061] In the embodiments of the present application, the purpose of introducing quasi-instantaneous transportation is to obtain an optimized crude oil scheduling plan more quickly and accurately by simplifying the model of the long-distance pipeline (that is, converting the delayed transportation of the long-distance pipeline into quasi-instantaneous transportation, especially characterizing the changes between the time when crude oil enters the long-distance pipeline and the time when the crude oil leaves the long-distance pipeline, so that after the conversion process, at the same time slice, the type and amount of crude oil entering and leaving the long-distance pipeline are the same).

[0062] According to an embodiment of the present application, the conversion process of a long-distance pipeline from delayed delivery characteristics to quasi-immediate delivery characteristics may, for example, include: setting two time variables: the time when the incoming oil enters the pipeline and the time when the incoming oil leaves the pipeline. The time when the upstream equipment delivers crude oil to the pipeline is based on the time when the oil enters the pipeline, and the time when the downstream equipment receives crude oil from the pipeline is based on the time when the oil leaves the pipeline. According to one example, based on the rule that the current incoming oil volume begins to leave the pipeline when the sum of the current incoming oil volume and the subsequent incoming oil volume exceeds the pipeline volume, the relationship between the time when the current incoming oil volume begins to leave the pipeline and the time when it begins to enter the pipeline is determined; based on the rule that the current incoming oil volume completely leaves the pipeline when the sum of the subsequent incoming oil volume exceeds the pipeline volume, the relationship between the time when the current incoming oil volume completely leaves the pipeline and the time when it begins to enter the pipeline is determined.

[0063] According to an embodiment of the present application, the conversion process of a long-distance pipeline from delayed transportation characteristics to quasi-instantaneous transportation characteristics may, for example, include: placing the upstream equipment and downstream equipment of the pipeline into two different time systems, and setting the time starting point of the downstream time system to be later than that of the upstream time system (i.e., the start time of the sth time slice of the downstream equipment is greater than the start time of the sth time slice of the upstream equipment).

[0064] According to one embodiment of the present application, a crude oil scheduling method may, for example, include: obtaining basic data (including but not limited to crude oil scheduling topology, operational constraints, tanker arrivals, distillation unit processing plans, crude oil evaluation data, distribution of initial pipeline oil reserves, initial tank inventory, operational rate constraints, the set of oil types that can be stored in the tank, the set of oil types that can be processed by the distillation unit, etc.). In addition, optimization objectives may be selected, optionally including minimizing tanker demurrage, minimizing the number of distillation unit feed switching times, minimizing the cost of distillation unit crude oil processing, minimizing the number of initial tank oil payment switching times, and maximizing pipeline delivery time. The method may also, for example, include program simulation of pipeline output, downstream tank oil delivery and receipt operations, and distillation unit processing (see Example 2 below for details), or constructing a mathematical programming sub-model (see Example 3 below for details): utilizing the above simulation method or the sub-model, based on the distribution information of initial pipeline oil reserves within the pipeline, the initial inventory information of the plant tanks, and the operational constraints of the distillation unit, determining an operation plan for the pipeline and downstream equipment that completely discharges the initial pipeline oil reserves. The method may also, for example, include setting a first time system, whose time origin is the scheduling start time, setting a second time system, whose time origin is the operation end time when the oil in the pipeline is emptied at the beginning of the period, the operation time of the long-distance pipeline inlet and upstream equipment is based on the first time system, and the operation time of the long-distance pipeline outlet and downstream equipment is based on the second time system; updating the beginning inventory of the downstream plant tank to the calculated plant tank inventory of the oil in the pipeline at the beginning of the period of emptying. The method may also, for example, include establishing a crude oil scheduling mathematical programming model for a crude oil scheduling system (for example, including oil unloading from tankers, oil collection and delivery in storage tanks, pipeline transportation, distillation unit feeding, and the entire process of crude oil blending), wherein 1) the long-distance pipeline exhibits the characteristics of "quasi-instantaneous transportation", that is, within the same time slice, the type and amount of crude oil entering and leaving the pipeline are the same; 2) optionally, scenarios of variable pipeline transportation rate, transportation stoppage or deceleration are considered by setting the variable thdct s-1,j and related constraints to prevent the plant tanks from prematurely supplying crude oil to the distillation unit that has not yet arrived in the tank or has not yet completed the required rest period. Then, based on the mathematical model, the long-distance pipeline oil collection plan and the incoming oil destination plan are obtained, and optionally combined with the initial pipeline oil inventory information of the pipeline, the pipeline's oil delivery operation plan is adjusted. According to one example, the oil collection plan may include, for example, the start and end times of oil collection, the volume of oil collected, the delivery rate, and the type of oil delivered; the destination of the incoming oil may include, for example, the destination downstream plant tank, the volume of oil collected by the downstream plant tank, and the type of oil collected; and the oil delivery operation plan may include, for example, the start and end times of the crude oil leaving the pipeline, the delivery volume, the delivery rate, the delivery destination, and the type of oil.

[0065] According to one embodiment of the present application, a crude oil scheduling method may include, for example, obtaining basic data (including but not limited to crude oil scheduling topology, operational constraints, tanker arrivals, distillation unit processing plans, crude oil evaluation data, distribution of oil inventory at the beginning of a long-distance pipeline, storage tank inventory at the beginning of a period, operational rate constraints, the set of oil types that can be stored in the tanks, the set of oil types that can be processed by the distillation unit, etc.). Furthermore, optimization objectives may be selected, optionally including minimizing tanker demurrage, minimizing the number of distillation unit feed switching times, minimizing the cost of distillation unit crude oil processing, minimizing the number of tank first payment oil operation switching times, and maximizing long-distance pipeline delivery time. The method may also, for example, include establishing a mathematical programming model for crude oil scheduling for a scheduling system (including the entire process of tanker unloading, storage tank delivery, pipeline transportation, distillation unit feeding, and crude oil blending), wherein: 1) two time variables are set: the time when incoming oil enters the pipeline and the time when it leaves the pipeline. The time when upstream equipment delivers crude oil to the pipeline is based on the time when it enters the pipeline, and the time when downstream equipment receives crude oil from the pipeline is based on the time when it leaves the pipeline. 2) Based on the rule that the current incoming oil volume begins to leave the pipeline when the sum of the current incoming oil volume and the subsequent incoming oil volume exceeds the pipeline volume, the relationship between the time when the current incoming oil volume begins to leave the pipeline and the time when it begins to enter the pipeline is determined. Based on the rule that the current incoming oil volume completely leaves the pipeline when the sum of the subsequent incoming oil volume exceeds the pipeline volume, the relationship between the time when the current incoming oil volume completely leaves the pipeline and the time when it begins to enter the pipeline is determined. 3) Long-distance pipelines exhibit "quasi-instantaneous" transportation characteristics, that is, the type and volume of crude oil entering and leaving the pipeline are the same at the same time slice. Then, a scheduling plan is formed based on the mathematical programming model.

[0066] This invention reduces model size and improves model performance, which are fundamental to model application and crucial for achieving intelligent production scheduling, responding to delayed tanker arrivals, and changing distillation unit processing plans. For example, if a company is notified at short notice that a tanker scheduled to arrive tomorrow will arrive the day after tomorrow, it needs to quickly adjust its plan and delay the use of this crude oil.

[0067] FIG1 is a flow chart of a crude oil scheduling process for a refinery, according to an exemplary embodiment. As shown in FIG1 , a refinery purchases crude oil and transports it to a terminal via tanker. After the tanker safely berths at the port, the crude oil is unloaded into multiple suitable terminal tanks. The crude oil in the terminal tank has two transportation routes: one is that the crude oil enters the transfer tank via a shorter oil pipeline (i.e., a non-long-distance pipeline), and the other is that the crude oil enters the plant tank via a longer oil pipeline (i.e., a long-distance pipeline). The crude oil in the transfer tank can also enter the plant tank via the long-distance pipeline. Finally, the crude oil in the plant tank enters the distillation unit for processing. The non-long-distance pipeline connecting the terminal tank and the transfer tank is relatively short (e.g., 11 km), and the transportation delay effect of the non-long-distance pipeline can be ignored. However, the long-distance pipeline supplying the plant tank is usually longer (e.g., 163 km) and has a larger capacity (e.g., 46,000 m 3 ), it takes a long time (for example, more than 20 hours) for crude oil to leave the long-distance pipeline after entering it. Therefore, the crude oil production scheduling problem of this oil refinery is a complex problem involving long-distance pipeline transportation.

[0068] Fig. 2 is a flow chart of a crude oil production scheduling method according to an exemplary embodiment. As shown in Fig. 2 , the crude oil production scheduling method may include the following steps S201 to S203 .

[0069] In S201, basic data of a crude oil scheduling system including a long-distance pipeline is obtained. According to one example, the crude oil scheduling system also includes upstream equipment located before the long-distance pipeline and downstream equipment located after the long-distance pipeline. According to one embodiment, the basic data may include, but is not limited to, crude oil scheduling topology, operational constraints, tanker arrivals, distillation unit processing plans, crude oil evaluation data, distribution of crude oil inventory at the beginning of the long-distance pipeline, beginning inventory of storage tanks, operational rate constraints, the set of oil types that can be stored in storage tanks, the set of oil types that can be processed by distillation units, etc. According to one specific example, the basic data may, for example, include at least one of distribution information of the beginning crude oil inventory within the long-distance pipeline, operational constraints on oil receipt and payment of the upstream and downstream equipment, beginning inventory information of storage tanks in the downstream equipment, and operational constraints of the distillation units in the downstream equipment.

[0070] 1 , the downstream equipment of the long-distance pipeline may include plant tanks and distillation units, and the upstream equipment of the long-distance pipeline may include oil tankers (including berth information), terminal tanks, non-long-distance pipelines, transfer tanks, etc. Among them, the long-distance pipelines involved in the current crude oil scheduling project may be one or more, the upstream equipment of the long-distance pipeline may be one or more, and the downstream equipment of the long-distance pipeline may also be one or more. For example, the current crude oil scheduling project involves one long-distance pipeline, multiple oil tankers, multiple terminal tanks, one non-long-distance pipeline, multiple transfer tanks, multiple plant tanks, and multiple distillation units. Those skilled in the art should understand that the crude oil scheduling topology of FIG1 can also have various variations. For example, the number and deployment location of each component of the crude oil scheduling system can be changed according to the actual application scenario.

[0071] In addition, according to an example of the present disclosure, before the crude oil scheduling project begins, it is assumed that all long-distance pipelines are full of oil. Due to the long distance of the long-distance pipelines, the crude oil is delayed in leaving the long-distance pipelines during the transportation process, that is, the long-distance pipelines have the characteristic of delayed transportation.

[0072] According to an example of the present disclosure, the basic information may include:

[0073] (1) Basic information of the crude oil to be processed, including the crude oil name, crude oil name, density, sulfur content, and acid value as shown in Table 1 below.

[0074] Table 1 Basic information of crude oil components to be processed

[0075] (2) The blending formula of the mixed crude oil is shown in Table 2 below.

[0076] Table 2 Blending formula of mixed crude oil

[0077] (3) The upper feed limit and planned processing rate of the distillation unit are shown in Table 3 below.

[0078] Table 3 Basic information of distillation unit scheduling

[0079] (4) Basic information of the tanker arriving at the port, including the estimated arrival time, type of oil carried and oil capacity, as shown in Table 4 below.

[0080] Table 4 Basic information of arriving tankers

[0081] (5) Basic information of storage tanks (including terminal tanks, transfer tanks and plant tanks), including tank capacity, opening inventory, opening oil type, downstream nodes, etc., as shown in Tables 5 to 7 below.

[0082] Table 5 Basic information of terminal tank

[0083] Table 6 Basic information of transfer tank

[0084] Table 7 Basic information of plant tanks

[0085] (6) Berth basic information, as shown in Table 8 below.

[0086] Table 8 Berth basic information

[0087] (7) Basic information of the oil pipeline is shown in Tables 9 and 10 below.

[0088] Table 9 Basic information of oil transfer lines (non-long-distance pipelines)

[0089] Table 10 Basic information of long-distance pipelines (including distribution information of pipeline oil reserves at the beginning of the period)

[0090] In S202, a mixed integer programming model with corresponding constraints is constructed by converting the long-distance pipeline from delayed transmission characteristics to quasi-immediate transmission characteristics.

[0091] According to one embodiment, the conversion process or the corresponding constraints are used to characterize the variation between the time when crude oil enters the pipeline and the time when it leaves the pipeline, such that after the conversion process, the type and amount of crude oil entering and leaving the pipeline are the same at the same time slice. According to one example, the conversion process is implemented by the following steps: determining a first relationship between the start time when the crude oil leaves the pipeline and the start time when the crude oil enters the pipeline; and determining a second relationship between the end time when the crude oil leaves the pipeline and the start time when the crude oil enters the pipeline. According to one example, the first and second relationships are determined by constructing corresponding constraints (as described in more detail below) regarding the start time and end time when the crude oil leaves the pipeline, respectively. After the conversion process, the time when the upstream equipment delivers crude oil to the pipeline is based on the start time of entry into the pipeline, while the time when the downstream equipment receives crude oil from the pipeline is based on the start time when the crude oil leaves the pipeline (see Example 1 for details).

[0092] According to another embodiment, the conversion process can also be achieved by the following steps: determining the time required to empty the initial pipeline oil, and setting the upstream equipment to a first time system and the downstream equipment to a second time system, wherein the second time system is delayed in time by the determined time compared to the first time system (see Example 2 and Example 3 described below for details).

[0093] According to embodiments of the present disclosure, through the quasi-immediate delivery conversion processing of long-distance pipelines according to the present disclosure, the long-distance pipelines considered in the mixed integer programming model have the characteristic that crude oil can leave the pipeline immediately after entering the pipeline, thereby simplifying the long-distance pipeline delivery problem to an immediate delivery problem and eliminating the long-distance pipeline delay effect. Therefore, according to one example, the mixed integer programming model only needs to consider the long-distance pipeline delivery rate constraints and material balance constraints. Specifically, when constructing the mixed integer programming model, the long-distance pipeline oil collection and delivery operation constraints may include, for example: crude oil leaves the long-distance pipeline immediately after entering the long-distance pipeline; the long-distance pipeline delivery rate constraints; and the long-distance pipeline material balance constraints, as further described below.

[0094] According to an embodiment of the present disclosure, a mixed integer programming model may, for example, include an objective function and constraints (as further described below). The model may be a mixed integer linear programming model or a mixed integer nonlinear programming model, and the model may be based on discrete time or continuous time. According to one embodiment, when constructing a mixed integer programming model, for example, the crude oil scheduling system may include oil tanker unloading, oil storage tanks (including terminal tanks, transfer tanks, and plant tanks) receiving and delivering oil, pipeline (including long-distance pipelines and non-long-distance pipelines) transportation, distillation unit processing, crude oil storage, and crude oil blending operations, and the like. Variables, constraints, and objective functions are set to establish a mixed integer programming model, that is, a mixed integer programming model is established that includes the entire process from oil tanker unloading to distillation unit processing. In addition, the mixed integer programming model can also be adjusted according to the actual crude oil scheduling application scenario, but at least includes a model for a long-distance pipeline.

[0095] In S203, based on the basic data and the mixed integer programming model, according to the optimization objective, the operating parameters of the crude oil scheduling system during the crude oil scheduling and production period are generated. According to one example, the operating parameters include the operating parameters of each component of the crude oil scheduling system (for example, including but not limited to the long-distance pipeline and its upstream and downstream equipment) during the entire scheduling period. According to one example, the objective function is constructed based on the optimization objective, wherein the optimization objective includes at least one of the following: minimizing the demurrage of the oil tanker in the upstream equipment; minimizing the inventory cost of the storage tank, wherein the storage tank includes the plant tank, transfer tank and / or terminal tank located in the downstream equipment and / or the upstream equipment; minimizing the number of feed switching times of the distillation unit in the downstream equipment; minimizing the cost of crude oil processing by the distillation unit; minimizing the number of switching times of oil receiving and delivery operations of the storage tank; and maximizing the delivery time of the long-distance pipeline.

[0096] According to embodiments of the present disclosure, operational parameters (i.e., crude oil scheduling plans) may include, but are not limited to, the following: operational parameters for the downstream equipment of a long-distance pipeline during the entire scheduling period, operational parameters for the downstream equipment of the long-distance pipeline during the entire scheduling period, and operational parameters for the upstream equipment of the long-distance pipeline during the entire scheduling period. According to one specific example, operational parameters may include information such as the start and end time of the operation, crude oil operation volume (i.e., volume), crude oil type (i.e., oil type), crude oil destination, crude oil source, and delivery rate.

[0097] According to a specific embodiment of the present disclosure, the operating parameters (i.e., crude oil scheduling and production plan) may also include but are not limited to: the long-distance pipeline's oil collection operating parameters during the entire scheduling period, i.e., the operating plan for crude oil entering the long-distance pipeline, such as the oil collection time (including the oil collection start time and oil collection end time), crude oil scheduling and production volume (i.e., oil collection volume), crude oil source, oil collection rate, oil type, etc.; the long-distance pipeline's oil delivery operating parameters during the entire scheduling period, i.e., the operating plan for crude oil leaving the long-distance pipeline, such as the oil delivery time (i.e., the time when crude oil leaves the long-distance pipeline, including the oil delivery start time and oil delivery end time), crude oil scheduling and production volume, crude oil destination, oil delivery rate, oil type, etc.; the oil delivery operating parameters of the tanker during the entire scheduling period, such as the berthing position, oil unloading time, crude oil destination, oil type, and oil unloading rate etc.; the oil receiving operation parameters of the terminal tank during the entire scheduling period, such as the oil receiving volume, oil receiving time, crude oil source, oil receiving rate, oil type, etc.; the oil delivery operation parameters of the terminal tank during the entire scheduling period, such as the oil delivery volume, oil delivery time, crude oil destination, oil delivery rate, oil type, etc.; the oil receiving operation parameters of the plant tank during the entire scheduling period, such as the oil receiving volume, oil receiving time, crude oil source, oil receiving rate, oil type, etc.; the oil delivery operation parameters of the plant tank during the entire scheduling period, such as the oil delivery volume, oil delivery time, crude oil destination, oil delivery rate, oil type, etc.; the oil receiving and processing operation parameters of the distillation unit during the entire scheduling period (such as oil receiving volume, oil receiving time, crude oil source information, processing rate, feed information (such as sulfur content, acid value upper limit, etc.)); the oil receiving and delivery operation parameters of the transfer tank and non-long-distance pipeline.

[0098] In the above technical solution, basic data for a crude oil scheduling system, including a long-distance pipeline, is first acquired. A mixed integer programming model with corresponding constraints is then constructed by converting the long-distance pipeline from delayed delivery characteristics to quasi-immediate delivery characteristics. Based on the basic data and the mixed integer programming model, operating parameters for the crude oil scheduling system during crude oil scheduling are generated according to the optimization objective. By converting the long-distance pipeline's "delayed delivery" characteristics to "quasi-immediate delivery," the crude oil entering the pipeline and leaving the pipeline are identical within the same time slice. This simplifies the data processing process for the long-distance pipeline (e.g., reducing the number of variables and constraints) and significantly improves model application performance, enabling the rapid and automatic compilation of high-quality crude oil scheduling plans. This allows for the rapid and automatic compilation of crude oil scheduling plans without manual intervention, lowering the scheduling threshold and reducing workload, thereby improving enterprise productivity and significantly contributing to stable and economical production. Furthermore, the above modeling method simplifies the long-distance pipeline modeling process, resulting in a small and efficient model, making it easier to solve complex crude oil scheduling problems. In addition, the present disclosure can solve the problem of crude oil transportation in long-distance pipelines, achieve efficient transportation of crude oil in long-distance pipelines, reduce the residence time of crude oil in long-distance pipelines, and inhibit long-distance pipeline corrosion and other phenomena.

[0099] Example 1

[0100] As described above, according to one embodiment, the conversion process or the corresponding constraints are used to characterize the variation between the time when crude oil enters the pipeline and the time when it leaves the pipeline, such that after the conversion process, the type and amount of crude oil entering and leaving the pipeline are the same at the same time slice. According to one example, the conversion process is implemented by: determining a first relationship between the start time when the crude oil leaves the pipeline and the start time when it enters the pipeline; and determining a second relationship between the end time when the crude oil leaves the pipeline and the start time when the crude oil enters the pipeline. According to one example, the first and second relationships are determined by constructing corresponding constraints (as described in more detail below) regarding the start time and end time when the crude oil leaves the pipeline, respectively. After the conversion process, the time when the upstream equipment delivers crude oil to the pipeline is based on the start time of entry into the pipeline, while the time when the downstream equipment receives crude oil from the pipeline is based on the start time when the crude oil leaves the pipeline.

[0101] The following describes a detailed description of a specific implementation of step S202. According to one example, the conversion process for a long-distance pipeline from delayed delivery characteristics to quasi-immediate delivery characteristics may include setting two time variables: the time when the incoming oil enters the pipeline and the time when the incoming oil leaves the pipeline. The time when the upstream equipment delivers crude oil to the pipeline is based on the time when it enters the pipeline, and the time when the downstream equipment receives crude oil from the pipeline is based on the time when the crude oil leaves the pipeline. According to one example, based on the rule that the current incoming oil volume begins to leave the pipeline when the sum of the current incoming oil volume and the subsequent incoming oil volume exceeds the pipeline volume, the relationship between the time when the current incoming oil volume begins to leave the pipeline and the time when it begins to enter the pipeline is determined. Based on the rule that the current incoming oil volume completely leaves the pipeline when the sum of the subsequent incoming oil volume exceeds the pipeline volume, the relationship between the time when the current incoming oil volume completely leaves the pipeline and the time when it begins to enter the pipeline is determined.

[0102] Specifically, this can be achieved by the following steps: Based on the oil collection and delivery operation restrictions of the long-distance pipeline and its upstream and downstream equipment, construct constraints. When constructing a mixed integer programming model (specifically, the model's constraints), the oil collection and delivery operation restrictions of the long-distance pipeline may include but are not limited to:

[0103] (A1) Restrictions on the time when crude oil begins to leave the long-distance pipeline;

[0104] (A2) The time limit for the crude oil to leave the long-distance pipeline;

[0105] (A3) Transmission rate limitations of long-distance pipelines;

[0106] (A4) Material balance limitations of long-distance pipelines;

[0107] (A5) Long-distance pipelines can simultaneously receive oil from one or more upstream facilities;

[0108] (A6) Long-distance pipelines can deliver oil to one or more downstream facilities simultaneously.

[0109] In an embodiment of the present disclosure, both the start time limit for crude oil leaving the long-distance pipeline and the end time limit for crude oil leaving the long-distance pipeline are determined based on the characteristics of delayed delivery of the long-distance pipeline. Specifically, the start time limit for incoming oil leaving the pipeline can be determined based on the characteristics of delayed delivery of the long-distance pipeline, in combination with the movement state of the incoming oil (i.e., the oil entering the long-distance pipeline) and the start time of the incoming oil entering the long-distance pipeline. Similarly, the end time limit for incoming oil leaving the pipeline can be determined based on the characteristics of delayed delivery of the long-distance pipeline, in combination with the movement state of the incoming oil and the start time of the incoming oil entering the long-distance pipeline.

[0110] According to each operation restriction in (A1) to (A4), corresponding constraint conditions can be constructed respectively.

[0111] For example, based on the distribution information of the initial pipeline oil inventory, the volume, and the upper limit of the delivery rate, a constraint condition regarding the start time of the crude oil leaving the long-distance pipeline is constructed. For example, according to a specific example, based on the above-mentioned operational constraint (A1), the following constraint conditions shown in equations (1) to (6) can be constructed:

[0112] The long-distance pipeline includes one or more long-distance pipelines represented by a natural number p; PL represents the set of long-distance pipelines involved in the current crude oil scheduling project; the initial pipeline oil inventory of the long-distance pipeline is divided into different pipeline segments according to the oil type, and the pipeline segments are numbered 1, 2, ..., NPS according to the distance from the outlet of the long-distance pipeline. p , natural number NPS p represents the initial number of pipeline sections of the p-th long-distance pipeline; LP is a parameter representing the scheduling time span of the current crude oil scheduling project (i.e., the duration of the entire scheduling period); the scheduling time span is sliced ​​into one or more time slices represented by natural numbers s′ or s″, and SL is a set of time slices; an integer s, when s ≥ 1, s∈SL, represents the time slice corresponding to the current scheduling time span; when s∈[1-NPSp ,2-NPS p ,...,0], it represents the time slice corresponding to the historical scheduling time span; when s=1-NPS p When, it represents the NPS of the p-th long-distance pipeline p The time slice number when the oil in the pipeline enters the pipeline at the beginning of the period, when s=2-NPS p When, it represents the NPS of the p-th long-distance pipeline p -1 is the time slice number when the oil in the pipeline enters the pipeline at the beginning of the first period, and so on; l is a natural number, indicating the oil in the pipeline at the beginning of the first period; VLPL p,l is a parameter representing the volume of crude oil in the first section of the long-distance pipeline p; VUPL p is a parameter representing the volume of the long-distance pipeline p; max_FPL s′,p is a parameter representing the upper limit of the transport rate of the long-distance pipeline p in the s′th time slice; tsopl s,p is a continuous variable, indicating the start time of the crude oil entering the long-distance pipeline p in the sth time slice leaving the long-distance pipeline p; tsipl s′,p is a continuous variable, indicating the start time of crude oil entering the long-distance pipeline p at the s′th time slice; vipl s ″ ,p is a continuous variable, indicating the transport capacity of the long-distance pipeline p in the s″th time slice; FUPL s′,p represents the transport rate of the long-distance pipeline p in the s′th time slice. When FUPL s′,p When the parameters are known, it means that the long-distance pipeline p is transporting at a constant rate. s′,p When it is a continuous variable, it means that the long-distance pipeline p is transporting at a changing rate; when the crude oil entering the long-distance pipeline at the sth time slice begins to leave the pipeline at the s′th time slice, bsopl s,s′,p =1, otherwise, bsopl s,s′,p =0; and max() represents the maximum value operation.

[0113] Note that for each device involved in the current crude oil scheduling project, the entire scheduling period is divided into N time slices corresponding to the device, and the sequence numbers of the N time slices constitute the above time slice sequence number set; FUPL s′,p It can be a known parameter or an unknown variable. When the mixed integer programming model is a mixed integer linear programming model, FUPL s′,p are known parameters. When the above mixed integer programming model is a mixed integer nonlinear programming model, FUPL s′,p is an unknown variable that can be obtained by solving the model.

[0114] For example, the entire time span is divided into 15 time slices corresponding to the device, and the sequence numbers of the 15 time slices constitute a first time slice sequence number set, that is, N=15, SL={1, 2, 3, ..., 15}.

[0115] In the above equations (1) to (6), when bsopl s,s′,p =1, that is, when the crude oil entering the long-distance pipeline p at the sth time slice begins to leave the long-distance pipeline p at the s′th time slice, the starting time tsopl of the crude oil entering the long-distance pipeline p at the sth time slice leaving the long-distance pipeline p s,p Equal to the start time tsipl of the long-distance pipeline p at the s′th time slice s′,p Adding the delivery time of the part of the oil entering the pipeline in the s′th time slice, this part of the oil entering the pipeline can just completely push out the crude oil entering the long-distance pipeline p before the sth time slice, and its volume is or VUPL p .

[0116] In addition, the mixed integer programming model in the present disclosure is represented based on a unit-specific event time representation method, but is not limited to this method. For example, a global time representation method may also be used.

[0117] For example, based on the distribution information of the initial pipeline oil inventory, the volume, and the upper limit of the delivery rate, a constraint condition regarding the end time of the crude oil leaving the long-distance pipeline is constructed. For example, according to a specific example, based on the above-mentioned operational constraint (A2), the following constraints shown in equations (7.1) to (7.6) can be constructed:

[0118] Among them, teopl s,p is a continuous variable, indicating the end time of the crude oil entering the long-distance pipeline p at the sth time slice leaving the long-distance pipeline p; when the crude oil entering the long-distance pipeline p at the sth time slice completely leaves the long-distance pipeline p at the s′th time slice, beopl s,s′,p =1, otherwise, beopl s,s′,p =0.

[0119] In the above equations (7.1) to (7.6), when beopl s,s′,p =1, that is, the time teopl when the crude oil entering the long-distance pipeline p at the sth time slice completely leaves the pipeline at the s′th time slice is the time when the crude oil entering the long-distance pipeline p at the sth time slice completely leaves the pipelines,p Equal to the start time tsipl of the s′th time slice of the long-distance pipeline p s′,p , plus the transportation time of the part of the oil entering the pipeline in the s′th time slice, this part of the oil entering the pipeline can just completely push out the crude oil entering the long-distance pipeline p in the sth time slice, and its volume is equal to or VUPL p .

[0120] For example, according to the above operation restriction (A3), the constraint condition shown in the following equation (8) can be constructed:

[0121] Among them, vipl s,p is a continuous variable, indicating the transport capacity of the long-distance pipeline p in the sth time slice; FUPL s,p represents the transmission rate of the long-distance pipeline p in the sth time slice; tsipl s,p Indicates the start time of the sth time slice of the long-distance pipeline p; teipl s,p Indicates the end time of the sth time slice of the long-distance pipeline p.

[0122] For example, according to the above-mentioned operation restriction (A4) and the fact that crude oil leaves the long-distance pipeline immediately after entering the long-distance pipeline, the following constraints shown in equations (9)-(11) can be constructed:

[0123] Among them, vicpl s,p,c is a continuous variable, indicating the volume of crude oil c entering the long-distance pipeline p in the sth time slice; vocpl s,p,c is a continuous variable, indicating the volume of crude oil c leaving the long-distance pipeline p in the sth time slice; SC represents the set of crude oil types.

[0124] For example, based on the above operational constraints (A5), the following constraint conditions shown in equation (12.1) can be constructed:

[0125] Among them, NSOURCE P is a parameter that indicates the upper limit of the number of devices that can simultaneously deliver oil to the long-distance pipeline p. For example, when NSOURCE P When ≥2, it means that at least two devices can simultaneously deliver oil to the long-distance pipeline p; SOURCE p is a parameter, which represents the set of equipment that can deliver oil to the long-distance pipeline p; bsrpl s,i,p is a binary variable. When upstream equipment i delivers oil to long-distance pipeline p in the sth time slice, bsrpl s,i,p=1, when upstream equipment i does not deliver oil to long-distance pipeline p in the sth time slice, bsrpl s,i,p =0.

[0126] For example, based on the above operational constraints (A6), the following constraint conditions shown in equation (12.2) can be constructed:

[0127] Among them, NDESTINATION P is a parameter that indicates the upper limit of the number of devices that can simultaneously receive oil from the long-distance pipeline p. For example, when NDESTINATION P When ≥2, it means that at least two devices can receive oil from the long-distance pipeline p at the same time; DESTINATION p is a parameter, which represents the set of equipment that can receive oil from the long-distance pipeline p; bctpl s,j,p is a binary variable. When the downstream equipment j receives oil from the long-distance pipeline p in the sth time slice, bctpl s,j,p = 1, when the downstream equipment i does not receive oil from the long-distance pipeline p in the sth time slice, bctpl s,j,p =0.

[0128] As can be seen, after the above conversion process, the crude oil entering and leaving the long-distance pipeline at the same time slice is the same in type and volume. Therefore, the above method or constraints can simplify the long-distance pipeline transportation problem to an instantaneous transportation problem, eliminating the long-distance pipeline delay effect.

[0129] Then, based on the operational constraints on oil delivery and receipt for the long-distance pipeline and its upstream and downstream equipment, a mixed integer programming (MIP) overall model is constructed, as described in further detail in Example 2 below. Note that the MIP overall model considers the long-distance pipeline, which has the characteristic that crude oil can immediately leave the pipeline after entering it. Therefore, the MIP model only needs to consider the pipeline's delivery rate constraints and material balance constraints. Specifically, when constructing the MIP model, the operational constraints on oil delivery and receipt for the long-distance pipeline may include: crude oil must immediately leave the pipeline after entering it; a delivery rate constraint for the long-distance pipeline; and a material balance constraint for the long-distance pipeline.

[0130] By converting the "delayed delivery" feature of long-distance pipelines into "quasi-instantaneous delivery", so that the crude oil entering the pipeline and the crude oil leaving the pipeline are the same in the same time slice, the present disclosure simplifies the data processing process of long-distance pipelines (for example, reduces the corresponding number of variables and constraints), and greatly improves the performance of model application. Therefore, a high-quality crude oil scheduling plan can be quickly and automatically compiled to achieve goals such as stable feeding of distillation units and rapid oil unloading by tankers. For example, by focusing on the time changes of crude oil entering and leaving the pipeline through constraints instead of describing the relationship between the crude oil distribution in the pipeline and the crude oil output variety as the crude oil enters, the "quasi-instantaneous delivery" method of long-distance pipelines disclosed in the present disclosure achieves performance and results comparable to immediate delivery without significantly increasing the model scale and computing resources, and can ensure stable processing of distillation units and rapid oil unloading by tankers.

[0131] Example 2

[0132] The following describes in detail another embodiment of a quasi-immediate delivery conversion process for a long-distance pipeline. Specifically, a process for draining the initial pipeline oil storage is first determined, and the upstream equipment is set to a first time system and the downstream equipment is set to a second time system, where the second time system is delayed by a predetermined time from the first time system.

[0133] According to one example, the basic data also includes the initial inventory information of the storage tanks in the downstream equipment and the operating limitations of the distillation unit in the downstream equipment, wherein the process of determining the emptying of the initial pipeline oil includes: determining the time required to empty the initial pipeline oil by establishing a mathematical programming sub-model based on the basic data, and obtaining the first operating parameters of the downstream equipment during the emptying of the initial pipeline oil.

[0134] According to one embodiment of the present disclosure, before the crude oil scheduling project begins, a mathematical programming sub-model is used to obtain the operational plan (i.e., first operating parameters or first results) for the long-distance pipeline and its downstream equipment during the process of completely draining the oil stored in the long-distance pipeline at the initial stage of scheduling (i.e., draining the initial oil stored in the long-distance pipeline). When constructing the mathematical programming sub-model, only the long-distance pipeline oil delivery operations, the oil collection and delivery operations of the plant tanks, and the oil collection and delivery operations of the distillation unit are considered. Assuming that crude oil flows through the long-distance pipeline at a constant or variable rate, variables, first constraints, and a first objective function are set to establish the mathematical programming sub-model. The initial oil stored in the pipeline is the oil stored in the long-distance pipeline at the start of scheduling. The first result can include the operating parameters of the long-distance pipeline and its downstream equipment during the process of draining the initial oil inventory within the long-distance pipeline. Specifically, the first result includes the operating parameters of each long-distance pipeline involved in the current crude oil scheduling project, each plant tank involved in the current crude oil scheduling project, and each distillation unit involved in the current crude oil scheduling project. The operating parameters include information such as the start and end time of the operation, the crude oil operation volume, and the crude oil type. Based on the first result, the initial inventory information of the plant tanks in the downstream equipment is updated. The initial inventory information includes the initial inventory volume, the initial oil type, and the end time of the most recent oil collection. This simplifies the long-distance pipeline transportation problem into an immediate transportation problem, eliminating the delay effect of the long-distance pipeline.

[0135] Then, based on the oil collection and delivery operation constraints of the long-distance pipeline and its upstream and downstream equipment, a hybrid mathematical programming overall model is constructed. In an embodiment of the present disclosure, the hybrid mathematical programming overall model may include a second objective function and a second constraint condition. When constructing the hybrid mathematical programming overall model, the operations of oil unloading by tankers, oil collection and delivery by storage tanks (including terminal tanks, transfer tanks, and plant tanks), pipeline (including long-distance pipelines and non-long-distance pipelines) transportation, distillation unit processing, and crude oil blending are considered, and variables, second constraints, and a second objective function are set to establish a hybrid mathematical programming overall model, that is, a hybrid mathematical programming overall model covering the entire process from oil unloading by tankers to distillation unit processing is established.

[0136] Next, based on the updated initial inventory information of the plant tanks and the overall hybrid mathematical programming model, a second result is obtained. The first and second results constitute the operating parameters of the long-distance pipeline and its upstream and downstream equipment for the entire scheduling period. Specifically, the second result includes the operating parameters for oil delivery and receipt of the long-distance pipeline's downstream equipment during the target period, the long-distance pipeline's delivery parameters during the target period, the long-distance pipeline's receiving parameters for the entire scheduling period, and the operating parameters for oil delivery and receipt of the long-distance pipeline's upstream equipment during the entire scheduling period. The target period is the period between the time the long-distance pipeline's initial oil inventory is drained and the scheduling end time. The time when the long-distance pipeline's initial oil inventory is drained refers to the time when all long-distance pipelines involved in the current crude oil scheduling project have drained their initial oil inventory, i.e., the time when the long-distance pipeline that drains its initial oil inventory the latest has drained its initial oil inventory. Finally, a crude oil transportation plan is generated based on the first and second results. In an embodiment of the present disclosure, by integrating (i.e., merging) the first result and the second result, a complete crude oil transportation plan can be obtained, that is, the oil receiving and delivery operation parameters of the long-distance pipeline and its upstream and downstream equipment during the entire scheduling period. Specifically, the crude oil transportation plan may include: the oil receiving operation parameters of the long-distance pipeline during the entire scheduling period, that is, the operation plan for crude oil entering the long-distance pipeline (for example, operation time, crude oil delivery volume, crude oil source information, etc.), the oil delivery operation parameters of the long-distance pipeline during the entire scheduling period, that is, the operation plan for crude oil leaving the long-distance pipeline (for example, the order in which crude oil leaves the long-distance pipeline, crude oil delivery flow, crude oil destination information, etc.); the oil delivery operation parameters of the tanker during the entire scheduling period (for example, berthing position, unloading time, crude oil destination information, etc.); the oil receiving operation parameters of the terminal tank during the entire scheduling period (for example, oil receiving volume, oil receiving time, crude oil source information), oil delivery operating parameters of the terminal tank during the entire scheduling period (for example, oil delivery volume, oil delivery time, crude oil destination information); oil collection operating parameters of the plant tank during the entire scheduling period (for example, oil collection volume, approximate oil collection time, crude oil source information), oil delivery operating parameters of the plant tank during the entire scheduling period (for example, oil collection volume, oil collection time, crude oil destination information); oil collection and processing operating parameters of the distillation unit during the entire scheduling period (for example, oil collection volume, oil collection time, crude oil source information, processing rate, feed information (such as sulfur content, acid value upper limit, etc.)); oil collection and delivery operating parameters of the transfer tank and non-long-distance pipelines.

[0137] In the above technical solution, in the first stage, a mathematical programming sub-model is established. By solving this model, the operating parameters of the long-distance pipeline and its downstream equipment during the process of draining the initial oil inventory in the long-distance pipeline are obtained. Then, based on these operating parameters, the initial inventory level, initial oil type, and the end time of the most recent oil collection in the plant tanks of the downstream equipment are adjusted, thereby simplifying the long-distance pipeline transportation problem to an immediate transportation problem and eliminating the long-distance pipeline delay effect. In the second stage, a hybrid mathematical programming overall model covering the entire process from tanker unloading to distillation unit processing is established and solved. Finally, based on the solution results of the two models, a crude oil transportation plan is generated.

[0138] The following details the specific implementation of constructing a mathematical programming sub-model based on the aforementioned constraints on oil delivery operations and the oil collection and delivery operations of downstream equipment. Specifically, a first constraint is constructed based on the constraints on oil delivery operations and the oil collection and delivery operations of downstream equipment, and a first objective function is constructed based on the first objective.

[0139] When constructing the mathematical programming sub-model, the oil delivery operation constraints of the long-distance pipeline may include but are not limited to:

[0140] (a1) Long-distance pipelines transport crude oil at a constant rate;

[0141] (a2) At any given time, only one section of crude oil leaves the long-distance pipeline. That is, for any long-distance pipeline involved in the current crude oil scheduling project, only one section of crude oil leaves the long-distance pipeline at any given time, and crude oil sections in different long-distance pipelines can be exported simultaneously.

[0142] (a3) The long-distance pipeline delivers crude oil to the plant tanks on a first-in-first-out basis, i.e., the crude oil sections in the long-distance pipeline leave the pipeline in the order in which they entered the pipeline;

[0143] (a4) At the end of the dispatch, the long-distance pipeline is drained.

[0144] According to each operation restriction in (a1) to (a4), a corresponding first constraint condition can be constructed respectively.

[0145] For example, according to the above operation restriction (a1), the first constraint condition shown in the following equation (13) can be constructed:

[0146] Among them, volpl s,p,l is a continuous variable, indicating the output volume of crude oil in the lth section of the long-distance pipeline p in the sth time slice; FUPL s,p represents the transmission rate of the long-distance pipeline p in the sth time slice; tspl s,pis a continuous variable, indicating the start time of the sth time slice of the long-distance pipeline p; tepl s,p is a continuous variable representing the end time of the sth time slice of the long-distance pipeline p. SL' is a set of second time slice sequence numbers. For each device involved in the current crude oil scheduling project, the process of draining the initial oil inventory in the long-distance pipeline is divided into M time slices corresponding to the device. The sequence numbers of the M time slices constitute the second set of time slice sequence numbers. PL represents the long-distance pipeline involved in the current crude oil scheduling project. LOT represents the set of crude oil sections in the long-distance pipeline p.

[0147] For example, as described above, the process of discharging the initial oil storage in the long-distance pipeline can be divided into 10 time slices corresponding to the equipment, and the sequence numbers of the 10 time slices constitute a second time slice sequence number set, that is, M=10, SL'={1,2,3,…,10}.

[0148] FUPL s,p It can be a known parameter or an unknown variable. When the above mathematical programming sub-model is a mixed integer linear programming model, FUPL s,p are known parameters. When the above mathematical programming sub-model is a mixed integer nonlinear programming model, FUPL s,p is an unknown variable that can be obtained by solving the model.

[0149] Equation (13) above illustrates a constant rate as the maximum delivery rate of long-distance pipeline p. When setting the constant rate, in addition to considering the maximum delivery rate of long-distance pipeline p, factors such as the service life of the oil pump of long-distance pipeline p may also be comprehensively considered. Note that the present disclosure also employs a variable-rate delivery model, which is more flexible than the prior art.

[0150] In addition, the mathematical programming sub-model and the hybrid mathematical programming overall model in the present disclosure are both represented based on the unit-specific event (specific unit event) time representation method, but are not limited to this method. For example, a global time representation method can also be used.

[0151] For example, according to the above operation restriction (a2), the first constraint condition shown in the following equation (14) can be constructed:

[0152] Among them, bolpl s,p,l is a binary variable. When the long-distance pipeline p is exporting the l-th section of crude oil in the s-th time slice, bolpl s,p,l =1, when the long-distance pipeline p does not output the l-th section of crude oil in the s-th time slice, bolpl s,p,l =0.

[0153] According to the above operation restriction (a3), the first constraint condition shown in the following equation (15) can be constructed:

[0154] Among them, bolpl ss,p,l-1 is a binary variable. When the long-distance pipeline p is exporting the crude oil of section l-1 in the ssth time slice, bolpl ss,p,l-1 =1, when the long-distance pipeline p does not output the l-1 section of crude oil in the ssth time slice, bolpl ss,p,l-1 =0.

[0155] According to the above operation restriction (a4), the first constraint condition shown in the following equation (16) can be constructed:

[0156] Among them, VLPL p,l is a parameter, which represents the volume of the first section of crude oil in the long-distance pipeline p at the start of scheduling.

[0157] When constructing the mathematical programming sub-model, the oil receiving and delivery operation constraints of the plant tanks in the downstream equipment of the long-distance pipeline include but are not limited to:

[0158] (b1) The second storage tank cannot perform oil receiving and delivery operations simultaneously. That is, for any second storage tank involved in the current crude oil scheduling project, the second storage tank cannot perform oil receiving and delivery operations simultaneously. Different second storage tanks can perform oil receiving and delivery operations simultaneously.

[0159] (b2) The oil delivery rate of the second storage tank is limited by the capacity of the oil pump of the second storage tank;

[0160] (b3) The second tank must be left standing for at least the target time after receiving the oil before it can be delivered. If there is no requirement for the second tank to remain standing, the target time is 0;

[0161] (b4) the inventory level of the second storage tank is between its corresponding preset tank bottom level and preset tank capacity and is less than its corresponding safety stock threshold;

[0162] (b5) The second storage tank can only store the corresponding storable oil type, that is, the second storage tank can only store specific oil types;

[0163] (b6) The second storage tank can only receive oil from its corresponding upstream equipment and deliver oil to its corresponding downstream equipment, that is, the storage tank can only receive oil from a specific equipment and deliver oil to a specific distillation unit.

[0164] Among them, the above-mentioned second storage tank is a factory tank. After the factory tank collects the oil, it needs to stand still for several hours and complete the desalination and dehydration operations before it can enter the distillation device for processing.

[0165] According to each operation restriction in (b1) to (b6), a corresponding first constraint condition can be constructed respectively.

[0166] For example, according to the above operation restriction (b1), the first constraint condition shown in the following equation (18) can be constructed:

[0167] Among them, bict s,j is a binary variable. When the plant tank j receives oil in the sth time slice, bict s,j =1, when the plant tank j is not receiving oil in the sth time slice, bict s,j =0;boct s,j is a binary variable. When the plant tank j delivers oil in the sth time slice, boct s,j =1, when the plant tank j is not delivering oil in the sth time slice, boct s,j =0; CT represents the plant tanks involved in the current crude oil scheduling project.

[0168] For example, according to the above-mentioned operation restriction (b2), the first constraint conditions shown in the following equations (19) and (20) can be constructed:

[0169] Among them, vplct s,p,j is a continuous variable, indicating the crude oil transport volume between the long-distance pipeline p and the plant tank j in the sth time slice; FUTC p,j is a parameter, which represents the maximum delivery rate of crude oil from the long-distance pipeline p to the plant tank j; tsct s,j is a continuous variable, indicating the start time of the sth time slice of plant tank j; tect s,j is a continuous variable, indicating the end time of the sth time slice of the plant tank j; vctcd s,j,d is a continuous variable, representing the crude oil transport volume between plant tank j and distillation unit d in the sth time slice; FUPC j,d is a parameter representing the maximum crude oil delivery rate from tank j to distillation unit d in the plant; CD represents the distillation unit involved in the current crude oil scheduling project.

[0170] According to the above operation restriction (b3), the first constraint condition shown in the following equation (21) can be constructed:

[0171] Among them, tect s',j is a continuous variable, indicating the end time of the s'th time slice of the plant tank j, where s'<s; THDCT indicates the shortest static time after the plant tank is drained; bict s′,jis a binary variable. When the plant tank j receives oil in the s'th time slice, bict s′,j =1, when the plant tank j is not receiving oil in the s'th time slice, bict s′,j =0.

[0172] According to the above operation restriction (b4), the first constraint conditions shown in the following equations (22) and (23) can be constructed:

[0173] v s,j ≥VLCT j (twenty two)

[0174] v s,j ≤min(VUCT j ,VSCT j ) (twenty three)

[0175] Among them, v s,j is a continuous variable, indicating the inventory of plant tank j at the end of the sth time slice; VLCT j is a parameter, which represents the preset tank bottom volume corresponding to the plant tank j; VUCT j is a parameter, which indicates the preset tank capacity corresponding to the plant tank j; VSCT j is a parameter, which represents the safety stock threshold corresponding to tank j in the plant area.

[0176] According to the above operation restriction (b5), the first constraint condition shown in the following equation (24) can be constructed:

[0177] Among them, SC_ST j represents the set of storable oil types corresponding to plant tank j; vcct s,j,c is a continuous variable, representing the inventory of crude oil c in plant tank j at the end of the sth time slice; SC represents the crude oil set.

[0178] According to the above operation restriction (b6), the first constraint conditions shown in the following equations (25) and (26) can be constructed:

[0179] Among them, SOURCE j Indicates the source equipment of crude oil received by plant tank j, that is, the upstream oil delivery equipment corresponding to plant tank j; DEST j is a set, which represents the destination of the crude oil in the plant tank j, that is, the downstream oil receiving equipment corresponding to the plant tank j.

[0180] When constructing the mathematical programming sub-model, the oil receiving and delivery operation constraints of the distillation unit in the downstream equipment of the long-distance pipeline include but are not limited to:

[0181] (c1) The distillation unit can only process the corresponding processable oil type, that is, the distillation unit can only process specific suitable oil types;

[0182] (c2) the processing capacity of the distillation unit is consistent with its corresponding planned processing capacity;

[0183] (c3) The distillation unit operates continuously and uninterruptedly.

[0184] According to each operation restriction in (c1) to (c3), a corresponding first constraint condition can be constructed respectively.

[0185] For example, according to the above operation restriction (c1), the first constraint condition shown in the following equation (27) can be constructed:

[0186] Among them, SC_PC d is a set, which represents the crude oil that can be processed by distillation unit d, that is, the type of oil that can be processed by distillation unit d; viccd s,d,c It is a continuous variable, which represents the processing volume of crude oil c by distillation unit d in the sth time slice.

[0187] According to the above operation restriction (c2), the first constraint condition shown in the following equation (28) can be constructed:

[0188] Among them, vcd s,d represents the planned processing capacity of the distillation unit d at the sth time slice; FCD d is a parameter representing the planned processing rate of distillation unit d; tecd s,d is a continuous variable, indicating the end time of the sth time slice of the distillation unit d; tscd s,d is a continuous variable, indicating the start time of the sth time slice of the distillation unit d.

[0189] According to the above operation restriction (c3), the first constraint condition shown in the following equation (29) can be constructed:

[0190] Among them, tscd s+1,d is a continuous variable, indicating the start time of the s+1th time slice of the distillation unit d; tecd s,d is a continuous variable, indicating the end time of the sth time slice of the distillation unit d; NSL is the last time slice in SL.

[0191] In addition, the first goal may include at least one of the following: emptying the oil in the pipeline at the beginning of the period as quickly as possible; minimizing the inventory cost of the plant tanks; and minimizing the number of feed switching times of the distillation unit in the downstream equipment.

[0192] In one embodiment of the present disclosure, the first objective may include draining the initial oil in the pipeline as quickly as possible, that is, minimizing the draining time of the initial oil in the pipeline may be used as the optimization objective to construct the first objective function.

[0193] For example, according to the first objective, the first objective function objective1 shown in the following equation (30) can be constructed:

[0194] objective1=minmtepl (30)

[0195] Among them, mtepl is a continuous variable, which represents the latest time of the initial oil storage in the pipeline of all long-distance pipelines.

[0196] For another example, the first objective may include: draining the initial pipeline oil inventory as quickly as possible, minimizing the inventory cost of the plant tanks, and minimizing the number of feed switches for the distillation unit in the downstream equipment. Specifically, the first objective function can be constructed with minimizing the initial pipeline oil inventory draining time, the plant tank inventory cost, and the number of feed switches for the distillation unit as optimization objectives.

[0197] For example, according to the first objective, the first objective function objective1 shown in the following equation (31) can be constructed:

[0198] Among them, w1, w2, and w3 represent optimization weights, which are all preset values; v s-1,j is a continuous variable, indicating the inventory of tank j at the end of the s-1th time slice; v 0,j represents the initial inventory of tank j in the plant area; bccd s,d is a binary variable. When the feed tank switching operation occurs at the beginning of the sth time slice in the distillation unit d, bccd s,d =1, when the distillation unit d does not switch the feed tank at the beginning of the sth time slice, bccd s,d =0.

[0199] Next, we can solve the mathematical programming submodel based on the initial oil inventory distribution of the long-distance pipeline (Table 10), the plant tank equipment information and initial inventory distribution (Table 7), the distillation unit feed requirements (Table 3), the crude oil properties (Table 1), and the mixed crude oil blending plan (Table 2), and obtain the first result.

[0200] According to one example, the first result may include an original plan for completely draining the initial oil storage in the long-distance pipeline, namely, the operating parameters of the plant tank during the process of draining the initial oil storage in the long-distance pipeline, as shown in Table 11 below. In Table 11 below, for ease of presentation, the execution time of the operation is described using relative time based on 6:00 AM on July 1, 2022.

[0201] Table 11 Original plan for completely removing the initial oil storage in the long-distance pipeline

[0202] For example, when the mathematical programming submodel is solved, the variable vcplct s,p,j,c =500, v s,j =1000,tsct s,j =0,tect s,j =10, where vcplct s,p,j,c is a continuous variable representing the volume of crude oil c transferred between pipeline p and plant tank j during the sth time slice. This result indicates that between time units 0 and 10, plant tank j receives 500 units of crude oil c from pipeline p. After the oil is received, the inventory in plant tank j is 1000 units.

[0203] The following describes in detail the specific implementation method for updating the initial inventory information of the plant tanks in the downstream equipment based on the first result. Specifically, the first result may include the inventory quantity and oil type of each plant tank involved in the current crude oil scheduling project when the initial pipeline oil storage is emptied. In this case, the initial inventory information of the plant tanks in the downstream equipment can be updated based on the first result in the following manner:

[0204] For each plant tank, the difference between the end time of the most recent oil collection of the plant tank and the time spent on emptying the oil stored in the pipeline at the beginning of the period is determined as the new and most recent end time of oil collection of the plant tank; if the plant tank has an oil collection and payment operation during the process of discharging the oil stored in the pipeline at the beginning of the period, the beginning inventory of the plant tank will be updated to the inventory of the plant tank when the oil stored in the pipeline at the beginning of the period is emptied, and the beginning oil type of the plant tank will be updated to the storage oil type of the plant tank when the oil stored in the pipeline at the beginning of the period is emptied.

[0205] For example, the beginning inventory and beginning oil type information of each plant tank shown in Table 7 can be updated to the ending inventory and ending oil type information of the corresponding plant tank shown in Table 11.

[0206] For example, after the mathematical programming sub-model is solved, the variable vcct NSL,j,c =500, vct NSL,j =500, where vcct NSL,j,c vct represents the volume of crude oil c stored in tank j at the plant when the long-distance pipeline is drained; NSL,j represents the updated opening inventory of plant tank j, indicating that when the opening oil storage in the long-distance pipeline is emptied, plant tank j stores crude oil c with a storage capacity of 500 volume units. In the binary mixed integer programming model, the opening inventory of plant tank j is 500 volume units, and the oil type in the tank is crude oil c.

[0207] The initial inventory information of the plant tanks at the initial stage of scheduling is adjusted to the initial inventory information when the oil in the long-distance pipeline is completely pushed out, thereby simplifying the long-distance pipeline transportation problem into an instant transportation problem and removing the delay effect of the long-distance pipeline. By converting the "delayed transportation" feature of the long-distance pipeline into "quasi-instant transportation", the crude oil entering the pipeline and the crude oil leaving the pipeline are the same in the same time slice. The above steps simplify the data processing process of the long-distance pipeline (for example, reducing the corresponding number of variables and constraints) and greatly improve the model application performance. Therefore, a high-quality crude oil scheduling plan can be quickly and automatically compiled to achieve the goals of stable feeding of the distillation unit and rapid unloading of oil by tankers. Compared with not considering the delayed transportation of the long-distance pipeline (i.e., instant transportation), the "quasi-instant transportation" method of the long-distance pipeline disclosed in the present invention achieves performance and results comparable to instant transportation without significantly increasing the model scale and computing resources, and can ensure stable processing of the distillation unit and rapid unloading of oil by tankers.

[0208] Then, the specific implementation method of constructing the hybrid mathematical programming overall model is described in detail based on the oil collection and delivery operation constraints of the long-distance pipeline and its upstream and downstream equipment. Specifically, it can be achieved through the following steps [1] and [2]:

[0209] Step [1]: Construct the second constraint based on the oil receiving and delivery operation restrictions of the long-distance pipeline and its upstream and downstream equipment.

[0210] Step [2]: Based on the second objective, construct the second objective function.

[0211] By transforming the long-distance pipeline's "delayed delivery" characteristic into "quasi-immediate delivery," the hybrid mathematical programming overall model considers the long-distance pipeline, which has the characteristic that crude oil can leave the pipeline immediately after entering. The hybrid mathematical programming overall model only needs to consider the pipeline's delivery rate and material balance constraints. Specifically, when constructing the hybrid mathematical programming overall model, the operational constraints on the long-distance pipeline's oil collection and delivery include:

[0212] (d1) Crude oil leaves the long-distance pipeline immediately after entering it;

[0213] (d2) Transmission rate limitations of long-distance pipelines;

[0214] (d3) Material balance limitations of long-distance pipelines.

[0215] According to each operation restriction in (d1) to (d3), corresponding second constraint conditions can be constructed respectively, which are similar to the corresponding constraint conditions of the relevant parts in Example 1.

[0216] For example, according to the above operation restriction (d1), the second constraint condition shown in the following equation (32) can be constructed:

[0217] Among them, vicpl s,p,c is a continuous variable, indicating the volume of crude oil c entering pipeline p in the sth time slice; vocpl s,p,c is a continuous variable representing the volume of crude oil c leaving pipeline p in the sth time slice; SL is the first time slice sequence number set. For each device involved in the current crude oil scheduling project, the entire scheduling period is divided into N time slices corresponding to the device. The sequence numbers of the N time slices constitute the first time slice sequence number set.

[0218] For example, as mentioned above in Example 1, the entire scheduling period is divided into 15 time slices corresponding to the device, and the sequence numbers of the 15 time slices constitute a first time slice sequence number set, that is, N=15, SL={1,2,3,…,15}.

[0219] According to the above operation limit (d2), the second constraint condition shown in the following equation (33) can be constructed:

[0220] Among them, vipl s,p is a continuous variable representing the delivery volume of pipeline p in the sth time slice. Like the mathematical programming sub-model, the hybrid mathematical programming overall model still assumes that the long-distance pipeline delivers crude oil at a constant rate, but the present disclosure is not limited thereto and it can also be assumed that the long-distance pipeline delivers crude oil at a variable rate.

[0221] FUPL s,p It can be a known parameter or an unknown variable. When the above hybrid mathematical programming overall model is a mixed integer linear programming model, FUPL s,p are known parameters. When the above hybrid mathematical programming overall model is a mixed integer nonlinear programming model, FUPL s,p is an unknown variable and can be obtained by solving the model. Among them, the mathematical programming sub-model and the hybrid mathematical programming overall model are of the same type.

[0222] According to the above operation limit (d3), the second constraint conditions shown in the following equations (34) and (35) can be constructed:

[0223] The storage tanks in the upstream and downstream equipment of long-distance pipelines can include terminal tanks, plant tanks, and transfer tanks. Among them, the oil collection and delivery operation constraints of terminal tanks considered in the hybrid mathematical programming overall model are basically consistent with the oil collection and delivery operation constraints of plant tanks considered in the mathematical programming sub-model. The oil collection and delivery operation constraints of transfer tanks considered in the hybrid mathematical programming overall model are basically consistent with the oil collection and delivery operation constraints of plant tanks considered in the mathematical programming sub-model.

[0224] Specifically, when constructing the overall hybrid mathematical programming model, the oil receiving and delivery operation restrictions of the terminal tanks and transfer tanks in the upstream equipment of the long-distance pipeline include but are not limited to: the second storage tank cannot perform oil receiving and delivery operations at the same time, where the second storage tank is a transfer tank or a terminal tank; the oil receiving and delivery rate of the second storage tank is limited by the capacity of the oil pump of the second storage tank; the second storage tank must be left to stand for at least a target time after receiving the oil before delivering the oil. If the second storage tank has no standing requirement, the target standing time is 0; the inventory of the second storage tank is between its corresponding preset tank bottom volume and preset tank capacity, and is less than its corresponding safety stock threshold; the second tank can only store its corresponding storable oil type; the second tank can only receive oil from its corresponding upstream equipment and deliver oil to its corresponding downstream equipment.

[0225] It should be noted that the operational constraints on the receipt and delivery of oil to the plant tanks considered in the hybrid mathematical programming overall model are basically the same as those considered in the mathematical programming sub-model, that is, they include the operational constraints shown in (b1) to (b6) above. Only the constraint corresponding to (b3) is different from the above equation (21).

[0226] For example, considering the actual scenario of stopping or slowing down a long pipeline, according to the above-mentioned operation restriction (b3), the second constraint of the hybrid mathematical programming overall model shown in the following equations (36) to (38) can be constructed:

[0227] Among them, thdct s-1,j It indicates the waiting time for the tank j in the plant to deliver oil at the end of the s-1 time slice; thdct s,j Indicates the waiting time for the plant tank j to deliver oil at the end of the sth time slice; THDCT is a parameter indicating the minimum waiting time for the plant tank after receiving oil. When the enterprise requires the tank to be idle after receiving oil, THDCT is the required waiting time. When the enterprise does not require the tank to be idle after receiving oil, THDCT is a sufficiently small number, such as 0.01h; bectpl s,j,p is a binary variable. When the operation of the plant tank j before the start of the sth time slice is to receive oil from the long-distance pipeline p, bectpl s,j,p = 1, when the operation of the plant tank j before the start of the sth time slice is not to receive oil from the long-distance pipeline p, bectpl s,j,p =0.

[0228] In addition, the oil collection and delivery operation constraints of the distillation unit considered by the hybrid mathematical programming overall model are consistent with the oil collection and delivery operation constraints of the distillation unit considered by the mathematical programming sub-model, and will not be repeated in this disclosure.

[0229] Furthermore, the operational constraints of oil tankers' receipt and payment operations considered in the hybrid mathematical programming overall model may include but are not limited to:

[0230] (e1) A tanker may only berth at one berth, and the berth’s capacity is one tanker (i.e. a berth can only be berthed by one tanker at a time);

[0231] (e2) The tanker can only berth and unload oil after arriving at the port;

[0232] (e3) The oil unloading rate of an oil tanker is limited by the capacity of the oil tanker's oil pumps.

[0233] According to each operation restriction in (e1) to (e3), corresponding second constraint conditions can be constructed respectively.

[0234] For example, according to the above operational constraint (e1) that “the tanker can only dock at one berth”, the second constraint shown in the following equation (39) can be constructed:

[0235] Among them, bvlbe s,v,b is a binary variable. When tanker v docks at berth b at the sth time slice, bvlbe s,v,b =1, when the tanker v is not docked at berth b in the sth time slice, bvlbe s,v,b =0; BE is the berth involved in the current crude oil scheduling project; VL is the tanker involved in the current crude oil scheduling project.

[0236] According to the above operational constraint (e1), “the berth capacity is one tanker”, the second constraint shown in equation (40) can be constructed as follows:

[0237] According to the above operation restriction (e2), the second constraint condition shown in the following equation (41) can be constructed:

[0238] Among them, tsvl s,v is a continuous variable, indicating the start time of the s-th time slice of the tanker v; TARVL v is a parameter, which represents the planned arrival time of tanker v.

[0239] According to the above operation restriction (e3), the second constraint condition shown in the following equation (42) can be constructed:

[0240] Among them, vvlbe s,v,b is a continuous variable, representing the oil unloading amount of tanker v at berth b in the sth time slice; tevl s,v is a continuous variable, indicating the end time of the sth time slice of the tanker v; tsvls,v is a continuous variable, indicating the start time of the sth time slice of the tanker v; FUUL v is a parameter representing the maximum unloading rate of tanker v.

[0241] In addition, when constructing the overall mixed integer programming model, the oil collection and delivery operation constraints of non-long-distance pipelines in the upstream equipment of the long-distance pipeline can also be considered, including but not limited to:

[0242] (f1) Material balance restrictions for non-long-distance pipelines;

[0243] (f2) Transmission rate limitations of non-long-distance pipelines.

[0244] According to each operation restriction in (f1) to (f2), corresponding constraints can be constructed respectively.

[0245] For example, according to the above operation restriction (f1), the first constraint condition shown in the following equation (43) can be constructed:

[0246] Among them, vizl s,z is a continuous variable, representing the transport capacity of non-long-distance pipeline z at the sth time slice, viczl s,z,c is a continuous variable, representing the delivery volume of crude oil c by non-long-distance pipeline z in the sth time slice, and ZL is the non-long-distance pipeline involved in the current crude oil scheduling project.

[0247] According to the above operation restriction (f2), the first constraint condition shown in the following equation (44) can be constructed:

[0248] Among them, tezl s,z is a continuous variable, indicating the end time of the sth time slice of the non-long-distance pipeline z; tszl s,z is a continuous variable, indicating the start time of the zth time slice of the non-long-distance pipeline; FUZL z is a parameter, which represents the maximum transmission rate of non-long-distance pipeline z.

[0249] In addition, the above-mentioned second goal may include at least one of the following: the demurrage time of the oil tanker in the downstream equipment is shortest; the inventory cost of the first storage tank is lowest, wherein the first storage tank includes at least one of the plant tank, the transfer tank in the upstream equipment of the long-distance pipeline, and the terminal tank in the upstream equipment; the number of feed switching times of the distillation unit in the downstream equipment is minimized; the cost of crude oil processing by the distillation unit is minimized; the number of switching times of receiving and delivering oil operations in the first storage tank is minimized; the delivery volume of the long-distance pipeline is maximized, in order to ensure that the pipeline does not stop, thereby avoiding the pipeline cleaning work caused by the pipeline stoppage and the energy consumption when restarting the pump.

[0250] Frequent feed switching and unstable feed properties in the distillation unit can seriously impact the smooth operation of the distillation unit and even the entire plant, potentially leading to safety incidents. Furthermore, shipping costs are high, and vessel demurrage fees are high, with tanker demurrage periods of 7-10 days not uncommon. Therefore, in one embodiment, the second objective can include minimizing tanker demurrage and the number of feed switching cycles for the distillation unit. Specifically, a second objective function can be constructed with minimizing tanker demurrage and the number of feed switching cycles for the distillation unit as optimization objectives, thereby calculating a safe, stable, and economical operating plan.

[0251] For example, according to the second objective, a second objective function objective2 shown in the following equation (45) can be constructed:

[0252] Among them, TEDK v is a continuous variable, representing the departure time of tanker v. w4 and w5 represent optimization weights, both of which are preset values.

[0253] For another example, the second objective may include minimizing tanker demurrage, minimizing plant tank inventory costs, and minimizing the number of feed switching operations for the distillation unit. Specifically, the second objective function may be constructed with minimizing tanker demurrage, plant tank inventory costs, and the number of feed switching operations for the distillation unit as optimization objectives.

[0254] For example, according to the second objective, a second objective function objective2 shown in the following equation (46) can be constructed:

[0255] Among them, w6, w7, and w8 represent optimization weights, which are all preset values.

[0256] According to an example, the following describes a detailed implementation method for solving the hybrid mathematical programming model based on the updated initial inventory information of the plant tanks to obtain the second result. According to a specific example, the hybrid mathematical programming model can be solved based on the data in Tables 1 to 10 to obtain the second result, where the data in Table 5 is the updated data based on Table 11.

[0257] For example, according to a specific embodiment, after the hybrid mathematical programming overall model is solved, the variable vcstpl s,i,p,c =500, tspl s,p =0,tepl s,p =10, where vcstpl s,i,p,c represents the volume of crude oil c delivered between pipeline p and terminal tank i in the sth time slice, indicating that pipeline p receives 500 units of crude oil c from terminal tank i in the 0th to 10th time units. This shows that pipeline p first delivers crude oil c1 to plant tank j1, then delivers crude oil c2 to plant tank j2, and finally delivers crude oil c3 to plant tank j3.

[0258] In addition to the operational restrictions given above, the following operational restrictions can also be considered: terminal tanks can only store component oils; transfer tanks can store both component oils and mixed crude oils; plant tanks can only store mixed crude oils; crude oil blending operations should be carried out as much as possible at the entrance of the long-distance pipeline or in the transfer tank.

[0259] Example 3

[0260] Example 3 differs from Example 2 in that a simulation method is used rather than a mathematical programming sub-model to obtain the operational plan (i.e., first operating parameters or first results) for the long-distance pipeline and its downstream equipment during the process of completely draining the oil stored in the long-distance pipeline at the initial stage of scheduling (i.e., draining the initial oil stored in the long-distance pipeline). According to one example, determining the process of draining the initial oil stored in the pipeline includes: determining the time required to drain the initial oil stored in the pipeline by program simulation of the long-distance pipeline output, the downstream storage tank oil delivery operations, and the distillation unit processing process, and obtaining the first operating parameters of the downstream equipment during the draining of the initial oil stored in the pipeline.

[0261] The following describes in detail a specific implementation method (i.e., a program simulation method) for determining the first operating parameter based on the distribution information of the initial oil inventory in the long-distance pipeline, the initial inventory information of the plant tank, and the operating limitations of the distillation unit. Specifically, this can be achieved through the following steps (1) to (6):

[0262] Step (1): From the plant tanks involved in the current crude oil scheduling project, determine the discharge tank of each long-distance pipeline with unemptied initial oil reserves at the initial moment and the feed tank of each distillation unit at the initial moment.

[0263] In an embodiment of the present disclosure, the initial value of the initial time is the scheduling start time.

[0264] Step (2): Determine the third operating parameter based on the initial inventory information of each discharge tank, the initial inventory information of each feed tank, and the distribution information of the initial oil inventory in the long-distance pipeline.

[0265] In an embodiment of the present disclosure, the third operating parameter may include the operating parameters of each long-distance pipeline, plant tank and distillation unit that has not been emptied of initial oil reserves within the first target time after the initial moment, and the first target time is the minimum value of the current sustainable oil collection time of each discharge tank and the current sustainable oil delivery time of each feed tank.

[0266] Among them, the current sustainable oil collection time of the discharge tank is the time during which the discharge tank can continuously collect oil, which is related to the inventory of the discharge tank at the initial moment, the tank capacity of the discharge tank (that is, the upper limit of the inventory), the delivery rate of the long-distance pipeline corresponding to the discharge tank (that is, the discharge tank is the discharge tank of the long-distance pipeline corresponding to it), the current distribution of the oil in the long-distance pipeline corresponding to the discharge tank, etc.; when the discharge tank collects oil and delivers oil at the same time, the current sustainable oil collection time of the discharge tank is also related to the oil delivery rate of the discharge tank. The current sustainable oil delivery time of the feed tank is the time during which the feed tank can continuously deliver oil. It is related to the inventory of the feed tank at the initial moment and the processing rate of the distillation device corresponding to the feed tank (that is, the feed tank is the feed tank of the distillation device corresponding to it) (that is, the oil delivery rate of the feed tank); when the feed tank collects oil and delivers oil at the same time, the current sustainable oil delivery time of the feed tank is also related to the oil collection rate of the feed tank.

[0267] Step (3): Based on the third operating parameter, the distribution information of the initial oil storage in each long-distance pipeline that has not been emptied of the initial oil storage is updated.

[0268] Specifically, for each long-distance pipeline with undrained initial oil reserves, the volume of each crude oil section transported by the pipeline within the first target time period after the initial time can be determined based on the pipeline's operating parameters (including information such as the crude oil sections transported, transportation duration, and transportation rate) within the first target time period after the initial time. Subsequently, based on the volumes of each crude oil section transported by the pipeline within the first target time period at the initial time period and the distribution information of the pipeline's initial oil reserves at the initial time period, the crude oil sections and the volumes of each crude oil section included in the pipeline's oil reserves at the target time can be determined. This means that new distribution information for the initial oil reserves within each long-distance pipeline with undrained initial oil reserves is obtained. The target time is the sum of the initial time period and the first target time period.

[0269] Step (4): Based on the updated distribution information, determine whether there is a long-distance pipeline that has not emptied the oil stored at the beginning of the period.

[0270] If there are any long-distance pipelines that have not been emptied of the oil stored at the beginning of the period, it means that there are still long-distance pipelines that have not been completely ejected of the oil stored at the beginning of the period. At this time, it is necessary to determine the operating parameters of each long-distance pipeline that has not been emptied of the oil stored at the beginning of the period, the plant tank and the distillation unit within a period of time after the above-mentioned target time. Specifically, the following step (5) can be executed, and then return to the above-mentioned step (1) to continue executing until there are no long-distance pipelines that have not been emptied of the oil stored at the beginning of the period.

[0271] If there is no long-distance pipeline that has not emptied the initial oil reserves, it means that the initial oil reserves in the long-distance pipelines involved in the current crude oil scheduling project have been completely ejected. At this time, the cycle can be ended and the following step (6) can be executed.

[0272] Step (5): Update the initial time to the sum of the initial time and the first target duration, and update the beginning inventory information according to the third operation parameter.

[0273] In the disclosure, updating the initial time to the sum of the initial time and the first target duration is to update the initial time to the above target time.

[0274] The third operating parameter may include the inventory and oil type of each plant tank involved in the current crude oil scheduling project at the target time. In this case, the initial inventory information of the plant tank may be updated according to the third operating parameter in the following manner:

[0275] For each plant tank, if the plant tank has any oil receipt or payment operation during the process of discharging the initial pipeline oil, the initial inventory of the plant tank will be updated to the inventory of the plant tank at the above target time, and the initial oil type of the plant tank will be updated to the storage oil type of the plant tank at the above target time.

[0276] Step (6): Determine the first operating parameter based on each third operating parameter.

[0277] Specifically, the operating parameters of the long-distance pipeline at different time periods with the oil stored in the pipe at the beginning of each cycle that have not been emptied are merged in chronological order to obtain the operating parameters of the long-distance pipeline during the discharge of the oil stored in the pipe at the beginning of the period; at the same time, the operating parameters of the plant tank at different time periods obtained in each cycle are merged in chronological order to obtain the operating parameters of the plant tank during the discharge of the oil stored in the pipe at the beginning of the period; the operating parameters of the distillation device at different time periods obtained in each cycle are merged in chronological order to obtain the operating parameters of the distillation device during the discharge of the oil stored in the pipe at the beginning of the period, thereby obtaining the above-mentioned first operating parameters.

[0278] The following describes in detail the specific implementation method for determining, from the plant tanks involved in the current crude oil scheduling project, the discharge tank of each long-distance pipeline with unemptied initial oil reserves and the feed tank of each distillation unit at the initial time in step (1). Specifically, this can be achieved through the following steps (11) and (12):

[0279] Step (11): Determine the feed tank of each distillation unit at the initial moment from the plant tanks involved in the current crude oil scheduling project.

[0280] Step (12): According to the inventory status of each feed tank at the initial moment, determine the discharge tank of each long-distance pipeline with unemptied initial oil reserves at the initial moment.

[0281] Among them, the inventory status includes full tank, empty tank and half tank (that is, the inventory is greater than 0 and less than the tank capacity).

[0282] The following describes in detail the specific implementation method of determining the feed tank of each distillation unit at the initial moment from the plant tanks involved in the current crude oil scheduling project in step (11). Specifically, it can be achieved by the following steps (111) and (112):

[0283] Step (111): For each distillation unit, if the target plant tank is not completely emptied, the target plant tank is determined as the feed tank of the distillation unit at the initial moment.

[0284] Step (112): If the target plant tank is completely emptied, the feed tank of the distillation device at the initial moment is determined from the feed tank of the distillation device.

[0285] Among them, the target plant tank is the plant tank that is supplying materials to the distillation device at the initial moment, that is, the current feed tank of the distillation device; when the inventory of the target plant tank at the initial moment is greater than 0, it is considered that the target plant tank is not completely emptied, and when the inventory of the target plant tank at the initial moment is equal to 0, it is considered that the target plant tank is completely empty.

[0286] If the target plant tank is not completely empty, the target plant tank is selected to continue supplying the distillation unit. This means the target plant tank is determined as the initial feed tank for the distillation unit. If the target plant tank is completely empty, the initial feed tank for the distillation unit is determined from the distillation unit's feed tanks. A distillation unit's feed tank refers to a plant tank that can supply oil to the distillation unit.

[0287] The specific implementation method of determining the feed tank of the distillation apparatus at the initial moment from the feed tank of the distillation apparatus in the above step (112) is described in detail below.

[0288] Specifically, when there is a feed tank whose corresponding second target time is greater than or equal to zero among the non-empty feed tanks of the distillation device, the feed tank whose corresponding second target time is the largest among the non-empty feed tanks of the distillation device is determined as the feed tank of the distillation device at the initial moment; when there is no feed tank whose corresponding second target time is greater than or equal to zero among the non-empty feed tanks of the distillation device, if there is a target feed tank among the empty feed tanks of the distillation device, any target feed tank is determined as the feed tank of the distillation device at the initial moment; when there is no feed tank whose corresponding second target time is greater than or equal to zero among the non-empty feed tanks of the distillation device, if there is no target feed tank among the empty feed tanks of the distillation device, it indicates that according to the equipment status at the initial stage of scheduling, it is impossible to find a transportation plan that meets the continuous processing of the distillation device. At this time, the crude oil transportation method process can be terminated, and the prompt message "According to the equipment status at the initial stage of scheduling, it is impossible to find a transportation plan that meets the continuous processing of the distillation device" is output.

[0289] In an embodiment of the present disclosure, the second target duration corresponding to the non-empty feed tank is equal to the difference between the actual standing time of the non-empty feed tank after receiving the oil and the shortest standing time of the non-empty feed tank after receiving the oil. Among them, the actual standing time of the non-empty feed tank after receiving the oil is the time interval between the initial moment and the end time of the most recent oil collection of the non-empty feed tank. The shortest standing time of the non-empty feed tank after receiving the oil is the shortest waiting time after the non-empty feed tank receives the oil if it wants to deliver the oil to the outside. For feed tanks that do not require standing time after receiving the oil, the shortest standing time after receiving the oil is 0. The target feed tank is an empty feed tank of the distillation device that allows simultaneous delivery and receipt of oil and can receive the current discharge of any long-distance pipeline that has not been emptied of the initial oil storage. When there is a long-distance pipeline corresponding to the supply tank in the long-distance pipeline with unemptied initial oil reserves (the supply tank can only receive oil from a specific long-distance pipeline), and the outlet oil section of the corresponding long-distance pipeline is the type of oil that the supply tank can store, it is determined that the supply tank can receive the current discharge of any long-distance pipeline with unemptied initial oil reserves.

[0290] The following describes in detail the specific implementation method for determining the discharge tank of each long-distance pipeline with unemptied initial oil reserves at the initial time based on the inventory status of each feed tank at the initial time in step (12). Specifically, this can be achieved by the following steps (121) and (122):

[0291] Step (121): For each feed tank, if the feed tank is empty, the feed tank is determined as the discharge tank of the target long-distance pipeline.

[0292] The target long-distance pipeline is any long-distance pipeline whose current discharge can be received by the feed tank and whose initial oil reserves have not been emptied. When the feed tank is empty, it indicates that the distillation unit corresponding to the feed tank at the initial time (i.e., the feed tank is the feed tank of the distillation unit corresponding to the feed tank at the initial time) is short of raw materials. This feed tank can be used to simultaneously receive and deliver oil to avoid the refinery being forced to shut down due to a supply shortage of the distillation unit corresponding to the feed tank at the initial time. In other words, the feed tank is determined to be the discharge tank of the target long-distance pipeline.

[0293] Step (122): For each long-distance pipeline that has not been emptied of its initial oil inventory, and for each other long-distance pipeline except the target long-distance pipeline, the discharge tank of the other long-distance pipeline at the initial moment is determined based on the transportation status of the other long-distance pipeline, the inventory status of the current discharge tank of the other long-distance pipeline, and the discharge oil type information of the other long-distance pipeline.

[0294] Among them, the current discharge tank of the other long-distance pipeline is the plant tank that is receiving the discharge of the other long-distance pipeline at the initial moment. The transportation status of the other long-distance pipeline is used to characterize whether the long-distance pipeline has stopped transportation at the previous moment before the initial moment, including stopping transportation and not stopping transportation.

[0295] The following describes in detail the specific implementation method of determining the discharge tank of the other long-distance pipeline at the initial moment based on the transportation status of the other long-distance pipeline, the inventory status of the current discharge tank of the other long-distance pipeline, and the discharge oil type information of the other long-distance pipeline in the above step (122).

[0296] Specifically, when the other long-distance pipeline meets the preset conditions, the current discharge tank of the other long-distance pipeline is determined as the discharge tank of the other long-distance pipeline at the initial moment; when the other long-distance pipeline does not meet the preset conditions, if there is no empty plant tank that can receive the current discharge of the other long-distance pipeline, it is considered that there is no suitable plant tank to receive the discharge of the other long-distance pipeline, and the other long-distance pipeline needs to stop transportation; when the other long-distance pipeline does not meet the preset conditions, if there is an empty plant tank that can receive the current discharge of the other long-distance pipeline, the plant tank that supplies the first target distillation unit among the empty plant tanks that can receive the current discharge of the other long-distance pipeline is determined as the discharge tank of the other long-distance pipeline at the initial moment.

[0297] In an embodiment of the present disclosure, the above-mentioned preset conditions may include: ① the other long-distance pipeline has not stopped transporting at the moment before the initial moment, ② the inventory status of the current discharge tank of the other long-distance pipeline is not full, and ③ the type of the discharge oil of the other long-distance pipeline has not been switched at the initial moment. The first target distillation unit is the distillation unit with the shortest current sustainable processing time among the distillation units that use the empty plant tank that can receive the current discharge of the other long-distance pipeline as the feed tank, that is, the distillation unit with the shortest current sustainable processing time among the crude oil destination units that can receive the empty plant tank that can receive the current discharge of the other long-distance pipeline. Among them, the current sustainable processing time of the distillation unit is equal to the sum of the current sustainable oil delivery time of each feed tank of the distillation unit at the initial moment (that is, the feed tank that delivers oil to the distillation unit).

[0298] Specifically, when the other long-distance pipeline satisfies the above conditions ①, ②, and ③ at the same time, the current discharge tank of the other long-distance pipeline is determined as the discharge tank of the other long-distance pipeline at the initial moment.

[0299] If the other long-distance pipeline fails to meet any of the above conditions ①, ②, or ③, a determination is made as to whether there is an empty plant tank capable of receiving the current discharge from the other long-distance pipeline. If no empty plant tank capable of receiving the current discharge from the other long-distance pipeline exists, it is deemed that no suitable plant tank currently exists to receive the discharge from the other long-distance pipeline, and the other long-distance pipeline needs to be shut down. That is, the discharge tank of the other long-distance pipeline at the initial moment is empty. If an empty plant tank capable of receiving the current discharge from the other long-distance pipeline exists, then the plant tank supplying the first target distillation unit among the empty plant tanks capable of receiving the current discharge from the other long-distance pipeline is determined as the discharge tank of the other long-distance pipeline at the initial moment.

[0300] In addition, in order to avoid the simultaneous delivery and receipt of oil by the plant tanks as much as possible, the discharge tank of the other long-distance pipeline can be adjusted if the discharge tank of the other long-distance pipeline at the initial moment and the feed tank of the distillation unit belong to the same plant tank. Specifically, after the above step of determining the current discharge tank of the other long-distance pipeline as the discharge tank of the other long-distance pipeline at the initial moment, the above step (122) can also include the following steps:

[0301] When the feed tank of each distillation unit at the initial moment includes the discharge tank of the other long-distance pipeline at the initial moment, the discharge tank of the other long-distance pipeline at the initial moment is adjusted at least according to the inventory status of the candidate feed tank of the second target distillation unit.

[0302] Among them, the feed tank of the second target distillation device at the initial moment and the discharge tank of the other long-distance pipeline at the initial moment are the same plant tank, and the candidate feed tanks include the feed tanks of the second target distillation device and other feed tanks except the feed tank of the second target distillation device at the initial moment.

[0303] Specifically, the discharge tank of the other long-distance pipeline at the initial moment can be adjusted in the following manner at least according to the inventory status of the candidate feed tank of the second target distillation unit:

[0304] If all candidate feed tanks for the second target distillation unit are empty, and there is an empty feed tank among the candidate feed tanks that can receive the current discharge of the other long-distance pipeline, then the discharge tank of the other long-distance pipeline at the initial moment is adjusted to any feed tank among the candidate feed tanks that can receive the current discharge of the other long-distance pipeline; if some candidate feed tanks are empty, and there is an empty feed tank among the candidate feed tanks that can receive the current discharge of the other long-distance pipeline, then the discharge tank of the other long-distance pipeline at the initial moment is adjusted to any feed tank among the candidate feed tanks that can receive the current discharge of the other long-distance pipeline. The earliest empty feed tank among the empty feed tanks currently discharging from other long-distance pipelines; if none of the candidate feed tanks are empty, or some of the candidate feed tanks are empty, and there is no empty feed tank among the candidate feed tanks that can receive the current discharge from the other long-distance pipeline, it indicates that the feed storage of the second target distillation unit is sufficient, and the other long-distance pipeline can be stopped, and the feed tank of the second target distillation unit at the initial moment is no longer used as the discharge tank of the other long-distance pipeline, that is, the discharge tank of the other long-distance pipeline at the initial moment is determined to be empty.

[0305] If all candidate feed tanks for the second target distillation unit are empty, and there is no empty feed tank among the candidate feed tanks that can receive the current discharge of the other long-distance pipeline, determine whether the feed tank of the second target distillation unit at the initial moment allows simultaneous receipt and delivery of oil; if the feed tank of the second target distillation unit at the initial moment allows simultaneous receipt and delivery of oil, the discharge tank of the other long-distance pipeline at the initial moment is not adjusted; if the feed tank of the second target distillation unit at the initial moment does not allow simultaneous receipt and delivery of oil, it indicates that according to the equipment status at the initial stage of scheduling, it is impossible to find a transportation plan that meets the continuous processing of the distillation unit. At this time, the crude oil transportation method process can be terminated, and a prompt message "According to the equipment status at the initial stage of scheduling, it is impossible to find a transportation plan that meets the continuous processing of the distillation unit" is output.

[0306] The following describes in detail the specific implementation method for determining the third operating parameter in step (2) above based on the initial inventory information of each discharge tank, the initial inventory information of each feed tank, and the distribution information of the initial oil inventory in the long-distance pipeline. Specifically, this can be achieved by following the following steps i to v:

[0307] i. Determine the operating duration (i.e., the first target duration) of the plant tank c (c∈BA). Without loss of generality, assume that the plant tank c receives oil from the long-distance pipeline p. The inventory of the plant tank c before receiving the oil is v0, the upper limit of the inventory (i.e., the tank capacity) is vu, the current planned crude oil volume delivered by the long-distance pipeline p is vp, and the delivery rate is fp. Then, the duration of the oil receiving of the plant tank c is t c =min(vu-v0,vp) / fp, where set A includes the feed tank of each distillation unit at the initial time, and set B includes the discharge tank of each long-distance pipeline at the initial time;

[0308] ⅱ. Determine the operating time of plant tank c (c∈A∩B). Without loss of generality, assume that plant tank c will deliver oil to distillation unit d. The planned processing rate of distillation unit d is fd. Then the oil collection duration of plant tank c is Among them, fp is greater than fd, and the oil delivery duration of tank c in the plant area is equal to the oil collection duration;

[0309] iii. Determine the operating duration of plant tank c (c∈AB). Without loss of generality, assume that plant tank c delivers oil to distillation unit d, the inventory of plant tank c before delivery is v0, and the planned processing rate of distillation unit d is fd. Then the duration of plant tank c's delivery is t c =v0 / fd;

[0310] iv. Take the minimum continuous operation time of all tanks in the plant area;

[0311] v. Determine the operation plan (i.e., the third operating parameter) for the long-distance pipeline and its downstream equipment within the operation time t after the initial time:

[0312] (v1) When the plant tank c∈BA, the plant tank c receives crude oil m1 from the long-distance pipeline p. The receiving time is t, the receiving volume is t×fp, and the inventory after receiving the oil is v0+t×fp, where crude oil m1 is the type of oil currently transported by the long-distance pipeline p.

[0313] (v2) When plant tank c∈B∩A, the operation time of plant tank c is t. It will receive crude oil m1 from long-distance pipeline p with a receiving volume of t×fp, and deliver crude oil m1 to distillation unit d with a delivery volume of t×fd. Its inventory after completing the task (i.e., the inventory at the target time) is v0+t×(fp-fd);

[0314] (v3) When plant tank c∈AB, plant tank c delivers crude oil m2 to distillation unit d. The delivery duration is t, the delivery volume is t×fd, and the inventory after the task is completed is v0-t×fd, where crude oil m2 is the inventory type of plant tank c before the task is performed (i.e., at the initial time);

[0315] (v4) Long-distance pipeline p delivers crude oil m1 to plant tank c, with a delivery volume of t×fp and a delivery time of t, and updates the distribution information of the initial oil storage of long-distance pipeline p. For example, before executing the delivery task, long-distance pipeline p has two sections of crude oil: the first section is m1 with a storage volume of v1, and the second section is m3 with a storage volume of v3. If v1>t×fp, when the delivery task is completed, the first section of long-distance pipeline p still has m1 in oil, with a storage volume of v1-t×fp, and the second section remains unchanged; if v1=t×fp, when the delivery task is completed, the first section of long-distance pipeline p has m3 in oil, with a storage volume of v3, and no second section of crude oil.

[0316] (v5) Distillation unit d receives crude oil m2 from plant tank c, with a processing volume of t×fd and a processing time of t.

[0317] Specifically, the first operating parameters can be determined based on the initial oil inventory distribution of the long-distance pipeline (Table 10), the plant tank equipment information and initial inventory information (Table 7), and the distillation unit operating restrictions (including the distillation unit feed requirements shown in Table 3) (Table 3).

[0318] The first operating parameters may include the original plan for completely draining the initial oil inventory in the long-distance pipeline, i.e., the operating parameters for the plant tank during the process of draining the initial oil inventory in the long-distance pipeline, as shown in Table 11 above. The following details the specific implementation method for updating the initial inventory information of the plant tank based on the first operating parameters.

[0319] Specifically, the first operating parameter may include the inventory quantity and oil type of each plant tank involved in the current crude oil scheduling project at the beginning of the emptying period. In this case, the inventory information of the plant tanks in the downstream equipment can be updated according to the first operating parameter in the following manner:

[0320] For each plant tank, the difference between the end time of the most recent oil collection of the plant tank and the time spent on emptying the oil stored in the pipeline at the beginning of the period is determined as the new and most recent end time of oil collection of the plant tank; if the plant tank has an oil collection and payment operation during the process of discharging the oil stored in the pipeline at the beginning of the period, the beginning inventory of the plant tank will be updated to the inventory of the plant tank when the oil stored in the pipeline at the beginning of the period is emptied, and the beginning oil type of the plant tank will be updated to the storage oil type of the plant tank when the oil stored in the pipeline at the beginning of the period is emptied.

[0321] For example, the beginning inventory quantity and beginning oil type information of each plant tank shown in Table 7 can be updated to the ending inventory quantity and ending oil type information of the corresponding plant tank shown in Table 11.

[0322] The inventory level and initial operating status of the plant tank at the initial stage of scheduling are adjusted to the inventory level and operating status when the oil in the long-distance pipeline is completely pushed out at the beginning of the scheduling period, thereby simplifying the long-distance pipeline transportation problem into an instant transportation problem and removing the delay effect of the long-distance pipeline. By converting the "delayed transportation" feature of the long-distance pipeline into "quasi-instantaneous transportation", the crude oil entering the pipeline and the crude oil leaving the pipeline are the same in the same time slice. The present disclosure simplifies the data processing process of the long-distance pipeline (for example, reduces the corresponding number of variables and constraints) and greatly improves the model application performance. Therefore, a high-quality crude oil scheduling plan can be quickly and automatically compiled to achieve the goals of stable feeding of the distillation unit and rapid unloading of oil by tankers. Compared with not considering the delayed transportation of the long-distance pipeline (i.e., instant transportation), the "quasi-instantaneous transportation" method of the long-distance pipeline disclosed in the present disclosure achieves performance and results comparable to instant transportation without significantly increasing the model scale and computing resources, and can ensure stable processing of the distillation unit and rapid unloading of oil by tankers.

[0323] Then, based on the operational constraints for oil delivery and receipt of the long-distance pipeline and its upstream and downstream equipment, a mixed integer programming model is constructed, as described above and will not be discussed in detail here. Note that similarly, the long-distance pipeline considered in the mixed integer programming model has the characteristic that crude oil can immediately leave the pipeline after entering it. Therefore, the mixed integer programming model only needs to consider the pipeline's delivery rate constraints and material balance constraints. Specifically, when constructing the mixed integer programming model, the operational constraints for oil delivery and receipt of the long-distance pipeline can similarly include: crude oil must immediately leave the pipeline after entering it; the pipeline's delivery rate constraints; and the pipeline's material balance constraints.

[0324] In the technical solution of Example 3, in the first stage, based on the distribution information of the initial oil inventory in the long-distance pipeline, the initial inventory information of the plant tanks, and the operational constraints of the distillation unit, a simulation method is used to determine the operation plan for the long-distance pipeline and its downstream equipment (including the plant tanks and distillation unit) during the process of draining the initial oil inventory in the long-distance pipeline, as well as the time of this emptying process. Then, based on these operation plans, the initial inventory level and initial operating state of the plant tanks are adjusted, simplifying the long-distance pipeline transportation problem into an instantaneous transportation problem and eliminating the long-distance pipeline delay effect. In Example 3, similar to Example 2, in the second stage, a mixed integer programming model is established and solved, covering the entire process from tanker unloading to distillation unit processing. Finally, based on the operation plan determined in the first stage and the solution results of the model, a crude oil transportation plan is generated, as described above with respect to Example 2.

[0325] Finally, according to an embodiment of the present disclosure, a detailed description of a specific implementation method for solving the corresponding mixed integer programming overall model of Example 1, Example 2, and Example 3 in S203 to obtain the target operating parameters can be provided. According to a specific example, based on the above basic information (and optionally, the tanker arrival plan, the distillation unit production plan, the crude oil blending rules, the crude oil evaluation, the tank farm resource monitoring, etc.) and the mixed integer programming overall model with corresponding constraints, various solution methods (including but not limited to rolling horizon decomposition, Lagrangean decomposition, Benders decomposition, and other decomposition strategies or solvers such as Gurobi, COPT, LINDO, Xpress, etc.) can be used to obtain the target operating parameters (e.g., the tanker unloading plan, the tank receiving / paying plan, the tank inventory change trend, the pipeline transportation plan, the crude oil distribution plan in the pipeline, the distillation unit feed plan, the crude oil blending plan, etc.).

[0326] In addition to the operational restrictions given above, the following operational restrictions can also be considered: terminal tanks can only store component crude oils; transfer tanks can store both component crude oils and mixed crude oils; plant tanks can only store mixed crude oils; crude oil blending operations should be carried out as much as possible at the entrance of the long-distance pipeline or in the transfer tank.

[0327] Further modification or adjustment examples of embodiment 2 and embodiment 3

[0328] Furthermore, it should be noted that the second operating parameters (scheduling plans) for the long-distance pipeline, upstream equipment, and downstream equipment during crude oil production scheduling obtained in Examples 2 and 3 can be further modified or adjusted. According to one example, the long-distance pipeline's oil collection plan and incoming oil destination plan included in the second operating parameters can be used, combined with the initial pipeline oil inventory distribution information, to adjust the long-distance pipeline's oil delivery plan. The oil collection plan includes at least one of the following: the start and end times of oil collection, the volume of oil collected, the delivery rate, and the type of oil delivered; the incoming oil destination plan includes at least one of the following: the destination tank, the volume of oil collected in the tank, and the type of oil collected; and the delivery plan includes at least one of the following: the start and end times of crude oil leaving the long-distance pipeline, the delivery volume, the delivery rate, the delivery destination, and the type of oil delivered. The following further details the modification or adjustment plans for the long-distance pipeline.

[0329] According to one embodiment, first, pipeline segment information of the initial oil storage in the long-distance pipeline, the oil collection operation parameters of the long-distance pipeline, and the destination of the incoming oil are obtained. According to one example, before the current crude oil scheduling project begins, it is assumed that each long-distance pipeline has full oil storage, and the initial pipeline oil storage is the oil storage in the long-distance pipeline at the start of scheduling. The same type of crude oil that is continuously distributed and has the same destination in the initial pipeline oil storage is divided into a pipeline segment (i.e., a crude oil segment). In this way, the initial pipeline oil storage is divided into one or more pipeline segments. The pipeline segment information includes the initial volume, initial oil type, and oil storage destination (i.e., downstream equipment) of each pipeline segment included in the initial pipeline oil storage. As shown in Figure 1, the downstream equipment of the long-distance pipeline may include plant tanks and distillation units.

[0330] As shown in Table 12 below, the initial pipeline oil storage includes three pipeline segments, among which CT09, CT08 and CT02 are all plant tanks.

[0331] Table 12 Pipeline segment information of oil storage at the beginning of the period

[0332] When formulating a long-distance pipeline oil collection plan, oil refineries have basically already determined the destination of this batch of incoming oil (that is, the destination of the incoming oil is known). Among them, the long-distance pipeline oil collection plan (known quantity) refers to the operation plan for crude oil entering the long-distance pipeline, which may specifically include the operation time (including the first start time and the first end time), crude oil delivery volume, the first delivery rate, the type of oil delivered, etc.

[0333] For ease of understanding, the process of collecting oil from a long-distance pipeline at the same rate and continuously receiving the same type of oil, destined for the same single downstream device, is denoted as one oil collection operation. Based on the definition of an oil collection operation, the long-distance pipeline oil collection plan can be divided into multiple oil collection operations. The first start time, first end time, collected oil volume (i.e., delivery volume), first delivery rate, and delivered oil type of each oil collection operation can be obtained, thereby obtaining the long-distance pipeline oil collection operation parameters. Specifically, the oil collection operation parameters include the first start time, first end time, collected oil volume, first delivery rate, and delivered oil type of each oil collection operation.

[0334] As shown in Table 13 below, the long-distance pipeline includes 16 oil collection operations, among which CT01 to CT09 are all plant tanks, and the first start time and the first end time are both relative times starting from the scheduling start time.

[0335] Table 13 Oil receiving operation parameters and destination of incoming oil in long-distance pipelines

[0336] Then, the oil delivery operation parameters of the long-distance pipeline are determined based on the pipeline section information, oil receiving operation parameters and the destination of the incoming oil.

[0337] In an embodiment of the present disclosure, the oil delivery operation parameters may include the second start time, the second end time, the oil delivery volume, the second delivery rate, the oil delivery destination, and the oil type of the delivered oil for each outgoing oil leaving the long-distance pipeline, wherein the outgoing oil is the pipeline section of the initial storage oil or the incoming oil leaving the long-distance pipeline.

[0338] For example, based on the pipeline segment information for the initial oil inventory shown in Table 12 above, and the long-distance pipeline oil collection operating parameters and the destination of the incoming oil shown in Table 13 above, the long-distance pipeline oil delivery operating parameters shown in Table 14 below can be obtained. The second start time and the second end time are both relative times relative to the scheduling start time.

[0339] Table 14 Oil delivery operation parameters of long-distance pipelines

[0340] In this technical solution, pipeline segment information, including initial oil inventory, the pipeline's oil collection parameters, and the destination of incoming oil are first obtained. Then, based on this information, the pipeline's oil collection parameters, and the destination of incoming oil, the pipeline's oil delivery parameters are determined. This allows for the automatic generation of a long-distance pipeline oil delivery plan, given a pipeline's oil collection plan and the allocation of the initial crude oil inventory and incoming oil destinations. This allows for the rapid and automated creation of a long-distance pipeline crude oil delivery plan without manual intervention. This not only lowers the scheduling threshold, but also reduces workload and improves enterprise productivity, significantly contributing to stable and economical production.

[0341] The following describes in detail the specific implementation method for determining the oil delivery operation parameters of a long-distance pipeline based on pipeline segment information, oil receiving operation parameters, and the destination of incoming oil. Specifically, this can be achieved through steps S301 to S313:

[0342] In S301, let i=1, o=1, no o =1.

[0343] In the embodiment of the present disclosure, i represents the i-th oil collection operation of the long-distance pipeline, o represents the o-th section of the long-distance pipeline oil, and no o Indicates the oil outlet of section o o Among them, because the long-distance pipeline may stop transmission, change speed, etc., each section of the outgoing oil may leave the long-distance pipeline multiple times, with multiple departure start time and end time, that is, multiple second start time and second end time. For this reason, the variable no is set o To indicate the different start and end times of the oil outlet in section o.

[0344] In addition, each oil receiving operation of the long-distance pipeline is numbered starting from 1 according to the order in which the operations are performed; the outgoing oil is arranged according to the order in which it enters the long-distance pipeline, that is, the outgoing oil is numbered starting from 1 according to the order in which the outgoing oil enters the long-distance pipeline.

[0345] In S302, the first start time of the i-th oil collection operation is determined as the no. o The second starting time of the first oil delivery is determined as the first delivery rate of the oil in the oth section. o The second delivery rate of the secondary delivery.

[0346] Right now,

[0347] Among them, tsin i is the first starting time of the i-th oil recovery operation, The oil outlet of section o is o The second start time of the second delivery, fin i is the first delivery rate of the i-th oil recovery operation, The oil outlet of section o is o The second delivery rate of the secondary delivery.

[0348] In S303 , it is determined whether the remaining outgoing oil volume of the o-th segment outgoing oil is greater than the remaining incoming oil volume of the i-th segment incoming oil corresponding to the i-th oil collection operation.

[0349] In the embodiment of the present disclosure, the remaining outlet oil volume vsout of the oth section outlet oil o The initial value is vout o , that is, vsout o =vout o , vout o is the oil volume or initial volume of the oth section of the oil outlet. When the oth section of the oil outlet is a pipeline segment, vsout o The initial value of vsout is the initial volume of the outgoing oil of section o. When the outgoing oil of section o is the incoming oil leaving the long-distance pipeline, o The initial value is the oil collection volume of the oth section outlet oil.

[0350] The i-th oil collection operation corresponds to the i-th section of the long-distance pipeline incoming oil, where the remaining incoming oil volume of the i-th section of the incoming oil is vsin i is the volume of the oil entering the long-distance pipeline in the i-th section, vsin i The initial value of is the oil recovery volume vin of the i-th oil recovery operation i , that is, vsin i =vin i .

[0351] Due to the "first-in, first-out" (i.e., "plug flow") movement characteristics of long-distance pipelines, the long-distance pipeline will first transport the first pipeline segment to the downstream equipment, then the second pipeline segment, and so on, until the crude oil in the pipeline segment is completely output, that is, after the initial pipeline oil is completely pushed out, the long-distance pipeline begins to transport the first section of incoming oil to the downstream equipment, then the second section of incoming oil, and so on. Among them, the pipeline segments are numbered starting from 1 according to the order in which they enter the long-distance pipeline.

[0352] If the remaining outlet oil volume of the o-th segment outlet oil is not greater than the remaining incoming oil volume of the i-th segment incoming oil corresponding to the i-th oil collection operation, it indicates that the remaining incoming oil of the i-th segment incoming oil can completely push out the remaining outlet oil of the o-th segment outlet oil. In this case, the following S304 to S306 can be executed. If the remaining outlet oil volume of the o-th segment outlet oil is greater than the remaining incoming oil volume of the i-th segment incoming oil corresponding to the i-th oil collection operation, it indicates that the remaining incoming oil of the i-th segment incoming oil cannot completely push out the remaining outlet oil of the o-th segment outlet oil. In other words, the remaining incoming oil of the i-th segment incoming oil and the incoming oil of the subsequent segments are required to completely push out the remaining outlet oil of the o-th segment outlet oil. In this case, the following S310 to S312 can be executed.

[0353] In S304, the volume of the oil discharged from the oth section is determined as the volume of the oil discharged from the oth section. o The volume of the oil delivered at the first time is o The second start time of the first delivery, the no. o The second delivery rate of the oth section of the oil outlet and the no. o The volume of the oil delivered at the first time determines the oil outlet of the first section o The second end time of the second delivery.

[0354] In the embodiment of the present disclosure, when the remaining outlet oil volume of the o-th segment outlet oil is not greater than the remaining inlet oil volume of the i-th segment inlet oil corresponding to the i-th oil collection operation, it indicates that the remaining inlet oil of the i-th segment inlet oil can completely push out the remaining outlet oil of the o-th segment outlet oil. Therefore, the no. o The volume of the delivery is equal to the volume of the oil outlet of section o, that is,

[0355] For example, the oil outlet of section o is o The second end time of the second delivery

[0356] In S305, the remaining outgoing oil volume of the oth segment outgoing oil and the remaining incoming oil volume of the ith segment incoming oil are updated, and o is incremented by 1, no o =1.

[0357] Since the remaining oil in the i-th section of the inlet oil can completely push out the remaining oil in the o-th section of the outlet oil, the remaining oil volume of the o-th section of the outlet oil vsout o = 0, that is, the remaining amount of the o-th section of the outlet oil after the update is 0. At this time, it indicates that the complete oil distribution plan for the o-th section of the outlet oil has been determined. After that, the oil distribution plan for the o+1-th section of the outlet oil begins to be determined, that is, let o be increased by 1, no o =1.

[0358] In addition, the remaining amount of oil in the i-th section That is, the remaining amount of inlet oil in the i-th section after updating is

[0359] In S306 , it is determined whether the remaining amount of incoming oil of the i-th section of incoming oil obtained after the update is equal to zero.

[0360] In an embodiment of the present disclosure, if the remaining incoming oil volume of the i-th section of incoming oil obtained after the update is equal to zero, it indicates that the remaining incoming oil of the i-th section of incoming oil is just enough to push out the remaining outgoing oil of the o-th section of outgoing oil. In this case, it can be determined whether the i-th section of incoming oil is the last section of incoming oil in the long-distance pipeline, that is, the following S307 is executed. If the remaining incoming oil volume of the i-th section of incoming oil obtained after the update is not equal to zero, that is, the remaining incoming oil volume of the i-th section of incoming oil obtained after the update is greater than zero, it indicates that the remaining incoming oil of the i-th section of incoming oil is not only enough to completely push out the remaining outgoing oil of the o-th section of outgoing oil, but can also be used to push out part or all of the outgoing oil of the o-th section of outgoing oil (in S305, o has been added by 1). In this case, the following S309 can be executed, and then the process returns to the above S303.

[0361] In S307, it is determined whether i is equal to the total number of oil collection times.

[0362] If i is not equal to the total number of oil collections, that is, i is less than the total number of oil collections, it indicates that the i-th section of incoming oil is not the last section of incoming oil in the long-distance pipeline. At this time, the i+1-th section of incoming oil is needed to push out the o-th section of outgoing oil (o has already been incremented by 1 in S305). Therefore, i is incremented by 1, and the following S308 is executed. Thereafter, the process returns to the above S302 and continues until i equals the total number of oil collections. If i is equal to the total number of oil collections, it indicates that the i-th section of incoming oil is the last section of incoming oil in the long-distance pipeline. At this time, it indicates that all incoming oil in the long-distance pipeline has entered the long-distance pipeline, and the long-distance pipeline oil delivery is complete, that is, a complete long-distance pipeline oil delivery plan is obtained. At this time, the method process can end.

[0363] In S308 , i is incremented by 1.

[0364] In S309, the oil outlet of section o-1 iso-1 The second end time of the delivery is determined as the no. o The second starting time of the ith oil delivery operation is determined as the first delivery rate of the ith oil receiving operation as the no. o The second delivery rate of the secondary delivery.

[0365] In the embodiment of the present disclosure, if the remaining amount of incoming line oil of the i-th section of incoming line oil obtained after the update is not equal to zero, it means that the remaining incoming line oil of the i-th section of incoming line oil can not only completely push out the remaining outgoing line oil of the o-1-th section of outgoing line oil, but can also be used to push out part or all of the outgoing line oil of the o-th section of outgoing line oil. In this case, the no. o-1 The second end time of the delivery is determined as the no. o The second starting time of the ith oil delivery operation is determined as the first delivery rate of the ith oil delivery operation. o Afterwards, the second delivery rate of the oth segment outgoing oil is determined according to the remaining outgoing oil volume of the oth segment outgoing oil and the remaining incoming oil volume of the ith segment ingoing oil obtained after the update. o The volume of the first delivery and the volume of the oil outlet of section o o The second end time of the second delivery, that is, returns to the above S303.

[0366] In S310, the remaining amount of the incoming oil of the i-th section is determined as the no. o The volume of the oil delivered is determined as the first end time of the i-th oil collection operation as the no. o The second end time of the second delivery.

[0367] If the remaining outgoing oil volume of the o-th section outgoing oil is greater than the remaining incoming oil volume of the i-th section incoming oil corresponding to the i-th oil collection operation, it means that the remaining incoming oil of the i-th section incoming oil cannot completely replace the remaining outgoing oil of the o-th section outgoing oil, that is, it is necessary to use the remaining incoming oil of the i-th section incoming oil and the incoming oil of the subsequent sections to completely push out the remaining outgoing oil of the o-th section outgoing oil. At this time, the remaining incoming oil volume of the i-th section incoming oil is determined as the no. o The volume delivered per time, i.e. The first end time of the i-th oil collection operation is determined as the no. o The second end time of the delivery, i.e. Among them, tein i is the first end time of the i-th oil recovery operation.

[0368] In S311, the remaining outgoing oil volume of the o-th stage outgoing oil and the remaining incoming oil volume of the i-th stage incoming oil are updated.

[0369] Since the remaining incoming oil of the i-th section cannot completely push out the remaining outgoing oil of the o-th section, it is necessary to use the remaining incoming oil of the i-th section and the incoming oil of the subsequent sections to completely push out the remaining outgoing oil of the o-th section. Therefore, the remaining incoming oil amount of the i-th section is vsin i =0, at this time, it can be determined whether the i-th section of incoming oil is the last section of incoming oil in the long-distance pipeline, that is, the following S312 is executed.

[0370] Remaining oil volume of the oth section oil outlet That is, the remaining outlet oil volume of the oth section outlet oil after the update is

[0371] In S312, it is determined whether i is equal to the total number of oil collection times.

[0372] If i is not equal to the total number of oil collections, that is, i is less than the total number of oil collections, it means that the incoming oil of the i-th section is not the last incoming oil of the long-distance pipeline. At this time, it is necessary to use the incoming oil of the i+1-th section to push out the remaining outgoing oil of the o-th section, that is, the outgoing oil of the o-th section needs to leave the long-distance pipeline in multiple times. Therefore, i is increased by 1, no o Also add 1, that is, execute the following S313, then return to the above S302 and continue executing until i equals the total number of oil collection operations. Among them, after returning to S302 and executing S303, it is determined whether the remaining outgoing oil volume of the o-th section of outgoing oil obtained after the update is greater than the remaining incoming oil volume of the i-th section of incoming oil corresponding to the i-th oil collection operation; if i is equal to the total number of oil collection operations, it indicates that the i-th section of incoming oil is the last section of incoming oil of the long-distance pipeline. At this time, it indicates that all the incoming oil of the long-distance pipeline has entered the long-distance pipeline, and the long-distance pipeline oil delivery is completed, that is, the long-distance pipeline oil delivery plan is obtained, and the method flow can be terminated at this time.

[0373] In S313, let i and no o Add 1 to each.

[0374] In addition, the oil delivery destination of each delivery of the o-th section of the outgoing oil is the oil storage destination or the incoming oil destination of the o-th section of the outgoing oil. Specifically, when the o-th section of the outgoing oil is a pipeline section, the oil delivery destination of each delivery of the o-th section of the outgoing oil is the oil storage destination of the o-th section of the outgoing oil. When the o-th section of the outgoing oil is the incoming oil leaving the long-distance pipeline, the oil delivery destination of each delivery of the o-th section of the outgoing oil is the incoming oil destination of the o-th section of the outgoing oil.

[0375] The delivered oil type for each delivery of the o-th section of the outgoing oil is the initial oil type or the delivery oil type of the o-th section of the outgoing oil. Specifically, when the o-th section of the outgoing oil is a pipeline section, the delivered oil type for each delivery of the o-th section of the outgoing oil is the initial oil type of the o-th section of the outgoing oil; when the o-th section of the outgoing oil is the incoming oil leaving a long-distance pipeline, the delivered oil type for each delivery of the o-th section of the outgoing oil is the delivery oil type of the o-th section of the outgoing oil.

[0376] In addition, the oil delivery plans for each outlet oil obtained through the above steps S301 to S313 are relatively scattered. In order to make the oil delivery plans clearer and more reasonable, the obtained oil delivery plans can be sorted and ranked. Specifically, the above S302 can also include the following two steps:

[0377] If i is equal to the total number of oil collections, then the oil delivery operations of the long-distance pipeline are uniformly numbered according to the order in which the outgoing oil leaves the long-distance pipeline and the order in which each outgoing oil is delivered;

[0378] Two refueling operations with the same second delivery rate, refueling destination, and refueling type and adjacent refueling operation times are merged.

[0379] In the embodiments of the present disclosure, "contiguous operation times" means that the end time of the dth oil delivery operation is the same as the start time of the d+1th oil delivery operation. Uniformly numbering the oil delivery operations of a long-distance pipeline means that, for each section of outgoing oil, the double-layer structure information of L delivery operations for that section of outgoing oil is converted into a single-layer structure information of L oil delivery operations.

[0380] For example, a long-distance pipeline includes three sections of outgoing oil. The first section of outgoing oil is a pipeline section, which is M02 oil and is transported in one batch. The second start time of the first delivery of the first section of outgoing oil is 0.00h, the second end time is 11.16h, and the second delivery rate is 2100m 3 / h, the oil delivery destination is plant tank CT08, and the oil delivery volume is 23443m 3 The second section of the outgoing oil is the incoming oil, which is M02 oil and is transported in one batch. The second start time of the first delivery of the second section of the outgoing oil is 11.16h, the second end time is 19.47h, and the second delivery rate is 2100m 3 / h, the oil delivery destination is plant tank CT08, and the oil delivery volume is 17441m 3 The oil for the third section outgoing line is the incoming line oil, which is M08 oil and is delivered in two times. The second start time of the first delivery of the oil for the third section outgoing line is 25.71h, the second end time is 46.82h, and the second delivery rate is 2100m 3 / h, the oil delivery destination is the plant tank CT01, and the oil delivery volume is 44320m 3The second start time of the second delivery of the third section of oil is 46.82h, the second end time is 48.58h, and the second delivery rate is 2100m 3 / h, the oil delivery destination is plant tank CT06, and the oil delivery volume is 3690m 3 Based on the order in which the three sections of oil leave the long-distance pipeline and the order in which each section of oil is delivered, the oil delivery operations of the long-distance pipeline are integrated (i.e., numbered uniformly), resulting in the oil delivery sequence shown in Table 15 below.

[0381] The first oil delivery of the first section and the first oil delivery of the second section have the same second delivery rate, delivery destination, and oil type, and their delivery operations are adjacent in time. Therefore, the first oil delivery of the first section and the first oil delivery of the second section can be combined to obtain the oil delivery operation parameters shown in Table 16 below.

[0382] Table 15: Oil delivery operation parameters of long-distance pipelines obtained after unified numbering

[0383] Table 16: Combined long-distance pipeline oil delivery operation parameters

[0384] Furthermore, after determining the long-distance pipeline's oil delivery operating parameters, the oil storage distribution within the long-distance pipeline at the end of the current crude oil scheduling project, i.e., the end-of-period pipeline oil storage, can be determined based on these parameters to be used in planning the next crude oil scheduling project. Specifically, the above method may further include the following steps:

[0385] The crude oil section in the incoming oil, excluding the outgoing oil, is determined as the end-of-period pipeline oil inventory of the long-distance pipeline.

[0386] For example, based on the pipeline segment information of the beginning-of-period oil inventory shown in Table 12 above, and the oil collection operating parameters and the destination of the incoming oil of the long-distance pipeline shown in Table 13 above, the oil delivery operating parameters of the long-distance pipeline shown in Table 14 above and the distribution information of the long-distance pipeline oil inventory at the end of the period shown in Table 17 below can be obtained.

[0387] Table 17 Distribution of oil reserves in long-distance pipelines at the end of the period

[0388] Result Analysis

[0389] Finally, based on the mixed integer programming model of Example 1 and the mixed integer programming overall model of Example 2 or Example 3 (and preferably including modification or adjustment schemes) and the above-mentioned basic data, a complete crude oil scheduling and production plan can be obtained through various solution strategies or methods. Figures 3 to 9 respectively show the tanker unloading plan, terminal tank operation plan, transfer tank operation plan, plant tank operation plan, distillation unit feeding plan, non-long-distance pipeline transportation plan and long-distance pipeline transportation plan. These figures are the crude oil scheduling and production plans for the company from 6:00 on July 1, 2022 to 6:00 on July 11, 2022, a total of 240 hours (i.e., the scheduling time span). Among them, in Figures 3 to 9, the numbers in the rectangular box represent the crude oil operation volume, the letter in the rectangular box represents the type of oil being operated, and the letter information after the type of oil being operated indicates the destination of the crude oil.

[0390] As can be seen from Figure 9, it takes some time for crude oil to completely leave the pipeline after entering the long-distance pipeline, and it leaves the pipeline in the order in which it enters the pipeline. Therefore, this method can completely solve the problem of delayed transportation in long-distance pipelines.

[0391] As can be seen from Figure 3 , all tankers started unloading oil after arriving at the port, which complies with the above-mentioned operating restriction (B2).

[0392] Looking at Figures 4 to 6 , any tank performs oil receiving and delivery operations alternately, which complies with the operation restriction that "tanks cannot perform oil receiving and delivery operations simultaneously" (i.e., the above-mentioned operation restriction C1).

[0393] As can be seen from Figure 4, there were five cases in which the terminal tank received oil and then delivered oil. The duration of the oil standing still after receiving oil ranged from 14.95 to 64.05 hours, which met the operating restriction that "the terminal tank must stand still for at least the reference time after receiving oil before delivering oil" (i.e., the above-mentioned operating restriction C3).

[0394] Observing Figures 4 and 9, combined with the data in Table 2 above, the long-distance pipeline PL received crude oil sand light (H) and crude oil Castile (A) from terminal tanks ST4 and ST7, respectively, from 2.28 to 20.72 hours to form mixed crude oil M8, which meets the operating restriction of "crude oil blending operation at the pipeline inlet".

[0395] Analysis of Figure 7 shows that CDU1 and CDU2 are processed continuously and uninterruptedly throughout the storage and transportation process, which meets the above-mentioned operating limit (D3).

[0396] Analysis of the scenario in Figure 7 reveals that CDU1 continuously processes M2 without any feed switching, while CDU2 only undergoes two feed switching operations. These two feed switching operations are due to limited crude oil resources and a long desalting and dehydration period (i.e., standing time). The analysis proceeds as follows: If CDU2 processes crude oil M8 first, after deducting the bottom oil, the existing inventory in the plant tanks is only 42,869 tons, which can only support CDU2's processing for 48.99 hours. This is because the initial oil inventory in the top-out pipeline PL (M2: 40,884 m3, M12: 5,116 m3) requires at least 21.90 hours. Even if crude oil can be instantly delivered from the terminal tanks and transfer tanks to the plant tanks, due to desalting and dehydration, CDU2 cannot continue processing M8 until 69.90 hours at the earliest, meaning that CDU2 can begin processing M12 after 48.99 hours. The existing crude oil resources (including oil from tankers, storage tanks, and pipelines) can produce a maximum of 67,205 tons of M12, which can be processed by CDU2 for another 76.81 hours. This means that CDU2 will begin processing a different crude oil after 125.80 hours. In this scenario, CDU2 will undergo two feed switches. Similarly, if crude M12 were processed first, CDU2 would also undergo at least two feed switches. The model's pipeline transport operation is rational, effectively coordinating the processing needs of the two distillation units and ensuring stable production.

[0397] Analyzing the solution in Figure 3, we find that all four tankers can unload their crude oil at the maximum rate immediately after arriving at the port, without causing any delays due to insufficient available storage tanks. In this case, the arrival times of the tankers are relatively dense, with two tankers (V1 and V2) arriving within the first 49 hours. The total oil capacity of these two tankers is 250,661 m3. 3 , requiring six empty tanks to hold all the purchased crude oil. The model fully utilized transfer tanks and plant tanks, rapidly emptying terminal tanks and ultimately enabling rapid tanker unloading.

[0398] Based on the above analysis, the model is rationally constructed and can calculate a crude oil scheduling plan that meets operational constraints within 3 minutes, forming the core technology for crude oil scheduling. In other words, by converting the "delayed delivery" feature of long-distance pipelines into "quasi-instantaneous delivery," so that the crude oil entering the pipeline and leaving the pipeline are the same within the same time slice, the present disclosure simplifies the data processing process of long-distance pipelines (for example, reducing the corresponding number of variables and constraints), significantly improving the application performance of the model, and thus can quickly and automatically compile high-quality crude oil scheduling plans to achieve goals such as stable feeding of distillation units and rapid oil unloading from tankers. For example, by constraining the focus on the time changes of crude oil entering and leaving the pipeline, rather than characterizing the relationship between the crude oil distribution within the pipeline and the crude oil output variety as the crude oil enters, the "quasi-instantaneous delivery" method for long-distance pipelines disclosed in the present disclosure achieves performance and results comparable to immediate delivery without significantly increasing the model scale and computing resources, ensuring stable processing of distillation units and rapid oil unloading from tankers.

[0399] FIG10 is a block diagram of a crude oil scheduling device according to an exemplary embodiment. As shown in FIG10 , the device 300 includes:

[0400] An acquisition module 301 is used to acquire basic data of a crude oil dispatching system including a long-distance pipeline;

[0401] A construction module 302 is configured to construct a mixed integer programming model with corresponding constraints by converting the long-distance pipeline from delayed delivery characteristics to quasi-immediate delivery characteristics; and

[0402] The generating module 303 is configured to generate operating parameters of the crude oil scheduling system during the crude oil scheduling period based on the basic data and the mixed integer programming model and according to the optimization target.

[0403] According to an embodiment of the present disclosure, the acquisition module 301 , the construction module 302 , and the generation module 303 may include submodules corresponding to any step or substep in the above method, which will not be elaborated here.

[0404] According to an example, for example, the building module 302 may include:

[0405] The first construction submodule is configured to construct a constraint regarding the start time of the crude oil leaving the long-distance pipeline based on the distribution information of the initial pipeline oil inventory, the volume, and the upper limit of the delivery rate. According to a specific example, based on the constraint on the start time of the crude oil leaving the long-distance pipeline, the following constraint is constructed:

[0406] The long-distance pipeline includes one or more long-distance pipelines represented by a natural number p; PL represents the set of long-distance pipelines involved in the current crude oil scheduling project; the initial pipeline oil inventory of the long-distance pipeline is divided into different pipeline segments according to the oil type, and the pipeline segments are numbered 1, 2, ..., NPS according to the distance from the outlet of the long-distance pipeline. p , natural number NPS p represents the initial number of pipeline sections of the p-th long-distance pipeline; LP is a parameter representing the scheduling time span of the current crude oil scheduling project; the scheduling time span is sliced ​​into one or more time slices represented by natural numbers s′ or s″, and SL is a set of time slices; an integer s, when s ≥ 1, s∈SL, represents the time slice corresponding to the current scheduling time span; when s∈[1-NPS p ,2-NPS p ,...,0], it represents the time slice corresponding to the historical scheduling time span; when s=1-NPS p When, it represents the NPS of the p-th long-distance pipeline p The time slice number when the oil in the pipeline enters the pipeline at the beginning of the period, when s=2-NPS p When, it represents the NPS of the p-th long-distance pipeline p -1 is the time slice number when the oil in the pipeline enters the pipeline at the beginning of the first period, and so on; l is a natural number, indicating the oil in the pipeline at the beginning of the first period; VLPL p,l is a parameter representing the volume of crude oil in the first section of the long-distance pipeline p; VUPL p is a parameter representing the volume of the long-distance pipeline p; max_FPL s′,p is a parameter representing the upper limit of the transport rate of the long-distance pipeline p in the s′th time slice; tsopl s,p is a continuous variable, indicating the start time of the crude oil entering the long-distance pipeline p in the sth time slice leaving the long-distance pipeline p; tsipl s′,p is a continuous variable, indicating the start time of crude oil entering the long-distance pipeline p at the s′th time slice; vipl s″,p is a continuous variable, indicating the transport capacity of the long-distance pipeline p in the s″th time slice; FUPL s′,p represents the transport rate of the long-distance pipeline p in the s′th time slice. When FUPL s′,p When the parameters are known, it means that the long-distance pipeline p is transporting at a constant rate. s′,p When it is a continuous variable, it means that the long-distance pipeline p is transporting at a changing rate; when the crude oil entering the long-distance pipeline at the sth time slice begins to leave the pipeline at the s′th time slice, bsopls,s′,p =1, otherwise, bsopl s,s′,p =0.

[0407] According to an example, the building module 302 may further include:

[0408] The second construction submodule is configured to construct a constraint regarding the end time of the crude oil leaving the long-distance pipeline based on the distribution information of the initial pipeline oil inventory, the volume, and the upper limit of the delivery rate. According to a specific example, based on the restriction on the end time of the crude oil leaving the long-distance pipeline, the following constraint is constructed:

[0409] The long-distance pipeline includes one or more long-distance pipelines represented by a natural number p; PL represents the set of long-distance pipelines involved in the current crude oil scheduling project; the initial pipeline oil inventory of the long-distance pipeline is divided into different pipeline segments according to the oil type, and the pipeline segments are numbered 1, 2, ..., NPS according to the distance from the outlet of the long-distance pipeline. p , natural number NPS p represents the initial number of pipeline sections of the p-th long-distance pipeline; LP is a parameter representing the scheduling time span of the current crude oil scheduling project; the scheduling time span is sliced ​​into one or more time slices represented by natural numbers s′ or s″, and SL is a set of time slices; an integer s, when s ≥ 1, s∈SL, represents the time slice corresponding to the current scheduling time span; when s∈[1-NPS p ,2-NPS p ,...,0], it represents the time slice corresponding to the historical scheduling time span; when s=1-NPS p When, it represents the NPS of the p-th long-distance pipeline p The time slice number when the oil in the pipeline enters the pipeline at the beginning of the period, when s=2-NPS p When, it represents the NPS of the p-th long-distance pipeline p -1 is the time slice number when the oil in the pipeline enters the pipeline at the beginning of the first period, and so on; l is a natural number, indicating the oil in the pipeline at the beginning of the first period; VLPL p,l is a parameter representing the volume of crude oil in the first section of the long-distance pipeline p; VUPL p is a parameter representing the volume of the long-distance pipeline p; max_FPL s′,p is a parameter, which represents the upper limit of the transmission rate of the long-distance pipeline p in the s′th time slice; teopl s,pis a continuous variable, indicating the end time of the crude oil entering the long-distance pipeline p at the sth time slice leaving the long-distance pipeline p; tsipl s′,p is a continuous variable, indicating the start time of crude oil entering the long-distance pipeline p at the s′th time slice; vipl s″,p is a continuous variable, indicating the transport capacity of the long-distance pipeline p in the s″th time slice; FUPL s′,p represents the transport rate of the long-distance pipeline p in the s′th time slice. When FUPL s′,p When the parameters are known, it means that the long-distance pipeline p is transporting at a constant rate. s′,p When it is a continuous variable, it means that the long-distance pipeline p is transporting at a changing rate; when the crude oil entering the long-distance pipeline p at the sth time slice completely leaves the long-distance pipeline p at the s′th time slice, beopl s,s′,p =1, otherwise, beopl s,s′,p =0.

[0410] Regarding the various modules of the apparatus in the above embodiment, the specific manner in which the operations performed by each module or its corresponding submodule have been described in detail in the embodiment of the method, and will not be elaborated on here.

[0411] In the above technical solution, basic data for a crude oil scheduling system, including a long-distance pipeline, is first acquired. A mixed integer programming model with corresponding constraints is then constructed by converting the long-distance pipeline from delayed delivery characteristics to quasi-immediate delivery characteristics. Finally, based on the basic data and the mixed integer programming model, the operating parameters of the crude oil scheduling system during the crude oil scheduling period (i.e., a crude oil scheduling plan) are generated according to the optimization objective. As described above, by converting the long-distance pipeline's "delayed delivery" characteristics into "quasi-immediate delivery," the crude oil entering the pipeline and leaving the pipeline are identical within the same time slice. This simplifies the data processing process for the long-distance pipeline (e.g., reducing the number of variables and constraints), significantly improving model application performance, and thus enabling the rapid and automatic compilation of high-quality crude oil scheduling plans. This allows for the rapid and automatic compilation of crude oil scheduling plans without manual intervention, which not only lowers the scheduling threshold but also reduces personnel workload and improves enterprise productivity, significantly contributing to achieving stable and economical production. Furthermore, the above modeling method simplifies the long-distance pipeline modeling process, resulting in a small-scale, highly efficient model and enabling intelligent crude oil scheduling. In addition, the present disclosure can achieve efficient transportation of crude oil in long-distance pipelines and can suppress corrosion problems caused by crude oil staying in long-distance pipelines for a long time.

[0412] In addition, the present disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned crude oil scheduling method provided in the present disclosure.

[0413] FIG11 is a block diagram of an electronic device 700 according to an exemplary embodiment. As shown in FIG11 , the electronic device 700 may include a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.

[0414] The processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above-mentioned crude oil scheduling method. The memory 702 is used to store various types of data to support the operation of the electronic device 700. Such data may include, for example, instructions for any application or method operating on the electronic device 700, as well as application-related data, such as contact information, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 702 or transmitted via the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules. The aforementioned other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more thereof, is not limited here. Therefore, the corresponding communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.

[0415] In an exemplary embodiment, the electronic device 700 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above-mentioned crude oil scheduling method.

[0416] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided. When executed by a processor, the program instructions implement the steps of the above-described crude oil production scheduling method. For example, the computer-readable storage medium may be the aforementioned memory 702 including the program instructions. The program instructions may be executed by the processor 701 of the electronic device 700 to implement the above-described crude oil production scheduling method.

[0417] Figure 12 is a block diagram of an electronic device 1900 according to an exemplary embodiment. For example, electronic device 1900 can be provided as a server. Referring to Figure 12, electronic device 1900 includes one or more processors 1922, and a memory 1932 for storing a computer program executable by processor 1922. The computer program stored in memory 1932 can include one or more modules, each corresponding to a set of instructions. Furthermore, processor 1922 can be configured to execute the computer program to perform the above-described crude oil scheduling method.

[0418] In addition, the electronic device 1900 may further include a power supply component 1926 and a communication component 1950. The power supply component 1926 may be configured to perform power management of the electronic device 1900, and the communication component 1950 may be configured to implement communication, such as wired or wireless communication, of the electronic device 1900. In addition, the electronic device 1900 may further include an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932.

[0419] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided. When executed by a processor, the program instructions implement the steps of the above-described crude oil production scheduling method. For example, the non-transitory computer-readable storage medium may be the aforementioned memory 1932 including the program instructions. The program instructions may be executed by the processor 1922 of the electronic device 1900 to implement the above-described crude oil production scheduling method.

[0420] In another exemplary embodiment, a computer program product is provided. The computer program product includes a computer program that can be executed by a programmable device, and the computer program has a code portion for executing the above-mentioned crude oil scheduling method when executed by the programmable device.

[0421] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments. Within the technical concept of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all fall within the scope of protection of the present disclosure.

[0422] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0423] In addition, the various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

[0424] Although the present disclosure is not limited in this regard, the following numbered examples demonstrate one or more aspects of the present disclosure.

[0425] Example 1. A crude oil scheduling method comprises: obtaining basic data of a crude oil scheduling system including a long-distance pipeline; constructing a mixed integer programming model with corresponding constraints by converting the long-distance pipeline from delayed delivery characteristics to quasi-immediate delivery characteristics; and generating operating parameters of the crude oil scheduling system during the crude oil scheduling period based on the basic data and the mixed integer programming model and an optimization objective.

[0426] Example 2. The method of Example 1, wherein the conversion process or the corresponding constraint condition is used to characterize the change between the time when the crude oil enters the long-distance pipeline and the time when the crude oil leaves the long-distance pipeline, so that after the conversion process, at the same time slice, the type and amount of crude oil entering and leaving the long-distance pipeline are the same.

[0427] Example 3. The method of Example 2, wherein the conversion process is implemented by the following steps: determining a first relationship between a start time when the crude oil leaves the long-distance pipeline and a start time when the crude oil enters the long-distance pipeline; and determining a second relationship between an end time when the crude oil leaves the long-distance pipeline and a start time when the crude oil enters the long-distance pipeline.

[0428] Example 4. The method of Example 3, wherein the basic data includes distribution information of initial oil inventory within the long-distance pipeline, the volume of the long-distance pipeline, and an upper limit on the delivery rate, wherein determining the first relationship includes: constructing a constraint condition regarding the start time of the crude oil leaving the long-distance pipeline based on the distribution information of the initial oil inventory, the volume, and the upper limit on the delivery rate.

[0429] Example 5. The method of Example 4, wherein determining the second relationship includes: constructing a constraint condition regarding the end time of the crude oil leaving the long-distance pipeline based on the distribution information of the initial pipeline oil inventory, the volume, and the upper limit of the delivery rate.

[0430] Example 6. The method of Example 3, wherein the crude oil scheduling system further includes upstream equipment located before the long-distance pipeline and downstream equipment located after the long-distance pipeline, wherein the basic data includes oil receipt and delivery operation restrictions of the upstream equipment and the downstream equipment, and the construction is further based on the oil receipt and delivery operation restrictions, and wherein the time when the upstream equipment delivers crude oil to the long-distance pipeline is based on the start time of entering the long-distance pipeline, and the time when the downstream equipment receives crude oil from the long-distance pipeline is based on the start time of the crude oil leaving the long-distance pipeline.

[0431] Example 7. The method of Example 1, wherein the crude oil scheduling system further includes upstream equipment located before the long-distance pipeline and downstream equipment located after the long-distance pipeline, wherein the basic data includes distribution information of initial pipeline oil inventory in the long-distance pipeline, and oil receipt and delivery operation restrictions of the upstream equipment and the downstream equipment, and the construction is further based on the oil receipt and delivery operation restrictions.

[0432] Example 8. The method of Example 7, wherein the conversion process is implemented by determining the time required to empty the initial pipeline oil storage, and setting the upstream device to a first time system and the downstream device to a second time system, wherein the second time system is delayed in time from the first time system by the determined time.

[0433] Example 9. The method of Example 8, wherein the basic data further includes information on the initial inventory of the storage tanks in the downstream equipment and operating limitations of the distillation unit in the downstream equipment, wherein the determining includes: determining, based on the basic data, a time required to empty the initial pipeline oil inventory by a program simulation method or by establishing a mathematical programming sub-model, and obtaining first operating parameters of the downstream equipment during the emptying of the initial pipeline oil inventory.

[0434] Example 10. The method of Example 9, wherein the basic data further includes oil delivery operational constraints of the long-distance pipeline, and the mathematical programming sub-model is based on the oil delivery operational constraints, wherein the oil delivery operational constraints include: the long-distance pipeline delivering crude oil at a variable or constant rate; and the long-distance pipeline delivering the initial pipeline inventory to the storage tank according to a first-in, first-out principle.

[0435] Example 11. The method of Example 9, further comprising: updating the opening inventory information of the storage tank based on the first operating parameter; and obtaining second operating parameters of the long-distance pipeline, the upstream equipment, and the downstream equipment during the crude oil scheduling period based on the updated opening inventory information of the storage tank and the mixed integer programming model.

[0436] Example 12. The method of Example 9, further comprising: utilizing the long-distance pipeline's oil collection plan and incoming oil destination plan included in the second operating parameters, combined with the initial pipeline oil inventory distribution information, to adjust the long-distance pipeline's oil delivery operation plan, wherein the oil collection plan includes at least one of the following: oil collection start and end times, oil collection volume, delivery rate, and delivered oil type; the incoming oil destination plan includes at least one of the following: the destination storage tank, the oil collection volume of the storage tank, and the received oil type; and the oil delivery operation plan includes at least one of the following: the start and end times of crude oil leaving the long-distance pipeline, the delivery volume, delivery rate, delivery destination, and delivered oil type.

[0437] Example 13. The method of Example 6 or 7, wherein the oil receiving and delivery operation restrictions of the non-long-distance pipeline in the upstream equipment include at least one of the following: a material balance restriction of the non-long-distance pipeline; and a delivery rate restriction of the non-long-distance pipeline.

[0438] Example 14. The method of Example 6 or 7, wherein the restrictions on oil delivery and receipt operations of the oil tanker in the upstream equipment include at least one of the following: the oil tanker can only dock at one berth, and the berth has a capacity of one oil tanker; the oil tanker can only berth and unload oil after arriving at the port; the oil tanker's oil unloading rate is limited by the capacity of the oil tanker's oil pump. The restrictions on oil delivery and receipt operations of the storage tanks in the upstream equipment and / or downstream equipment include at least one of the following: the storage tanks cannot perform oil delivery and receipt operations simultaneously; the oil delivery and receipt rate of the storage tanks is limited by the capacity of the storage tanks' oil pumps; the storage tanks must remain stationary for at least a reference time after receiving oil before delivering oil; the inventory level of the storage tank is between its corresponding preset tank bottom level and preset tank capacity and is less than its corresponding safety inventory threshold; the tank can only store its corresponding storable oil type; the tank can only receive oil from its corresponding upstream equipment and deliver oil to its corresponding downstream equipment. The oil receiving and delivery operation restrictions of the distillation unit in the downstream equipment include at least one of the following: the distillation unit can only process its corresponding processable oil type; the processing volume of the distillation unit is consistent with its corresponding planned processing volume; the distillation unit processes continuously and uninterruptedly.

[0439] Example 15. As described in Example 14, in the case where the long-distance pipeline stops or reduces its transmission speed, the following constraint is established based on the fact that the storage tank must remain stationary for at least a target period of time after receiving oil before delivering oil:

[0440] Among them, boct s,j is a binary variable. When tank j delivers oil in the sth time slice, boct s,j =1, when tank j is not delivering oil in the sth time slice, boct s,j =0; thdct s-1,j thdct represents the time it takes for tank j to deliver oil at the end of the s-1 time slice; s,j represents the waiting time for tank j to deliver oil at the end of the sth time slice; THDCT represents the shortest static time after the tank receives oil; tect s,j Indicates the end time of the sth time slice of tank j; tspl s,p Indicates the start time of the sth time slice of the long-distance pipeline p; tepl s,p Indicates the end time of the sth time slice of the long-distance pipeline p; bectpl s,j,p is a binary variable. When the operation of storage tank j before the start of time slice s is to receive oil from long-distance pipeline p, bectpl s,j,p = 1, when the operation of storage tank j before the start of time slice s is not to receive oil from long-distance pipeline p, bectpls,j,p =0; the scheduling time span is sliced ​​into one or more time slices represented by natural numbers s, s′, or s″, and SL is a set of time slices; the long-distance pipelines include one or more long-distance pipelines represented by natural numbers p; PL represents the set of long-distance pipelines involved in the current crude oil scheduling project; CT represents the set of storage tanks involved in the current crude oil scheduling project.

[0441] Example 16. The method of Example 1, wherein the mixed integer programming model includes an objective function, wherein the objective function is constructed based on the optimization objective, wherein the optimization objective includes at least one of the following: minimizing the demurrage of the oil tanker in the upstream equipment; minimizing the inventory cost of the storage tank, wherein the storage tank includes a plant tank, a transfer tank, and / or a terminal tank located in the downstream equipment and / or the upstream equipment; minimizing the number of feed switching times of the distillation unit in the downstream equipment; minimizing the cost of crude oil processing by the distillation unit; minimizing the number of switching times of oil receiving and delivery operations of the storage tank; and maximizing the transportation time of the long-distance pipeline.

[0442] Example 17. A crude oil scheduling device comprises: an acquisition module for acquiring basic data of a crude oil scheduling system including a long-distance pipeline; a construction module for constructing a mixed integer programming model with corresponding constraints by converting the long-distance pipeline from delayed delivery characteristics to quasi-immediate delivery characteristics; and a generation module for generating operating parameters of the crude oil scheduling system during the crude oil scheduling period based on the basic data and the mixed integer programming model and according to an optimization objective.

[0443] Example 18. A non-transitory computer-readable storage medium having a computer program stored thereon, the program performing the method of any one of Examples 1-16 when executed by a processor.

[0444] Example 19. An electronic device comprising: a memory having a computer program stored thereon; and a processor configured to execute the computer program in the memory to perform the method of any one of Examples 1-16.

[0445] Example 20. A computer program product having a computer program stored thereon, wherein the computer program is executed by a processor to perform the method of any one of Examples 1-16.

[0446] Example 21. A crude oil transportation method, comprising: constructing a mixed integer programming model based on operational constraints for oil delivery and receipt of a long-distance pipeline and its upstream and downstream equipment, wherein the long-distance pipeline has a delayed delivery characteristic; and solving the mixed integer programming model to obtain target operating parameters, wherein the target operating parameters include operating parameters of the long-distance pipeline and its upstream and downstream equipment during the entire scheduling period.

[0447] Example 21. The method of Example 20, wherein the oil receiving and delivery operation restrictions of the long-distance pipeline include: a restriction on the start time of crude oil leaving the long-distance pipeline; a restriction on the end time of crude oil leaving the long-distance pipeline; a restriction on the delivery rate of the long-distance pipeline; and a restriction on the material balance of the long-distance pipeline; wherein the restriction on the start time and the restriction on the end time are both determined based on the characteristics of the delayed delivery.

[0448] Example 22. The method of Example 21, wherein the mixed integer programming model includes an objective function and constraints; and constructing the mixed integer programming model based on the oil collection and delivery operation constraints of the long-distance pipeline and its upstream and downstream equipment includes: constructing corresponding constraints based on the constraint of the start time of the crude oil leaving the long-distance pipeline; or constructing corresponding constraints based on the constraint of the end time of the crude oil leaving the long-distance pipeline.

[0449] Example 23. A crude oil transportation device comprises: a model construction module for constructing a mixed integer programming model based on the operational constraints of oil receipt and delivery of a long-distance pipeline and its upstream and downstream equipment, wherein the long-distance pipeline has a delayed delivery characteristic; and a model solving module for solving the mixed integer programming model to obtain target operating parameters, wherein the target operating parameters include the operating parameters of the long-distance pipeline and its upstream and downstream equipment during the entire scheduling period.

[0450] Example 24. A crude oil transportation method comprises: constructing a first mixed integer programming model based on the oil delivery operation constraints of a long-distance pipeline and the oil collection and delivery operation constraints of downstream equipment of the long-distance pipeline; solving the first mixed integer programming model to obtain a first result, wherein the first result includes the operating parameters of the long-distance pipeline and its downstream equipment during the process of discharging the initial oil inventory in the long-distance pipeline; updating the initial inventory information of the plant tanks in the downstream equipment based on the first result, wherein the initial inventory information includes the initial inventory amount, the initial oil type, and the end time of the most recent oil collection; constructing a second mixed integer programming model based on the oil collection and delivery operation constraints of the long-distance pipeline and its upstream and downstream equipment; solving the second mixed integer programming model based on the updated initial inventory information of the plant tanks to obtain a second result, wherein the first result and the second result constitute the operating parameters of the long-distance pipeline and its upstream and downstream equipment during the entire scheduling period; and generating a crude oil transportation plan based on the first result and the second result.

[0451] Example 25. The method of Example 24, wherein the first mixed integer programming model includes a first objective function and a first constraint; constructing the first mixed integer programming model based on the oil delivery operation constraints of the long-distance pipeline and the oil collection and delivery operation constraints of the downstream equipment of the long-distance pipeline includes: constructing the first constraint based on the oil delivery operation constraints of the long-distance pipeline and the oil collection and delivery operation constraints of the downstream equipment of the long-distance pipeline; constructing the first objective function based on the first objective; wherein the first objective includes at least one of the following: fastest emptying of the initial pipeline oil inventory; lowest inventory cost of the plant tank; and minimum number of feed switching times of the distillation unit in the downstream equipment.

[0452] Example 26. The method of Example 24, wherein the second mixed integer programming model includes a second objective function and a second constraint; constructing the second mixed integer programming model based on the oil receipt and delivery operational constraints of the long-distance pipeline and its upstream and downstream equipment includes: constructing the second constraint based on the oil receipt and delivery operational constraints of the long-distance pipeline and its upstream and downstream equipment; constructing the second objective function based on the second objective; wherein the second objective includes at least one of the following: minimizing the demurrage of the oil tanker in the downstream equipment; minimizing the inventory cost of the first storage tank, wherein the first storage tank includes at least one of the plant tank, the transfer tank in the upstream equipment of the long-distance pipeline, and the terminal tank in the upstream equipment; minimizing the number of feed switching times of the distillation unit in the downstream equipment; minimizing the cost of crude oil processing by the distillation unit; minimizing the number of oil receipt and delivery operation switching times of the first tank; and maximizing the transportation volume of the long-distance pipeline.

[0453] Example 27. The method of Example 24, wherein the oil delivery operation constraints of the long-distance pipeline used in constructing the first mixed integer programming model include: the long-distance pipeline delivers crude oil at a constant rate; only one section of crude oil leaves the long-distance pipeline at any time; the long-distance pipeline delivers the initial pipeline inventory to the plant tank on a first-in-first-out basis; and the long-distance pipeline is emptied at the end of the scheduling.

[0454] Example 28. The method of Example 24, wherein the operational constraints on oil delivery and receipt of the long-distance pipeline used in constructing the second mixed integer programming model include: crude oil immediately leaving the long-distance pipeline after entering the long-distance pipeline; a delivery rate constraint of the long-distance pipeline; and a material balance constraint of the long-distance pipeline.

[0455] Example 29. The method of Example 24, wherein the restrictions on the oil receiving and delivery operations of the second storage tank include: the second storage tank cannot perform oil receiving and delivery operations simultaneously, wherein the second storage tank is any one of the plant tank, the transfer tank in the upstream equipment of the long-distance pipeline, and the terminal tank in the upstream equipment; the oil receiving and delivery rate of the second storage tank is limited by the capacity of the oil pump of the second storage tank; the second storage tank must remain stationary for at least a target time after receiving oil before delivering oil; the inventory level of the second storage tank is between its corresponding preset tank bottom level and preset tank capacity and is less than its corresponding safety stock threshold; the second tank can only store its corresponding storable oil type; the second tank can only receive oil from its corresponding upstream equipment and deliver oil to its corresponding downstream equipment.

[0456] Example 30. The method of Example 29, wherein the second mixed integer programming model includes a second objective function and a second constraint, the second storage tank is the plant tank, and constructing the second mixed integer programming model based on the oil collection and delivery operational constraints of the long-distance pipeline and its upstream and downstream equipment includes: constructing the following second constraint based on the requirement that the second storage tank must remain stationary for at least a target time after receiving oil before delivering oil:

[0457] Among them, boct s,j is a binary variable. When the plant tank j delivers oil in the sth time slice, boct s,j =1, when the plant tank j is not delivering oil in the sth time slice, boct s,j =0; thdct s-1,j It indicates the waiting time for the tank j in the plant to deliver oil at the end of the s-1 time slice; thdct s,j = THDCT represents the minimum waiting time after the plant tank j receives oil at the end of the sth time slice; s,j Indicates the end time of the sth time slice of the plant tank j; tspl s,p Indicates the start time of the sth time slice of the long-distance pipeline p; tepl s,p Indicates the end time of the sth time slice of the long-distance pipeline p; bectpl s,j,p is a binary variable. When the operation of the plant tank j before the start of the sth time slice is to receive oil from the long-distance pipeline p, bectpl s,j,p = 1, when the operation of the plant tank j before the start of the sth time slice is not to receive oil from the long-distance pipeline p, bectpl s,j,p=0; SL is the first time slice sequence number set; PL represents the long-distance pipeline involved in the current crude oil scheduling project; CT represents the plant tank involved in the current crude oil scheduling project.

[0458] Example 31. The method of Example 24, wherein the oil receiving and delivery operation restrictions of the distillation unit in the downstream equipment include: the distillation unit can only process the corresponding processable oil type; the processing volume of the distillation unit is consistent with its corresponding planned processing volume; and the distillation unit processes continuously and uninterruptedly.

[0459] Example 32. The method of Example 24, wherein the first result includes the inventory and stored oil type of each plant tank when the initial pipeline oil is emptied; and updating the initial inventory information of the plant tanks in the downstream equipment based on the first result includes: for each plant tank, determining the difference between the end time of the plant tank's most recent oil collection and the time spent on emptying the initial pipeline oil as the new, most recent end time of the plant tank's oil collection; if the plant tank undergoes an oil collection or delivery operation during the process of discharging the initial pipeline oil, updating the initial inventory of the plant tank to the inventory of the plant tank when the initial pipeline oil is emptied, and updating the initial oil type of the plant tank to the stored oil type of the plant tank when the initial pipeline oil is emptied.

[0460] Example 33. A crude oil transportation device comprises: a first model construction module for constructing a first mixed integer programming model based on the oil delivery operation constraints of a long-distance pipeline and the oil collection and delivery operation constraints of downstream equipment of the long-distance pipeline; a first solution module for solving the first mixed integer programming model to obtain a first result, wherein the first result includes the operating parameters of the long-distance pipeline and its downstream equipment during the process of discharging the initial oil stored in the long-distance pipeline; an update module for updating the initial inventory information of the plant tanks in the downstream equipment based on the first result, wherein the initial inventory information includes the initial inventory inventory, beginning oil type, and end time of the most recent oil collection; a second model construction module, used to construct a second mixed integer programming model based on the oil collection and delivery operation constraints of the long-distance pipeline and its upstream and downstream equipment; a second solution module, used to solve the second mixed integer programming model based on the updated beginning inventory information of the plant tank to obtain a second result, wherein the first result and the second result constitute the operating parameters of the long-distance pipeline and its upstream and downstream equipment during the entire scheduling period; a plan generation module, used to generate a crude oil transportation plan based on the first result and the second result.

[0461] Example 34. A crude oil transportation method comprises: determining first operating parameters based on distribution information of initial oil reserves in a long-distance pipeline, initial inventory information of plant tanks, and operational constraints of a distillation unit, wherein the first operating parameters include operating parameters of the long-distance pipeline, the plant tanks, and the distillation unit during the process of discharging the initial oil reserves, and the initial inventory information includes an initial inventory amount and an initial operating status; updating the initial inventory information based on the first operating parameters; constructing a mixed integer programming model based on the operational constraints of oil receipt and delivery for the long-distance pipeline and its upstream and downstream equipment; solving the mixed integer programming model based on the updated initial inventory information to obtain second operating parameters, wherein the first and second operating parameters constitute the operating parameters of the long-distance pipeline and its upstream and downstream equipment during the entire scheduling period; and generating a crude oil transportation plan based on the first and second operating parameters.

[0462] Example 35. The method as described in Example 34, wherein the first operating parameter is determined based on the distribution information of the initial oil storage in the long-distance pipeline, the initial inventory information of the plant tank, and the operating restrictions of the distillation unit, including: determining the discharge tank of each long-distance pipeline with unemptied initial oil storage at the initial moment and the feed tank of each distillation unit at the initial moment from the plant tanks involved in the current crude oil scheduling project, wherein the initial value of the initial moment is the scheduling start moment; determining the third operating parameter based on the initial inventory information of each discharge tank, the initial inventory information of each feed tank, and the distribution information, wherein the third operating parameter includes the operating parameters of each long-distance pipeline with unemptied initial oil storage, the plant tank, and the distillation unit within a first target time after the initial moment, wherein the first target time is the current available time of each discharge tank. the minimum value between the continuous oil collection time and the current sustainable oil delivery time of each feed tank; updating the distribution information of the initial pipeline oil in each long-distance pipeline that has not emptied the initial pipeline oil according to the third operating parameter; if it is determined according to the updated distribution information that the long-distance pipeline that has not emptied the initial pipeline oil exists, then the initial time is updated to the sum of the initial time and the first target time, and the initial inventory information is updated according to the third operating parameter, and the step of determining the discharge tank of each long-distance pipeline that has not emptied the initial pipeline oil and the feed tank of each distillation unit at the initial time from the plant tanks involved in the current crude oil scheduling project is returned; if it is determined according to the updated distribution information that the long-distance pipeline that has not emptied the initial pipeline oil exists, then the first operating parameter is determined according to each of the third operating parameters.

[0463] Example 36. The method of Example 35, wherein determining, from the plant tanks involved in the current crude oil scheduling project, the discharge tank of each long-distance pipeline with unemptied initial oil reserves and the feed tank of each distillation unit at the initial time, comprises: determining, from the plant tanks involved in the current crude oil scheduling project, the feed tank of each distillation unit at the initial time; and determining, based on the inventory status of each feed tank at the initial time, the discharge tank of each long-distance pipeline with unemptied initial oil reserves at the initial time.

[0464] Example 37. The method of Example 36, wherein determining the feed tank of each distillation unit at the initial moment from the plant tanks involved in the current crude oil scheduling project includes: for each distillation unit, if a target plant tank is not completely emptied, determining the target plant tank as the feed tank of the distillation unit at the initial moment, wherein the target plant tank is the plant tank that is currently supplying the distillation unit at the initial moment; and if the target plant tank is completely emptied, determining the feed tank of the distillation unit at the initial moment from the supply tanks of the distillation unit.

[0465] Example 38. As described in Example 37, the method of determining the feed tank of the distillation apparatus at the initial moment from the feed tanks of the distillation apparatus includes: when there is a feed tank whose corresponding second target time is greater than or equal to zero among the non-empty feed tanks of the distillation apparatus, determining the feed tank with the largest corresponding second target time among the non-empty feed tanks of the distillation apparatus as the feed tank of the distillation apparatus at the initial moment, wherein the second target time corresponding to the non-empty feed tank is equal to the difference between the actual standing time after the non-empty feed tank receives oil and the shortest standing time after the non-empty feed tank receives oil; when there is no feed tank whose corresponding second target time is greater than or equal to zero among the non-empty feed tanks of the distillation apparatus, if there is a target feed tank among the empty feed tanks of the distillation apparatus, determining any one of the target feed tanks as the feed tank of the distillation apparatus at the initial moment, wherein the target feed tank is a feed tank among the empty feed tanks of the distillation apparatus that is allowed to receive and deliver oil simultaneously and can receive the current discharge of any long-distance pipeline that has not yet emptied the initial oil storage.

[0466] Example 39. The method of Example 36, wherein determining the discharge tank of each long-distance pipeline with unemptied initial oil reserves at the initial moment based on the inventory status of each feed tank at the initial moment, comprises: for each feed tank, if the feed tank is empty, determining the feed tank as the discharge tank of a target long-distance pipeline, wherein the target long-distance pipeline is any long-distance pipeline with unemptied initial oil reserves whose current discharge can be received by the feed tank; and for each other long-distance pipeline with unemptied initial oil reserves other than the target long-distance pipeline, determining the discharge tank of the other long-distance pipeline at the initial moment based on the transportation status of the other long-distance pipeline, the inventory status of the current discharge tank of the other long-distance pipeline, and the discharge oil type information of the other long-distance pipeline, wherein the current discharge tank is the plant tank that is receiving the discharge of the other long-distance pipeline at the initial moment.

[0467] Example 40. The method of Example 39, wherein the discharge tank of the other long-distance pipeline at the initial moment is determined based on the transportation status of the other long-distance pipeline, the inventory status of the current discharge tank of the other long-distance pipeline, and the discharge oil type information of the other long-distance pipeline, Including: when the other long-distance pipeline meets the preset conditions, the current discharge tank is determined as the discharge tank of the other long-distance pipeline at the initial moment; when the other long-distance pipeline does not meet the preset conditions, if there is an empty plant tank that can receive the current discharge of the other long-distance pipeline, then the plant tank that can receive the current discharge of the other long-distance pipeline and supplies the first target distillation device among the empty plant tanks that can receive the current discharge of the other long-distance pipeline is determined as the discharge tank of the other long-distance pipeline at the initial moment, wherein the first target distillation device is the distillation device with the shortest current sustainable processing time among the distillation devices that use the empty plant tank that can receive the current discharge of the other long-distance pipeline as a supply tank; wherein the preset conditions include: no suspension of supply occurred at the previous moment of the initial moment, the inventory status of the current discharge tank is not full, and the type of discharge oil has not been switched at the initial moment.

[0468] Example 41. The method of Example 40, wherein after the step of determining the current discharge tank as the discharge tank of the other long-distance pipeline at the initial moment, determining the discharge tank of the other long-distance pipeline at the initial moment based on the transportation status of the other long-distance pipeline, the inventory status of the current discharge tank of the other long-distance pipeline, and the discharge oil type information of the other long-distance pipeline, further comprises: when the feed tank of each of the distillation units at the initial moment includes the discharge tank of the other long-distance pipeline at the initial moment, adjusting the discharge tank of the other long-distance pipeline at the initial moment based on at least the inventory status of candidate supply tanks of the second target distillation unit, wherein the feed tank of the second target distillation unit at the initial moment and the discharge tank of the other long-distance pipeline at the initial moment are tanks in the same plant, and the candidate supply tanks include other supply tanks among the supply tanks of the second target distillation unit except the feed tank of the second target distillation unit at the initial moment.

[0469] Example 42. The method as described in Example 41, wherein the adjusting the discharge tank of the other long-distance pipeline at the initial moment according to at least the inventory status of the candidate feed tanks of the second target distillation device comprises: if all the candidate feed tanks are empty, and there is an empty feed tank among the candidate feed tanks that can receive the current discharge of the other long-distance pipeline, then adjusting the discharge tank of the other long-distance pipeline at the initial moment to any feed tank among the candidate feed tanks that can receive the current discharge of the other long-distance pipeline; if some of the candidate feed tanks are empty, If the candidate feed tanks are empty and there is an empty feed tank among the candidate feed tanks that can receive the current discharge of the other long-distance pipeline, the discharge tank of the other long-distance pipeline at the initial moment is adjusted to the feed tank that is emptied earliest among the empty feed tanks that can receive the current discharge of the other long-distance pipeline; if none of the candidate feed tanks are empty, or some of the candidate feed tanks are empty, and there is no empty feed tank among the candidate feed tanks that can receive the current discharge of the other long-distance pipeline, then the discharge tank of the other long-distance pipeline at the initial moment is determined to be empty.

[0470] Example 43. A crude oil transportation device comprises: a first determination module for determining a first operating parameter based on distribution information of initial oil inventory in a long-distance pipeline, initial inventory information of a plant tank, and operating constraints of a distillation device, wherein the first operating parameter includes operating parameters of the long-distance pipeline, the plant tank, and the distillation device during the process of discharging the initial oil inventory, and the initial inventory information includes an initial inventory amount and an initial operating status; an update module for updating the initial inventory information based on the first operating parameter; a model construction module for constructing a mixed integer programming model based on the oil collection and delivery operating constraints of the long-distance pipeline and its upstream and downstream equipment; a model solving module for solving the mixed integer programming model based on the updated initial inventory information to obtain a second operating parameter, wherein the first and second operating parameters constitute the operating parameters of the long-distance pipeline and its upstream and downstream equipment during the entire scheduling period; and a plan generation module for generating a crude oil transportation plan based on the first and second operating parameters.

[0471] Example 44. A method for transporting crude oil via a long-distance pipeline, comprising: obtaining pipeline segment information of initial oil inventory in the long-distance pipeline, oil collection operating parameters of the long-distance pipeline, and the destination of incoming oil; and determining oil delivery operating parameters of the long-distance pipeline based on the pipeline segment information, the oil collection operating parameters, and the destination of the incoming oil.

[0472] Example 45. The method of Example 44, wherein the pipeline segment information includes the initial volume, initial oil type, and destination of the stored oil of each pipeline segment included in the initial pipeline oil inventory, wherein crude oil of the same type continuously distributed and having the same destination in the initial pipeline oil inventory is divided into one pipeline segment; the oil collection operation parameters include a first start time, a first end time, the collected oil volume, a first delivery rate, and the delivered oil type of each oil collection operation; and the oil delivery operation parameters include a second start time, a second end time, the delivered oil volume, a second delivery rate, the delivered oil destination, and the delivered oil type of each outgoing oil leaving the long-distance pipeline, wherein the outgoing oil is the incoming oil of the pipeline segment or leaving the long-distance pipeline.

[0473] Example 46. The method of Example 45, wherein determining the oil delivery operation parameters of the long-distance pipeline according to the pipeline segment information, the oil receiving operation parameters, and the destination of the incoming oil, comprises: setting i=1, o=1, no o =1, where i represents the i-th oil collection operation of the long-distance pipeline, o represents the o-th section of the long-distance pipeline oil, and no o Indicates the oil outlet of section o oThe outgoing oil is arranged in the order of entering the long-distance pipeline; the first start time of the i-th oil collection operation is determined as the no. o The second starting time of the first oil delivery is determined as the first delivery rate of the oil in the oth section. o The second delivery rate of the delivery of the first delivery; determining whether the remaining outgoing oil volume of the o-th section outgoing oil is greater than the remaining incoming oil volume of the i-th section incoming oil corresponding to the i-th oil collection operation; if the remaining outgoing oil volume of the o-th section outgoing oil is not greater than the remaining incoming oil volume of the i-th section incoming oil, then determining the volume of the o-th section outgoing oil as the no. o The volume of the oil delivered at the first stage is o The second start time of the first delivery, the no. o The second delivery rate of the oth section outlet oil and the no. o The volume of the oil delivered at the first time is used to determine the oil outlet of the first section. o The second end time of the second delivery; update the remaining outgoing oil volume of the oth section outgoing oil and the remaining incoming oil volume of the i-th section incoming oil, and add 1 to o, no o =1; determine whether the remaining amount of incoming oil of the i-th section of the incoming oil obtained after the update is equal to zero; if the remaining amount of incoming oil of the i-th section of the incoming oil obtained after the update is equal to zero, then add 1 to i and return to the method of determining the first start time of the i-th oil collection operation as the number no of the o-th section of the outgoing oil. o The second starting time of the first oil delivery is determined as the first delivery rate of the oil in the oth section. o The step of the second delivery rate of the o-th section of oil is continued until i is equal to the total number of oil collections; wherein, the delivery destination of each delivery of the o-th section of oil is the storage destination or the incoming oil destination of the o-th section of oil, and the delivery oil type of each delivery of the o-th section of oil is the initial oil type or the delivery oil type of the o-th section of oil.

[0474] Example 47. The method of Example 46, wherein determining the oil delivery operation parameters of the long-distance pipeline based on the pipeline segment information, the oil receiving operation parameters, and the destination of the incoming oil, further comprises: if the remaining incoming oil amount of the i-th section incoming oil obtained after the update is not equal to zero, then o-1 The second end time of the delivery is determined as the no. o The second starting time of the ith oil delivery operation is determined as the first delivery rate of the ith oil delivery operation. oReturn to the step of determining whether the remaining outgoing oil volume of the o-th segment outgoing oil is greater than the remaining incoming oil volume of the i-th segment incoming oil corresponding to the i-th oil collection operation.

[0475] Example 48. The method of Example 46, wherein determining the oil delivery operation parameters of the long-distance pipeline based on the pipeline segment information, the oil receiving operation parameters, and the destination of the incoming oil, further comprises: if the remaining outgoing oil volume of the o-th segment outgoing oil is greater than the remaining incoming oil volume of the i-th segment ingoing oil, determining the remaining incoming oil volume of the i-th segment ingoing oil as the no. o The volume of the oil delivered is determined as the first end time of the i-th oil collection operation as the no. o The second end time of the second delivery; update the remaining outgoing oil volume of the oth section outgoing oil and the remaining incoming oil volume of the i-th section incoming oil; let i and no o Add 1 to each of them, and return the first start time of the i-th oil collection operation to the no. o The second starting time of the first oil delivery is determined as the first delivery rate of the oil in the oth section. o The second delivery rate step of the oil is repeated until i is equal to the total number of oil collection times.

[0476] Example 49. The method of any one of Examples 46-48, wherein determining the oil delivery operation parameters of the long-distance pipeline based on the pipeline segment information, the oil collection operation parameters, and the destination of the incoming oil further comprises: if i is equal to the total number of oil collections, uniformly numbering the oil delivery operations of the long-distance pipeline based on the order in which the outgoing oil leaves the long-distance pipeline and the order in which each of the outgoing oil is delivered; and merging two oil delivery operations that have the same second delivery rate, delivery destination, and delivery oil type and have adjacent delivery times.

[0477] Example 50. The method of Example 45 further comprises: determining a crude oil segment in the incoming oil excluding the outgoing oil as the end-of-period pipeline oil inventory of the long-distance pipeline.

[0478] Example 51. A long-distance pipeline crude oil transportation device, comprising: an acquisition module for acquiring pipeline segment information of initial oil storage in the long-distance pipeline, oil collection operating parameters of the long-distance pipeline, and the destination of incoming oil; and a first determination module for determining oil delivery operating parameters of the long-distance pipeline based on the pipeline segment information, the oil collection operating parameters, and the destination of the incoming oil.

[0479] Although only a few embodiments of the present disclosure have been shown and described, it will be apparent to those skilled in the art that many changes and modifications may be made thereto without departing from the spirit and scope of the invention as described in the appended claims. All patent applications and patents cited herein, whether foreign or domestic, and all other publications, are hereby incorporated in their entirety to the extent permitted by law.

[0480] The methods and systems described herein can be deployed in part or in whole by a machine that executes computer software, program code, and / or instructions on a processor. The present disclosure can be implemented as a method on a machine, as a system or device, as a part of a machine or about a part of a machine, or as a computer program product embodied in a computer-readable medium that is executed on one or more machines. In an embodiment, the processor can be a server, a cloud server, a client, a network infrastructure, a mobile computing platform, a fixed computing platform, or part of other computing platforms. The processor can be any type of computing or processing device that can execute program instructions, codes, binary instructions, etc. The processor can be or can include a signal processor, a digital processor, an embedded processor, a microprocessor, or any variant, such as a coprocessor (mathematical coprocessor, graphics coprocessor, communication coprocessor, etc.), which can directly or indirectly facilitate the execution of program codes or program instructions stored thereon. In addition, the processor can enable the execution of multiple programs, threads, and codes. Threads can be executed simultaneously to enhance the performance of the processor and facilitate the simultaneous operation of applications. As an implementation, the methods, program codes, program instructions, etc. described herein can be implemented in one or more threads. Threads may spawn other threads, which may be assigned priorities associated with them; the processor may execute the threads based on priority or based on any other order of instructions provided in the program code. The processor or any machine utilizing the processor may include non-transitory memory that stores methods, codes, instructions, and programs as described herein and elsewhere. The processor may access a non-transitory storage medium through an interface that may store methods, codes, and instructions described herein and elsewhere. The storage medium associated with the processor for storing methods, programs, codes, program instructions, or other types of instructions that can be executed by a computing or processing device may include, but is not limited to, one or more of the following: CD-ROM, DVD, memory, hard disk, flash drive, RAM, ROM, cache, and the like.

[0481] The processor may include one or more cores that can enhance the speed and performance of the multiprocessor. In an embodiment, the processor may be a dual-core processor, a quad-core processor, other chip-level multiprocessors that combine two or more independent cores, etc. (called a die).

[0482] Method and system described herein can be deployed partially or entirely by a machine that executes computer software on a server, client, firewall, gateway, hub, router or other such computer and / or networking hardware.Software program can be associated with a server, and this server can include a file server, a print server, a domain server, an internet server, an intranet server, a cloud server and other variations such as auxiliary servers, host servers, distributed servers or the like.The server can include one or more of the following: memory, a processor, a computer-readable medium, a storage medium, a port (physical and virtual), a communication device and the interface that can access other servers, clients, machines and equipment by wired or wireless media, or the like. Method, program or code as described in this article and elsewhere can be performed by a server. In addition, other equipment required for executing the method as described in the application can be considered as a part for the infrastructure associated with the server.

[0483] The server can provide an interface to other devices, and these other devices include but are not limited to client, other servers, printer, database server, print server, file server, communication server, distributed server, social network or the like. Additionally, this coupling and / or connection can be convenient to remote execution program on the network. The networking of some or all of the devices in these devices can be convenient to parallel process program or method at one or more locations, without departing from the scope of this disclosure. In addition, any device attached to the server by the interface can include at least one storage medium that can store method, program, code and / or instruction. The central repository can provide the program instruction to be executed on different devices. In this implementation, the remote repository can serve as the storage medium for program code, instruction and program.

[0484] The software program may be associated with a client, which may include a file client, a print client, a domain client, an internet client, an intranet client, and other variations such as an auxiliary client, a host client, a distributed client, and the like. The client may include one or more of a memory, a processor, a computer-readable medium, a storage medium, ports (physical and virtual), a communication device, and interfaces capable of accessing other clients, servers, machines, and devices via wired or wireless media, and the like. Methods, programs, or codes as described herein and elsewhere may be executed by the client. In addition, other devices required to perform the methods as described in this application may be considered part of the infrastructure associated with the client.

[0485] The client can provide an interface to other devices, and these other devices include but are not limited to servers, other clients, printers, database servers, print servers, file servers, communication servers, distributed servers, etc. Additionally, this coupling and / or connection can be convenient for executing programs remotely on the network. The networking of some or all of these devices can be convenient for processing programs or methods in parallel at one or more locations, without departing from the scope of this disclosure. In addition, any device attached to the client by the interface can include at least one storage medium that can store methods, programs, applications, codes and / or instructions. The central repository can provide the program instructions to be executed on different devices. In this implementation, the remote repository can serve as the storage medium for program code, instructions and programs.

[0486] The methods and systems described herein can be deployed in part or in whole through a network infrastructure. The network infrastructure can include the following elements: such as computing devices, servers, routers, hubs, firewalls, clients, personal computers, communication equipment, routing devices and other active or passive devices, modules and / or components as known in the art. (One or more) computing and / or non-computing devices associated with the network infrastructure can include (among other components) storage media, such as flash memory, buffers, stacks, RAM, ROM, etc. The processes, methods, program codes, instructions described herein and elsewhere can be executed by one or more network infrastructure elements. The methods and systems described herein can be adapted to be used for use in any type of private, community or hybrid cloud computing network or cloud computing environment, including those methods and systems involving the features of software as a service (SaaS), platform as a service (PaaS) and / or infrastructure as a service (IaaS).

[0487] Computer software, program code and / or instructions may be stored and / or accessed on machine-readable media, which may include: computer components, devices and recording media that retain digital data used for computations for time intervals; semiconductor memory devices known as random access memory (RAM); mass storage devices typically used for more permanent storage, such as optical disks, magnetic storage forms such as hard disks, tapes, drums, cards and other types; processor registers, cache memory, volatile memory, non-volatile memory; optical storage media such as CDs, DVDs; removable media such as flash memory (e.g., USB sticks or keys), floppy disks, magnetic tape, paper tape, punch cards, stand-alone RAM disks, Zip drives, removable mass storage devices, offline, etc.; other computer memory such as dynamic memory, static memory, read / write storage devices, variable storage devices, read-only, random access, sequential access, location addressable, file addressable, content addressable, network attached storage devices, storage area networks, bar codes, magnetic ink, etc.

[0488] The methods and systems described herein can transform physical and / or intangible items from one state to another. The methods and systems described herein can also transform data representing physical and / or intangible items from one state to another.

[0489] The elements described and depicted herein (including the elements in the flow charts and block diagrams throughout the accompanying drawings) imply the logical boundaries between elements. However, according to software or hardware engineering practices, the elements depicted and their functions can be implemented on a machine by a computer-executable medium, and the machine has a processor capable of executing program instructions stored thereon, and the program instructions are used as a single-chip software structure, as a separate software module, or as a module using external routines, codes, services, etc. or any combination of these, and all such implementations can be within the scope of this disclosure. The example of such a machine can include but is not limited to personal digital assistants, laptop computers, personal computers, mobile phones, other handheld computing devices, medical equipment, wired or wireless communication equipment, converters, chips, calculators, satellites, tablet PCs, e-books, gadgets, electronic devices, devices with artificial intelligence, computing devices, networking equipment, servers, routers, etc. In addition, the elements or any other logical components depicted in the flow charts and block diagrams can be implemented on a machine capable of executing program instructions. Therefore, although the aforementioned drawings and descriptions set forth the functional aspects of the disclosed system, the specific arrangement of the software for implementing these functional aspects should not be inferred from these descriptions, unless explicitly stated or otherwise clear according to the context. Similarly, it will be appreciated that the various steps identified and described above may be varied, and the order of the steps may be adapted to the specific application of the technology disclosed herein. All such variations and modifications are intended to fall within the scope of the present disclosure. As such, depictions and / or descriptions of the order of various steps should not be construed as requiring a specific order of execution for those steps, unless required by a specific application, or explicitly stated or otherwise clear from the context.

[0490] The above methods and / or processes and the steps associated therewith can be implemented in hardware, software, or any combination of hardware and software suitable for a particular application. The hardware can include a general-purpose computer and / or a special-purpose computing device, or a specific computing device, or specific aspects or components of a specific computing device. The processes can be implemented in one or more microprocessors, microcontrollers, embedded microcontrollers, programmable digital signal processors, or other programmable devices, together with external and / or internal memory. The processes can also or instead be embodied in a dedicated integrated circuit, a programmable gate array, programmable array logic, or any other device or combination of devices that can be configured to process electronic signals. It will be further appreciated that one or more of the processes can be implemented as computer executable code that can be executed on a machine-readable medium.

[0491] Computer executable code may be created using a structured programming language, such as C, an object-oriented programming language such as C++, or any other high-level or low-level programming language (including assembly language, hardware description languages, and database programming languages ​​and techniques), which may be stored, compiled, or interpreted to run on one of the aforementioned devices, as well as heterogeneous combinations of processors, processor architectures, or combinations of different hardware and software, or any other machine capable of executing program instructions.

[0492] Thus, in one aspect, each of the above methods and combinations thereof can be embodied in computer executable code that performs its steps when executed on one or more computing devices. In another aspect, the method can be embodied in a system that performs its steps and can be distributed across devices in many ways, or all functionality can be integrated into a dedicated, separate device or other hardware. In another aspect, the components for performing the steps associated with the above processes can include any of the hardware and / or software described above. All such permutations and combinations are intended to fall within the scope of the present disclosure.

[0493] The method steps of the implementations described herein are intended to include any suitable means, consistent with patentability of the appended claims, of causing such method steps to be performed, unless a different meaning is expressly provided or otherwise clear from the context. Thus, for example, performing step X includes any suitable means of causing another party (such as a remote user, a remote processing resource (e.g., a server or cloud computing environment), or a machine) to perform step X. Similarly, performing steps X, Y, and Z may include any means of directing or controlling any combination of such other individuals or resources to perform steps X, Y, and Z to obtain the benefits of such steps. Thus, the method steps of the implementations described herein are intended to include any suitable means, consistent with patentability of the appended claims, of causing one or more other parties or entities to perform such steps, unless a different meaning is expressly provided or otherwise clear from the context. Such parties or entities need not be under the direction or control of any other party or entity, and need not be located in a particular jurisdiction.

[0494] Although the present disclosure has been disclosed in conjunction with the preferred embodiments shown and described in detail, various modifications and improvements thereon will become readily apparent to those skilled in the art. Therefore, the spirit and scope of the present disclosure are not limited to the foregoing examples, but are to be understood in the broadest sense permitted by law.

[0495] Unless otherwise indicated herein or clearly contradictory with the context, in the context of describing the present disclosure (especially in the context of the appended claims), the use of the terms "a" and "an" and "the" and similar references is to be interpreted as covering both the singular and the plural. Unless otherwise indicated, the terms "comprise", "have", "include" and "contain" are to be interpreted as open terms (i.e., meaning "including but not limited to"). Unless otherwise indicated herein, the reference to the range of values ​​herein is only intended to be used as a shorthand method to refer to each individual value falling within the range, and each individual value is incorporated into the specification as if it were separately described herein. Unless otherwise indicated herein or clearly contradictory with the context in other ways, all methods described herein can be implemented in any appropriate order. The use of any and all examples or exemplary languages ​​(e.g., "such as") provided herein is only intended to better illustrate the present disclosure and is not intended to limit the scope of the present disclosure unless otherwise claimed. Any language in the specification should not be interpreted as indicating any unclaimed element that is essential for practicing the present disclosure.

[0496] Although the foregoing written description enables one skilled in the art to make and use what is presently considered to be the best mode thereof, those skilled in the art will understand and appreciate variations, combinations, and equivalents of the specific embodiments, methods, and examples presented herein. Therefore, the present disclosure should not be limited to the above-described embodiments, methods, and examples, but rather to all embodiments and methods within the scope and spirit of the present invention. All documents cited herein are hereby incorporated by reference.

Claims

1. A method for crude oil scheduling and production scheduling, characterized in that: include: Obtain basic data of crude oil dispatching system including long-distance pipelines; By converting the long-distance pipeline from delayed transmission characteristics to quasi-immediate transmission characteristics, a mixed integer programming model with corresponding constraints is constructed; and Based on the basic data and the mixed integer programming model, according to the optimization target, the operating parameters of the crude oil scheduling system during the crude oil scheduling and production scheduling period are generated.

2. The method according to claim 1, characterized in that: The conversion process or the corresponding constraint condition is used to characterize the change between the time when the crude oil enters the long-distance pipeline and the time when the crude oil leaves the long-distance pipeline, so that after the conversion process, at the same time slice, the type and amount of crude oil entering and leaving the long-distance pipeline are the same.

3. The method according to claim 1, characterized in that The conversion process is achieved by the following steps: Determining a first relationship between a start time when the crude oil leaves the long-distance pipeline and a start time when the crude oil enters the long-distance pipeline; and A second relationship between the end time when the crude oil leaves the long-distance pipeline and the start time when the crude oil enters the long-distance pipeline is determined.

4. The method according to claim 3, characterized in that The basic data includes distribution information of initial pipeline oil reserves in the long-distance pipeline, the volume of the long-distance pipeline and an upper limit of the delivery rate, wherein determining the first relationship includes: constructing a constraint condition on the start time of the crude oil leaving the long-distance pipeline based on the distribution information of the initial pipeline oil reserves, the volume and the upper limit of the delivery rate.

5. The method according to claim 4, characterized in that The determining of the second relationship includes: constructing a constraint condition on the end time of the crude oil leaving the long-distance pipeline according to the distribution information of the initial pipeline oil storage, the volume and the upper limit of the transportation rate.

6. The method according to claim 3, characterized in that The crude oil dispatching system also includes upstream equipment located before the long-distance pipeline and downstream equipment located after the long-distance pipeline. wherein the basic data includes the oil collection and payment operation restrictions of the upstream equipment and the downstream equipment, and the construction is also based on the oil collection and payment operation restrictions, and The time when the upstream equipment delivers crude oil to the long-distance pipeline is based on the start time of entering the long-distance pipeline, and the time when the downstream equipment receives crude oil from the long-distance pipeline is based on the start time of the crude oil leaving the long-distance pipeline.

7. The method according to claim 1, characterized in that The crude oil scheduling system also includes upstream equipment located before the long-distance pipeline and downstream equipment located after the long-distance pipeline, wherein the basic data includes the distribution information of the initial pipeline oil inventory in the long-distance pipeline, the oil collection and payment operation restrictions of the upstream equipment and the downstream equipment, and the construction is also based on the oil collection and payment operation restrictions.

8. The method according to claim 7, characterized in that The conversion process is achieved through the following steps: Determine the time required to drain the initial pipe oil in the period, and The upstream device is set to a first time frame and the downstream device is set to a second time frame, wherein the second time frame is delayed in time by the determined time relative to the first time frame.

9. The method according to claim 8, characterized in that The basic data also includes the initial inventory information of the storage tanks in the downstream equipment and the operating limitations of the distillation unit in the downstream equipment, wherein the determination includes: According to the basic data, the time required to empty the initial pipeline oil is determined by a program simulation method or by establishing a mathematical programming sub-model, and the first operating parameters of the downstream equipment during the emptying of the initial pipeline oil are obtained.

10. The method according to claim 9, characterized in that The basic data also includes the oil delivery operation constraints of the long-distance pipeline, and the mathematical programming sub-model is based on the oil delivery operation constraints, wherein the oil delivery operation constraints include: The long-distance pipeline transports crude oil at a variable or constant rate; and The long-distance pipeline transports the initial pipeline oil to the storage tank according to the first-in-first-out principle.

11. The method according to claim 9, characterized in that The method further comprises: According to the first operating parameter, updating the initial inventory information of the storage tank; and According to the updated initial inventory information of the storage tank and the mixed integer programming model, second operating parameters of the long-distance pipeline, the upstream equipment and the downstream equipment during the crude oil scheduling and production scheduling are obtained.

12. The method according to claim 11, characterized in that The method further comprises: The oil collection scheme and the oil entry scheme of the long-distance pipeline included in the second operation parameter are used. The oil destination plan is combined with the distribution information of the initial pipeline oil storage to adjust the oil delivery operation plan of the long-distance pipeline, wherein the oil collection plan includes at least one of the following: the start and end time of oil collection, the volume of oil collection, the delivery rate and the type of oil delivered; the in-line oil destination plan includes at least one of the following: the destination of the storage tank, the oil collection volume of the storage tank and the type of oil collected; and the oil delivery operation plan includes at least one of the following: the start and end time of the crude oil leaving the long-distance pipeline, the volume of oil delivery, the delivery rate, the destination of oil delivery and the type of oil delivered.

13. The method according to claim 6 or 7, characterized in that: The oil receiving and delivery operation restrictions of the upstream equipment other than the long-distance pipeline include at least one of the following: Material balance limitations for non-long-distance pipelines; and The transmission rate limitation of the non-long-distance pipeline; The oil receiving and delivery operation restrictions of the oil tanker in the upstream equipment include at least one of the following: The tanker can only berth at one berth, and the capacity of the berth is one tanker; The tanker can only berth and unload oil after arriving at the port; and The oil unloading rate of the tanker is limited by the capacity of the tanker's oil pump; The oil receiving and delivery operation restrictions of the storage tanks in the upstream equipment and / or downstream equipment include at least one of the following: The storage tank cannot perform oil receiving and payment operations at the same time; The oil receiving and disbursement rate of the storage tank is limited by the capacity of the oil pump of the storage tank; The storage tank must be left to stand for at least a reference period of time after receiving the oil before it can be delivered; The inventory of the storage tank is between the corresponding preset tank bottom volume and the preset tank capacity, and is less than the corresponding safety inventory threshold; The storage tank can only store the corresponding storable oil type; and The storage tank can only receive oil from its corresponding upstream equipment and deliver oil to its corresponding downstream equipment; The oil collection and payment operation restrictions of the distillation unit in the downstream equipment include at least one of the following: The distillation unit can only process the corresponding processable oil; The processing capacity of the distillation unit is consistent with its corresponding planned processing capacity; and The distillation apparatus operates continuously and without interruption.

14. The method according to claim 13, characterized in that In the case where the long-distance pipeline stops or slows down the transportation, the following constraints are constructed based on the fact that the storage tank must be stationary for at least the target time after receiving the oil before delivering the oil: Among them, boct s,j is a binary variable. When tank j delivers oil in the sth time slice, boct s,j = 1, when tank j is not delivering oil in the sth time slice, boct s,j =0; thdct s-1,j It indicates the time that storage tank j needs to wait to deliver oil at the end of the s-1th time slice; thdct s,j represents the waiting time for tank j to deliver oil at the end of the sth time slice; THDCT represents the shortest static time after the tank receives oil; tect s,j Indicates the end time of the sth time slice of tank j; tspl s,p Indicates the start time of the sth time slice of the long-distance pipeline p; tepl s,p Indicates the end time of the sth time slice of the long-distance pipeline p; bectpl s,j,p is a binary variable. When the operation of storage tank j before the start of the sth time slice is to receive oil from the long-distance pipeline p, bectpl s,j,p = 1, when the operation of storage tank j before the start of the sth time slice is not to receive oil from the long-distance pipeline p, bectpl s,j,p =0; the scheduling time span is sliced ​​into one or more time slices represented by natural numbers s, s′ or s″, SL is a set of time slices; the long-distance pipeline includes one or more long-distance pipelines represented by natural numbers p; PL represents the set of long-distance pipelines involved in the current crude oil scheduling project; CT represents the set of storage tanks involved in the current crude oil scheduling project.

15. The method according to claim 1, characterized in that The mixed integer programming model includes an objective function, wherein the objective function is constructed based on the optimization target, wherein the optimization target includes at least one of the following: The demurrage duration of the oil tanker among the upstream equipment is the shortest; The inventory cost of storage tanks is the lowest, wherein the storage tanks include plant tanks, transfer tanks and / or dock tanks located in the downstream equipment and / or the upstream equipment; The number of feed switching times of the distillation unit in the downstream equipment is minimal; The distillation unit has the lowest cost for processing crude oil; The number of switching operations of receiving and paying oil in the storage tank is minimal; and The long-distance pipeline has the longest transportation time.

16. A crude oil scheduling and production arrangement device, characterized in that: include: An acquisition module is used to acquire basic data of the crude oil dispatching system including long-distance pipelines; A construction module is used to construct a mixed integer programming model with corresponding constraints through the conversion process of the long-distance pipeline from delayed transmission characteristics to quasi-immediate transmission characteristics; as well as A generation module is used to generate operating parameters of the crude oil scheduling system during crude oil scheduling and production scheduling based on the basic data and the mixed integer programming model according to the optimization target.

17. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 15 is performed.

18. A computer program product having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 15 is performed.

19. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to perform the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Modeling method based on whole oil refinery dispatching discrete time

    CN103984990A

  • Variable-speed scheduling method and system for mixed transportation of crude oil in long-distance pipeline

    CN111156419A

  • Crude oil dispatching optimization method and optimization device thereof

    CN116187545A

  • Linear Programming-based Approach to Scheduling of Crude Oil Operations in Refinery for Energy Efficiency Optimization

    US20170083028A1

Cited By

  • Oil tanker scheduling method and device and chip

    CN122243331A