Resource scheduling data generation method and device, equipment and medium
By constructing a resource scheduling model using a mixed-integer nonlinear programming method, the objective function and constraint equations are automatically solved, which solves the problem of scheduling schemes relying on human experience and achieves efficient and accurate generation of resource scheduling data.
Patent Information
- Application Number
- CN202411101296.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2026-02-13
AI Technical Summary
In existing technologies, the formulation of crude oil dispatch management schemes relies on the experience of dispatchers, resulting in low generation efficiency and difficulty in guaranteeing accuracy.
A resource scheduling model is constructed using a mixed-integer nonlinear programming method. The objective function and constraint equations are automatically solved by a solver to generate resource scheduling data, which guides the formulation of scheduling schemes.
It improves the efficiency and accuracy of resource scheduling scheme generation, ensures that the optimal solution is obtained under various conditions, and reduces errors caused by human factors.
Smart Images

Figure CN121526501A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of resource scheduling, in particular to a method and apparatus for generating resource scheduling data, a device and a medium. BACKGROUND
[0002] Crude oil scheduling management refers to a series of activities of planning, organizing, commanding and controlling the transportation, storage and distribution of crude oil from the production site to the refinery or storage facility. It includes multiple links such as loading, transportation, unloading, storage, blending and delivery to the refinery.
[0003] In related technologies, the formulation of a crude oil scheduling management scheme is often calculated by scheduling personnel through a spreadsheet, and the scheme is formulated through repeated testing.
[0004] However, the above method is highly dependent on the personal experience of the scheduling personnel, and the efficiency of generating the scheduling scheme is low, and the accuracy of the scheduling scheme is difficult to guarantee. SUMMARY
[0005] Embodiments of the present application provide a method and apparatus for generating resource scheduling data, a device and a medium, which can improve the generation efficiency of resource scheduling schemes. The technical solution is as follows:
[0006] On the one hand, a method for generating resource scheduling data is provided, which comprises:
[0007] Obtaining modeling raw data, the modeling raw data including scheduling period data, ship schedule data, tank farm data and pipeline data, the scheduling period data including the start and end time of the resource scheduling process, the ship schedule data including the estimated arrival time of the oil tanker loading resources, the tank farm data including the storage capacity information of the terminal tank and the plant tank storing resources, and the pipeline data including the transportation capacity information of the pipeline transporting resources, the resource scheduling process referring to the process of unloading resources from the oil tanker to the terminal tank, transporting resources from the terminal tank to the plant tank, and transporting resources from the plant tank to the atmospheric and vacuum distillation unit;
[0008] Determining a resource scheduling model based on the modeling raw data, the resource scheduling model being used to generate resource scheduling data, the resource scheduling data being used to simulate the resource scheduling process;
[0009] Solving variables of the resource scheduling model by a solver to obtain the resource scheduling data.
[0010] On the other hand, a device for generating resource scheduling data is provided, which comprises:
[0011] The acquisition module is used to acquire the raw modeling data, which includes scheduling cycle data, shipping schedule data, tank farm data, and pipeline data. The scheduling cycle data includes the start and end times of the resource scheduling process. The shipping schedule data includes the estimated arrival time of the tankers loading resources. The tank farm data includes the storage capacity information of the terminal tanks and plant tanks. The pipeline data includes the transportation capacity information of the pipelines transporting resources. The resource scheduling process refers to the process in which the tankers arrive at the port, unload resources into the terminal tanks, and then the terminal tanks transport the resources to the plant tanks, and finally the plant tanks transport the resources to the atmospheric and vacuum distillation unit.
[0012] The model determination module is used to determine a resource scheduling model based on the original modeling data. The resource scheduling model is used to generate resource scheduling data, and the resource scheduling data is used to simulate the resource scheduling process.
[0013] The solver module is used to solve the resource scheduling model by means of a solver to obtain the resource scheduling data.
[0014] In an optional embodiment, the resource scheduling model includes an objective function and constraint equations;
[0015] The model determination module is further configured to determine an objective function based on the original modeling data. The objective function is used to determine the total cost of the resource scheduling process. The objective function contains multiple variables to be solved. The module also determines constraint equations based on the original modeling data. The constraint equations are used to constrain the relationships and value ranges between the variables in the objective function. The relationships include linear relationships and nonlinear relationships.
[0016] In an optional embodiment, the solving module is further configured to input the objective function and the constraint equations into the solver, and the solver solves the variables in the objective function based on the constraint equations to obtain an output result; and the resource scheduling data is determined based on the output result of the solver, wherein the values of the variables in the output result meet the requirements of the constraint equations.
[0017] In an optional embodiment, the model determination module is further configured to: determine a first expression based on the scheduling cycle data and the shipping schedule data, the first expression representing the cost incurred by the tanker's demurrage; determine a second expression based on the shipping schedule data and the tank farm data, the second expression representing the cost incurred by the tanker unloading; determine a third expression based on the tank farm data and the pipeline data, the third expression representing the cost incurred by the atmospheric and vacuum distillation unit switching to oil intake; determine a fourth expression based on the scheduling cycle data and the tank farm data, the fourth expression representing the cost incurred by the terminal tanks and the plant tank storage resources within the scheduling cycle; and determine the objective function based on the first expression, the second expression, the third expression, and the fourth expression.
[0018] In an optional embodiment, the model determination module is further configured to obtain multiple weight values, including a first weight, a second weight, a third weight, and a fourth weight; determine a first product of the first weight and the first expression, a second product of the second weight and the second expression, a third product of the third weight and the third expression, and a fourth product of the fourth weight and the fourth expression; and determine the objective function based on the sum of the first product, the second product, the third product, and the fourth product.
[0019] In an optional embodiment, after the acquisition module, the apparatus further includes:
[0020] The verification module is used to verify the original modeling data, determine the presence of abnormal data in the original modeling data, remove the abnormal data, and obtain verified original data. The abnormal data includes at least one of duplicate data and data with missing information. The verified original data is then converted to a new format to obtain preprocessed original data.
[0021] The model determination module is also used to determine the resource scheduling model based on the preprocessed raw data.
[0022] In an optional embodiment, after the solving module, the apparatus further includes:
[0023] The scheme determination module is used to determine the resource scheduling scheme based on the resource scheduling data, and the resource scheduling scheme is used to guide the resource scheduling process; and to generate a resource scheduling Gantt chart based on the resource scheduling scheme, and the resource scheduling Gantt chart is used to plan the execution time of multiple tasks in the resource scheduling process.
[0024] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the resource scheduling data generation method as described in any of the above embodiments of this application.
[0025] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the resource scheduling data generation method as described in any of the above embodiments of this application.
[0026] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the resource scheduling data generation method described in any of the above embodiments.
[0027] The beneficial effects of the technical solutions provided in this application include at least the following:
[0028] By constructing a resource scheduling model using mixed-integer nonlinear programming, resource scheduling data can be automatically generated, providing guidance for resource scheduling scheme formulation while minimizing scheduling costs. The model includes an objective function and various constraints, which are automatically solved by a solver. It systematically considers all relevant constraints and objectives, ensuring that the scheduling scheme obtains the optimal solution while satisfying various conditions. Compared to relying on the manual experience of schedulers to obtain resource scheduling data and schemes, this method reduces errors caused by human factors, resulting in more accurate resource scheduling data and schemes, and improving the efficiency of resource scheduling scheme formulation. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a topology diagram of a resource scheduling problem provided by an exemplary embodiment of this application;
[0031] Figure 2This is a schematic diagram of a resource scheduling data generation system provided in an exemplary embodiment of this application;
[0032] Figure 3 This is a flowchart of a method for generating resource scheduling data provided in an exemplary embodiment of this application;
[0033] Figure 4 This is a schematic diagram of a resource scheduling Gantt chart provided in an exemplary embodiment of this application;
[0034] Figure 5 This is a structural block diagram of a resource scheduling data generation apparatus provided in an exemplary embodiment of this application;
[0035] Figure 6 This is a structural block diagram of a resource scheduling data generation apparatus provided in another exemplary embodiment of this application;
[0036] Figure 7 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0038] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0039] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0040] It should be noted that all information and data involved in this application are authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0041] It should be understood that although the terms first, second, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, a first parameter may also be referred to as a second parameter, and similarly, a second parameter may also be referred to as a first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0042] First, a brief introduction to the terms used in the embodiments of this application:
[0043] Gantt chart: A bar chart that displays the project timeline, including the project's various phases, tasks, milestones, and durations. Gantt charts help project managers clearly see the overall project progress and the dependencies between tasks. A Gantt chart typically includes the following elements: (1) Timeline: Represents the start and end times of the project, usually located at the bottom or left of the chart; (2) Task bars: Represent the individual tasks in the project, with the length of each task bar indicating the duration of the task; (3) Task name: The name or description of the task is usually labeled above or below each task bar.
[0044] Mixed Integer Nonlinear Programming (MINLP) is a mathematical optimization method used to solve complex problems involving integer variables and nonlinear relationships. These problems involve objective functions and constraints, where the objective function and / or constraints are nonlinear, and at least one decision variable is restricted to integers.
[0045] An objective function is a mathematical expression representing the quantity that is desired to be optimized. In optimization problems, the goal is usually to find a solution that maximizes (in maximization problems) or minimizes (in minimization problems) the value of the objective function. For example, in a cost minimization problem, the objective function might be an expression for the total cost; in a revenue maximization problem, the objective function might be an expression for the total revenue.
[0046] Constraints are a set of restrictions that define the conditions that a solution must satisfy. These conditions can be equality or inequality, and they limit the range of values that variables can take, ensuring that the solution is feasible in practical applications.
[0047] The resource scheduling model constructed in this application is based on a mixed-integer nonlinear programming method, employing an asynchronous continuous-time modeling approach and including an objective function and various constraint equations. The objective function indicates the total cost required for the resource scheduling process, while the constraint equations constrain the variables involved in multiple stages of the resource scheduling process.
[0048] The asynchronous time approach is reflected in the model's definition of time. Each object (tanker, dock tank, plant tank, atmospheric and vacuum distillation unit) defines the same time period on its own time axis, and each time period is defined by two variables: start time and end time. The different time periods of each object are asynchronous.
[0049] Atmospheric and vacuum distillation unit: also known as atmospheric and vacuum distillation unit, it is a key piece of equipment in oil refineries used for the preliminary processing of crude oil. It mainly includes three processes: crude oil desalting and dehydration, followed by atmospheric and vacuum distillation. The entire atmospheric and vacuum distillation process is the first step in crude oil processing.
[0050] Crude oil dispatch management refers to the process of planning, organizing, directing, and controlling the extraction, transportation, storage, and distribution of crude oil in the oil and gas industry. This is a crucial step in ensuring that crude oil, once extracted from the ground, reaches refineries or markets efficiently, safely, and economically.
[0051] Crude oil dispatching, as the source of refinery production scheduling, occupies a crucial position in the overall refinery scheduling. It not only affects the scheduling plans of downstream units and oil blending plans, but also directly relates to the production stability and economic benefits of refining enterprises. Effective dispatching management can optimize crude oil flow paths, reduce costs during transportation and storage, and improve resource utilization. Therefore, determining a suitable crude oil dispatching management plan has become a major challenge for refining enterprises. This requires not only in-depth research into market demand and supply, but also comprehensive consideration of factors such as crude oil quality, processing costs, and transportation conditions.
[0052] Typically, crude oil dispatching schemes include tanker terminal unloading, terminal-to-processing plant transfer, crude oil blending within the plant, and atmospheric and vacuum distillation. In related technologies, dispatchers use spreadsheets for calculations and develop crude oil dispatching schemes through repeated testing. However, this method heavily relies on the experience and skill of the dispatchers, is time-consuming and labor-intensive, has low efficiency in determining dispatching schemes, and the dispatching results obtained through manual testing cannot guarantee that the scheme is optimal.
[0053] This solution provides a method for generating resource scheduling data. It can construct a resource scheduling model based on mixed integer nonlinear programming. The resource scheduling data generated by the resource scheduling model can be used to generate resource scheduling schemes, thereby obtaining scheduling instructions that meet the needs of resource scheduling business, are executable, and have the lowest operating cost. This helps schedulers to quickly formulate scheduling plans. Compared with the method of schedulers manually determining resource scheduling schemes based on experience, this solution can improve the design efficiency of resource scheduling schemes.
[0054] This application uses crude oil as an example to illustrate the resource allocation process. The resource scheduling model and resource scheduling scheme are both used in the crude oil scheduling management process. The resource scheduling model can be called the crude oil scheduling model, the resource scheduling scheme can be called the crude oil scheduling scheme, and the resource scheduling data can be called the crude oil scheduling data.
[0055] The resource scheduling process involved in the embodiments of this application is described in an illustrative manner. Please refer to [the relevant documentation / reference]. Figure 1 The diagram shows the topology of a resource scheduling problem, involving the following steps.
[0056] 1. After the oil tanker 110 is loaded with resources and sails to port 120, it will unload the resources into the dock tank 130 inside port 120;
[0057] 2. After the resources are loaded into the dock tank 130, they are transported to the plant tank 140 via the long-distance pipeline 140;
[0058] 3. The plant tank 150 transports the resources to the atmospheric and vacuum distillation unit 160, where the resources are processed to obtain resource products for different purposes.
[0059] Secondly, the resource scheduling data generation system involved in the embodiments of this application will be described, for illustrative purposes only. Please refer to [reference needed]. Figure 2 The resource scheduling data generation system 200 involves a terminal 210 and a server 220, which are connected via a communication network 230. A solver is deployed in the server 220.
[0060] Terminal 210 acquires the data required to build the resource scheduling model, verifies and preprocesses the data, and then builds the resource scheduling model (i.e., the MINLP model) based on the preprocessed data. The resource scheduling model contains multiple constraint equations and an objective function. The objective function is used to determine the total cost of the resource scheduling process, and the constraint equations are used to constrain the range of values of multiple variables involved in the resource scheduling process. In other words, the process of building the resource scheduling model can actually be regarded as the process of building a set of functions and equations.
[0061] Terminal 210 sends the objective function and constraint equations to server 220, which solves the equations to obtain resource scheduling data. The resource scheduling data refers to the values of each variable when the objective function is minimized. For example, the resource scheduling data includes scheduling cycle information for tankers, dock tanks, and plant tanks.
[0062] In some embodiments, the above process may also be executed only by terminal 210, that is, a solver may also be deployed inside terminal 210, and the resource scheduling model may be solved directly through the solver after it is constructed; or, the above process may also be executed only by server 220, and this application does not limit this.
[0063] In some embodiments, after the solver solves the model, it outputs the optimization results. The scheduler determines the specific resource scheduling scheme based on the optimization results. The terminal 210 outputs reports, Gantt charts, and tank inventory trend charts based on the resource scheduling scheme, so that the scheduler can monitor and adjust the resource scheduling process in real time based on the charts.
[0064] In summary, this application employs a mixed-integer nonlinear programming method to model a resource scheduling model with the aim of optimizing crude oil dispatching. The resource scheduling model consists of variables, parameters, constraint equations, and an objective function. The data used in the modeling, such as tank farm information (current tank inventory, maximum and minimum values) and shipping schedule information, are all used as parameters in the mathematical model.
[0065] The aforementioned terminal can be various forms of terminal devices such as mobile phones, tablets, desktop computers, portable laptops, smart TVs, vehicle terminals, and smart home devices, and this application embodiment does not limit them.
[0066] It is worth noting that the aforementioned servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0067] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Based on the cloud computing business model, cloud technology encompasses network technology, information technology, integration technology, management platform technology, and application technology. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.
[0068] In some embodiments, the server described above can also be implemented as a node in a blockchain system.
[0069] Based on the above-described terms and application scenarios, the method for generating resource scheduling data provided in this application will be explained. This method can be executed by a server or a terminal, or by both a server and a terminal. In this embodiment, the method is illustrated by being executed by a terminal. Figure 3 As shown, Figure 3 This is a flowchart of a method for generating resource scheduling data according to an exemplary embodiment of this application. The method includes the following steps.
[0070] Step 310: Obtain the original data for modeling.
[0071] The raw data for modeling includes scheduling cycle data, shipping schedule data, tank farm data, and pipeline data.
[0072] The scheduling cycle data includes the start and end times of the resource scheduling process; the shipping schedule data includes the estimated arrival time of tankers carrying resources; the tank farm data includes storage capacity information for terminal tanks and plant tanks; and the pipeline data includes transportation capacity information for pipelines carrying transportation resources.
[0073] The resource scheduling process refers to the process by which oil tankers unload resources into dock tanks upon arrival at the port, the dock tanks transport the resources to plant tanks, and the plant tanks transport the resources to the atmospheric and vacuum distillation unit.
[0074] Optionally, the scheduling cycle data includes the following: (1) the start and end times of the scheduling cycle; (2) the processing volume of each atmospheric and vacuum distillation unit within the scheduling cycle; (3) if each atmospheric and vacuum distillation unit adopts a specific processing scheme, it is also necessary to determine the processing oil type and blending data.
[0075] The shipping schedule data includes the following: (1) the estimated arrival time of all tankers within the scheduling cycle; and (2) the amount and type of resources carried by each tanker.
[0076] The tank farm data includes the following: information on all tanks in the refining and chemical enterprise, such as: dock tanks, plant tanks, commercial storage warehouses, etc.; among which, the storage information of each tank includes: current tank inventory, payable tank quantity, receivable tank quantity, oil type ratio in the tank, oil properties in the tank, whether simultaneous receipt and payment is allowed, etc.
[0077] The pipeline data includes the following: relevant information about the pipelines involved in the resource scheduling process; such as the upper and lower limits of transmission capacity and unit transportation cost of unloading pipelines (from oil tankers to terminal tank farms) and long-distance pipelines (from terminal tank farms to plant tank farms).
[0078] Optionally, the original modeling data also includes some general rules and constraints, mainly referring to variables related to operating costs, such as the unit switching cost of atmospheric and vacuum distillation units, the unit unloading cost of tankers, the lagging cost of tankers, the unit storage cost of tankers, the upper and lower limits of atmospheric and vacuum distillation, and the upper and lower limits of the mixed resource properties of atmospheric and vacuum distillation.
[0079] Step 320: Determine the resource scheduling model based on the original modeling data.
[0080] In some embodiments, after obtaining the original modeling data, the original modeling data is validated to determine if there is abnormal data in the original modeling data, and the abnormal data is removed to obtain validated original data, wherein the abnormal data includes at least one of duplicate data and data with missing information.
[0081] For example, the loading date / load volume was missing from the data recorded for a certain oil tanker loading resources; for the same oil tanker, the loading process on December 1, 2023 was recorded twice, which is a duplicate.
[0082] It is worth noting that, in addition to the two types used in the examples mentioned above, abnormal data can also include other types, such as data that is inconsistent with the actual situation, problems with the data recording format, and manual input errors made by operators when recording data. This embodiment does not limit these types.
[0083] Optionally, the format of the verified raw data is converted to obtain preprocessed raw data; a resource scheduling model is determined based on the preprocessed raw data.
[0084] Among them, the resource scheduling model is used to generate resource scheduling data, and the resource scheduling data is used to simulate the resource scheduling process.
[0085] Resource scheduling data includes the predicted costs of events that may generate costs for each scheduling process, as well as the variable objectives that need to be achieved to control actual costs to match predicted costs.
[0086] Optionally, the resource scheduling model includes an objective function and constraint equations.
[0087] The objective function is determined based on the original modeling data. The objective function is used to determine the total cost of the resource scheduling process and contains a variety of variables to be solved.
[0088] The constraint equations are determined based on the original modeling data. These constraint equations are used to constrain the relationships and ranges of values among the variables in the objective function. These relationships include linear and nonlinear relationships.
[0089] Optionally, a first expression is determined based on scheduling cycle data and shipping schedule data, which represents the cost incurred by tanker demurrage; a second expression is determined based on shipping schedule data and tank farm data, which represents the cost incurred by tanker unloading; a third expression is determined based on tank farm data and pipeline data, which represents the cost incurred by switching oil intake at the atmospheric and vacuum distillation unit; a fourth expression is determined based on scheduling cycle data and tank farm data, which represents the cost incurred by terminal tanks and plant tanks for storing oil during the scheduling cycle; and an objective function is determined based on the first, second, third, and fourth expressions.
[0090] Optionally, multiple weight values are obtained, including a first weight, a second weight, a third weight, and a fourth weight; the first product of the first weight and the first expression, the second product of the second weight and the second expression, the third product of the third weight and the third expression, and the fourth product of the fourth weight and the fourth expression are determined; the objective function is determined based on the sum of the first product, the second product, the third product, and the fourth product.
[0091] For example, this application uses the case where the first weight, second weight, third weight, and fourth weight are all integers of 1 for illustration.
[0092] The objective function is as follows:
[0093]
[0094] Where v refers to oil tanker, and C SEA ∑ v∈V (T vs (v)-T VL (v)) is the first expression, that is, the cost incurred by the tanker's demurrage; C UNLOAD ∑ v∈V (T vf (v)-T vs(v)) is the second expression, that is, the cost incurred by unloading oil from the tanker; c SET (∑ l∈L ∑ n∈N Z co (l,n) is the third expression, which is the cost incurred by switching the oil inlet of the atmospheric and vacuum distillation unit; It is the fourth expression, where, This refers to the cost incurred by the terminal tank storage resources during the scheduling cycle. It is the cost incurred by the storage resources in the code factory area during the scheduling cycle.
[0095] The constraint equations include, but are not limited to, the following:
[0096] 1. Single device time constraint: This constraint restricts the start and end times of different time periods within the device itself. The start time of a time period is earlier than its end time, and the start time of the next time period is later than the end time of the previous time period. The equation is as follows:
[0097]
[0098]
[0099]
[0100]
[0101] 2. Time Constraints for Different Devices: This constraint limits the start and end times of different devices within the same time period when a scheduling event occurs. Taking transfer as an example, when terminal tank i transfers resources to plant tank j within time period n, the start time of plant tank j is earlier than the start time of terminal tank i, and the end time of plant tank j is later than the end time of terminal tank i. Specific settings need to be configured based on operational requirements; the equation is as follows:
[0102]
[0103]
[0104]
[0105]
[0106]
[0107]
[0108] 3. Tanker Mass Balance Constraint: Each tanker may have multiple tanks, each storing different types of resources. This constraint restricts the tanker from completely unloading all resources from each tank and ensures mass balance across tanks over consecutive time periods. Mass balance signifies no material loss; for example, the amount of oil unloaded from the tanker to the terminal tank equals the amount received by the terminal tank, or the amount of oil transferred from the terminal tank equals the amount received by the plant tank, etc. Here, Ip refers to the set of terminal tanks i that can receive crude oil from tank p, as shown in the following equation:
[0109]
[0110]
[0111] 4. Quality balance constraint for dock tanks and plant tanks: This constraint is used to maintain the quality balance of each dock tank and plant tank within a continuous time period. Specifically, the tank inventory at the end of the next time period equals the tank inventory at the end of the previous time period, plus the tank intake volume in the next time period, minus the tank outtake volume. The equation is as follows:
[0112]
[0113]
[0114] 5. Tank capacity constraint, used to ensure that the inventory of tanks in the plant area and docks does not exceed the maximum oil storage capacity and is not lower than the minimum oil storage capacity when transferring resources; the equation is as follows:
[0115]
[0116]
[0117]
[0118]
[0119] 6. The single-oil storage constraint of the tank is given by the following equation:
[0120] X pin (p,i,n)≤1-(B PC (p,c)-(B icn (i,c,n-1)+B icn (i,0,n-1)))
[0121]
[0122]
[0123] B icn (i,c,n)≤(V i (i,n)-V IL (i))
[0124] B icn (i,c,n)≥-(V i (i,n)-V IL (i))
[0125] 7. Flow rate and velocity constraints: These constraints limit the tanker speed to meet the upper and lower limits of pipeline unloading rates, and restrict the transfer speed from terminal tanks to plant tanks to meet the upper and lower limits of long-distance pipeline rates. The equations are as follows:
[0126] B x (p,i,n)≤X pin (p,i,n)×B XU
[0127] B x (p,i,n)≥X pin (p,i,n)×B XL
[0128] B x (p,i,n)≤(T pf (p,n)-T ps (p,n))×F XU
[0129] B x (p,i,n)≥(T pf (p,n)-T ps (p,n))×F XL -B XU ×(1-X pin (p,i,n))
[0130] Where V, L, N, and J represent the tanker set, atmospheric and vacuum distillation unit set, asynchronous time period set, and plant tank set, respectively; P represents the oil tank set, and I represents the terminal tank set. V, L, and J are derived from the actual conditions and data of the refinery, while N is a user-defined parameter used in modeling. The symbols used in the above constraint equations and objective function are defined as follows:
[0131] C SEA Tanker waiting cost per unit time;
[0132] C UNLOAD Cost of unloading oil from a tanker per unit time;
[0133] C SET Cost of switching feed tanks for atmospheric and vacuum distillation units;
[0134] C INV_I Cost of storage in dock tanks per unit time;
[0135] C INV_J: Cost of tank storage per unit time in the plant area;
[0136] T vs (v): Time when the tanker begins unloading oil;
[0137] T vf (v): Time for tanker to complete unloading;
[0138] T VL (v): Tanker arrival time;
[0139] Z co (l,n): Number of times the atmospheric and vacuum distillation unit switches feed tanks; l refers to the atmospheric and vacuum distillation unit;
[0140] V p (p,n): The amount of resources in oil tank p at the end of the nth time period; the time period n is the number of asynchronous time periods defined by the user, that is, the number of time periods that each object can define on its own time axis. Generally, the longer the scheduling period, the more operations are performed within the period.
[0141] V i (i,n): The inventory of dock tank i at the end of the nth time period;
[0142] V j (j,n): The inventory of tank j in the plant area at the end of the nth time period;
[0143] V P0 (p): The initial oil load of oil tank p;
[0144] V I0 (i): Initial inventory of dock tank i;
[0145] V J0 (j): Initial inventory of tank j in the plant area;
[0146] NN: Number of time periods in the model;
[0147] H: Scheduling period; specifically, the length of the scheduling period. For example, if the scheduling period is set to 7 days, then H = 168 (in hours).
[0148] T ps (p,n): The start time of the nth time interval in oil tank p;
[0149] T pf (p,n): The end time of the nth time interval in oil tank p;
[0150] T is (i,n),T if (i,n): The start and end times of the nth time interval for dock tank i;
[0151] T js(j,n),T jf (j,n): The start and end times of the nth time period for tank j in the plant area;
[0152] T ls (l,n),T lf (l,n): Start and end times of the nth time period of the atmospheric and vacuum distillation unit l;
[0153] B XL B XU Minimum and maximum amount of resource unloading operations;
[0154] F XL F XU Minimum and maximum rates for resource unloading operations;
[0155] X pin (p,i,n): Whether oil tank p unloads oil to terminal tank i in the nth time period; a binary variable, with a value of 0 or 1;
[0156] Y ijn (i,j,n): Whether the terminal tank i transfers to the plant tank j in the nth time period; a binary variable, with a value of 0 or 1;
[0157] Z jln (j,l,n): Whether tank j in the plant supplies oil to the atmospheric and vacuum distillation unit l in the nth time period; a binary variable, with a value of 0 or 1;
[0158] B x (p,i,n): The amount of resources unloaded from oil tank p to dock tank i in the nth time period;
[0159] B y (i,j,n): The amount of resources transferred from dock tank i to plant tank j in the nth time period;
[0160] B z (j,l,n): The amount of resources that tank j in the plant area supplies to atmospheric and vacuum distillation unit l in the nth time period;
[0161] V IL (i), V IU (i): Minimum and maximum oil storage capacity of terminal tank i;
[0162] V JL (j), V JU (j): Minimum and maximum oil storage capacity of tank j in the plant area;
[0163] B PC (p,c): Whether oil tank p stores oil type c;
[0164] B icn (i,c,n): Whether tank i at the terminal has stored oil type c at the end of the nth time period;
[0165] M: A large number, which can be set to 10. 6 .
[0166] Step 330: Solve the variables of the resource scheduling model using a solver to obtain resource scheduling data.
[0167] The objective function and constraint equations are input into the solver. The solver solves for the variables in the objective function based on the constraint equations, and obtains the output results. Resource scheduling data is determined based on the solver's output results, where the values of the variables in the output results meet the requirements of the constraint equations.
[0168] A solver is a specially designed algorithm or software tool used to solve specific mathematical or optimization problems. It finds one or more solutions to a problem by applying mathematical models and computational methods. For example, in this embodiment, the solver solves for the objective function using constraint equations, obtaining a set of data that minimizes the objective function (i.e., the total cost incurred during resource scheduling) and satisfies the constraints of the constraint equations; this data is the resource scheduling data.
[0169] Optionally, after obtaining resource scheduling data, a resource scheduling scheme is determined based on the resource scheduling data, and the resource scheduling scheme is used to guide the resource scheduling process.
[0170] For example, a resource scheduling Gantt chart is generated based on the resource scheduling scheme. The resource scheduling Gantt chart is used to plan the execution time of multiple tasks during the resource scheduling process.
[0171] like Figure 4 As shown, Figure 4 This is a schematic diagram of a resource scheduling Gantt chart. Gantt chart 400 displays information about the events executed by each device on different dates during the resource scheduling process. Figure 4 In this context, the resource scheduling process actually refers to the crude oil scheduling process.
[0172] The crude oil dispatch process started on December 15, 2023, and ended on December 23, 2023, meaning the process lasted for 9 days.
[0173] The process involves multiple dock tanks, in-plant tanks, and atmospheric and vacuum distillation units, as follows: dock tank 0302-TK-0204, dock tank 0303-TK-0303, dock tank 0305-TK-0502, dock tank 0305-TK-0504, in-plant tank 5101-TK-1104, in-plant tank 5102-TK-1203, in-plant tank 5103-TK-1304, in-plant tank 5104-TK-1401, in-plant tank 5104-TK-1403, in-plant tank 5104-TK-1404, in-plant tank 5106-TK-1501, in-plant tank 5106-TK-1502, in-plant tank 5106-TK-1503, atmospheric and vacuum distillation unit CDU1, and atmospheric and vacuum distillation unit CDU2.
[0174] Each device corresponds to different events, including: (1) Transfer event 410: crude oil is transferred from the dock tank to the plant tank; (2) Oil inlet event 420: crude oil is unloaded from the tanker to the dock tank; (3) Plant delivery event 430: oil is delivered from the plant tank to the atmospheric and vacuum distillation unit, that is, crude oil is delivered to the processing unit.
[0175] Taking December 15, 2023 as an example, the crude oil transportation arrangements for each unit in Gantt Chart 400 are explained. First, terminal tank 0302-TK-0204 executes oil intake event 420, receiving crude oil unloaded from the tanker and transferring it to terminal tank 0303-TK-0303. Terminal tank 0303-TK-0303 then executes transfer event 410. Terminal tank 0305-TK-0504 executes oil intake event 420, and plant tank 5104-TK-1401 executes transfer event 430. Plant tanks 5101-TK-1104, 5103-TK-1304, 5106-TK-1501, 5106-TK-1502, 5106-TK-1503, atmospheric and vacuum distillation unit CDU1, and atmospheric and vacuum distillation unit CDU2 execute plant oil delivery event 430 to realize the process of transporting crude oil to the processing unit.
[0176] In summary, the resource scheduling data generation method provided in this application constructs a resource scheduling model using a mixed-integer nonlinear programming method. This method can automatically generate resource scheduling data, providing guidance for the resource scheduling scheme formulation process while minimizing scheduling costs. The model includes an objective function and various constraints, which are automatically solved by a solver. It systematically considers all relevant constraints and objectives, ensuring that the scheduling scheme obtains the optimal solution while satisfying various conditions. Compared to relying on the manual experience of schedulers to obtain resource scheduling data and schemes, this method reduces errors caused by human factors, resulting in more accurate generated resource scheduling data and schemes, and improving the efficiency of resource scheduling scheme formulation.
[0177] Figure 5 This is a structural block diagram of a resource scheduling data generation apparatus provided in an exemplary embodiment of this application, such as... Figure 5 As shown, the device includes the following parts.
[0178] The acquisition module 510 is used to acquire the original modeling data. The original modeling data includes scheduling cycle data, shipping schedule data, tank farm data, and pipeline data. The scheduling cycle data includes the start and end times of the resource scheduling process. The shipping schedule data includes the estimated arrival time of the tanker loading resources. The tank farm data includes the storage capacity information of the terminal tanks and plant tanks storing resources. The pipeline data includes the transportation capacity information of the pipelines transporting resources. The resource scheduling process refers to the process in which the tanker arrives at the port, unloads resources into the terminal tanks, the terminal tanks transport the resources to the plant tanks, and the plant tanks transport the resources to the atmospheric and vacuum distillation unit.
[0179] The model determination module 520 is used to determine a resource scheduling model based on the original modeling data. The resource scheduling model is used to generate resource scheduling data, and the resource scheduling data is used to simulate the resource scheduling process.
[0180] The solver module 530 is used to solve the resource scheduling model by means of a solver to obtain the resource scheduling data.
[0181] In an optional embodiment, the resource scheduling model includes an objective function and constraint equations;
[0182] The model determination module 520 is further configured to determine an objective function based on the original modeling data, the objective function being used to determine the total cost of the resource scheduling process, the objective function containing multiple variables to be solved; and to determine constraint equations based on the original modeling data, the constraint equations being used to constrain the range of values of the variables in the objective function.
[0183] In an optional embodiment, the solving module 530 is further configured to input the objective function and the constraint equations into the solver, and the solver solves the variables in the objective function based on the constraint equations to obtain an output result; and the resource scheduling data is determined based on the output result of the solver, wherein the values of the variables in the output result meet the requirements of the constraint equations.
[0184] In an optional embodiment, the model determination module 520 is further configured to: determine a first expression based on the scheduling cycle data and the shipping schedule data, the first expression representing the cost incurred by the tanker's demurrage; determine a second expression based on the shipping schedule data and the tank farm data, the second expression representing the cost incurred by the tanker unloading oil; determine a third expression based on the tank farm data and the pipeline data, the third expression representing the cost incurred by the atmospheric and vacuum distillation unit switching to oil intake; determine a fourth expression based on the scheduling cycle data and the tank farm data, the fourth expression representing the cost incurred by the terminal tanks and the plant tank storage resources within the scheduling cycle; and determine the objective function based on the first expression, the second expression, the third expression, and the fourth expression.
[0185] In an optional embodiment, the model determination module 520 is further configured to acquire multiple weight values, including a first weight, a second weight, a third weight, and a fourth weight; determine a first product of the first weight and the first expression, a second product of the second weight and the second expression, a third product of the third weight and the third expression, and a fourth product of the fourth weight and the fourth expression; and determine the objective function based on the sum of the first product, the second product, the third product, and the fourth product.
[0186] In an optional embodiment, after the acquisition module 510, as follows: Figure 6 As shown, the device further includes:
[0187] The verification module 540 is used to verify the original modeling data, determine the presence of abnormal data in the original modeling data, remove the abnormal data, and obtain verified original data. The abnormal data includes at least one of duplicate data and data with missing information. The verified original data is then converted to a new format to obtain preprocessed original data.
[0188] The model determination module 520 is also used to determine the resource scheduling model based on the preprocessed raw data.
[0189] In an optional embodiment, after the solver module 530, the apparatus further includes:
[0190] The scheme determination module 550 is used to determine the resource scheduling scheme based on the resource scheduling data, the resource scheduling scheme being used to guide the resource scheduling process; and to generate a resource scheduling Gantt chart based on the resource scheduling scheme, the resource scheduling Gantt chart being used to plan the execution time of multiple tasks in the resource scheduling process.
[0191] In summary, the resource scheduling data generation device provided in this application can construct a resource scheduling model using a mixed-integer nonlinear programming method, automatically generate resource scheduling data, and provide guidance for the resource scheduling scheme formulation process while minimizing scheduling costs. The model includes an objective function and various constraints, which are automatically solved by a solver. It systematically considers all relevant constraints and objectives, ensuring that the scheduling scheme obtains the optimal solution while satisfying various conditions. Compared to relying on the manual experience of schedulers to obtain resource scheduling data and schemes, this method reduces errors caused by human factors, resulting in more accurate generated resource scheduling data and schemes, and improving the efficiency of resource scheduling scheme formulation.
[0192] It should be noted that the resource scheduling data generation device provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the resource scheduling data generation device and the resource scheduling data generation method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0193] Figure 7 This illustration shows a structural block diagram of a computer device 700 provided in an exemplary embodiment of this application. The computer device 700 may be a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The computer device 700 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.
[0194] Typically, computer device 700 includes a processor 701 and a memory 702.
[0195] Processor 701 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 701 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 701 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 701 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 701 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0196] The memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 702 is used to store at least one instruction, which is executed by the processor 701 to implement the resource scheduling data generation method provided in the method embodiments of this application.
[0197] In some embodiments, the computer device 700 also includes other components, as those skilled in the art will understand. Figure 7 The structure shown does not constitute a limitation on the computer device 700, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0198] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The sequence numbers of the embodiments in this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0199] This application also provides a computer device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the resource scheduling data generation method as described in any of the above embodiments of this application.
[0200] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the resource scheduling data generation method as described in any of the above embodiments of this application.
[0201] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the resource scheduling data generation methods described in the above embodiments.
[0202] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0203] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for generating resource scheduling data, characterized in that, The method includes: Obtain the raw modeling data, which includes scheduling cycle data, shipping schedule data, tank farm data, and pipeline data. The scheduling cycle data includes the start and end times of the resource scheduling process. The shipping schedule data includes the estimated arrival time of the tanker carrying the resources. The tank farm data includes the storage capacity information of the terminal tanks and plant tanks. The pipeline data includes the transportation capacity information of the pipelines transporting the resources. The resource scheduling process refers to the process by which the tanker arrives at the port, unloads the resources into the terminal tanks, and then the terminal tanks transport the resources to the plant tanks, and finally the plant tanks transport the resources to the atmospheric and vacuum distillation unit. Based on the original modeling data, a resource scheduling model is determined. The resource scheduling model is used to generate resource scheduling data, and the resource scheduling data is used to simulate the resource scheduling process. The resource scheduling model is solved by a solver to obtain the resource scheduling data.
2. The method according to claim 1, characterized in that, The resource scheduling model includes an objective function and constraint equations; The process of determining the resource scheduling model based on the original modeling data includes: Based on the original modeling data, an objective function is determined. The objective function is used to determine the total cost of the resource scheduling process. The objective function contains multiple variables to be solved. Based on the original modeling data, constraint equations are determined. These constraint equations are used to constrain the relationships and value ranges among the variables in the objective function. The relationships include linear and nonlinear relationships.
3. The method according to claim 2, characterized in that, The step of solving the resource scheduling model using a solver to obtain the resource scheduling data includes: The objective function and the constraint equations are input into the solver, which solves for the variables in the objective function based on the constraint equations to obtain the output result. The resource scheduling data is determined based on the output of the solver, wherein the values of the variables in the output conform to the requirements of the constraint equations.
4. The method according to claim 2, characterized in that, The process of determining the objective function based on the original modeling data includes: A first expression is determined based on the scheduling cycle data and the shipping schedule data. The first expression is used to represent the cost incurred by the tanker's demurrage. A second expression is determined based on the shipping schedule data and the tank farm data. The second expression is used to represent the cost incurred by unloading oil from the tanker. A third expression is determined based on the tank farm data and the pipeline data. The third expression is used to represent the cost incurred by the atmospheric and vacuum distillation unit when switching oil inlet. A fourth expression is determined based on the scheduling cycle data and the tank area data. The fourth expression is used to represent the cost incurred by the storage resources of the terminal tanks and the plant tanks during the scheduling cycle. The objective function is determined based on the first expression, the second expression, the third expression, and the fourth expression.
5. The method according to claim 4, characterized in that, Determining the target function based on the first expression, the second expression, the third expression, and the fourth expression includes: Obtain multiple weight values, including a first weight, a second weight, a third weight, and a fourth weight; Determine the first product of the first weight and the first expression, the second product of the second weight and the second expression, the third product of the third weight and the third expression, and the fourth product of the fourth weight and the fourth expression; The objective function is determined based on the sum of the first product, the second product, the third product, and the fourth product.
6. The method according to any one of claims 1 to 5, characterized in that, After obtaining the original data for modeling, the process also includes: The original modeling data is validated to determine if there is any abnormal data in the original modeling data, and the abnormal data is removed to obtain the validated original data. The abnormal data includes at least one of duplicate data and data with missing information. The verified raw data is format-converted to obtain preprocessed raw data; The process of determining the resource scheduling model based on the original modeling data includes: The resource scheduling model is determined based on the preprocessed raw data.
7. The method according to any one of claims 1 to 5, characterized in that, After obtaining the resource scheduling data by solving the resource scheduling model using a solver, the process further includes: The resource scheduling scheme is determined based on the resource scheduling data, and the resource scheduling scheme is used to guide the resource scheduling process. A resource scheduling Gantt chart is generated based on the resource scheduling scheme. The resource scheduling Gantt chart is used to plan the execution time of multiple tasks during the resource scheduling process.
8. A device for generating resource scheduling data, characterized in that, The device includes: The acquisition module is used to acquire the raw modeling data, which includes scheduling cycle data, shipping schedule data, tank farm data, and pipeline data. The scheduling cycle data includes the start and end times of the resource scheduling process. The shipping schedule data includes the estimated arrival time of the tankers loading resources. The tank farm data includes the storage capacity information of the terminal tanks and plant tanks. The pipeline data includes the transportation capacity information of the pipelines transporting resources. The resource scheduling process refers to the process in which the tankers arrive at the port, unload resources into the terminal tanks, and then the terminal tanks transport the resources to the plant tanks, and finally the plant tanks transport the resources to the atmospheric and vacuum distillation unit. The model determination module is used to determine a resource scheduling model based on the original modeling data. The resource scheduling model is used to generate resource scheduling data, and the resource scheduling data is used to simulate the resource scheduling process. The solver module is used to solve the resource scheduling model by means of a solver to obtain the resource scheduling data.
9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the resource scheduling data generation method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The storage medium stores at least one program segment, which is loaded and executed by a processor to implement the resource scheduling data generation method as described in any one of claims 1 to 6.