CHEMICAL ENGINEERING TRANSACTIONS VOL. 52, 2016 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Petar Sabev Varbanov, Peng-Yen Liew, Jun-Yow Yong, Jiří Jaromír Klemeš, Hon Loong Lam Copyright © 2016, AIDIC Servizi S.r.l., ISBN 978-88-95608-42-6; ISSN 2283-9216 A Genetic Algorithm Based Plant Layout Design Methodology Considering Piping and Safety Yan Wu, Yufei Wang*, Xiao Feng, Shuo Feng State Key Laboratory of Heavy Oil Processing, China University of Petroleum(Beijing) 18 Fuxue Road, Changping, Beijing 102249, China. wangyufei@cup.edu.cn Plant layout design is the key way to help enterprise improving production efficiency, operation safety and energy saving. At the level of facilities in a plant, the constraints of layout design have been gradually improved. However, the main constraints will change when the problem of design extends to the level of plants in a factory or an industrial park. Because the long distance between the plants cannot be neglected. Pipeline network and safety issues for the whole factory are deemed to be the more remarkable constraints. In this paper, the pipeline network is specified into two types: material pipeline and steam pipeline. The investments for both types are evaluated through temperature, pressure and the property of material individually. For the length of steam pipelines, the minimum length of steam pipelines is optimized by Kruskal algorithm. Additionally, the likelihood of safety accidents, such as explosion, is taken into account to make the plant layout design more practical. A genetic algorithm is used to solve the problem. The objective function is to minimize the total pipeline cost and the economic property damage which is caused by safety accidents simultaneously. This paper presents a mathematical model for the plant layout design and a case study reveals the effectiveness of proposed methodology. 1. Introduction The designing of plant layout is a complex and multidisciplinary work. Koopmans and Beckman (1957) firstly presented this problem for increasing economic benefits. From then on, academics explored a lot of methods to solve plant layout. In the early years, the problem is solved by the experiences of designers and related national standards, such as Kern (1978). At present, the method of mathematical programming is widely used to optimize plant layout and it will be the trend of development. The plant layout problem is formulated as a quadratic assignment problem (QAP) by Koopmans and Beckman (1957). Then Montreuil (1991) proposed mixed integer programming (MIP) model includes connection of material flows. Patsiatzis and Papageorgiou (2002) optimized the process plant layout includes floor number, plant size and relative location by Mix integer linear programming (MILP) model. Besides, mix integer nonlinear programming (MINLP) is used to solve the layout design consider safety issue (de Lira-Flores et al., 2014). There are many factors impacting the layout, such as the connection cost of material flows, relative location, shape of the plant, floors number, no-overlapping and safety problems. Caputo et al. (2015) optimized plant layout whose objective function consists of material transfer cost, land cost and safety cost using genetic algorithm (GA). The material transfer cost includes piping and pumping cost. Martinez-Gomez et al. (2014) proposed a general optimization model to determine the optimal plant layout with the simultaneous consideration of economic and safety issues. The safety objective is represented by the sum of plants caused by boiling liquid expanding vapor explosions (BLEVE) and vapor cloud explosion (VCE). And the overpressures for these explosions is calculated by the TNT equivalent model. Jung et al. (2011) determined safe locations of facilities by minimizing the overall cost including fire and explosion scenarios. Additionally, a flame acceleration simulator (FLACS) is used to provide substantial guidance for deciding the optimal layout. Safety constraint is also included in the work by XU et al. (2013), it consists of minimum distance and toxic DOI: 10.3303/CET1652005 Please cite this article as: Wu Y., Wang Y., Feng X., Feng S., 2016, A genetic algorithm based plant layout design methodology considering piping and safety, Chemical Engineering Transactions, 52, 25-30 DOI:10.3303/CET1652005 25 gas dispersion. The optimal targets are land cost and pipe length. For the present papers, the connection cost is just a rough estimation, and consists of material flow piping cost only, ignoring the cost of steam piping. Besides, the safety issues such as fire, explosion and toxic gas dispersion are mainly affected by safe distance. Few paper mainly considered the security influence of relative locations. In this paper, objective function includes the cost of connection and safety. The connection cost is enriched, which includes the cost of material flow piping and steam piping. And the cost is calculated by proposed model rather than estimation. Furthermore, VCE is considered in the model. It focuses on the influence of relative locations on safety cost. GA is used to solve the problem. 2. Methodology 2.1 Problem statement This method is used to optimize the plant layout in a factory or industrial park and reduce the investment cost. The number of plants, the connections between material flows, the steam usage of the plants and the costs of different types of piping are given. Some assumptions are made in order to simplify the problem. Each plant is considered as a point which has no size and shape. But it will be described as rectangle in the figures in order to express clearly. Besides, the distance between two adjacent plants are the same and are meet the minimum safety distance. And the distance between plant and pipe rack is neglected. It should be noticed that the piping can be laid horizontally or vertically only. 2.2 Mathematical model The objective function is computed as Eq(1). min + n m k S MS M C Ra aL L          (1) Where C is the total cost of piping of the factory, n is the number of steam levels, m is the number of material flow, while aαS and aβM are the unit prices of different steam piping and material piping including the costs of materials, LαS is the length of each level of steam piping which is calculated by Kruskal algorithm, and LβM is the length of each process material piping. Rγ is the safety cost of each plant which is composed of the loss caused by VCE. Specially, LβM is computed as Eq(2). M I O I O L = x - x + y - y      (2) Where ((xβI, yβI) are the coordinates of the plants which produce process materials and (xβO, yβO) are the coordinates of the process materials users. In order to obtain aαS and aβM, the diameters should be calculated and the materials of different piping should be determined according to the chemical properties of material flows and steam. Diameters of piping is calculated as Eq(3). 4  W D  v (3) Where D is the diameter of pipe (m), W is the mass flow rate (kg/s), ρ is the density (kg/m3) and ν is velocity of the flow (m/s). In the case study, v is set to 1.5 m/s for liquid and 20 m/s for gas (for material flows). The annual on-stream time is set to 8,400 h. Then according to the diameters and materials, the unit prices can be found out in the Application Data Bases of Petrochemical Installation Engineering Budget Estimate Making. Besides, Rγ is computed as Eq(4). ( )R E N F T       (4) Where Eγ indicates the property damage of incident, Nγ indicates the loss of casualties, F is the frequency of incident, which is 7.8 ×10-6, T is plant life time, which is 50 y. Eγ is determined based on the radius of property damage (RE). And Nγ is determined based on the radiuses of die radius (R0.5), serious injuries radius (Rd0.5) and minor injuries radius (Rd0.01). The sum of the plant value in different radius is RE and it is same as Nγ. The radiuses are computed by TNT equivalent model (2014). 1.8 f c TNT TNT W H W Q   (5)   TNT TNT E Q W (6) 26 Where λ is the equivalent coefficient of vapor cloud of flammable gas, Hc is combustion heat of flammable gas, Wf is the fuel quality that leaks into the air, QTNT is the combustion heat of TNT, E is the explosion energy, WTNT is the TNT equivalent of combustible gas. R0.5, Rd0.5, Rd0.01 and RE are computed by Eqs(7-9). 0.37 0.5 13.6 1000        TNT W R (7) 3 2 1 0 0.5 0.01 1/ 3 0 0.137 Z 0.119 0.269 0.019 (or )                     S P Z Z P Rd Rd Z E P (8) 1/ 3 1/ 6 2 3175 1             TNT E TNT KW R W (9) Where P0 is the ambient pressure, 101,300 Pa, Z is dimensionless distance and △Ps is overpressure, 44,000 Pa for Rd0.5 and 17,000 Pa for Rd0.01, K is a constant which is 9.6. 2.3 Optimization algorithm GA is used through MATLAB in this paper to obtain the optimal scheme of plant layout. It mimics the process of biological evolution. GA starts from an initial population and repeats the operations of selection, crossover and mutation until the optimal result is obtained. For the calculation of steam piping, Kruskal algorithm is used to obtain the shortest length. It is a kind of minimal spanning tree algorithm which calculates the connected graph with weight. The weight in this paper is set to be 1. And the steam usage is described by binary variables. In order to optimize the shortest path of steam piping, all the plants which need steam and unpredictably other plants need to be combined. The length and arrangement of piping can be obtained through the calculation and verification of Kruskal algorithm. 3. Case study The case study has three scenarios based on the different optimization target in order to illustrate the proposed method. They are the cost of material piping, the total piping cost and the sum of piping cost and safety cost. There are nine plants in the factory. The steam is distributed at three levels: high pressure steam, medium pressure steam and low pressure steam. 3.1 Data acquisition The design data of material flows piping and steam piping are shown in Table 1 and Table 2. Table 1: The design data of material flows piping Number Name of material flow Transport direction Mass flow (104 t/y) Density (kg/m3) 1 material 1 from 7 to 2 1,200 900 2 material 2 from 7 to 2 140 800 3 material 3 from 3 to 7 50 720 4 material 4 from 2 to 3 280 820 5 material 5 from 4 to 6 400 910 6 material 6 from 2 to 3 260 760 7 material 7 from 3 to 5 260 760 8 material 8 from 3 to 5 60 800 9 material 9 from 3 to 4 100 920 10 material 10 from 2 to 4 250 1,000 11 gas 1 from 7 to 3 10 580 12 gas 1 from 7 to 4 15 580 13 gas 1 from 7 to 6 15 580 14 gas 2 from 5 to 6 10 1.4 15 gas 2 from 2 to 5 8 1.4 27 Table 2: The design data of steam piping Pressure (MPa) Temperature (℃) Velocity (m/s) Mass flow (104 t/y) Density (kg/m3) 3.5 450 55 504 10.8842 1.1 350 40 252 3.903 0.4 210 30 168 1.678 According the data above, the results for unite prices are obtained, as shown in Table 3. Table 3: The results about the calculation and selection of piping Number Diameter (m) Size Type Unit price (¥/10 m) 1 0.612 Sch40 DN600 seamless carbon steel 1,657.46 2 0.222 Sch40 DN250 seamless carbon steel 879.09 3 0.140 Sch40 DN150 seamless carbon steel 770.45 4 0.310 Sch40 DN300 seamless carbon steel 907.28 5 0.351 Sch40 DN400 seamless carbon steel 1,207.07 6 0.310 Sch40 DN350 seamless carbon steel 989.34 7 0.310 Sch40 DN350 seamless carbon steel 989.34 8 0.145 Sch40 DN150 alloy steel 2,096.89 9 0.175 Sch40 DN200 alloy steel 2,373.40 10 0.243 Sch40 DN250 stainless steel 5,884.47 11 0.070 Sch40 DN80 seamless carbon steel 584.47 12 0.085 Sch40 DN100 seamless carbon steel 603.35 13 0.085 Sch40 DN100 seamless carbon steel 603.35 14 0.388 Sch40 DN400 alloy steel 3,892.26 15 0.347 Sch40 DN350 alloy steel 3,090.16 3.5 MPa 0.596 Sch80 DN600 seamless carbon steel pipe 2,319.41 1.1 MPa 0.825 DN 900 welded carbon steel pipe 1,252.23 0.4 MPa 1.186 DN 1200 welded carbon steel pipe 1,413.07 Additionally, the steam usage and value of plants are shown in Table 4. In the table, 1 represents that the plant needs steam. On the contrary, 0 represents that the plant does not need any steam. Besides, VCE may take place in plant 7. Table 4: The steam usage and value of plants Number 3.5 MPa 1.1 MPa 0.4 MPa Number of people Value (104¥) Plant 1 1 1 1 25 30,000 Plant 2 1 1 0 10 25,000 Plant 3 1 1 0 20 106,000 Plant 4 0 1 1 15 12,000 Plant 5 1 1 0 8 43,000 Plant 6 1 0 1 8 6,000 Plant 7 0 1 0 2 5,000 Plant 8 0 0 1 10 2,000 Plant 9 0 0 1 60 3,000 3.2 Results and discussions The results show that different costs decrease gradually with the increasing of generation. When the number of generation is greater enough, the target values of three scenarios are no longer change which shows that the stable results of optimization are obtained. For three scenarios, the optimization targets decreased respectively than the initial values, which are about 30.44 × 104 ¥, 24.40 × 104 ¥ and 73.74 × 104 ¥. These illustrate that the optimization of material flow piping, total piping and total cost considering safety are effective. After optimization using GA, the optimal layouts of different scenarios can be obtained. The specific calculation results are shown in Table 5, Table 6 and Table 7. 28 Table 5: The results of three scenarios. Material flow piping cost (104¥) Steam piping cost (104¥) Total piping cost (104¥) Safety cost (104¥) Total cost (104¥) Scenario 1 136.56 99.60 236.16 90.88 327.04 Scenario 2 139.84 84.68 224.52 206.81 431.33 Scenario 3 139.84 84.68 224.52 90.74 315.26 Table 6: The summary of optimal relative locations Relative location of each plant Scenario 1 6 5 3, 7 2 4, 1 8 9 Scenario 2 6 4 8, 5 2 1, 3 7 9 Scenario 3 8 6 4, 9 5 2, 1 3 7 Table 7: The radius of safety R0.5 (m) Rd0.5 (m) Rd0.01 (m) RE (m) 123.56 276.30 496.44 700.87 In Table 5, the material flow piping cost of scenario 1 is the least, which is 136.56 × 104 ¥. But the cost of steam piping is 99.60 × 104 ¥ resulting in the total piping cost 11.64 × 104 ¥ more than that of scenario 2. In scenario 2, the cost of material flow and steam piping are 139.84 × 104 ¥ and 84.68 × 104 ¥. It reveals that optimization of material flow piping and steam piping simultaneously is better than a single piping optimization. Besides, the plant layout of scenario 2 is more practical than that of scenario 1 after enrich the content of pipeline network. Safety cost is added in the objective function of scenario 3. So the safety cost of it is the most economical which is 90.74 × 104 ¥. And the cost of steam piping is the same as scenario 2. It is the least cost. Though the material flow piping cost is not the least, the total piping cost is optimal. For the total cost, the value of scenario 3 is 315.26 × 104 ¥, 11.78 × 104 ¥ less than scenario 1 and 116.07 × 104 ¥ less than scenario 2. This displays the effect of the optimization including enriched piping and safety issue. Comparing calculation results of three scenarios, the scheme of scenario 3 is the most practical and economical layout. The optimal plant layout and pipeline network is shown in Figure 3 which corresponds to the scenario 3 in Table 6 and Table 7. Figure 1: The optimal layout scheme and pipeline network 29 The three levels of steam piping are the simplest, as shown in Figure 1. Because the pipelines are arranged without passing the redundant plants. Besides, the piping of material flows is concentrated together, illustrating the decreasing of the piping cost. The different areas in Figure 1 indicate the different radius of personnel and property losses. The scope losses is greater in the area with more shallow color. Areas with deep color are contained by the shallow ones. Plant 7 is located in the bottom right corner in scenario 3. This is one of the important factors lead to reduced cost of safety. 4. Conclusions The proposed method in this paper enriches the piping cost on the basis of improved calculation. The enriched piping consists of material flow and steam flow results in the economic cost. Additionally, the safety issue of VCE is added in the objective function. This paper investigated the effect of safety cost in different relative locations through three scenarios in the case study. It is different from other researches whose target is determining the safety distance of plant layout. Because the distance between plants in a factory is longer than that between facilities in a plant. GA and Kruskal algorithm is applied to solve the problem of plant layout. Finally, the optimal scheme of plant layout and pipeline network are obtained. The scenario considering the enriched piping and safety issue is illustrated to be the most practical and economical. Simultaneously, the case study reveals the effect of the proposed methodology. Acknowledgements Financial support from the National Basic Research Program of China (973 Program: 2012CB720500), the National Natural Science Foundation of China under Grant No. 21306228 and Science Foundation of China University of Petroleum, Beijing (No.2462013YJRC010) are gratefully acknowledged. References Caputo A.C., Pelagagge P.M., Palumbo M., Salini P., 2015, Safety-based process plant layout using genetic algorithm, Journal of Loss Prevention in the Process Industries, 34, 139-150. de Lira-Flores J., Vázquez-Román R., López-Molina A., Mannan M.S., 2014, A MINLP approach for layout designs based on the domino hazard index. Journal of Loss Prevention in the Process Industries, 30, 219- 227. Jung S., Ng D., Diaz-Ovalle C., Vazquez-Roman R., Mannan M.S., 2011, New approach to optimizing the facility siting and layout for fire and explosion scenarios, Industrial & Engineering Chemistry Research, 50(7), 3928-3937. Kern R., 1978, Plant Layout, 10. How to Arrange Plot Plan for Process Plants, Chemical Engineering, 85(11), 191-197. Koopmans T.C., Beckmann M., 1957, Assignment problems and the location of economic activities, Econometrica: Journal of the Econometric Society, 25(1), 53-76. Martinez-Gomez J., Nápoles-Rivera F., Ponce-Ortega J.M., Serna-González M., El-Halwagi M.M., 2014, Siting Optimization of Facility and Unit Relocation with the Simultaneous Consideration of Economic and Safety Issues, Industrial & Engineering Chemistry Research, 53(10), 3950-3958. Montreuil B., 1991, A modelling framework for integrating layout design and flow network design, Material Handling, 90, 95-115. Patsiatzis D.I., Papageorgiou L.G., 2002, Optimal multi-floor process plant layout, Computers & Chemical Engineering, 26(4), 575-583. Yuan X., Zhenyu W., Qunxiong Z., 2013, An improved hybrid genetic algorithm for chemical plant layout optimization with novel non-overlapping and toxic gas dispersion constraints, Chinese Journal of Chemical Engineering, 21(4), 412-419. 30