A hybrid approach using CLP and MILP applied to tank farm operation scheduling

A hybrid approach using CLP and MILP applied to tank farm operation scheduling

16th European Symposium on Computer Aided Process Engineering and 9th International Symposium on Process Systems Engineering W. Marquardt, C. Pantelid...

440KB Sizes 30 Downloads 70 Views

16th European Symposium on Computer Aided Process Engineering and 9th International Symposium on Process Systems Engineering W. Marquardt, C. Pantelides (Editors) © 2006 PubUshed by Elsevier B.V.

2213

A Hybrid Approach Using CLP and MILP Applied to Tank Farm Operation Scheduling S.L. Stebel," F. Neves Jr.," L.V.R. Arruda" ""UTFPR, CPGEl Av. Sete de Setembro - 3165, Curitiba/PR - 80230-901, BRAZIL Tel: +55 41 3310-4701 Fax.: +55 41 3310-4683 E-mails: {stebel, neves, arruda}@cpgei. cefetpr.br Abstract This work develops an optimization model to aid the operational decision-making in a real world tank farm scheduling. The short term scheduling of tank farm is a hard task because the specialist has to take into account issues concerning plant topology, mass balances, transfer policies, resource constraints, demand pattern, and changeovers. So this operational decision-making is still based on experience with the aid of manual computations. The main goal of this work is to reduce the difference between a theoretical model and the practical needs. In order to reduce this difference the formulation addresses a new aspect related to the operator procedure. When the operator executes the programmed activities many tasks are delayed or advanced for personal convenience. This fact can cause bottlenecks in the system operation. In order to avoid them, some considerations about qualitative variables are inserted in the model. So that, the generated scheduling tends to be more practical to represent the qualitative variables by means a fuzzy system. Moreover the scheduling problem is modeled in a unified framework, which uses Constraint Logic Programming (CLP) and Mixed Integer Linear Programming (MILP). This approach had a computational time smaller than only the MILP model, and is able to define a good solution in few seconds. The proposed model can be used to test and correct new operational conditions and scenarios rather than to just determine the scheduling of regular activities. Keywords: Scheduling, Constraint Logic Programming (CLP), Mixed Integer Linear Programming (MILP), Tank Farm, Fuzzy Systems. 1. Introduction The short-term scheduling of activities in refineries has received a special attention in the last years from academic and industrial communities. The main reason for this is a constant increase in the oil processing. According to Magalhaes (2004) in a typical refinery several activities are performed by the scheduler: crude receipt; process units operations modes; inventory management; blending. This work focus on the inventory management activities in a tank farm, because when the refinery load increases the total tankage, in general, remains the same. Most of the existing literature in the refmery scheduling problems are based on mathematical programming (Shah, 1996; Pinto et al., 2000), more specifically MILP (mixed integer linear programming). It also has been used CLP (constraint logic programming) for generical scheduling problems. More recently have appeared the integration CLP-MILP as a promising alternative (Hooker, 2000; Jain and Grossmann, 2000). In this context, this work develops a hybrid approach based on CLP and MILP techniques, with aims to reduce the CPU time. Moreover, to minimize the difference between the theoretical model and the practical needs a fuzzy system is used to represent qualitative variables. Such variables are associated to the exchange cost parameters, which are included in the scheduling model objective

2214

S.L Stebel et al

function. For a given scheduling solution these variables represent how the user executes the set of activities. This cost is explained in section 3.1. 2. Problem Statement The short-term scheduling of activities in the refinery tank farm involves a set of decisions that must be taken by the scheduler. Figure 1 illustrates the main aspects of the tank farm structure. The tank farm area is composed by raw materials and intermediate/final product tankages. The tankage scheduling must take into account issues concerning physical restrictions, initial amount of product, operational constraints, flow rates, and demands. Considering these issues the scheduler must determine the scheduling involved in all operations. By the way, it has been based on personal experience, with the aid of manual calculations.

Local Market

Tenninal (Crude Receipt)

Refmerj;

Figure 1. Overview of Tank Farm Structure

3. Integrating CLP-MILP One common limitation reported of scheduling models based on mathematical programming, especially MILP with discrete time representation, is the explosion of CPU time. In order to reduce it, recently, the CLP-MILP integrated approach has been used in scheduling problems (Magatao, 2005). According to Focacci (2000) the CLPMILP integration can be made for algorithmic and engineering approaches. In this work it is used the second one. It is established a separation between the modeling and problem solving.

A Hybrid Approach Using CLP and MILP

2215

An MILP model of this problem was proposed by Stebel (2003) and it is used as a basic model to the CLP-MILP hybrid model proposed in this paper. Some constraints are rewritten in CLP, others are maintained in MILP, and, finally, a constraint set links MILP and CLP variables. The OPL language is used to implement and solve the models (Hog, 2002a; Hog, 2002b). The most fundamental concept in OPL for scheduling applications is the activity. An activity can be thought of as an object containing three data items: a starting date, a duration, and an ending date (Hog, 2002a; Hog, 2002b). The activity created in the model is represented by operationrj,„, which has an starting date TSrj,„, and an ending date 77v,/,n (equations 1 and 2). TS^. ^ = operation^ ,, .start Vr G R, i e I, n G N TF ^ ^ = operation^ .^ .end

(1)

Vr G R, i G I, n G N

(2)

Constraints (3 and 4) are used in the hybrid model. These constraints specify that operation A precedes B. Furthermore, they avoid the overlap among parallel activities.

fe,

>rF,, J&(rF,,„. ^^)SC[TF,,„. ^O)J^F4^^^,,,„^„, =I)

(3)

V(rl,r2)6R,iGl,(nl,n2)€N (^^j ^2 / «i ni - V ^operation^^. ^^ precedes operation^^. ^, V(rl,r2)GR,iGl,(nl,n2)GN

(4)

Other important OPL resource, called generate, allows that the search tree be explored from a specific discrete variable (Hog, 2002a; Hog, 2002b). In general, this resource allows the solver to obtain solutions faster than when no command is used. In this paper, the binary variable RDrj^ which indicates whether tank r is sending to unit i in the slot«, is used to generate the search tree (expression 5). generate[RD^.^) VrG R,iG I,,nG N

(5)

3.1. Fuzzy Systems Qualitative variables are normally not considered in scheduling models, for instance, how the system operator normally executes the activities*. These aspects are a model refinement, and represent variable imprecision. In a practical standpoint the activities will be delayed or advanced resulting in dynamic bottlenecks in the system. To avoid them and reduce the difference between the theorical model and the practical needs a fuzzy system is proposed to model qualitative variables. Fuzzy set theory, introduced by Zadeh (1965), is a generalization of conventional set theory to represent vagueness or imprecision in everyday life in a strict mathematical framework . Fuzzy interpretations of data structures are very natural to formulate and solve various real-life problems, with a good intuitive appeal. In this paper, the implemented fuzzy system is composed by one output variable (exchange cost) and three input variables (difficulty, maneuvers, and period). Figure 2 illustrates the fuzzy system. Exchange cost: this variable represents the set of all operations during each hour of the day. Is composed by five pseudo trapezoidal functions are used to represent the

Set of tasks, for instance, open / close valves and, turn on / turn off pumps.

2216

S.L Stehel et al

attributes that this variable can be assumed: very low, low, medium, high, and very high (see figure 3).

Fuzzy Inference Engine

high

0.5

0.75

very j^jgj^

Exchange cost

0

period

medium

0.25

1

Figure 3. Exchange Cost

Figure 2. Fuzzy system

Difficulty: difficulty to open/close valves. Is composed by three piece-wise linear (triangular) functions with values between 0 and 1. These functions make the mapping of the values that each variable can assume with the attributes low, medium, high (see figure 4). Maneuvers: number of actuated valves to execute an operation. Is composed by three piece-wise linear (triangular) functions with values between 0 and 1. These functions make the mapping of the values that each variable can assume with the attributes few, medium, and several (see figure 5). Period: the 24 hour clock is divided in three different periods of labor (first- 23:00 to 7:00 hour; second 7:00 to 15:00 hour, and third 15:00 to 23:00 hour). There is a period of time where an overlap occurs between two periods. Is composed by seven piece-wise linear functions with values between 0 and 1. These functions make the mapping of the values that each variable can assume with the attributes endTl, T2, T3, TRl, TR2, TR3, and iniTl (see figure 6).

Figure 4. Difficulty

Figure 5. Maneuvers

Figure 6. Period

The base rule has sixty three rules. For instance, //"difficulty is medium and maneuver is several and period is TR2 then the exchange cost is very high and the implemented system uses a Mamdani inference engine to compute the final exchange cost (Stebel, 2003). The obtained values are represented by a parameter matrix that is inserted in the model objective function. In order to represents it in the CLP-MILP model some constraints are added to the original model.

A Hybrid Approach Using CLP and MLP

2217

The objective function in shown by expression (6). It defines the operational cost minimization. Such cost is influenced by three factors: the pumping cost, the electrical cost, and the exchange cost. The first one represents the use of the resources: pumps, valves, and tanks. The second one is the time period that a product is pumped during on-peak hours. The third one illustrates the manner that operator executes the activities. min

(6)

reR fe(/aU/Z,) «eA' feHF

4. Results This section considers an instance of a real Liquefied Petroleum Gas (LPG) tank farm scenario. This area has five tanks that receive product from process units and external pipelines and send it to local and external markets. The considered scenario has several parameters that are used in the data preprocessing. The state of all tanks at the initial time is known (sending, receiving, or waiting). Table 1 shows a comparative* between MILP and CLP-MILP approaches. In the same way that Magatao (2005) the obtained CLP-MILP model was, in average, faster than the MILP model. Therefore, a rigorous formulation considering practical issues in the execution of the scheduling could be modeled without prohibitive CPU time. The modeling and optimization tool ILOG OPL Studio 3.6.1 is used to implement and solve the models on a Pentium 4, 2.4GHz, 1 Gbyte RAM. Table 1. Comparative Results between MILP and CLP-MILP approaches Number of variables Number of constraints Solution [$] CPU time [s] - (first/optimal) solutions

MILP 5,441 15,170 104 (520/10,582)

CLP-MILP 5,232 7,465 104 (12/852)

Figure 7 illustrates a Gantt chart where it is possible to verify the influence of electrical and exchange costs in the reported scheduling. The HPj and HP2 labels represent the cost variation (on-peak demand hours). Normally this value is five times greater than the normal cost. It is possible to notice that only the receiving of continuous process occurs in that period. The TRl, TR2, TR3 labels indicate the exchange period. In these periods the initial times of the activities should be avoided. It is possible to notice that only one operation occurs in that period TR2 (see the hatched circle in the figure 7). If the exchange cost was not considered the obtained solutions could have been unpractical. So that, the system operator tends to advance or delay tasks for personal convenience. As a potential consequence, bottlenecks are created and operational costs increase. For simplicity the solver settings in both approaches are maintained in the default option. For details see Hog (2002b).

2218

S.L Stebel et al

TRl

T R 2 ^ ^ i TR3

ii

TRl

-r-rt

i i'if H i ! ^ \ 1 io ,

46 I 1

Send to local market Receive from external pipelines

Send to external market

Figure 7. Gantt Chart 5. Conclusions This work addresses the scheduling problem of an oil refinery tank farm. The approach, which combines CLP and MILP in a unified framework showed better results than a previous MILP model. Heuristic information was used to guide the search process and it contributed to reduce the CPU time. For this reason other aspects were considered in the modeling to reduce the difference between a theorical model and the practical needs. Results show that the fuzzy system is effectively able to represent the problem uncertainty. The developed model can be used to test and correct new operational conditions and scenarios rather than to just determine the scheduling of regular activities.

References Hog, 2002a, Hog OPL Studio 3.6.1 - Language Manual, ILOG Corporation, France. Hog, 2002b, Hog OPL Studio 3.6.1 - Users Manual, ILOG Corporation, France. Focacci, F., 2000, Solving Combinatorial Optimization Problems in Constraint Programming, PhD thesis, Universita Degli Studi di Ferrara, Ferrara, Italia. Magatao, L., 2005, Mixed Integer Linear Programming and Constraint Logic Programming: Towards a Unified Modeling Framework, PhD thesis, CPGEI/CEFET-PR, Brazil. Magalhaes, M. V. O., 2004, Refinery Scheduling, PhD thesis. Imperial College London, UK. Jain, V. and I. E. Grosssmann, 2001, Algorithms for Hybrid MILP/CP Models for a Class of Optimization Problems, INFORMS Joumal on Computing, 13(4), 258-276. Hooker, J.N., 2000, Logic Based Methods for Optimization and Constraint Satisfaction, Wiley Interscience Series in Discrete Mathematics and Optimization, New York, USA. Pinto, J. M., Joly, M. and L. F. L. Moro, 2000, Planning and Scheduling Models for Refinery Operations, Computers & Chemical Engeneering, 24, 2259-2276. Shah, N., 1996, Mathematical Programming Techniques for Crude Oil Scheduling, Computers & Chemical Engeneering, 20, S1227-S1232. Stebel, S. L., 2003, Technical Report, CEFET-PR/CPGEI, Brazil, December 2003 (in Portuguese). Zadeh, L.A., 1965, Fuzzy Systems, Information and Control 8(3): 338-353.

Acknowledgements The authors acknowledge financial support from ANP and FINEP (PRH-ANP / MCT PRHIOCEFET-PR).