Heuristic batch sequencing on a multiproduct oil distribution system

Heuristic batch sequencing on a multiproduct oil distribution system

Computers and Chemical Engineering 33 (2009) 712–730 Contents lists available at ScienceDirect Computers and Chemical Engineering journal homepage: ...

1MB Sizes 0 Downloads 49 Views

Computers and Chemical Engineering 33 (2009) 712–730

Contents lists available at ScienceDirect

Computers and Chemical Engineering journal homepage: www.elsevier.com/locate/compchemeng

Heuristic batch sequencing on a multiproduct oil distribution system Susana Relvas a,∗ , Ana Paula F.D. Barbosa-Póvoa a , Henrique A. Matos b a b

CEG-IST, UTL, Av. Rovisco Pais, 1049-001 Lisboa, Portugal CPQ, IST-UTL, Av. Rovisco Pais, 1049-001 Lisboa, Portugal

a r t i c l e

i n f o

Article history: Received 28 March 2008 Received in revised form 15 October 2008 Accepted 16 October 2008 Available online 5 November 2008 Keywords: Multiproduct pipeline Inventory management Scheduling Heuristic MILP

a b s t r a c t Real world planning and scheduling of complex oil supply chains appears as a challenging problem, which requires adequate tools that can aid the decision making process. The present work looks into the scheduling of a multiproduct pipeline and associated tank farm inventory management through a mixed integer linear model (MILP). The pipeline has a single origin and single destination and transports oil products and its batch sequencing is constrained by product quality. The pumping sequencing variables are used to define a continuous time scale (Relvas, S., Matos, H. A., Barbosa-Póvoa, A. P. F. D, Fialho, J., & Pinheiro, A. S. (2006). Pipeline scheduling and inventory management of a multiproduct distribution oil system. Industrial and Engineering Chemistry Research, 45, 7841–7855). In this way, these variables have a large impact on CPU time. Therefore, to improve the model performance an adequate identification of feasible products sequences is required. This is evident when solving real case studies. These facts motivate the development of a sequencing heuristic to be used prior to the model implementation. This approach provides a set of information on the most desirable sequences of products to be pumped to the pipeline. It uses information from one given scenario, such as priorities on the transportation and outputs for clients to be replenished. The heuristic is applied and validated using a real world scenario of a Portuguese oil products’ distribution company. © 2008 Elsevier Ltd. All rights reserved.

1. Introduction Supply chains are growing day after day, adding not only new actors but also complexity. On the other hand, organizations are facing greater challenges in meeting demands in a fluctuating global market under design constrained operations (Koo, Adhityaa, Srinivasan, & Karimi, 2008). A straightforward example is the oil industry and supply. This is one of the most important world wide impact businesses. The oil supply chain involves a variety of tasks such as crude procurement, logistics scheduling, storage scheduling and crude scheduling, which require interaction between several departments and the processing of a large amount of data (Julka, Karimi, & Srinivasan, 2002). Decisions at this level have a large impact on chain performance. The new incoming challenges of oil rationalization, volatile crude prices, excess refining capacity, and fluctuating demands and prices for oil products are serious reasons for refiners to look for new business management approaches. A wide variety of advanced process engineering methodologies have been proposed for the strategic, tactical and operational levels. Moro (2003) states

∗ Corresponding author. Tel.: +351 21 423 3550/841 7302; fax: +351 21 841 7979. E-mail address: [email protected] (S. Relvas). 0098-1354/$ – see front matter © 2008 Elsevier Ltd. All rights reserved. doi:10.1016/j.compchemeng.2008.10.012

that advanced management approaches usage is growing over the last years. However, Neiro and Pinto (2004) underline that in several sites management is still based on heuristics or simple linear models, despite problem complexity. Crude oil scheduling and refinery operations have long been the major focus of attention for several authors, who addressed several subsystems of the OSC. The main solution methods have relied on MILP (Mixed-Integer Linear Programming) approaches. The higher level problem of the oil supply has been addressed by Más and Pinto (2003). Neiro and Pinto (2004) proposed new particular frameworks for storage tanks and pipelines, following the work of Pinto, Joly, and Moro (2000). Subsequently, the complete chain is built, using interconnection streams between nodes, which may be refineries, pipelines and terminals. The resulting model is a large-scale MINLP, which was applied to a real world corporation. The problem of crude oil supply to a refinery was addressed by Shah (1996) and Lee, Pinto, Grossmann, and Park (1996). Shah (1996) used a spatial decomposition approach to reduce problem complexity. In succeeding years, several mathematical programming approaches appeared in literature addressing similar problems. Reddy, Karimi, and Srinivasan (2004) developed a continuous time formulation for a system considering the scheduling operations of a refinery that receives crude from large vessels through a pipeline. One feature of this work is the usage of an iterative approach that reduces the MILP complexity and consequently

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

the computational effort. Crude oil scheduling was also addressed by Wenkai, Hui, Hua, and Tong (2002), who proposed a MINLP model decomposed in an iterative procedure between MILP and NLP problems. The major improvement is the reduction of binary variables and hence the overall solution time. Jia and Ierapetritou (2003, 2004) and Jia, Ierapetritou, and Kelly (2003) presented a spatial decomposition approach to overcome the complexity of the short-term scheduling problem of refinery operations. This decomposition considered three main parts: (i) crude oil unloading, mixing and inventory control, (ii) production unit scheduling (with fractionation and reaction processes) and (iii) finished product blending and shipping end of the refinery. One essential aspect from the works listed above is the need of combining decomposition approaches to reduce model complexity, solution times and determination of valid solutions. These represent the major issues to deal with in a common large-scale optimization problem. Wu and Ierapetritou (2003) revised suitable decomposition approaches to support short-term scheduling problems, such as time-based decomposition, required production method and resource-based decomposition. Despite the fact that the refinery is the core of the OSC, the logistics scheduling ensure that all products are delivered to the final desired destination, at the due date and with the required quantities. Several methods can be used to transport oil and oil products: pipeline, tank truck, railroad tank cars and tankers. The option over which one to use depends on distances, product type, cost, quantities and purpose. Pipelines are one of the most economical solutions, being both safe and clearly indicated for large volumes and long-term solutions. Nonetheless, energy consumption is the most constraining cost. The main issues in the model formulation are: high variable batches’ volumes, unknown schedules, unknown volumes and a map of possible/forbidden interfaces due to quality and cost issues. Unknown schedules depend both on refinery production and tank farm demand and are usually part of the problem objective. Unknown batch volumes depend on market requirements and tanks availability. The lack of commercial tools that provide optimized schedules for systems containing pipelines has motivated the development of advanced mathematical models by several authors. Rejowski and Pinto (2003) explore discrete MILP representations of both time and pipeline to address the problem of oil products distribution from one refinery to several distribution centres. This work was improved later by Rejowski and Pinto (2004), in order to develop valid integer cuts that improved model performance. A later work by the same authors (Rejowski & Pinto, 2008) explores the continuous time representation of the same multiproduct pipeline, comparing this formulation with the earlier discrete version. The resulting MINLP model considers that the pipeline operates intermittently due to peaks on electricity prices. The pumping costs associated depend on the booster stations yield rates, covering hydraulic aspects of pipeline operation. The main conclusion is that the MINLP continuous time model achieved better results and is more general than the previously presented MILPs. An alternative work was developed by Cafaro and Cerdá (2004). These authors addressed a continuous time and pipeline volume representations through a MILP approach and addressed the same problem presented by Rejowski and Pinto (2003). The approach considers batch sequencing inside of the pipeline to avoid pipeline discretization. One of the major drawbacks recognized is the common usage of short horizons and unique due dates. For this reason, they applied to this methodology the concept of rolling horizons (Cafaro & Cerdá, 2008), using a multiperiod approach. A second benefit from the approach is that at each time period, any new data of the problem is used to provide a rescheduling procedure.

713

In this way, they ensure that the pipeline schedule reflects current conditions. Magatão, Arruda, and Neves (2004) developed a MILP discrete approach using a decomposition strategy to address the case where a pipeline operates in both flow directions, between a refinery and a harbour, pumping oil derivatives. The decomposition approach relies on an auxiliary routine for temporal constraints. Relvas, Matos, Barbosa-Póvoa, Fialho, and Pinheiro (2006) proposed a MILP continuous time approach that uses the batch sequencing proposed by Cafaro and Cerdá (2004) to a real world medium-term problem containing a refinery, a pipeline and one distribution centre. This model explores the inventory management at the chain end in order to develop pipeline schedules that reflect not only market demands but also storage constraints, such as settling periods. Furthermore, market demands are included on a discrete basis, being the model able to operate between discrete and continuous scales. Those authors proposed an improved work (Relvas, Matos, Barbosa-Póvoa, & Fialho, 2007), which included extensions to account for variable flowrate, pipeline stoppages and settling periods that vary with products. Additionally, these authors proposed a reactive scheduling strategy that deals with unforeseen situations that provides new schedules with minimum deviations from the previous ones. Pipeline scheduling, as well as OSC problems, represents a complex problem, where several details and tradeoffs arise. For these reasons, some of the proposed solution approaches make use of support methodologies such as decomposition, iterative approaches, heuristics or hybrid methods, rather than using single models, as was pointed by Rejowski and Pinto (2008). Complementarily, these authors emphasise the strict relation between obtaining a solution and the strategy used: decomposition approaches may eliminate optimal solutions but have a large potential for improving solution times. Magatão et al. (2004) worked on pipeline scheduling models using a spatial decomposition approach, as reported earlier. A later work, Magatão, Arruda, and Neves (2005) expanded their approach by including constraint logic programming (CLP) techniques and conclude that this approach presented a better performance than the separate equivalents on MILP or CLP approaches. Despite the fact that support methodologies may eliminate the optimal system solution, they are becoming widely used so as to reduce problem complexity and to obtain results in real time. Additionally, decision makers and schedulers usually seek good solutions, close to the optimal, rather than a time consuming optimal solution with little margin of improvement when compared to the others. These facts constitute the main motivation for the heuristic presented in this paper. Heuristics can support exact solution methods mainly to provide fast solutions or reduce search space, diminishing the complexity of formulations representing real world systems. In the area of scheduling, heuristics have been mainly developed to support rescheduling procedures. In the area of the oil supply chain, Adhitya, Srinivasan, and Karimi (2007) presented a rescheduling procedure that reduces solution time effort as well as minimizing differences when compared to the previous schedule. This heuristic is applied to the unloading system of crude oil from crude carrier vessels up to the charging of crude oil to Crude Distillation Units. On the other hand, reordering strategies have been approached by Röslof, Harjunkoski, Björkqvist, Karlsson, and Westerlund (2001) supported by a MILP representation. However, this approach is used in batch manufacturing, thus with a different scope of pipeline continuous pumping operation. Finally, heuristic rules were also used integrated in the short-term scheduling hierarchical approach for refinery operations proposed by Luo and Rong (2007). In here the heuristic is used to adjust the operation modes of some multi-

714

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

Fig. 1. Problem’s operation system.

purpose tanks within aggregate tanks. This represents a decision manipulation integrated in a scheduling framework that uses both mathematical modelling and simulation. The paper is organized as follows: Section 2 presents the generic problem under study, specifying data, results and assumptions. Section 3 describes the decision support tool architecture, where it is revised previous work by the authors and the sequencing heuristic. This heuristic is described in Section 4. Section 5 provides three different case studies. Conclusions and directions for further work are provided in Section 6. 2. Problem definition The system in study comprises one pipeline that connects one refinery to one distribution centre, as represented in Fig. 1. The refinery produces several oil products and the distribution centre is responsible for supplying these products to a local market. Given: (a) The number of products to be transported; (b) The matrix of possible/forbidden sequences between pairs of products in pipeline transit; (c) The maximum storage capacity for each product; (d) The pipeline capacity; (e) The pumping rate limits; (f) The minimum settling period for each product; (g) The time horizon extent and the total number of days to be considered; (h) The maximum number of allowable batches to be pumped during the time horizon; (i) The initial inventory of each product; (j) The daily clients’ demands for each product; (k) The planned pipeline stoppages. It is desired to obtain: (1) The optimal pipeline schedule, with sequence of products, batches’ volumes, pumping rates and pumping and discharging timings; (2) The inventory management at the distribution centre, including daily volume balances by product and monitoring of arrivals, settling and approving tasks as well as satisfaction of clients’ demands. So as to satisfy a predefined objective function that can be either economical or operational. In the present work it will be used an operational objective function, which will be described in Section 3.2. 3. Computational framework In Section 3.1 the Decision Support Framework architecture is described, including all methodologies interconnections. Section

Fig. 2. Decision Support Framework architecture.

3.2 provides a glance over the structure of the MILP model and the objective function developed previously by Relvas et al. (2006, 2007) and used in this work.

3.1. Decision Support Framework architecture The proposed architecture is presented in Fig. 2. This structure enables the interaction of the MILP model with the proposed model extensions: the reactive scheduling procedure and the sequencing heuristic. It also illustrates the connections that guarantee the feeding of input data and output results. The inputs have three origins: (i) initial conditions, (ii) market forecasts and (iii) scenario parameters. The initial conditions connect the current time horizon to the previous. They capture the initial contents of the pipeline as well as the initial inventory at each tank. Model inputs can be given by the user or other company’s information systems. The subsequent step requires a decision over the type of sequence of products, i.e., if the sequencing heuristic is used or not. The heuristic uses the initial state and market forecasts to analyse the current tank farm operational conditions and establish parameters to develop sequences of products. Fixed sequences are more indicated for larger time horizons, while free sequences can be used more easily in shorter time horizons. The MILP model is run using inputs and possible heuristic results. Model results are used as schedules for the current time horizon. However, it was already pointed out the high probability of disruptions occurrence. In this case, new inputs are provided for each unpredicted situation and the reactive scheduling procedure is activated. Additionally, the objective function now includes penalization terms that minimize deviations to the previous schedule. The reactive scheduling procedure is run to obtain a new adapted schedule built from the previous one. Both MILP model and the reactive scheduling approach require a solution algorithm, such as CPLEX. The results obtained include the optimized pipeline schedule and the tank farm inventory management policy.

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

715

Fig. 3. Continuous time scale definition.

Fig. 4. Fixed sequence of products.

Fig. 5. Mixed sequence of products.

3.2. MILP scheduling model The work presented by Relvas et al. (2006, 2007) describes a MILP model that addresses the system described in Section 2. This model (see Appendix A) was applied to short and medium term horizons of operation and results are reported in those works. The main considerations behind the model building and formulation are (i) time and volume representations, (ii) representation of demands, (iii) sequence of products to be pumped by the pipeline and (iv) objective function. 3.2.1. Time and volume representations This model was built considering continuous representations of both time and pipeline volume. The continuous time scale is built based on the time instants when each batch has finished to be pumped to the pipeline (Fig. 3). The model formulation uses sequencing variables to build the continuous time scale based on these events. All the remaining operations in the system are reported to these time points. Accordingly, once the pipeline pumping and transportation represent a considerable in transit time, at each time interval it is necessary to update the materials evolution inside the pipeline. This is the reason why a volume scale is necessary in this particular system. Thus, the sequencing of batches captures at each new time point the volume pumped to the pipeline. Consequently the evolution of all products in transit and the products discharged, through a volume balance between pipeline ends is obtained. 3.2.2. Representation of demands Distribution centre’s clients provide forecasts of their demands over a time horizon. Usually these forecasts are specified in discrete and smaller periods than the time horizon. In order to describe the system closer to reality, the model translates a discrete scale related to clients’ forecasts (e.g., daily) by means of an operator to obtain demands represented over the continuous scale. Therefore, inventory management accounts for clients distributed over the continuous time scale. 3.2.3. Sequence of products There are feasible and forbidden sequences between pairs of products. The products’ sequence may consist either on a periodic repetition of products or a free combination of products. In the first case, a cycle of products may be defined and repeated over the time horizon. A cycle of products consists of a combination of all products, guaranteeing the possible pairs of products within the cycle and between cycle ends (so as to repeat the cycle one

after another). There is no specific rule to establish which products should be located in the cycle ends because it mainly depends on the system in study. However, if a repeated cycle strategy is used it guarantees that those products in cycle end are the ones that correspond to larger batch volumes. If cycle end position corresponds to the complete sequence end, it is likely that if the pipeline stops at these points a lower number of interfaces inside the pipeline are obtained. Three possibilities for sequences can be accounted for: - If a cycle can be repeated, this will arise in a fixed sequence (Fig. 4); - If a base sequence can be built, but leaving open some decisions to model solution process, then it will be defined as a mixed sequence (Fig. 5); - If no simple heuristics can be applied, then the model solution process needs to decide over the entire sequence, leading to a free sequence (Fig. 6). 3.2.4. Objective function The used objective function deals with operational indicators. The objective function adopted will be of the form of Eq. (1). (max ∨ min)

N  n=1

(+ ∨ −)wn

n nmax

(1)

This represents a multi-attribute function, where it is allowed to establish tradeoffs between several objectives in the attainment of a maximum performance of the system. The most common form involves maximization of the sum of linearly weighted objectives. Eq. (1) is a generic objective function, where N represents the set of operational indicators that may be included in the objective function. Each indicator will have a positive or a negative sign, which will be set after establishing the direction of the objective function: maximization or minimization. wn is the weight applied to each term. Finally, each operational indicator n will be included in a normalized (between 0 and 1) and dimensionless term, recurring usually to the upper limit, nmax . Using this normalized objective function, it is possible to have a unique weighted objective considering all operational indicators. Table 1 presents all the operational indicators used in the objective function. It is also referred the direction that should be used for each term in the optimization procedure.

Fig. 6. Free sequence of products.

716

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

Table 1 Objective function terms. #

Operational indicator description

Objective

1 2 3 4 5

Total pumping time Total pumped volume Total final inventory Balance between total inputs and outputs Lowest final inventory among all products

Maximize Maximize Maximize Minimize Maximize

The maximization of terms 1 and 2 is straightforward, while for the third term might be controversial. In the one hand it would be interesting to lower the final inventory, as in general inventory management procedures. The higher the inventory levels the higher the costs. However, this is a type of operation with a considerable uncertainty index, high inventory turnover ratio and policies that enforce the maintenance of specific safety stocks. Hence, there is a tendency to maintain or even maximize the inventory at the end of the time horizon. The fourth term represents the difference between all pipeline input to the distribution centre and the total outputs for clients. The minimization of this term is an indirect way of minimizing the medium flowrate. The flowrate is not a model variable, to maintain model linearity. The fifth indicator translates the lowest final inventory level among all products. This indicator will be determined in a mini-

max strategy. It is defined as being lower or equal to any of the final inventory level of each product. On the other hand, this variable is maximized in the objective function. 3.3. Heuristic resource allocation: Motivation One of the main results of the scheduling problem in study is the sequence of products to be pumped to the pipeline. Due to the definition of sequencing variables that define the continuous time scale based on the sequence of products, the time scale will have as many intervals as the number of batches that are pumped to the pipeline. Moreover, the durations of each continuous time interval are related to batch pumping time. One of the major drawbacks of the large-scale MILP model developed by Relvas et al. (2006, 2007) is that the definition of the sequence of products since it highly influences the model performance. This problem is the starting point of the study presented in this paper, which is translated in the development of a heuristic process to be coupled with the MILP model. This heuristic enables a study of the initial conditions combined with forecasted demands (and any other information for the current time horizon) in order to develop suitable sequences’ of products for the given scenario. Once a set of sequences are obtain they can be used to run the MILP model previously presented by Relvas et al. (2007).

Fig. 7. Initialization procedure’s architecture.

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

4. Heuristic architecture The heuristic procedure answers three main questions regarding sequences of products to pump through the pipeline: (1) how the sequence should start, (2) how to develop it along the time horizon and (3) how should it end? Using a generic cycle unit as a starting point, it is necessary to know in which cycle position to start the sequence (and repeat the cycle) so as to meet time horizon requirements. Another question that may arise is how many batches should be pumped during the given time horizon. Some guidelines to answer these questions are developed in a detailed initialization heuristic, schematized in Fig. 7. Three lines of information that can be used in the heuristic. The priorities establish which products must be pumped prior to others to avoid product stock out. The bounds on batches establish limits on number of batches and can be determined on an individual product basis or on a cycle basis. The information used in these calculations is provided from the initial scenario conditions. The heuristic can be used to:

Parameters Symbol

Description

Woi

Volume of batch i that originally is inside of the pipeline (vu) Minimum settling period for a batch of product p (h) Volume to transport of product p that covers total clients’ demands (vu)

Trep,p TPipep typical

Batchp

Typical batch volume of product p (vu)

BatchMaximum p

Maximum batch volume of product p (vu)

product

Maximum number of batches of product p to include in the sequence of products to be pumped

product

Minimum number of batches of product p to include in the sequence of products to be pumped Total volume that is predicted to be delivered for clients (vu) Total number of cycle of products batches’ positions Takes a value of 1 if cycle position c is occupied by product or group of concurrent products p Typical cycle volume (vu) Maximum cycle volume (vu)

BTmax,p BTmin,p VPipe

TNPos NPositionsc,p Cycletypical Cyclemax cycle

Maximum number of cycles to include in the sequence of products to be pumped

cycle

Minimum number of cycles to include in the sequence of products to be pumped

BTmax BTmin

(1) Develop an initialization for the products’ sequence and give margins for maximum and minimum number of batches to be pumped; (2) Develop a set of the most adequate fixed sequences and run the model for all options.

717

Binary variables Symbol

Description

yi,p

Indicates that product p is contained in batch i whenever yi,p = 1

Note: “vu” stands for volumetric units.

The continuous time model is run with the information provided by the initialization heuristic and with the desired stopping criterion. The stopping criterion is not mandatory. However there might be operational constraints that lead to the definition of the stopping criterion. Otherwise, the sequence should terminate with a number of batches that optimize the given scenario. Each step of the heuristic will be detailed in the subsequent sections.

4.2. Priorities

The indexes and parameters used throughout this paper are described as follows:

Priorities are defined based on a simple rule that is related to the initial level of inventory for each product. Therefore, priority 1 (higher priority) is given to the product whose inventory faces stock out in first place if the pipeline would remain stopped along the time horizon. For this purpose it is defined a heuristic invenheur , which is obtained through Eqs. (2) and (3). The scenario tory, IDp,k data required to this step is the initial inventory level of each product (ID0,p ) and the discrete output for clients, Demp,k . ID0,p should include initial inventory of product p either on tank farm storage or in transit inventory,

Indexes/sets

heur heur IDp,k = IDp,k−1 − Demp,k

4.1. Nomenclature

Symbol

Description

n∈N p∈P k∈K i∈I Inew ⊂I

Set of terms of the objective function Set of products Set of discrete time points that represent clients’ demands Set of batches Batches whose pumping will be performed during the time horizon Set of cycle positions Group of concurrent products for the same cycle position

c∈C Pconcurrent ⊂P Parameters Symbol

Description

wn n nmax IDheur

Weight of objective function’s term n Generic objective function’s term Generic objective function’s upper bound for term n Total inventory of product p at day k, calculated assuming that the pipeline is stopped during the time horizon (for heuristic purposes) (vu) Initial inventory of product p considering tank farm storage and in transit inventory (pipeline contents) (vu) Clients’ demands of each product p at each day k (vu) Minimum flowrate (vu/h) Day that product p will stock out calculated assuming that the pipeline is stopped during the time horizon (for heuristic purposes) (day)

p,k

ID0,p Demp,k vbmin DDayp

heur = ID0,p − Demp,1 IDp,1

∀p ∈ P, k ∈ K, k > 1 ∀p ∈ P

(2) (3)

Based on the different levels of inventory calculated, priorities are assigned to all products taking into account the existence of forbidden sequences between products. As a result, one or more sequences’ beginnings can be outlined. The main objective of the priority is to locate as early as possible in the sequence the products with higher priorities. Since the initial content of the pipeline is known, these products will be certainly discharged to the distribution centre. So they can be accounted also as an input, extra to the initial inventory. However, it is necessary to consider as pumping rate the minimum possible (vbmin ), to maintain the least favourable scenario, and calculate the day at which they will be totally discharged (DDayp ) and with settling period completed:



DDayp =

i (Woi /vbmin ) + Trep,p i =1



∀p ∈ P, i ∈ / I new

24 yi,p =1

(4) The numerator of the right hand side of Eq. (4) has two terms. The first calculates the time necessary to unload the batch i from

718

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

the pipeline while the second takes into account the settling period for batch i. The sum of both values will give the total amount of time that batch i takes to be available for clients. There is one condition applied to the numerator, which requires the calculation only if the model binary variable yi,p becomes equal to 1. yi,p is equal to 1 whenever product p is contained in batch i. In this way, it is done the correspondence between parameters indexed to i and parameters indexed to p. The denominator is used to convert hours into days. Finally, DDayp is an integer value obtained as the rounding to the upper integer of the value obtained in the right end side of Eq. (4).

Fig. 8. Cycle unit analysis.

4.4. Bounds on number of batches (based on cycles) 4.3. Bounds on number of batches (based on products) The analysis of the minimum and maximum number of batches (based on products) has a large dependence on the system characteristics under study. One additional information necessary is typical the typical batch volume, Batchp , and the maximum batch volume, BatchMaximum , for each product. This information can be rather p difficult to define, but a good approximation is sufficient. A small typical note should be added regarding the parameter Batchp . In a first approach, the minimum values for batch volumes should be used, so as to obtain the valid interval of number of batches. However, the minimum values of batch volumes may correspond to reduced volumes, either if fixed volumes or a lower bound are used. Thus, in order to avoid a high degree of freedom on the number of batches, it is proposed the usage of the most common batch volume. The procedure is as follows: (1) Obtain the volume to transport of each product TPipep that covers total demands, but already takes into account the fact that the pipeline is filled up and, therefore, these products are definitely being discharged: TPipep =





Demp,k −

Woi

∀p ∈ P

(5)

i/ ∈I new |y

k∈K

i,p =1

product

product

(2) Obtain the maximum BTmax,p and minimum BTmin,p number of batches in the sequence (after the products that are already inside of the pipeline):

 product BTmax,p

=

=

∀p ∈ P

typical

Batchp

 product BTmin,p

 TPipep

(6)



TPipep BatchMaximum p

∀p ∈ P

(7)

product

yi,p ≤ BTmax,p

∀p ∈ P

(8)

i ∈ I new |y

i,p =1



VPipe =



product

∀p ∈ P



Woi

(10)

i/ ∈I new |y

p∈P k∈K

i,p =1

The subsequent step is to analyse if there is the chance to establish a cycle unit of products. A cycle unit should cover every product to be transported within the system. Thus, this cycle is repeated one after another, taking into account the possible/impossible pairs of products and providing a sequence of products. Each cycle has a total number TNPos of positions, equal to the total number of elements of set C. These positions can be occupied in two different ways: (i) fixed position, if a single product can occupy the position or (ii) mixed position, if there are two or more concurrent products for the position, as indicated in Fig. 8. In the case of a mixed position, in order to obtain as a final result a fixed sequence the occupancy of the spot is defined by the demand of each concurrent product. Therefore, the number of positions occupied by each product should be proportional to product demand. This analysis is carried out whenever market forecasts are available. The cycle end position has to verify a possible sequence with the product located in the first position. TNPos will be distributed by products or group of concurrent products in the following way: TNPos =





NPositionsc,p

(11)

where NPositionsc,p is a 0–1 matrix, where a value equal to 1 indicates that position c is occupied by the product or group of concurrent products p∈Pconcurrent . typical and BatchMaximum Using the values of Batchp , it is possible to p determine the typical and maximum cycle volume, Cycletypical and Cyclemax . Cycletypical =

yi,p ≥ BTmin,p

Demp,k −

c ∈ C p ∈ P concurrent

(3) Define the number batches to be transported. The values obtained in point 2 can now be used as new constraints in the model representation.



A second method to determine the bounds on the number of batches was developed. This was done using information based on a cycle of products. When a problem has a considerable number of batches and products, the total number of batches may vary within a large range. This is due to the fact that the sum of minimum and maximum number of batches per product is obtained to expand the search interval so as to overcome uncertainty issues. The input information concerns the total volume that is predicted to be delivered for clients, VPipe, but taking into account pipeline contents as it was considered when calculating TPipep . This should be the goal for the volume to be transported by the pipeline.

i,p =1

The additional information to give to the model is the fixed sequence obtained in the previous section, with a total number of pre-assigned (fixed) batches equal to the minimum number of batches to be pumped.

typical

NPositionsc,p × Batchp



(12)

c∈C p∈P

(9)

i ∈ I new |y

 

Cyclemax =



(NPositionsp × BatchMaximum ) p

(13)

c∈C p∈P cycle

cycle

At this point new values for BTmin and BTmax can be calculated dividing the expected pumped volume by both cycle volumes. These values will correspond to the expected number of cycles to

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

be pumped. The number of batches is obtained multiplying by the total number of positions in the cycle unit. Therefore new tighter bounds for minimum and maximum number of total batches are obtained through Eqs. (14) and (15).



cycle

BTmax = cycle BTmin



VPipe TNPos × Cycletypical

= TNPos ×

VPipe

Cyclemax



(14)

719

Table 2 Matrix of possible sequences on two consecutive products, CLC’s case study. P1 P1 P2 P3 P4 P5

P2

P3

P4

P5

P6

– – – –

– –



– –

– – – –





– –

(15)

4.5. Products’ sequence end In some systems, there might be a sequence’s termination criterion at the end of the time horizon. Such a criterion could be the guarantee of the existence of a minimum number of interfaces inside of the pipeline, where the strategy is to use a product that fills up completely the pipeline. Other criteria can be used to terminate the sequence. If no constraints are present, then the decision is left as a decision to be taken during the model solving procedure. It should be noticed that either to start the sequence or to end it, the decision maker should use the system information and any criteria based on single products. Thus, it is possible to use intermediate number of batches rather than multiple numbers of cycle length and start/end with specific products. 4.6. Set of fixed sequences In order to provide a systematic procedure to obtain feasible fixed sequences of products to apply to a medium term time horizon, the adopted strategy will use some rules that account for the priorities and the bounds on number of batches: (1) Use as starting point the initial batches that are already inside of the pipeline; (2) Use the priorities in order to transport as soon as possible the products with higher priorities; (3) After the initialization based on initial pipeline contents and priorities, find a suitable point to start repeating cycles of products; (4) Terminate the sequence either with a cycle or with necessary batches, in order to meet (i) a number of batches between the calculated interval or (ii) the desired sequence stopping criteria. This procedure should be repeated until all the possibilities within the interval of possible number of batches are totally covered. 5. Case studies Three case studies will be presented in this section. Case Study 1 is used to illustrate and validate the heuristic procedure for a shortterm period of 1 week. Case Study 2 is applied to a medium term horizon of one month and explores several options of the proposed heuristic. Finally, Case Study 3 contemplates 6 consecutive months and the heuristic is applied consecutively, providing the final data of each month to feed as initial conditions for the subsequent month. All case studies are based on the real world scenario of CLC – Companhia Logística de Combustíveis, a Portuguese company that transports and distributes oil products. This company owns a distribution centre located in the central area of Portugal. It distributes six different oil products (P1–P6) that are obtained through a pipeline connected to one refinery located in the south. The pipeline has 147 km in length and the total volume is 18,000 volumetric units (vu). The operating flowrates can span from 400

to 720 vu/h. Due to product quality, some sequences cannot be allowed inside of the pipeline. Table 2 represents the allowed matches ( ) or not allowed (–) to combine two consecutive products. The cycle of products corresponds to the one presented in Fig. 8. Products P3 and P4 are concurrent for the same position. Product P2 can only be transported between batches of product P1. The same situation occurs for batches of product P6, which can only be transported between batches of product P5. Finally, the end position of the cycle is occupied either by the concurrent products P3 and P4. It is easily stated through Table 2 that these products may be followed by product P1, which is located in the first cycle position. The values for typical and maximum volumes of batches are given in Table 3, for CLC’s case study. The results presented for each case study will comprise model performance and operational indicators. The operational indicators are: (i) the medium flowrate while the pipeline is pumping, which is an indirect measure of the pumping costs; (ii) Inventory, which is the difference between total pipeline input and total clients’ demands, indicating whether the pipeline total input covered the amount consumed by clients; (iii) the pipeline usage represents the total amount of time the pipeline is working, where it can be easily seen if all the available time is used; (iv) the final inventory level is the final fraction of total capacity that is being used at the end of the time horizon; (v) the minimum inventory is the lowest inventory verified for any product at any time point during the whole time horizon; (vi) the minimum final inventory indicates, which product has the lowest inventory level at the end of the time horizon; (vii) the number of interfaces inside of the pipeline while it is stopped. The last three indicators are extremely important. The minimum inventory is an indicator of schedule flexibility to incorporate any unpredicted situation that might occur. The minimum final inventory indicates that if there is one of the products with small inventory margin, the subsequent month’s beginning might be difficult to schedule. The interfaces will grow whenever the pipeline is stopped. They will lead to a larger volume sent to slops’ tanks and reduced products’ quality, due to mixing, may be compromised. Therefore, it is important to have the minimum number of interfaces during a stop. Table 3 CLC’s heuristic data: information on batches. typical

Product (p)

Batchp

P1 P2 P3 P4 P5 P6

18000 16000 8000 8000 800 3100

(vu)

Batchpmax imum (vu) 21800 16000 8000 16000 3200 4650

720

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

Table 4 Model performance for Case Study 1 – free sequences. Sequence (#batches)

5

6

7

8

9

10

11

12

# Continuous variables # Binary variables # Equations # Nodes # Iterations CPU (s) Objective function Relative gap (%)

669 215 1040 0 0 0.359 – –

892 272 1421 1914 56169 7.203 −1.971104 0.00

1143 333 1855 11822 549960 55.859 −1.992595 0.00

1422 398 2342 1500 224780 31.359 −2.039337 0.00

1729 467 2882 15719 4057537 615.734 −2.100077 0.00

2064 540 3475 248066 130131922 27578.437 −2.106478 0.00

2427 617 4121 288820 271617216 72000.640 −2.100077 1.87

2818 698 4820 459508 225242230 72015.296 −2.085006 2.57

For the case studies presented in any of the free sequence instances the model is run using the maximum number of batches as an upper limit rather than a fixed value. Since the (i) continuous time scale is based on the assignment variables of products to batches and (ii) the model has several types of discrete decisions, the combinatorial complexity is reduced when a fixed and, therefore, compulsory number of batches is used. For instance, on a monthly horizon and for the specific case of CLC, it is likely to have a number of batches between 30 and 40. Leaving the number of batches as an additional decision would originate an intractable model. Fig. 9. Free sequences of products obtained for Case Study 1.

5.1. Case Study 1 The objective of this case study is to provide an analysis to validate the heuristic procedure. For this purpose it will be considered a short-term period of 1 week. The data used will correspond to the real data of the first week of June 2006. The pipeline will start pumping at 10 h of day 1 and flowrates can vary between 450 and 650 vu/h. As the time horizon is only 1 week, there is no special end criterion for the sequence of products. The objective function used is the combination of terms 1, 4 and 5 from Table 1. Being the objective set to minimize, the weight on the term 1 is 2 with negative sign, on term 4 is 3 with positive sign and on term 5 the weight is 0.5 with negative sign. All scenarios were represented in GAMS 22.4 and solved with CPLEX 10.0, on a Pentium D820 with 2 GB RAM, running Microsoft Windows XP Professional. The desired computational stopping criterion is to obtain the optimal solution, however it was imposed a time limit of 10 h (72,000 s). The model will be run on a first phase for several number of total batches to be transported within 1 week, i.e., considering (i) free sequences, (ii) the specified number of batches has to be met and (iii) no information from the heuristic is used. From the application of the heuristic the limits on number of batches based on individual products are 7 and 10, as lower and upper limit, respectively. However, the complete set of scenarios will cover results from 5 up to 12 batches, such that the best solution is contained in this interval with a comfortable margin. The usage of the heuristic cannot guarantee that the sequence of products that leads to the overall optimal solution is the general problem’s optimal solution if the sequence constraints imposed by the heuristic were not used. However, the main objective is

to provide feasible sequences that address specific problem issues and reduce the computational effort related with optimal solution search. The second phase of the case study will consider the results from the heuristic procedure and in the scenarios’ implementation. 5.1.1. Free sequences From all scenarios, only the one with five batches was verified to be integer infeasible. Fig. 9 presents the free sequences obtained for each case. The obtained sequences reveal some differences between them. The sequences with 6 and 7 batches include basically P1, P3 and P4. Sequences with 8–12 batches reveal some tendency to transport cycles of products, being the base unit indicated in Fig. 8. The sequences that disclose some similarities are 9 and 10. The performance and model statistics are detailed in Table 4, while the operational indicators of each sequence are detailed in Table 5, being the best values indicated in bold. The optimal solution among this set is the one with 10 batches of products, which presents the lowest value for the objective function. However, it is easily seen that the optimal solution for this scenario was obtained after 7.7 h of computation, whereas the optimal solution for the sequence with nine batches was obtained in 10.6 min. Thus, one of the major conclusions is the impact that the sequence of products (and model size) has on CPU effort. Sequences 11 and 12 did not return the optimal solution after 20 h of computation. The best possible solution was −2.138500, which would be better than the solution for sequence 10. But

Table 5 Operational indicators for Case Study 1 – free sequences. Sequence (#batches)

5

6

7

8

9

10

11

12

Medium flowrate (vu/h) Inventory (vu) Pipeline usage (%) Final inventory level (%) Minimum inventory (%) Minimum final inventory (%)

– – – – – –

489.87 +34 94.05 51.53 18.22 (P5) 18.22 (P5)

489.87 +34 94.05 51.53 22.52 (P6) 22.52 (P6)

494.94 +834 94.05 51.95 30.11 (P5) 36.26 (P2)

491.77 +334 94.05 51.69 27.12 (P5) 45.66 (P1)

489.87 +34 94.05 51.53 26.78 (P5) 45.29 (P1)

491.77 +334 94.05 51.69 30.11 (P5) 45.66 (P1)

489.87 +34 94.05 51.53 30.11 (P5) 41.00 (P1)

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

721

Table 6 Heuristic inventory for the initial 14 days of June 2006.

considering that this is a real world case study, it is necessary to obtain solutions within reduced amounts of time. In this way, solutions with relative gaps below 5% were obtained in (i) 36 s for sequence 10, (ii) 250 s for sequence 11 and (iii) 680 s for sequence 12. Analysing the operational results, all sequences used the total amount of available time, but sequences 8, 9 and 11 used higher medium flowrates. Final inventory level varied from 51.53% up to 51.95%. The minimum inventories on products, either final or during the complete time horizon, verified their lowest values for sequence 6. However, the solutions with the higher values presented quite reasonable levels. 5.1.2. Fixed sequences The second phase consists in establishing a set of scenarios for the same problem, using fixed sequences that were derived from the heuristic procedure proposed. The results are then compared either in obtained sequences, model performance and operational indicators. The first step is to analyse the calculated heuristic inventory for the first 14 days of June in Table 6. It can be observed that after the first 7 days of the short-term horizon to be included as model data, no product faces stock out. For this reason, it is important to analyse a week further because the current products being pumped to the pipeline will have effect over the inventory at the distribution centre a few days after (due to pipeline transit and settling period). Table 7 describes the values obtained for the three approaches proposed within the heuristic procedure. The obtained priorities indicate that priority 1 is for P4, priority 2 for P1, priority 3 for P6, priority 4 for P2 and P5 and finally priority 5 for P3, which does not even stock out. The interval on number of batches is narrower for the information based on cycles. The minimum medium flowrate that guarantees outputs’ reposition is of 489.7 vu/h. The maximum pumping time is of 158 h (start-up occurs at 10 h of day 1) in a 168 h time horizon. Fig. 10 shows the possible sequences obtained for the corresponding intervals and priorities while avoiding forbidden sequences between pairs of products. Although the maximum number of batches is 9/10, it was decided to analyse the sequence

until a number of 12 batches so as to verify if there is any improvement in the objective function and operational results. All sequences start with product P1, which was the online product in pipeline contents, and then P4 is included. From this point on the cycle is completed, since it started at position number 3 (P1) as it can be observed in Fig. 8. The cycle repetition can be observed in more detail when a medium-term horizon is used. When comparing the sequences obtained and presented in Fig. 10 and the pre-analysis data presented in Table 7 it is possible to add some comments as follows. The heuristic approach presented main purpose is to give directions for the user. Therefore, it was determined the range value of number of batches to transport by product. However, these intervals were developed based on the idea that the pipeline operation should replace consumed products. This is not a hard constraint or neither the objective is fixed. For instance, for a given scenario it may be desired to raise the inventory level due to a specific situation. In this situation, the heuristic should provide results in this sense through a simple change in the volumes to transport through the pipeline. The obtained results on model performance are summarized in Table 8 and the operational indicators are described in Table 9, being the best values indicated in bold. The optimal solution was obtained for sequences 9, 10 and 11. For sequence 12 the best possible solution started to decrease. No integer feasible solutions were obtained for sequences 7 and 8. The main differences between the fixed and the free sequences are (i) on one hand computational effort is, at least, one order of magnitude lower and (ii) on another hand, none of the proposed sequences was equal to the ones obtained by the free sequences’ scenarios, thus neither the optimal solutions. The reduction on binary variables verified between Table 4 and Table 8 is only due to the fixing of the assignment variables that translate the pumping sequence. The observed difference on computational effort relies on the definition

Table 7 Heuristic data for the first 7 days of June 2006. Product

Priorities

Bounds on batches (products) Min

Max

Min

P1 P2 P3 P4 P5 P6

2 4 5 1 4 3

2 1 1 2 2 2

2 1 1 1 1 1

– – – – – –

– – – – – –

Total



10

7

9

7

Max

Bounds on batches (cycles)

Fig. 10. Sequences of products for Case Study 1.

722

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

Table 8 Model performance for Case Study 1 – fixed sequences. Sequence (# batches)

5

6

7

8

9

10

11

12

# Continuous variables # Binary variables # Equations # Nodes # Iterations CPU (s) Objective function Relative gap (%)

– – – – – – – –

– – – – – – – –

1143 292 1855 0 0 0.062 – –

1422 351 2342 0 0 0.171 – –

1729 414 2882 661 3972 1.265 −2.030331 0.00

2064 481 3475 1889 11708 2.859 −2.030331 0.00

2427 552 4121 47 241 0.921 −2.030331 0.00

2818 627 4820 4 81 0.859 −1.964397 0.00

Table 9 Operational indicators for Case Study 1 – fixed sequences. Sequence (# batches)

5

6

7

8

9

10

11

12

Medium flowrate (vu/h) Inventory (vu) Pipeline usage (%) Final inventory level (%) Minimum inventory (%) Minimum final inventory (%)

– – – – – –

– – – – – –

– – – – – –

– – – – – –

489.87 +34 94.05 51.53 26.78 (P5) 30.06 (P3)

489.87 +34 94.05 51.53 30.06 (P3) 30.06 (P3)

489.87 +34 94.05 51.53 30.06 (P3) 30.06 (P3)

505.06 +2434 94.05 52.80 30.06 (P3) 30.06 (P3)

of the continuous time scale that uses the pumping sequence to define a sequential time scale (Relvas et al., 2006). Analysing the operational indicators, the solutions for sequences 9–11 were almost equal, except for the minimum inventory obtained with sequence 9. The main difference on sequence 12 was a higher medium flowrate and, therefore, a higher final inventory. As it was already stated, one of the benefits of the heuristic is that it can be incorporated knowledge of the following days. The model itself is blind to whatever may happen right after the end of the time horizon. For this reason, it was decided to analyse the stock out days for all sequences considering as the starting point the final inventory of week 1 of June. The results are presented in Table 10. Apart of having the optimal solution when the sequences are free, the days for stock out have better results for the fixed sequences. Only in five cases the free sequences performed better. In conclusion, this first case study was established in order to validate the proposed heuristic. Despite of having the risk of eliminating the optimal solution for the given scenario, the heuristic can use some knowledge of the system that the model itself neglects. This is verified if the time horizons are extended and a quick analysis is made for the new days of stock out. With the results obtained from the heuristic, the inventory management for Case Study 1 became more flexible. Table 10 Days of stock out after week 1, Case Study 1.

5.2. Case Study 2 The analysis presented in this case study reflects the initial conditions at CLC of November 2006. The objective is to obtain an initial plan for this month, with the information that was gathered in middle October. Table 11 indicates initial products inside the pipeline, initial inventory and total demands. Flowrates may vary between 500 and 600 vu/h. Additionally, it is known that due to pipeline maintenance, pipeline operation will start during day 2 (60 h) and that there is a planned pipeline stop between 642 and 672 h. It is also desired to obtain a positive balance between inputs and outputs. The objective function used is the combination of terms 1 and 4 from Table 1. Being the objective set to minimize, the weight on the term 1 is 2 with negative sign and on term 4 the weight is 1 with positive sign. Two examples will be studied using the above data. In the first example (E1) the option 1 of the heuristic procedure is contemplated. They it will be derived an initialization sequence and minimum and maximum bounds on the number of batches (based on products) to be included in model formulation. The second example (E2) explores the second option of the heuristic procedure and will develop feasible fixed sequences to include as initial data for the model.

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

723

Table 11 Initial conditions at November 2006. Product

P1

P2

P3

P4

P5

P6

Total

Woi (vu) p ID0 (vu) Total demand (vu)

18000 40690 188765

0 15706 53640

0 13867 7181

0 18276 58031

0 7771 13150

0 6734 24448

18000 103044 345215

Table 12 Assignment of priorities and limits on number of batches. Product

Initial inventory (vu)

Inventory inside of the pipeline (vu)

Day of stock out

P1 P2 P3 P4 P5 P6

40690 15706 13867 18276 7771 6734

18000 0 0 0 0 0

9 9 – 9 20 8

Total

Both scenarios were represented in GAMS 22.3 and solved with CPLEX 10.0, on a Pentium D820 with 2 GB RAM, running Microsoft Windows XP Professional. The desired computational stopping criterion is a relative gap lower than 5%. 5.2.1. Example E1 Given the data in Tables 10 and 11, priorities for products and bounds on batches were derived. These results are presented in Table 12. Product P6 will be the first to face stock out, but there are three products (P1, P2 and P4) that face stock out at day 9. P3 and P5 face no tight margins. With this information, it is possible to establish a beginning for the sequence. Considering that batch 1 is already inside the pipeline, Fig. 11 shows a possible initialization for the sequence. This is a sequence that brings as early as possible P6 (fourth position). P4 becomes in the second position, but P1 and P2 are positioned later in positions seven and eight. For the derivation of the scenarios of study E1, it is taken the minimum number of batches of 22 indicated by the heuristic. The sequence beginning in Fig. 11 is extended until this number is reached, using cycle unit repetitions. It can be seen that the repetition starts at position 9, since a complete cycle of products is located between positions 1 and 8. The model is run with the first part of the sequence fixed and with maximum number of batches of 48, which was the maximum number of batches obtained through the heuristic procedure. The second scenario considers the model with the inclusion of limits also on the number of batches for each product, which are detailed in Table 12. For a maximum of 15 h of computation none of the scenarios returned a feasible solution. Table 13 presents the model statistics for both scenarios of study E1. The main difference between both cases is that the second scenario is more restricted than the first one, due to the limits on the number of batches for each product. However, the reduction of the search space is translated in a slower search process: for the same CPU time limit, they were explored 1040 nodes in the first scenario, but only 180 in the second. Even with a fixed sequence on the beginning, it is evident that the model performance largely depends on the products sequence. Furthermore, this first option of the heuristic procedure imposes

Min. number of batches

Max. number of batches

7 3 0 3 4 5

10 4 1 8 17 8

22

48

Table 13 Model performance for Example E1. Scenario

Without limits by product

With limits by product

# Continuous variables # Binary variables # Equations # Nodes explored # Iterations CPU (min) Objective function Relative gap (%)

37862 8534 68802 1040 14587412 900 – –

37862 8534 68814 180 7899519 900 – –

limits on the number of batches. Even fixing the first part of the sequence, there is a new source of complexity (new degree of freedom) where it is possible to have a sequence with a number of batches between 22 and 48. This is translated in a combinatorial complexity increase. 5.2.2. Example E2 This second example regards option 2 of the heuristic initialization procedure presented in Fig. 7. Several sequences ends will be proposed such that complete fixed sequences can be given to the model. At the end of the time horizon it is imposed that the pipeline has to be completely filled with P1. Nine fixed sequences were defined with 25, 27, 31, 33, 35, 39, 41, 43 and 47 batches. An alternative sequence initialization can also be derived, once there are four products whose stock out will be located between days 8 and 9. This is represented in Fig. 12. In this case, the cycle is initialized, like it was first presented in Fig. 8, and the repetition of cycles is done from position 9 forwards. Having the same ending criterion, a group of 10 fixed sequences is derived, with 25, 27, 29, 33, 35, 37, 41, 43, 45, and 47 batches. Therefore both cases will be analysed. All sequences will be identified in the subsequent form: .<# of batches>. For instance, the sequence with the second initialization and with a number of batches of 35 is “2.35”. The model is run using a CPU time limit of 2 h, which is an acceptable amount of time regarding the real world company objectives. Table 14 presents the model statistics for example E2. Table 14 shows that model size increases with the number of batches in the fixed sequence. Sequences with lower number of batches (from 25 to 33) have no feasible solutions. The same is

Fig. 11. Products’ sequence initialization 1 for Example E1.

724

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

Fig. 12. Products’ sequence initialization 2 for Example E2.

Table 14 Model performance for Example E2. Sequence

1.25

1.27

1.31

1.33

1.35

1.39

1.41

1.43

1.47

# Continuous variables # Binary variables # Equations # Nodes # Iterations CPU (s) Objective function Relative gap (%)

11642 3266 20493 – – 5.75 – –

13334 3638 23574 – – 9.51 – –

17054 4430 30372 – – 9.14 – –

19082 4850 34089 – – 13.77 – –

21222 5286 38018 18440 883351 7200 – –

25838 6206 46512 5862 550541 778.75 −1.7497 0.03

28314 6690 51077 4273 137409 316.23 −1.7499 0.01

30902 7190 55854 529 76612 256.73 −1.7496 0.04

36414 8238 66044 7820 753780 7200 – –

Sequence

2.25

2.27

2.29

2.33

2.35

2.37

2.41

2.43

2.45

2.47

# Continuous variables # Binary variables # Equations # Nodes # Iterations CPU (s) Objective function Relative gap (%)

11642 3266 20493 – – 7.41 – –

13334 3638 23574 – – 10.16 – –

15138 4026 26867 – – 9.00 – –

19082 4850 34089 – – 23.12 – –

21222 5286 38018 513 85375 182.62 −1.7491 0.09

23474 5738 42159 182 72541 299.88 −1.7499 0.01

28314 6690 51077 248 74912 350.78 −1.7499 0.01

30902 7190 55854 258 121856 488.77 −1.7499 0.01

33602 7706 60843 169 61544 375.47 −1.7499 0.01

36414 8238 66044 – – 29.64 – –

true for the sequence 2.47. Furthermore, the model takes a reduced amount of time to analyse the existence of solutions. However, for sequences 1.35 and 1.47 it was not possible to find a feasible solution within 2 h of computation. For a group of 8 sequences out of 19, solutions very close to the optimal were found. Despite the time taken for sequences 1.35 and 1.47, the remaining study of 17 different sequences took approximately 53 min in total. Table 15 summarizes the operational indicators for the sequences that returned feasible solutions. These are: (1) the medium flowrate verified throughout the entire time horizon;(2) the balance between final and initial inventory, which is obtained by the difference between total inputs and total outputs; (3) the total pipeline usage, compared with time horizon extension; (4) the final inventory level, representing the occupancy of total available storage capacity in the tank farm; (5) minimum inventory level verified in a single product and (6) number of interfaces inside of the pipeline during the predicted pipeline stoppage. The best values for each indicator are represented in bold. When analysing Table 15, it can be seen that the first four indicators have similar values in all solutions obtained. This is not surprising since all solutions are very close to optimal one. However, some differences can be found in the minimum inventory and number of interfaces during pipeline stop. Sequences 1.41 and 2.43 consider three interfaces during the pipeline stoppage. Throughout a 30 h stop, it is likely for interfaces to enlarge and contaminate adjacent batches. Regarding the minimum inventory level, there is not any critical value, but the scheduler can chose not to have a minimum inventory level of 15.4%, as it is verified in sequences 2.35, 2.43 and 2.45, or any other option.

Since the best values of indicators are highlighted, sequence 2.37 has a total of four best values for indicators. Furthermore, two extra criteria can be used in order to choose one of the schedules. These could be the model size and the CPU time. These are justified by the fact that with a schedule covering one month, there will certainly take place rescheduling tasks and opportunities for improvement will arise. In this way, sequence 2.37 has one of the lowest model sizes and presents a reasonable CPU time, but sequence 2.35 would now be the chosen one (best CPU time and smallest size, leading to five best indicators’ values). 5.3. Case Study 3 This study is meant to analyse the behaviour of the heuristic in a group of 6 consecutive months. They describe the operations at CLC between months June and November 2006. The study was carried using the final data for each month, i.e., the real occurrences for each month, such as real initial inventory, pipeline start-up, stoppages and demands. Therefore, it will be considered that each month has a static behaviour, i.e., the obtained solution provides directly initial data for the subsequent month. The main objective of this study was to use the priorities indicator combined with the information obtained from the bounds on batches based on cycle information. For this study and for each month it was developed a set of fixed sequences resulting from the application of the rules defined in Section 4. All scenarios were represented in GAMS 22.4 and solved with CPLEX 10.0, on a Pentium D820 with 2 GB RAM, running Microsoft Windows XP Professional. The desired computational stopping cri-

Table 15 Operational indicators for Example E2. Sequence

1.39

1.41

1.43

2.35

2.37

2.41

2.43

2.45

Medium flowrate (vu/h) Inventory (vu) Pipeline usage (%) Final inventory level (%) Minimum inventory (%) # Interfaces during pipeline stop

548.2 +135 87.5 54.7 23.2 (P6) 1

548.0 +35 87.5 54.6 21.5 (P2) 3

548.3 +185 87.5 54.7 23.2 (P6) 0

548.6 +385 87.5 54.8 15.4 (P4) 2

548.0 +35 87.5 54.6 23.2 (P5) 0

548.0 +35 87.5 54.6 17.6 (P6) 1

548.0 +35 87.5 54.6 15.4 (P4) 3

548.0 +35 87.5 54.6 15.4 (P4) 0

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

725

Fig. 13. Set of feasible sequences following heuristic rules (June 2006, Case Study 3).

Table 18 Priorities on products to be pumped for June 2006 (Case Study 3).

terion is a relative gap lower than 5% or a computational time limit of 2 h. The objective function used is the combination of terms 1, 4 and 5 from Table 1. Being the objective set to minimize, the weight on the term 1 is 2 with negative sign, on term 4 the weight is 3 with positive sign and on term 5 is 0.5 with negative sign. Flowrates can vary between 450 and 650 vu/h. Table 16 shows the pipeline stops for each month, the pumping start point as well as the maximum available pumping time. Table 17 shows the total demands for each month, the upper and lower limits for number of batches obtained from the limits on number of batches based on cycle information and the expected medium flowrate that assures the total replenishment of clients’ demands. This flowrate is obtained using the available time for pipeline operation and the total volume of products forecasted by clients. The number of batches and medium flowrate verified in CLC’s revisions are also indicated. Considering that the model is set to approximate the difference between total demands and pipeline input, it is expected as model results to obtain medium flowrates close to the predicted medium flowrate. It can be seen that for June, July, October and November CLC’s medium flowrate is higher than the expected. On the other hand, during August and September, there were lower

Priority

Product

1 2 3 4 5

P4 P1 P6 P2 P3

P5

medium flowrates, leading to some expected fluctuations on the storage level. Regarding the number of batches, in July, October and November CLC had a higher number of batches. However, in the model formulation they are only considered three different batch volumes in contrast to CLC scheduling, where values can be inserted manually. In some situations CLC’s schedulers may deviate from the heuristic of transporting volumes equal to tanks’ volume in order to have a specific batch later or sooner. In most of these situations, they are used smaller volumes. Considering June as example, the obtained priorities are shown in Table 18. In the fourth position there are two products, meaning that they will stock out during the same day. The last priority is for P3, which would not even stock out, but the final inventory would

Table 16 Initial data for Case Study 3: timing issues. Month

Pipeline stops (h) 1

June 2006 July 2006 August 2006 September 2006 October 2006 November 2006

603.6–642 515.1–527.0 163.3–202.0 319.3–433.0 153.7–183.0 28.2–65.5

2

3

– 551.0–560.8 252.3–264.5 652.8–659.5 199.2–207.3 618.0–648.0

– – 354.6–394.0 – – 671.0–674.4

Pumping start (h)

Available pumping time (h)

10 34 1 34 61 23

671.6 (93.3%) 688.3 (92.5%) 652.6 (87.7%) 565.6 (78.6%) 645.6 (86.8%) 626.3 (87.0%)

Table 17 Upper and lower limits on number of batches, expected medium flowrate and CLC’s results (Case Study 3). Month

Total demands (vu)

June 2006 July 2006 August 2006 September 2006 October 2006 November 2006

323623 328110 341009 319314 333639 327326

# Batches

Expected flowrate (vu/h)

Upper

Lower

35 37 38 35 36 36

26 26 27 25 27 26

481.6 476.7 522.5 564.6 516.8 522.6

CLC #Batches

Medium flowrate (vu/h)

33 39 37 32 42 39

520 503 494 528 550 538

726

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

Table 19 Number of fixed sequences and total CPU effort, Case Study 3. Month

Number of sequences

Number of solutions

Total time of computation (min)

June 2006 July 2006 August 2006 September 2006 October 2006 November 2006

4 5 5 5 5 4

3 3 3 2 3 2

30.8 146.3 219.8 218.1 169.6 153.5

be under 5%. For this reason, it is decided to pump one set of P3. The set of fixed sequences obtained for June 2006 is shown in Fig. 13. Each sequence will be identified with ., as indicated on the left side of Fig. 13. The first three sequences have three complete cycles, while sequence 6.35 has four cycles. All off them start and end with the pipeline full of P1, which is the usual criterion at CLC for the end of the month. On the right side of Fig. 13 it is indicated the corresponding number of cycles obtained for each sequence. For example, sequence 6.27 has three complete cycles plus three single batches. Considering that each cycle has eight positions, these batches can be considered as a fraction of cycle. The feasible interval obtained from the heuristic is from 3.153 to 4.356. Therefore, sequence 6.35 is slightly out of the interval, but will be considered. Table 19 summarizes the number of sequences developed for each month. In the following results presented in Tables 20 and 21, model performances and operational indicators are shown for the selected sequences for each month. The most preponderant decision factors are the operational indicators. The decision maker should select the sequence that provides not only good model performance but also a flexible solution, i.e., the one that provides a good basis to accommodate any unpredicted situation. From a total of 28 sequences of products, 16 returned feasible solutions. From the remaining, seven sequences returned integer infeasible solutions and five did not return any solution after two hours of computation. Another interesting remark is that for the months with only two feasible solutions, July, August, October and November, it is more likely that the feasible solutions are from the sequences that were outlined first, i.e., taking into account prior-

Fig. 14. Monthly total inventory levels: real and model results (Case Study 3).

ities with higher levels. This is a good indicator for the heuristic performance. The total amount of time spent was 15.6 h, with 10 h spent in sequences with no solution (5) and 2.3 min in integer infeasible solutions (7). Fig. 14 represents the evolution of the total inventory levels for each month, comparing the difference between the results obtained with the model and the real data from CLC. The major conclusion is that the model keeps a steady final inventory, meanwhile the heuristic scheduling done by CLC’s schedulers faces variations in a range of 35,000 vu. One of the major guidelines for CLC’s schedulers is to try to keep the storage level close to (and preferably higher than) 50% of total tank farm capacity. However, this is not verified for CLC’s schedule for September. Fig. 15 shows how the monthly inventory profiles vary by product. The upper gridline represents the maximum storage capacity. The other gridline represents 50% capacity. In the individual representation, the variations are higher, even for the model results. However, it can be verified some similarities between model a real data evolution. P1’s model profile is located below 50% of storage capacity, denoting that it is a very demanding product. For the remaining products, the profiles are mainly located above 50% of storage capacity. CLC data shows some breaks, mainly for P3 and P6.

Table 20 Model performance for the selected sequences by month, Case Study 3. Month

June

July

August

September

October

November

# Continuous variables # Binary variables # Equations # Nodes # Iterations CPU (s) Objective function Relative gap (%)

15146 4027 26908 391 93182 160.359 −2.042297 0.01

23629 5701 42431 2006 403351 765.171 −2.077844 1.02

23703 5775 42605 966133 3494 1652.046 −1.978030 1.54

21300 5182 38201 17914 2019167 2770.328 −1.812429 0.75

23629 5701 42461 6008 694095 1064.859 −1.972828 1.15

17186 4400 30655 22629 860799 832.906 −1.936731 0.16

Table 21 Operational indicators for the selected sequences by month, Case Study 3. Month

June

July

August

September

October

November

# Batches Medium flowrate (vu/h) Inventory (vu) Pipeline usage (%) Final inventory level (%) Minimum inventory (%) Minimum final inventory (%) # Interfaces during pipeline stop

29 481.62 +27 93.33 51.52 16.23 (P4) 35.16 (P1) 0

37 477.30 +390 92.51 51.73 11.56 (P5) 46.03 (P1) 4;1

37 522.59 +41 87.72 51.75 44.79 (P2) 16.40 (P4) 1;1;0

35 566.83 +1286 78.56 52.49 16.43 (P4) 49.91 (P1) 2;1

37 516.97 +111 86.77 52.55 17.56 (P6) 47.62 (P2) 1;2

31 523.38 +474 86.99 52.80 40.00 (P6) 23.90 (P6) 1;1;1

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

727

Fig. 15. Monthly inventory levels by product: real and model results (Case Study 3).

Except for P1, all the remaining products would have higher inventory at the end of the 6-month period using model results. With Case Study 3 it was possible to study how the heuristic behaves for consecutive time horizons. It is easily adapted both to receive and use the initial data, and also to produce feasible solutions, with feasible final results to feed to the consecutive time horizon. It was also possible to analyse that the second strategy, to obtain tighter intervals on number of batches, performed in a positive way. 6. Conclusions and further work The proposed heuristic procedure combines scenario data and the matrix of possible sequences to derive valid sequence directions, so as to improve the solution method. Two strategies were proposed: (i) initialize the sequence of products to be pumped and give upper and lower margins for the total number of batches and (ii) provide a set of alternative fixed sequences for the same problem. The first method was applied without success to a medium term scheduling problem (Case Study 2). Despite having the initial part of the sequence fixed, leaving open for the solution finding process

to set the remaining sequence no solutions were returned, even with large time intervals. Thus, this method is not suitable to use in CLC’s case study whenever a medium term solution is desired. On the other hand, the second method provide acceptable results not only in a short term time horizon (Case Study 1) but also for medium term horizons (Case Study 3). Given a good range for the number of batches, a set of fixed sequences can be derived using the product priorities. The most suitable method to obtain lower and upper limits on number of batches is the cycle unit information. The main advantage for a solution obtained with the heuristic procedure is that one can use information on the subsequent days after the time horizon, as it was verified in Case Study 1. This is important due to the fact that products transported by the pipeline will have a time delay between the pumping time and the effective moment when they are necessary at the distribution centre. For this reason, the scheduler knowledge is important to decide which solution to use. Two notes should be added to the implementation and usage of the proposed heuristic procedure concerning (i) approach usage and (ii) assumptions made. In the first case, the approach presented aims to provide decision support for the user as well as to reduce model complexity. In this

728

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

way the current heuristic approach was implemented in a spreadsheet with high level of interaction with the user. This implies that there are several degrees of freedom that the user can fulfil with his own knowledge of the problem. In the future, a systematic procedure that combines the sequence exploration procedure (highly combinatorial) with the intrinsic knowledge of the problem is to be proposed. The second point is related with the assumptions made in the heuristic procedure. It is important to note that the heuristic proposes limits on the number of batches, therefore it is desired to maintain inventory levels at the tank farm, i.e., the pipeline should make the reposition of products consumed. However, this is not a general assumption (but covers a normal operation mode) since there might be different objectives to fulfil through pipeline operation. An alternative would be to raise final inventory level to face an eventual event as higher client demands or a long forced pipeline stoppage. The current flexibility of the heuristic algorithm enables the user to change this assumption in order to fulfil the new desired objective. The proposed heuristic is problem-oriented and independent of the usage of the MILP model already published by the authors. The heuristic only uses problem details, such as products and transportation constraints, and scenario data, such as initial inventory and time-dependent demands. Additionally, the heuristic proposed provides solutions on sequencing products into pipelines, which represent a continuous operation. This work shows the proposed heuristic applied to CLC’s case study, but is prepared to receive any problem having a similar system under study. As future work the heuristic procedure could be extended to include timing issues. In this way, it would be used tank farm requirements over time in order to provide information of quantities and timings for each product so as to feed as pipeline data. Additionally, a new objective function based on costs should be developed and compared the effects of the usage of the heuristic. Acknowledgement

Parameters Symbol

Description

Dmax

Upper limit on the volume of any batch that can be transferred from the pipeline to the distribution centre (vu) Lower limit on the volume of any batch that can be transferred from the pipeline to the distribution centre Volumetric coordinate of the distribution centre (vu) big-M, related to pipeline volume = Minimum settling period for a batch of product p (h) Storage capacity for product p (vu) Volume of batches i that originally are inside the pipeline (vu) Daily-based (k) time scale for information on clients demands (h) Matrix of possible batches’ volumes lt for each product p (vu) Clients’ demands of each product p at each day k (vu) Matrix of possible sequences between subsequent products inside the pipeline, p and p Initial inventory of product p at the tank farm (vu)

Dmin  Mvol Trep,p IDmax,p Woi TDemk lotsp,lt Demp,k sequencep,p IDp0

Continuous variables Symbol

Description

Ci Li Qi  Fi

Completion time of pumping batch i (h) Length of pumping batch i (h) Volume of batch i (vu) Upper volumetric coordinate of batch i while injecting a later batch i (vu) Volumetric fraction of batch i still inside of the pipeline while injecting a later batch i (vu) Volumetric fraction of batch i discharged to the distribution centre while injecting a later batch i (vu) Volume of batch i made available for clients after accomplishing the settling period while injecting a later batch i (vu) Demand of product p while injecting batch i (vu) Volumetric fraction of batch i of product p discharged to the distribution centre while injecting a later batch i (vu) Volume of batch i of product made available for clients after accomplishing the settling period and while injecting a later batch i (vu) Total inventory of product p available at the distribution centre while injecting batch i (vu) Inventory of product p available for clients while injecting batch i (vu) = Total time that batch i had already settled while injecting a later batch I (h) Total time that batch i of product p had already settled while injecting a later batch i (h)

i

Wi



i

Di



Di



i

clients,i

qdpi  DV i

i,p

DV i



clients,i,p

IDi

total,o

The authors gratefully acknowledge the case study and the financial support provided by Companhia Logística de Combustíveis.

IDpi Ti



Ti



set,i setp,i,p

Appendix A In this section the MILP model formulation including the rescheduling strategy is presented. All the symbols used in the different indices/sets, parameters and variables have the following definitions.

Binary variables Symbol

Description

yi,p  xi

Indicates that product p is contained in batch i whenever yi,p = 1 Indicates that a fraction of batch i can be transferred to the distribution centre while a later batch i is being pumped,  whenever xi = 1 i Indicates that batch i has batch volume lt of product p whenever lsi,p,lt = 1 Indicates that day k (0 h) is located in time interval [0,Ci ] whenever dmei,k = 1 Indicates that 0 h of day k are located in time interval] Ci−1 ,Ci ] whenever dmFinal = 1

i

Indices/sets Symbol

Description

i∈I p∈P lt∈LT k∈K Inew ⊂I

Batches Products Volumetric batches Days Batches whose pumping will be performed during the time horizon Pipeline stoppage instant (h) Pipeline startup instant, after pipeline stoppage (h)

Tstop ∈T Tstart ∈T Parameters

lsi,p,lt dmei,k dmFinal i,k

 xi set,i

xi





available,i

Symbol

Description

xi

hmax

Time horizon (h) Minimum flowrate (vu/h) Maximum flowrate (vu/h)

pmatchi

vbmin vbmax

clients,i

i,k

Indicates that batch i has already performed a settling period  =1 over Trep whenever xi set,i

Indicates that batch i is already available for clients when a  =1 later batch i is being pumped whenever xi out,i

Indicates that batch i is available for clients when a later batch  =1 i is being pumped whenever xi clients,i

pstopi

Indicates that pipeline stop time (Tstop ) is lower than Ci whenever pmatchi = 1 Indicates that the pipeline stoppage is located at time interval i when pstopi = 1

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

• Inventory control at the distribution centre

Model formulation



∀i ∈ I new

∀i ∈ I

Li ≤ Ci

Ci ≤ hmax

∀i ∈ I new , p ∈ P, i ≥ i

i ≤ Dmax × yi,p DVi,p

• Batches’ sequencing Ci − Li ≥ Ci−1

(A1)

new

(A2)

∀i ∈ I

(A3)

new





i DVi,p = Dii



∀i ∈ I new , i ≥ i

p

vbmin × Li ≤ Qi ≤ vbmax × Li ∀i ∈ I new

lmax =



(A5)

vbmax

(A6)

vbmin

yi,p × lmin ≤ Li ≤



p

yi,p × lmax

(A7)

p

• Forbidden sequences yi−1,p + yi,p ≤ 1 + sequencep,p

∀i ∈ I new , ∀p, p ∈ P

(A8)

• Upper and lower volume coordinates of batch i 





(A9)

∀i ∈ I new





Wii = Wii −1 − Dii 

Dii ≤ Dmax × xii 

Fii ≥  × xii





∀i ∈ I, ∀i ∈ I new , i > i ∀i ∈ I, ∀i ∈ I new , i ≥ i

i

i

Fi+1 ≤  − Di + (1 − xi ) × Mvol i

∀i ∈ I, ∀i ∈ I

∀i ∈ I, ∀i ∈ I new , i > i

Dii ≤ Wi



∀i ∈ I, ∀i ∈ I new , i > i

≥ Dmin × xi i −1



(A12)

∀i ∈ I, ∀i ∈ I new , i ≥ i

i −1

 Wii −1

(A10) (A11)



p∈P



yi,p ≤

p∈P



∀i ∈ I new

yi,p ≤ 1



i

(A27)

IDtotal,p ≤ IDmax,p

(A27a)

∀p ∈ P, i ∈ I new

(A28)

new

yi−1,p

∀i ∈ I

, k∈K

(A30)

= dmei,k − dmei−1,k dmFinal i,k

∀i ∈ I new , k ∈ K

(A31)

∀i ∈ I new , p ∈ P

(A32)

qdp,i =



Demp,k × dmFinal i,k

k∈K





i ) × Dmin Wii −1 ≥ (1 − xset,i



, i >i

i

xset,i ≤ 1 − xi 











∀i ∈ I, i ∈ I new , i > i

∀i ∈ I, i ∈ I new , i > i

i −1 i ≤ Tset,i + Ci − Ci −1 Tset,i

∀i ∈ I, i ∈ I new , i > i



(A16) (A17)





(A20)

(A36)

(A37)

∀i ∈ I, i ∈ I new , i > i

i i Tsetp,i,p = Tset,i

(A38)

p∈P 

∀i ∈ I, i ∈ I new , i > i

i ≤ yi,p × hmax Tsetp,i,p

(A19)

(A35)



∀i ∈ I, i ∈ I new , i > i

(A15)

(A33) (A34)

∀i ∈ I, i ∈ I new , i > i

i i Tset,i ≤ xset,i × hmax



(A39)



i −1 i ≥ Trep,p × (yi,p + xavailable,i − 1) Tsetp,i,p

∀i ∈ I, i ∈ I new , i > i 

∀i ∈ I new

(A29)

Ci ≤ TDemk + hmax × dmei,k

new

(A14)

(A18)

∀i ∈ I new

∀i ∈ I new , k ∈ K

Ci ≥ TDemk × dmei,k

i −1 i i Tset,i ≥ Tset,i + Ci − Ci −1 − (1 − xset,i ) × hmax

p∈P

yi,p = 1

∀p ∈ P, i ∈ I new

(A13)

• Product allocation constraints





i = 1, ∀p ∈ P

i = IDp0 IDtotal,p

i

∀i ∈ I new

Fii = Wii



i DVi,p − qdpi

• Settling period

∀i ∈ I, ∀i ∈ I new , i > i

• Pipeline end tasks Qi = Wii + Dii

(A26)

• Clients’ demands

max(lotsp,lt )

i + Wii = Fii Fi+1

(A25)

i ∈ I,i≤i

(A4)

min(lotsp,lt )







i −1 i = IDtotal,p + IDtotal,p

• Relation between batch volume and pumping duration

lmin =

729

(A40)



i −1 i Tsetp,i,p ≤ Trep,p + xavailable,i × hmax

∀i ∈ I, i ∈ I new , i > i (A41)

p

• Choice of batches’ volumes



lsi,p,lt = yi,p

lt ∈ LT

Qi =



∀i ∈ I new , p ∈ P

(A21)

(lsi,p,lt × lotsp,lt ) ∀i ∈ I new

(A22)

Dii



∀i ∈ I new

(A23)

• Initial conditions inside the pipeline Wi

= Woi

∀i ∈ / I new , i = first(I new )

(A42) (A43)



∀i ∈ I, i ∈ I new , i > i

i i Dclients,i ≥ Qi − (1 − xclients,i ) × Dmax

(A44)









IDpi = IDpi −1 + (A24)

∀i ∈ I, i ∈ I new , i > i

∀i ∈ I, i ∈ I new , i > i

i i Dclients,i ≤ xclients,i × Dmax

i ∈ I,i≤i

i −1

Dclients,i ≤ Qi 

• Overall volume balance to the pipeline ends while injecting batch i Qi =





i

p ∈ P lt ∈ LT





i −1 i i xclients,i = xavailable,i − xavailable,i



i ∈ I,i≤i



∀i ∈ I, i ∈ I new , i > i 

i DVclients,i,p − qdpi

∀p ∈ P, i ∈ I new

(A45) (A46)

730

S. Relvas et al. / Computers and Chemical Engineering 33 (2009) 712–730

i = 1, ∀p ∈ P

IDpi = IDp0 i

IDp ≤ IDmax,p



(A46a)

∀p ∈ P, i ∈ I new

i

i

(A47)

∀i ∈ I, i ∈ I new , i > i

(A48)

∀i ∈ I, i ∈ I new , p ∈ P, i > i

(A49)

∀i ∈ I new

(A50)

DVclients,i,p = Dclients,i

p 

i ≤ Dmax × yi,p DVclients,i,p

• Pipeline stoppages Ci−1 ≥ T stop × pmatchi−1 Ci−1 + Li ≤ T

stop

+ pmatchi × hmax

pstopi = pmatchi − pmatchi−1

∀i ∈ I

∀i ∈ I

new

new

Ci ≥ Ci−1 + Li + (T start − T stop ) × pstopi

(A51) (A52)

∀i ∈ I new , i ∈ I new , i > i (A1a)

• Auxiliary conditions 



Fii ≥ Fii −1 i

i





∀i ∈ I, ∀i ∈ I new , i > i i −1

Fi − Wi ≥ Fi Fii ≥ Wii



i



− Wi

∀i ∈ I, ∀i ∈ I new , i > i

∀i ∈ I, ∀i ∈ I new , i ≥ i

Di =

i ∈ I,i≤i

i −1



(lsi ,p,lt × lotsp,lt ) ∀i ∈ I new

(A53) (A54) (A55) (A56)

p ∈ P lt ∈ LT

dmFinal = 1 k∈K i,k

(A57)

i ∈ I new 



i ≤i 





i xii ≥ xset,i

k∈K

(A58)

i ∈ I new ,i ≥i

References Adhitya, A., Srinivasan, R., & Karimi, I. A. (2007). Heuristic rescheduling of crude oil operations to manage abnormal supply chain events. AIChE Journal, 53(2), 397–422. Cafaro, D. C., & Cerdá, J. (2004). Optimal scheduling of multiproduct pipeline systems using a non-discrete MILP formulation. Computers & Chemical Engineering, 28, 2053–2068. Cafaro, D. C., & Cerdá, J. (2008). Dynamic scheduling of multiproduct pipelines with multiple delivery due dates. Computers & Chemical Engineering, 32, 728–753. Jia, Z., & Ierapetritou, M. (2003). Mixed-integer linear programming model for gasoline blending and distribution scheduling. Industrial & Engineering Chemical Research, 42, 825–835.

Jia, Z., & Ierapetritou, M. (2004). Efficient short-term scheduling of refinery operations based on a continuous time formulation. Computers & Chemical Engineering, 28, 1001–1019. Jia, Z., Ierapetritou, M., & Kelly, J. D. (2003). Refinery short-term scheduling using continuous time formulation—Crude oil operations. Industrial & Engineering Chemical Research, 42, 3085–3097. Julka, N., Karimi, I., & Srinivasan, R. (2002). Agent-based supply chain management – 2: A refinery application. Computers & Chemical Engineering, 26, 1771–1781. Koo, L. Y., Adhityaa, A., Srinivasan, R., & Karimi, I. A. (2008). Decision support for integrated refinery supply chains – 2: Design and operation. Computers & Chemical Engineering, 32, 2787–2800. Lee, H., Pinto, J. M., Grossmann, I. E., & Park, S. (1996). Mixed-integer programming model for refinery short-term scheduling of crude oil unloading with inventory management. Industrial & Engineering Chemical Research, 35, 1630–1641. Luo, C., & Rong, G. (2007). Hierarchical approach for short-term scheduling in refineries. Industrial & Engineering Chemical Research, 46, 3656–3668. Magatão, L., Arruda, L. V. R., & Neves, F., Jr. (2004). A mixed integer programming approach for scheduling commodities in a pipeline. Computers & Chemical Engineering, 28, 171–185. Magatão, L., Arruda, L. V. R., & Neves, F., Jr. (2005). Using CLP and MILP for scheduling ˜ (Eds.), Computer-aided commodities in a pipeline. In L. Puigjaner & A. Espuna chemical engineering (pp. 1027–1032). Más, R., & Pinto, J. M. (2003). A mixed-integer optimization strategy for oil supply in distribution complexes. Optimization and Engineering, 4, 23–64. Moro, L. F. L. (2003). Process technology in the petroleum refining industry—Current situation and future trends. Computers & Chemical Engineering, 27, 1303–1305. Neiro, S. M. S., & Pinto, J. M. (2004). A general modeling framework for the operational planning of petroleum supply chains. Computers & Chemical Engineering, 28, 871–896. Pinto, J. M., Joly, M., & Moro, L. F. L. (2000). Planning and scheduling models for refinery operations. Computers & Chemical Engineering, 24, 2259–2276. Reddy, P. C. P., Karimi, I. A., & Srinivasan, R. (2004). A new continuous-time formulation for scheduling crude oil operations. Chemical Engineering Science, 59, 1325–1341. Rejowski, R., Jr., & Pinto, J. M. (2003). Scheduling of a multiproduct pipeline system. Computers & Chemical Engineering, 27, 1229–1246. Rejowski, R., Jr., & Pinto, J. M. (2004). Efficient MILP formulations and valid cuts for multiproduct pipeline scheduling. Computers & Chemical Engineering, 28, 1511–1528. Rejowski, R., Jr., & Pinto, J. M. (2008). A continuous time representation for scheduling of pipeline systems with pumping yield rate constraints. Computers & Chemical Engineering, 32, 1042–1066. Relvas, S., Matos, H. A., Barbosa-Póvoa, A. P. F. D., & Fialho, J. (2007). Reactive scheduling framework for a multiproduct pipeline with inventory management. Industrial & Engineering Chemical Research, 46, 5659–5672. Relvas, S., Matos, H. A., Barbosa-Póvoa, A. P. F. D., Fialho, J., & Pinheiro, A. S. (2006). Pipeline scheduling and inventory management of a multiproduct distribution oil system. Industrial & Engineering Chemical Research, 45, 7841–7855. Röslof, J., Harjunkoski, I., Björkqvist, J., Karlsson, S., & Westerlund, T. (2001). An MILPbased reordering algorithm for complex industrial scheduling and rescheduling. Computers & Chemical Engineering, 25, 821–828. Shah, N. (1996). Mathematical programming techniques for crude oil scheduling. Computers & Chemical Engineering, 20, S1227–S1232. Wenkai, L., Hui, C.-W., Hua, B., & Tong, Z. (2002). Scheduling crude oil unloading, storage and processing. Industrial & Engineering Chemical Research, 41, 6723–6734. Wu, D., & Ierapetritou, M. (2003). Decomposition approaches for the efficient solution of short-term scheduling problems. Computers & Chemical Engineering, 27, 1261–1276.