SOLUTION TO A PIPELINE SCHEDULING PROBLEM BY USING A MIXED INTEGER LINEAR PROGRAMMING MODEL 1

Pipelines are efficient ways of conveying huge amounts of refined petroleum products to distant points. Different products are pumped successively, in the pipelines without a need of a separator between them. Pipelines should be chosen very carefully based on the pumping sequences, volumes to be conveyed, covering the constraints involved by cutting operational costs and focusing on market demands. The real life problem considered in this study consists of a unidirectional pipe distribution system used for pumping petroleum products between the sources and distribution centers. Problem was stated as a Mixed Integer Linear Programming (MILP) model and solved by using GAMS software thorough actual data. As a result of the study, an optimal pumping schedule for pipeline operations at a certain period of time is achieved.


LITERATURE REVIEW
Pipelines have been widely used over the past 40 years.Regardless of the higher investment costs involved in setting up a pipeline transportation system, its operational costs are relatively lower than the other means of transportation.As the price of the transported product depends on the transporting expenses, it is important that the transporting process becomes worthwhile.That's why over the past 30 years' focus has been on pipelines scheduling problems (Herr{n et al., 2012).
Pipeline scheduling for every pumping station is a sequential specification of parties to be injected into the pipeline.The party is defined as a product in a certain quality and quantity.The parties are pumped at certain flow rates.Then division is made throughout the pipeline to reach different delivery points.
The main feature of pipeline transportation is the advancement of the parties through the pipes.Every party pushes another party pumped previously and the process advances in this way.Among the activities done periodically, is the preparation of an applicable likely schedule within a given time interval in order to cover the demands.The target is to obtain sequences of different parties injected into the line by fulfilling the constraints in order to cover the demands.Demands are the essential data in pipeline scheduling.
Due to the fact that a certain portion of mixing occurs during pumping of successive parties, some party sequencing is not needed.When the costs incurred in refining these parties in subsequent stages are taken into account, those sequences are completely prohibited.Other aspects that require consideration when performing scheduling are as follows: • The products should be delivered at a correct amount and time in order to fulfill the customer's demands.
• That the storage capacity of the system is limited.
• The pump stations can operate at the maximum and minimum flow rates of the pipeline set up.
• The pipelines operate together with other means bulky of transport.That is why their stock levels and product demands should be considered.
The most important function of the multi-product pipeline systems is to deliver the products to the required points by minimizing transportation costs and other expenses.Product party can either be injected into the line or discharged into a tank.The system either should fulfill operational constraints such as product transfer, amount, minimum and maximum flow rates etc.Besides this, care should be taken as prohibited product sequence may occur in the pipeline.The system should check the stock levels in the tanks and meet customer's product needs.The aim is to minimize operational, pumping and transferring costs involved with the storage tanks and refinery.Before the end of the planning period, the amount of product injections at the starting point, their sequence and timing should be chosen correctly in order to meet the product demands at the terminals with minimum total expenses.Pumping, reprocessing of the mix and stock expenses should be taken into consideration (MirHassani, 2011).
Pipeline scheduling aims at minimizing operational costs of the pipeline systems; improve the knowledge given to the transporter about the product transfer, benefitting from the available advantages in the time varying energy expenses for power consumption of the pumps (Cafaro and Cerd{, 2004).
The works regarding this topic that have been published in recent years can be summarized into two groups; the type of the pipeline systems (single line system and pipeline networks) and the techniques used in the system (classic, heuristic or hybrid methods).
Sasikumar et al. established a pumping scheduling for products distribution by applying a single source multi-delivery-point pipeline system.They recommended a data base heuristic search technique for a solution.In this intuitional approach, they considered things like availability of the product, meeting demands, stock constraints and other logical pipeline operational constraints (Sasikumar et al., 1997).
Rejowski and Pinto, conducted a study where a petroleum refinery, multi-product pipeline and a system formed of tanks associated with local consumer markets were considered.With the tanks, they developed a wide calibrated (MILP) model for the system's synchronized optimization.The model was formed on the basis of convex-hull formulation (Rejowski and Pinto, 2002).
The tanks had to cover the local consumer's market needs.The researchers used a discrete time approach in their study.They recommended two different mathematical models for the same problem.The first model consists of parties with equal volumetric capacities; whereas in the second model, this assumption was neglected.Cafaro and Cerd{, recommended a steady state approach for transportation of refined products from one refinery to several distribution terminals with a single pipeline.They also recommended a steady state MILP formulation for optimal scheduling of multi products pipeline systems.Neither did this formulation use a discrete time approach nor was the pipeline divided into several parties for the same product.They demonstrated their approach on two real time applications presented by Rejowski and Pinto (Rejowski and Pinto, 2003;Cafaro and Cerd{, 2004).
In their study, Neiro and Pinto modeled crude oil supplying chains containing multi pipelines.Nodes of these chains were suppliers that maintain the whole flow of the product, distribution centers and refineries.They used the process to obtain a wide scaled Mixed Integer Non-Linear Programming (MINLP) model that would represent a complex topology.They recommended a discretization technique that would lessen calculation load for a solution.They also targeted to improve the effectiveness of the MILP model presented by Rejowski and Pinto They added constraints to the original MILP model that would minimize product disturbances in the pipeline.They then evaluated the model in terms of its performance and quality of the solution (Rejowski and Pinto, 2003;Rejowski and Pinto, 2004;Neiro and Pinto, 2004).Magatão et al., investigated a problem that contains short term scheduling activities of a certain pipeline connecting a port to a refinery.Throughout the limited scheduling time, they formed pipeline operations presenting low cost operational procedures with the encountered operational requisites simultaneously.They established the main model based on the combined CLP-MILP approaches (Magatão et al., 2005).
Rejowski and Pinto, developed a hydraulic formulation for pipeline scheduling.In their MINLP based study, they completed synchronous multi-product pipeline scheduling and hydraulic operations.With this new MINLP approach, they obtained better objective function values and more exact results than with the previous MILP approach presented by Rejowski and Pinto (Rejowski and Pinto, 2003;Rejowski and Pinto, 2005).
In another study by Relvas et al., a decision support tool constructed on the basis of MILP model was developed.They connected the pipeline operations with the distribution center control at the end of the pipeline.The model is based on steady state principles in terms of time and quantity.They used Standard branch-boundary techniques to obtain the solution.Their study was essentially based on the work of Cafaro and Cerd{.They also recommended steady state MILP model (Cafaro and Cerd{, 2004;Relvas et al., 2006).
Maruyama et al., accomplished a simulation model for decision making scheduling activities of a networks pipeline system.They used the proposed simulation model together with short term scheduling optimization packages.They did this on the EXTEND software by making use of the discrete event simulation model.Each event conveys information about flow rate, quantity, course and type of every transferred product that characterize different parties (Maruyama et al., 2007).
Relvas et al., focused on time and quantity MILP model in order to complete multi product pipeline operations.This model not only defined the first scheduling but also considered the dynamic nature of the operations on the rescheduling (Relvas et al., 2007).
Cafaro and Cerd{, presented a steady time MILP structure for dynamic scheduling of pipelines on a planning period.The redirected deliveries and time dependent product demands on the distribution terminals were supposed to upgrade the pipeline operations continuously.Initially, work was conducted on multi-functional scheduling of a unidirectional pipeline system with a single entry point and a number of exit points amounting to the distribution terminals along the line (Cafaro and Cerd{, 2008).
Mirhassani and Ghorbanalizadeh, developed an integer programming formulation for pipeline scheduling problems.The aim was to explain functions with the number of mixtures.They investigated arrangement of minimum number of mixes with pumping schedules (Mirhassani and Ghorbanalizadeh, 2008).
In a study by Moura et al., the problem of scheduling all pumping operations in order to cover market demands and store planned products was defined.Every pumping commencement and delivery tanks, pipeline course, starting and finishing time, specific products and their quantities were defined by specific details.The basic target beside proper usage of stock and production in order to cover all local demands was to find a solution in terms of physical and operational constraints of the networks (Moura et al., 2008).
Rejowski and Pinto, recommended a steady time based MINLP formulation for scheduling of multiproduct pipeline systems that were supposed to cover a diverse range of consumer markets (Rejowski and Pinto, 2003).This MINLP formulation was based on MILP formulation proposed by Rejowski and Pinto (Rejowski and Pinto, 2004).The hydraulic factors and pumping efficiency were taken into consideration.The proposed study was compared with the study involving discrete time by Rejowski and Pinto, and better results were obtained.Effects of number of time intervals that represent the transfer operations were considered several establishments were tested for pushing stations (Rejowski and Pinto, 2008).
Relvas et al., conducted a study focusing on developing a MILP model that defines fuel distribution through a pipeline connecting a refinery to a tank ranch.In order to achieve fuel supply, they created an interaction between the inner constraints on the tank ranch and the pipeline scheduling (Relvas et al., 2008).
In another study by Relvas et al., the researchers worked on a system composed of a single pipeline connecting a refinery to a distribution center.They found that it was necessary to define a suitable product sequence so that they could develop the model performance.They also used an integrated intuitional algorithm in order to set some multi-purpose tank operational modes.Here, they presented a scheduling decision whereby solution based mathematical modeling and simulation were used together (Relvas et al., 2009).
Cafaro and Cerd{ developed a MILP formulation for a unidirectional pipeline network that allows synchronized party injection at several terminals and multi-source operational planning.They significantly decreased the total time necessary for distribution of the products in the stocks in order to cover the demands by making proper use of the pipeline carrying capacities (Cafaro and Cerd{, 2009).
By using a mathematical model that provides progresses under economic target functions, Relvas et al., defined a multi-product pipeline scheduling and stock management at the terminals (Relvas et al., 2009).
Cafaro et al., presented a discrete event simulation system developed on ARENA software for a detailed schedule of a multi-product pipeline system which connects a single entry station to several receiving terminals.They easily managed the pipeline operations with the proposed simulation technique by combining it with optimization tools (Cafaro et al., 2010).
Cafaro and Cerd{, studied pipeline networks formed of one of the bidirectional stations having multi-entry and multiple terminals.In these pipelines, various pumping operations can be carried out simultaneously on different sources.They defined the MILP steady state formulation.The aim in this problem was to accomplish the tank needs with minimum total expenses possible.Scheduling of the pumping and delivery operations was executed at the same time.The results had shown that synchronous party injections offer optimum usage of the pipeline transferring capacity and substantially decrease the time necessary for covering the storage needs (Cafaro and Cerd{, 2010).
The study by Herr{n et al., recommended a new mathematical approach to be used in solving problems of more complex multi-pipeline systems' short term operational planning where the system consists of connecting multi-product pipelines together.The researchers developed a MILP model.In order to achieve an optimal plan, they minimize the criteria used such as pumping and start/stop expenses, mixing losses and stock carrying costs.They also monitored the stock level throughout the planning period so that they could keep the stock level on every node at allowable interval (Herr{n et al., 2010).
An optimum structure that would help with decision making on multi-product pipeline scheduling in operational activities was recommended in the study conducted by Neves et al.Discretization technique was used in this study.The technique was developed in two different MILP models as lower and main pipeline scheduling problems.In the MILP sequencing model (the main model), the researchers defined the volume and pumping sequence of each party.By using these results in the detailed MILP model (lower model), they could obtain the whole schedule (Neves et al., 2010).
Relvas et al., presented a MILP model formed of flexible storage tanks and that could be connected with the other process models in the system.The main system in the publication was in a chemistry institution or stock tank farmstead that could be located at a supplier chain point.To achieve this system, scheduling of the storage activities on the tank farmstead was to be defined (Relvas et al., 2010).
In a published study by Cafaro et al., the researchers employed optimization and step function simulation methods in order to achieve detailed scheduling of a single source pipeline system (Cafaro et al., 2011).
Then, to solve this transferring problem, Herr{n et al. recommended a global finding metaintuitional algorithm (Herr{n et al., 2012).
Mirhassani and Ghorbanalizadeh, defined a short term scheduling for distribution of petroleum derivatives from a single refinery to several storage tanks through tree-shaped pipeline.They presented a steady state MILP formulation for the tree-shaped pipelines (Mirhassani and Ghorbanalizadeh, 2011).

PROBLEM DEFINITION
The problem consists of a distribution system where a one directional pipeline is used for pumping fuel derivatives between a refinery and distribution centers.The aim is obtain a pipeline scheduling that forms pipeline operations at certain suitable time intervals.For solution to the problem, the followings were involved: Number of tanks; setting up pipeline for refined petroleum products to be contained within gaps between every tank and refinery, capacity and every tank is capable of containing the products delivered, product demands on every distribution terminal at the end of scheduling period, party sequencing along the pipeline and their initial quantities, initial product stocks, allowable maximum/minimum product levels, maximum values of party pumping ratio, product supply ratio from the pipeline to the tanks and products supply ratio from the tanks to the local markets; scheduling period prohibited P2.(P3), P3.(P2), P3.(P4), P4.(P3) products to be supplied into the line one after the other.They are given in Tables 1,2 and 3 respectively The problem targets to determine optimal sequence, initial quantities and types of products of new party injections assigned to every pipeline.The aim is to meet the product demands, keep the stocks levels in the refinery and storage tanks at allowable intervals all the time and minimize the pumping and stocking costs.Meanwhile; beside the changes in the stock levels in the refinery and storage tanks, when the old and new parties move along the pipelines their changes in sizes and coordinates are monitored throughout the time interval.At the beginning S1, S2, S3, S4, S5 and S6 parties were in the pipeline.These parties, respectively, contained P1, P2, P1, P2, P1 and P2 products and were at these respective quantities 7000, 8500, 10000, 17500, 17000 and 10000 m3.The length of the planning term was 75 hours.Pumping ratio of the products to the pipeline was at the range of 400-500 m3/h while their pumping ratio from the pipeline to the storage tanks was 500 m3 / h.

Objective Function:
Pumping costs and operational holding costs contitutes objective function.

∑ ∑ ( ∑ ∑ ) ∑ [∑ ( ∑ )]
Constraints: Party sequencing constraint:Injection of a new party into pipeline can never start before the pumping of the previous party ends (1) (2) Where; Ci is the finishing time of the new party, Li is pumping time and hmax is the horizon of the scheduling period.Chronologically, (i−1) I, is pumped before the i Inew.For this reason, (i − 1) I is farther with respect to the starting point.

Relationship between the quantity of a new party and its length:
The amount of a new party (i I) pumped into the pipeline should be in a suitable interval. (3) The length of the pumping time of the new party (i Inew), must be higher than a certain maximum pumping time and lower than the minimum pumping time (∑ =1) Mixing materials between successive parties: (i − 1) I is pumped into the pipeline before the i .Therefore; the mixing quantity of the two close parties must be lower than the mixing quantity, between the p and p' products.(i-1) and i respectively contain p' and p products.
Prohibited Sequence:Due to products pollution, some product sequencing is not allowed into the pipeline.For two p and p' prohibited products, the following constraint is added to the problem.This mixing quantity will not be transferred to the storage tanks.It will be kept in the line up to the storage tank it reaches; and from there, it will be drawn back and subjected to the process again (Rejowski and Pinto, 2002).Otherwise; it may lead to high product The highest and lowest pipeline coordinates of I' (i I) party at time .i. is the volumetric coordinate of ith (i I) party at finishing time of the ith party's (i' Inew) pumping ( ).At ) time, equals the total of the quantity of the farthermost coordinate I, of the (i+1) th party and the ith party.Because (i +1) and i parties move one after the other, the mixing quantity between the parties is within the (i +1)th party. (8)

Quantity transferred to the tanks when pumping of the ith party
) continues: Is the quantity of ith party at the end of pumping time.Qi, is the initial amount of the ith party, while (Qi-Wi), refers to the amount of ith party transferred to the storage tanks.The quantity of party transferred to storage tanks when pumping of the next party is in process.The difference between ith party (i I) at time Ci and that at time Ci-1 is equal to the amount of ith party (i' ) injected into the storage tanks.

∑ (10)
Conditions necessary for the transfer from the parties on the pipeline to the storage tanks: The transfer of product, p carried by the ith party (i I), to jth storage tank that needs the product is only possible if the ith party has reached the jth tank.To achieve this;The sub-coordinate of the ith party at the end of pumping time of (i'-1) th party must be less than storage tank coordinate.The difference between the ith party's farmost coordinate at the end of pumping time of (i') th party and the quantity of mixture should be lower than the storage tank coordinate.

∑ ∑ (11)
When the ith party reaches jth storage tank, otherwise, it is 0 and no product transfer takes place from i th party to j th storage tank.If the maximum amount to be transferred from ith party to jth storage tank is indicated with Dmax, then; (12) The amount transferred from ith party to jth storage tank during injection of ith party ( , cannot exceed the difference of quantity between ith party and the quantity of mixture at the end of (i'-1) th pumping time.During pumping of , the amount limit transferred from party to the storage tanks within the time interval of , cannot exceed the amount of i th party pumped from party to the storage tanks when pumped into the pipeline at time .

∑ ∑ ∑ (13)
Total amount in the pipeline during pumping of :The total quantity of ith party transferred into the storage tanks during pumping of ( must be equal the amount of ith party injected into the pipeline.

∑ ∑ (14)
When a new party is injected, all the parties along the pipeline move; as a result, the lowest and highest party coordinates increase with time.
(15) Product assignment: Every party transferred within the pipeline should contain a single refinery product.

∑ (16)
Achieving market demands:The amount of product p transferred from storage tanks to customers at time interval of (Ci, Ci-1) should be delivered at specific pumping ratio.Throughout the scheduling period the total quantity of product p supplied to the customers from storage tanks (j) must satisfy the demands. (17) The amount of product p injected into the pipeline when is pumped:If p product is not sent to ith party, (yi,p=0),then no product is drawn from the refinery.Otherwise, the amount of product injected into the pipeline from the refinery tank becomes equal to the initial amount of ith party.Determining suitable stock intervals: The stock level of product p in j storage tank at time , is found by adding the amount transferred to storage tanks from ith party to the stock level exisiting in time and simultaneously subtracting the amount supplied to the local markets from product p.

∑ (23)
The stock level of product p in j tank at time , should always remain between specific maximum and minimum stock levels of . (24)

RESULTS AND DISCUSSION
According to the results presented on Figure 1, in order to meet customer demands, three new parties of S7-S8 and S9 having capacities of 4500, 1000 and 24000 m3 and containing products P4-P1and P3 respectively, should be injected into the pipeline.At the intervals of 15,28-24,28 hours, S7, 24,63-26,63 hours S8 and between 27-75 hours S9 parties were pumped into the pipeline.First of all, when 4500 m3 of product P4 was pumped at the intervals of 15,28-24,28 hours, 500 m3 of product P1 from S3 party was transferred to J5 storage tank, 3000 m3 of product P2 from S4 party was transferred to storage tank J3, and 1000 m3 of product P1 from S5 party was transferred to storage tank J3.Then, between 24,63-26,63 hours 1000 m3 of P1 was being pumped and the same amount of 1000m3 of P1 was transferred from S3 party to J5 storage tank.Between 27-75 hours, P3 was being injected into the pipeline and 1000 m3 of P1 product from S1 party was sent to J7 tank, 1500 m3 of P1 from S3 party was transferred to J5 tank, 4000 m3 of P1 from S3 party was transferred to J6 tank, 8500 m3 of P2 product from S4 party was sent to J4 tank, 1000 m3 of P2 from S4 party was sent to J5 tank, 2000 m3 of P1 product from S5 party was sent to J5 tank, 2000m3 of P4 product from S7 party was transferred to J1 storage tank, 1000m3 of P1 product from S8 party was sent to J1 tank and 3000m3 of P3 product from S9 party was transferred to J1 storage tank.
The optimum result was found to be 398.940,66.

CONCLUSION
Regardless of the fact that recently a focus has been placed on scheduling problems due to the increasing trend of transferring petroleum products from production centers to consumer areas by using pipelines as the most economic means of transfer, no record of such a study has been conducted in Turkey.
In this study, a mathematical model has been proposed for the purpose of scheduling a fuel distribution system that supplies fuel to strategic points and monitored on the basis of the pipeline requirements and product demands.The system consists of 8 storage tanks located at different areas and a unidirectional pipeline connected to its refinery.4 different products are found in the pipeline and storage tanks.The aim of the study is present a flexible MILP model that cover pipeline operations run based on expert experience.The model can be used for different situations by changing operating conditions and adding specific constraints depending on the needs at hand.Variations in the coordinates and quantities of the parties within the pipeline that occur as time changes are monitored.Besides achieving product demands, with the model, high pumping, mixing and stock costs have been avoided.

Figure 1 .
Figure 1.Schematic indication showing results obtained from a mathematical model run on GAMS software series existing in the pipeline at the start of time horizon : New party series to be injected into the pipeline during time horizon J : Distribution terminals series along the pipeline P : Refined petroleum products series PARAMETERS : Unit stock expenses of product p in j th storage tank : Pumping costs of product p from refinery to j storage tank : Horizon length : Initial costs of product p in j storage tank : Quantity of mixture between parties containing p and products : Maximum/minimum pumping time for a new party : Total demand of product p covered in j tank : Maximum flow rate to the local markets : Pumping ratio : Maximum pumping ratio : Minimum pumping ratio : Initial amount of old parties : Volumetric coordinate between start terminal and j storage tanks VARIABLES : Product amount injected into pipeline during pumping of i th party : Ratio of i th party's pumping completing time to pumping length : ith amount transferred from pipeline to j storage tank when th party is injected : Amount of product p transferred from ith party to jth storage tank when the th party is injected : The farmost coordinate of ith party from refinery at time : Stock level of product p in j storage tank at the time pumping of th party ends : Amount of new i party : Amount of i party at time : Amount of p product from the storage tanks sent to customers within time interval : Quantity of mixture between i and (i-I ) parties that contain p and products : When the ith party contains p product, it takes the value of 1 : When ith party is transferred to j storage tank during injection of th party

Table 1 .
. Stock costs on the tanks

Table 2 .
Initial product quantities in the tanks and max./min stock levels

Table 3 .
Product demands in the tanks and pumping costs