Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a refinery berth scheduling method based on a hierarchical constraint condition, which comprises the following steps:
acquiring preset layered constraint conditions, wherein the layered constraint conditions comprise a first constraint condition used for determining a berth matched with a tanker and a second constraint condition used for determining a berthing sequence of the tanker in the same berth;
establishing an objective function by taking the minimum total delay cost as a target;
acquiring oil tanker data and berth data, inputting the oil tanker data and the berth data into an objective function, and solving the objective function under the hierarchical constraint condition to obtain a berth scheduling result.
Optionally, the first constraint condition includes:
the length of the tanker does not exceed the maximum accommodation length of the berth, and the width of the tanker does not exceed the maximum accommodation width of the berth;
the draft of the tanker does not exceed the expected draft of the berth;
the loading capacity of the tanker does not exceed the maximum loading capacity of the berth;
the oil seeds loaded on the oil tanker are the oil seeds which are allowed to operate in the berth;
the waiting time of the tanker does not exceed the preset time.
Optionally, the second constraint condition includes:
acquiring the data of the oil tanker distributed to the same berth, wherein the data comprises the oil grade, the delay charge coefficient, the loading capacity and the estimated arrival time of the oil tanker;
if the oil product grade is higher than the preset grade, determining the mooring sequence of the oil tanker according to the sequence from high to low of the oil product grade within the allowable waiting time range of the oil tanker, and if the oil product grade is not higher than the preset grade, judging whether the estimated arrival time of the oil tanker conflicts with other oil tankers;
and if the conflict exists, weighting and summing the delay charge coefficient and the loading capacity based on the preset weight, determining the mooring sequence of the oil tanker with the conflict according to the sequence from high to low of the summed value, and if the conflict does not exist, determining the mooring sequence of the oil tanker according to the sequence from small to large of the loading capacity.
Optionally, the establishing an objective function with the minimum total hysteresis cost as a target includes:
establishing a target function totalmeurage based on a formula I;
wherein totalmeurage represents the minimum value of the total lag, ship, waitiIndicating the waiting time, ship, of tanker iiThe free working time of the tanker i is represented, the ship _ demurrage represents the lag cost coefficient of the tanker, and m is the total number of the tankers; totalmeurage, ship, waiti、ship,freehouriThe value range of the ship _ demarreage is positive number, and the value range of the m is positive integer.
Optionally, the obtaining of the tanker data and the berth data, inputting the tanker data and the berth data into an objective function, and solving the objective function under a hierarchical constraint condition to obtain a berth scheduling result includes:
acquiring oil tanker data of a predicted arrival port oil tanker and berth data of a refinery port;
inputting the oil tanker data and the berth data into an objective function, solving the minimum value of the objective function on the premise of meeting the hierarchical constraint condition, and obtaining a berth scheduling result through the solving result;
and outputting a berth scheduling result in a Gantt chart form, wherein the berth scheduling result comprises a berth number, the starting operation time of the oil tanker at the berth and the berthing time.
Optionally, the refinery berth scheduling method further includes an optimization process of the berth scheduling result, specifically including:
and acquiring weather data and tide height data in real time, delaying the operation starting time of the oil tanker influenced by weather and tide, updating the berth scheduling result, and determining the delayed time length according to the weather data and the tide height data.
The invention also provides a refinery berth scheduling device based on the layered constraint condition based on the same idea, which comprises the following components:
a restraint unit: the method comprises the steps of acquiring preset hierarchical constraint conditions, wherein the hierarchical constraint conditions comprise a first constraint condition for determining a berth matched with a tanker and a second constraint condition for determining a berthing sequence of the tanker in the same berth;
a modeling unit: the method comprises the steps of establishing an objective function by taking the minimum total delay cost as a target;
a scheduling unit: the method is used for acquiring the oil tanker data and the berth data, inputting the oil tanker data and the berth data into an objective function, and solving the objective function under the hierarchical constraint condition to obtain a berth scheduling result.
Optionally, the constraint unit is configured to determine a first constraint condition, and includes:
the length of the tanker does not exceed the maximum accommodation length of the berth, and the width of the tanker does not exceed the maximum accommodation width of the berth;
the draft of the tanker does not exceed the expected draft of the berth;
the loading capacity of the tanker does not exceed the maximum loading capacity of the berth;
the oil seeds loaded on the oil tanker are the oil seeds which are allowed to operate in the berth;
the waiting time of the tanker does not exceed the preset time.
Optionally, the constraint unit is further configured to determine a second constraint condition, including:
acquiring the data of the oil tanker distributed to the same berth, wherein the data comprises the oil grade, the delay charge coefficient, the loading capacity and the estimated arrival time of the oil tanker;
if the oil product grade is higher than the preset grade, determining the mooring sequence of the oil tanker according to the sequence from high to low of the oil product grade within the allowable waiting time range of the oil tanker, and if the oil product grade is not higher than the preset grade, judging whether the estimated arrival time of the oil tanker conflicts with other oil tankers;
and if the conflict exists, weighting and summing the delay charge coefficient and the loading capacity based on the preset weight, determining the mooring sequence of the oil tanker with the conflict according to the sequence from high to low of the summed value, and if the conflict does not exist, determining the mooring sequence of the oil tanker according to the sequence from small to large of the loading capacity.
Optionally, the scheduling unit is specifically configured to:
acquiring oil tanker data of a predicted arrival port oil tanker and berth data of a refinery port;
inputting the oil tanker data and the berth data into an objective function, solving the minimum value of the objective function on the premise of meeting the hierarchical constraint condition, and obtaining a berth scheduling result through the solving result;
and outputting a berth scheduling result in a Gantt chart form, wherein the berth scheduling result comprises a berth number, the starting operation time of the oil tanker at the berth and the berthing time.
The technical scheme provided by the invention has the beneficial effects that:
compared with the traditional method for carrying out berth scheduling only from the perspective of the lag time fee, the berth scheduling method provided by the invention does not take the benefits of a berth scheduling system as a unique optimization point, so that the required oil product can be provided according to the actual requirements of a refinery on the premise of ensuring the minimum total lag time fee as far as possible. The priority in the invention is a hierarchical priority, the scientificity of the berth scheduling sequence can be improved by setting the first-level priority and the second-level priority, the production requirement of a refinery is further met, meanwhile, the optimal berth scheduling result is obtained by combining the oil tanker and the berth matching rule, and the influence of subjective factors is overcome to the maximum extent. In addition, the technical scheme provided by the invention displays the berthing scheduling result in a Gantt chart mode, and can more intuitively display the berthing condition of the tanker in a period of time in the future.
Detailed Description
To make the structure and advantages of the present invention clearer, the structure of the present invention will be further described with reference to the accompanying drawings.
As shown in fig. 1, the present invention provides a refinery berth scheduling method based on hierarchical constraint conditions, including:
s100: and acquiring preset hierarchical constraint conditions, wherein the hierarchical constraint conditions comprise a first constraint condition for determining the berth matched with the tanker and a second constraint condition for determining the berthing sequence of the tanker in the same berth.
The hierarchical constraint conditions comprise a first constraint condition and a second constraint condition, when the oil tanker is subjected to berth scheduling, a proper berth is allocated to each oil tanker arriving at the port according to the first constraint condition, and then the berthing sequence of the oil tanker in the same berth is determined according to the second constraint condition.
The first constraint includes:
(1) and (3) space constraint: the length of the tanker does not exceed the maximum accommodation length of the berth, and the width of the tanker does not exceed the maximum accommodation width of the berth;
(2) draft depth restraint: the draft of the tanker does not exceed the expected draft of the berth;
(3) and (3) load capacity constraint: the loading capacity of the tanker does not exceed the maximum loading capacity of the berth;
(4) oil seed restraint: the oil seeds loaded on the oil tanker are the oil seeds which are allowed to operate in the berth;
(5) and (3) latency constraint: the waiting time of the oil tanker does not exceed the preset time;
in addition to this, it is necessary to ensure that each tanker must be and can only be serviced once, namely:
wherein x isijIndicating whether the ith tanker is assigned to the jth berth, xijThe value range of (1) is 0 or 1, and a value of 0 indicates that the signal is not assigned to the jth parking space, and a value of 1 indicates that the signal is assigned to the jth parking space. m represents the total number of tanker ships, n represents the total number of berths; the value ranges of m, n, i and j are all positive integers.
The second constraint includes:
(1) the oil grade is set according to the production requirement and the inventory condition of the refinery, and the lower the inventory of oil required by the refinery production, the higher the oil grade.
(2) If the oil product grade is higher than the preset grade, determining the mooring sequence of the oil tanker according to the sequence from high to low of the oil product grade within the allowable waiting time range of the oil tanker, and if the oil product grade is not higher than the preset grade, judging whether the estimated arrival time of the oil tanker conflicts with other oil tankers;
(3) and if the conflict exists, weighting and summing the delay charge coefficient and the loading capacity based on the preset weight, determining the mooring sequence of the oil tanker with the conflict according to the sequence from high to low of the summed value, and if the conflict does not exist, determining the mooring sequence of the oil tanker according to the sequence from small to large of the loading capacity.
The berth scheduling method is divided into two stages by using the layering constraint condition, so that the sequential berth scheduling is facilitated, the requirement of the oil tanker on the berth is met, and the production requirement of a refinery plant is met as far as possible. The berth is preferentially distributed to the oil tanker loading the specified oil products according to the level of the oil product grade, the required oil products can be timely unloaded, the production progress of a refinery cannot be influenced due to unreasonable scheduling of the berth, and meanwhile, the berth is distributed to the oil tanker loading the oil products with the lower grade according to the loading capacity and the delay cost coefficient by combining the estimated arrival time due to the fact that the oil product with the lower grade of the refinery is not high in demand degree. The method and the device realize simultaneous consideration of the lag time and the oil product condition, timely allocate the berth according to the production requirement of the refinery, and improve the rationality and scientificity of berth scheduling.
S200: and establishing an objective function by taking the minimum total delay cost as a target.
The method is the same as the traditional berth scheduling method, and the implementation also establishes an objective function by taking the minimum total delay cost as a target, so that the berthing cost of the oil tanker is reduced to the maximum extent. The late fee is a certain penalty paid to the ship side for the time exceeding the time, because the ship renter does not finish the loading and unloading operation within the specified loading and unloading period, so that economic loss is caused to the ship side. The method for calculating the delay fee comprises the following steps: and calculating the difference between the waiting time of the oil tanker and the free working time length, wherein the product of the absolute value of the difference and the delay charge coefficient of the oil tanker is the delay charge of the oil tanker. The method specifically comprises the following steps:
an objective function totalmeurage is established based on the formula one,
wherein totalmeurage represents the minimum value of the total lag, ship, waitiIndicating the waiting time, ship, of tanker iiThe free working time of the tanker i is represented, the ship _ demurrage represents the lag cost coefficient of the tanker, and m is the total number of the tankers; totalmeurage, ship, waiti、ship,freehouriThe value range of the ship _ demarreage is positive number, and the value range of the m is positive integer.
Ship, freehour in formula IiBoth the variable ship _ demurrage and the variable ship _ demurrage can be obtained from the tanker dataiCan be calculated based on the estimated time to port in the tanker data. In this embodiment, the minimum time of the objective function, ship, wait, is solvediDetermining a berthage scheduling result.
S300: acquiring oil tanker data and berth data, inputting the oil tanker data and the berth data into an objective function, and solving the objective function under the hierarchical constraint condition to obtain a berth scheduling result.
Acquiring the data of the oil tanker expected to arrive at the port oil tanker and the berth data of the refinery port. The tanker data includes oil grade, lag time coefficient and loading capacity, and also includes tanker code, estimated arrival time, crude oil loading and unloading rate, free working time, tanker width, tanker length and tanker draft. The berth data includes a set of berthable tanker codes, a maximum containment length, a maximum containment width, a projected draft, a maximum payload, a berth-allowable operating oil seed, and historical tide level information.
Inputting the oil tanker data and the berth data into an objective function, and solving the objective function as the minimum time variable ship, wait on the premise of meeting the hierarchical constraint conditioniAccording to the value of ship, waitiThe value of the position number is combined with the estimated arrival time in the oil tanker data to obtain the starting operation time of the oil tanker in the position scheduling result, the berthing time in the position scheduling result is obtained according to the ratio of the loading capacity to the loading and unloading rate of the crude oil, and the position number in the position scheduling result is obtained according to the corresponding position distribution condition when the objective function is the minimum value.
Finally, as shown in fig. 2, the result of the berthage scheduling is output in the form of a gantt chart. The display content of the gantt chart includes a berth number, the starting operation time of the tanker at the berth, and the berthing time. Wherein, the 'berth _ 001' and the 'berth _ 002' respectively represent two berths with berth numbers of 1 and 2, a time axis for representing the date is arranged above the Gantt chart, and the 'A', the 'B', the 'C' and the 'D' all represent the number of the oil tanker parked in the corresponding time period and the loaded oil product. And acquiring the starting operation time and the mooring time of the oil tanker at the berth according to the corresponding relation between the length of the square in the figure and the time axis.
The Gantt chart can visually display the starting operation time, the operation duration, the waiting time, the planned departure time and the planned berthing of the oil tanker, and output the delay cost and the total delay cost of each ship, so that a dispatcher can conveniently check the berthing dispatching result in time, and the manual adjustment is facilitated.
Since the berthing port is often influenced by typhoon and tidal changes, which may cause the possibility that some affected oil tankers may delay arriving at the port, the embodiment further includes an optimization process of the berthing scheduling result, specifically including:
and acquiring weather data and tide height data in real time, delaying the operation starting time of the oil tanker influenced by weather and tide, updating the berth scheduling result, and determining the delayed time length according to the weather data and the tide height data. For example, under the influence of typhoon, the estimated arrival time of the oil tanker is delayed and adjusted for 1 day, and the adjusted estimated arrival time is input into the berth scheduling model for scheduling again, so that the optimized berth scheduling result is obtained.
By the process, optimization processing can be realized according to weather and tide reasons, and the berth scheduling result can adapt to more application scenes.
Example two
As shown in fig. 3, the present invention provides a refinery berth scheduling apparatus 4 based on hierarchical constraint conditions, comprising:
the restricting unit 41: the method comprises the steps of obtaining preset hierarchical constraint conditions, wherein the hierarchical constraint conditions comprise a first constraint condition used for determining the berth matched with the tanker and a second constraint condition used for determining the berthing sequence of the tanker in the same berth.
The hierarchical constraint conditions comprise a first constraint condition and a second constraint condition, when the oil tanker is subjected to berth scheduling, a proper berth is allocated to each oil tanker arriving at the port according to the first constraint condition, and then the berthing sequence of the oil tanker in the same berth is determined according to the second constraint condition.
The constraint unit 41 is configured to determine a first constraint, where the first constraint includes:
(1) and (3) space constraint: the length of the tanker does not exceed the maximum accommodation length of the berth, and the width of the tanker does not exceed the maximum accommodation width of the berth;
(2) draft depth restraint: the draft of the tanker does not exceed the expected draft of the berth;
(3) and (3) load capacity constraint: the loading capacity of the tanker does not exceed the maximum loading capacity of the berth;
(4) oil seed restraint: the oil seeds loaded on the oil tanker are the oil seeds which are allowed to operate in the berth;
(5) and (3) latency constraint: the waiting time of the oil tanker does not exceed the preset time;
in addition to this, it is necessary to ensure that each tanker must be and can only be serviced once, namely:
wherein x isijIndicating whether the ith tanker is assigned to the jth berth, xijThe value range of (1) is 0 or 1, and a value of 0 indicates that the signal is not assigned to the jth parking space, and a value of 1 indicates that the signal is assigned to the jth parking space. m represents the total number of tanker ships, n represents the total number of berths; the value ranges of m, n, i and j are all positive integers.
The constraint unit 41 is further configured to determine a second constraint, where the second constraint includes:
(1) the oil grade is set according to the production requirement and the inventory condition of the refinery, and the lower the inventory of oil required by the refinery production, the higher the oil grade.
(2) If the oil product grade is higher than the preset grade, determining the mooring sequence of the oil tanker according to the sequence from high to low of the oil product grade within the allowable waiting time range of the oil tanker, and if the oil product grade is not higher than the preset grade, judging whether the estimated arrival time of the oil tanker conflicts with other oil tankers;
(3) and if the conflict exists, weighting and summing the delay charge coefficient and the loading capacity based on the preset weight, determining the mooring sequence of the oil tanker with the conflict according to the sequence from high to low of the summed value, and if the conflict does not exist, determining the mooring sequence of the oil tanker according to the sequence from small to large of the loading capacity.
The berth scheduling method is divided into two stages by using the layering constraint condition, so that the sequential berth scheduling is facilitated, the requirement of the oil tanker on the berth is met, and the production requirement of a refinery plant is met as far as possible. The berth is preferentially distributed to the oil tanker loading the specified oil products according to the level of the oil product grade, the required oil products can be timely unloaded, the production progress of a refinery cannot be influenced due to unreasonable scheduling of the berth, and meanwhile, the berth is distributed to the oil tanker loading the oil products with the lower grade according to the loading capacity and the delay cost coefficient by combining the estimated arrival time due to the fact that the oil product with the lower grade of the refinery is not high in demand degree. The method and the device realize simultaneous consideration of the lag time and the oil product condition, timely allocate the berth according to the production requirement of the refinery, and improve the rationality and scientificity of berth scheduling.
The modeling unit 42: for establishing an objective function with a minimum total hysteresis.
Like the conventional berth scheduling method, the modeling unit 42 in this embodiment also establishes an objective function with the minimum total delay cost as a target, thereby reducing the berthing cost of the tanker to the maximum extent. The late fee is a certain penalty paid to the ship side for the time exceeding the time, because the ship renter does not finish the loading and unloading operation within the specified loading and unloading period, so that economic loss is caused to the ship side. The method for calculating the delay fee comprises the following steps: and calculating the difference between the waiting time of the oil tanker and the free working time length, wherein the product of the absolute value of the difference and the delay charge coefficient of the oil tanker is the delay charge of the oil tanker. The method specifically comprises the following steps:
an objective function totalmeurage is established based on the formula one,
wherein totalmeurage represents the minimum value of the total lag, ship, waitiIndicating the waiting time, ship, of tanker iiThe free working time of the tanker i is represented, the ship _ demurrage represents the lag cost coefficient of the tanker, and m is the total number of the tankers; totalmeurage, ship, waiti、ship,freehouriThe value range of the ship _ demarreage is positive number, and the value range of the m is positive integer.
Ship, freehour in formula IiBoth the variable ship _ demurrage and the variable ship _ demurrage can be obtained from the tanker dataiCan be calculated based on the estimated time to port in the tanker data. In this embodiment, the minimum time of the objective function, ship, wait, is solvediDetermining a berthage scheduling result.
The scheduling unit 43: the method is used for acquiring the oil tanker data and the berth data, inputting the oil tanker data and the berth data into an objective function, and solving the objective function under the hierarchical constraint condition to obtain a berth scheduling result. The method is specifically used for:
acquiring the data of the oil tanker expected to arrive at the port oil tanker and the berth data of the refinery port. The tanker data includes oil grade, lag time coefficient and loading capacity, and also includes tanker code, estimated arrival time, crude oil loading and unloading rate, free working time, tanker width, tanker length and tanker draft. The berth data includes a set of berthable tanker codes, a maximum containment length, a maximum containment width, a projected draft, a maximum payload, a berth-allowable operating oil seed, and historical tide level information.
Inputting the oil tanker data and the berth data into an objective function, and solving the objective function as the minimum time variable ship, wait on the premise of meeting the hierarchical constraint conditioniAccording to the value of ship, waitiThe value of the position number is combined with the estimated arrival time in the oil tanker data to obtain the starting operation time of the oil tanker in the position scheduling result, the berthing time in the position scheduling result is obtained according to the ratio of the loading capacity to the loading and unloading rate of the crude oil, and the position number in the position scheduling result is obtained according to the corresponding position distribution condition when the objective function is the minimum value.
Finally, as shown in fig. 2, the result of the berthage scheduling is output in the form of a gantt chart. The display content of the gantt chart includes a berth number, the starting operation time of the tanker at the berth, and the berthing time. Wherein, the 'berth _ 001' and the 'berth _ 002' respectively represent two berths with berth numbers of 1 and 2, a time axis for representing the date is arranged above the Gantt chart, and the 'A', the 'B', the 'C' and the 'D' all represent the number of the oil tanker parked in the corresponding time period and the loaded oil product. And acquiring the starting operation time and the mooring time of the oil tanker at the berth according to the corresponding relation between the length of the square in the figure and the time axis.
The Gantt chart can visually display the starting operation time, the operation duration, the waiting time, the planned departure time and the planned berthing of the oil tanker, and output the delay cost and the total delay cost of each ship, so that a dispatcher can conveniently check the berthing dispatching result in time, and the manual adjustment is facilitated.
Since mooring ports are often affected by typhoons and tidal variations, which may cause the possibility of delayed arrival of some affected oil tankers, the present embodiment further comprises an optimization unit for optimizing the berth scheduling result, specifically for:
and acquiring weather data and tide height data in real time, delaying the operation starting time of the oil tanker influenced by weather and tide, updating the berth scheduling result, and determining the delayed time length according to the weather data and the tide height data. For example, under the influence of typhoon, the estimated arrival time of the oil tanker is delayed and adjusted for 1 day, and the adjusted estimated arrival time is input into the berth scheduling model for scheduling again, so that the optimized berth scheduling result is obtained.
By the process, optimization processing can be realized according to weather and tide reasons, and the berth scheduling result can adapt to more application scenes.
The sequence numbers in the above embodiments are merely for description, and do not represent the sequence of the assembly or the use of the components.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.