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 Approximation of Non-linear Cost Functions in P-graph Structures Benjamin H.Y. Ong, Timothy G. Walmsley, Martin J. Atkins*, Michael R.W. Walmsley, James R. Neale Energy Research Centre, School of Engineering, University of Waikato, Private Bag 3105, Hamilton, New Zealand matkins@waikato.ac.nz P-graph employs combinatorial and optimisation algorithms to solve process network synthesis (PNS) problem. However, the P-graph framework requires linear cost functions when optimising PNS problems. As a result, a high error between the user-input linear cost function and the actual non-linear cost function is likely to occur. This paper presents a new method to incorporate multiple linear cost functions in parallel for raw materials, operating units and products in P-graph problems to accurately approximate the non-linear functional form of most cost estimation functions. This was achieved by dividing the original cost functions into multiple equal segments that then could be individually represented by linear sub-functions. Application of the new method to a simple wood-to-fuel processing example influences the optimal P-graph process structure such that a previously uneconomic side-product route (pyrolysis) becomes economic and increases the overall profit. The results also demonstrate that the linear approximation error decreases with increasing numbers of segments and linear cost sub-functions. The time increase to solve the new problem structure, which has over threefold more operating units, is negligible for this simple case, but may be significant for more complex problems. 1. Introduction Process Graph (P-graph) is a bipartite graph that uses a combinatorial optimisation framework to optimise process network synthesis (PNS) problems. P-graph is more advantageous than mathematical programming (MP) as it solves PNS problems through the combinatorial nature of the problem instead of translating the problem into sets of equations. The combinatorial instrument, the five P-graph axioms and P-graph algorithm, which was initially proposed by Friedler et al. (1992), reduces the combinatorial search space by avoiding the infeasible combinations. This helps make P-graph more efficient than MP by 30 orders of magnitude (Klemeš and Varbanov, 2015). One other advantage P-graph has over MP is that P-graph is able to also show the sub- optimal structures, which finds use in the optimisation of industrial symbiotic networks (Aviso et al., 2015). P- graph methodology has been applied to different applications (Lam, 2013), for example (i) synthesis of separation networks, (ii) optimal design of steam supply systems, (iii) synthesis of alternative distillation system sequences, (iv) heat exchanger networks, (v) identifying reaction pathways, (vi) supply chain network synthesis, and (vii) risk management. One of the limitations in P-graph is the assumption of linear cost functions; including capital cost, raw material costs, and product sale price. In P-graph, the capital cost is estimated using a fixed investment cost plus a linear function of plant size (or capital size) that is proportional to input or output material flowrates as shown in Halasz et al. (2005). However, in process engineering, capital cost estimation normally requires non-linear functions such as a Power Law function to maintain accuracy across over a broad range of equipment sizes. The cost of delivered wood biomass is also non-linear, being governed by available volume and distance. Higher required wood volumes increases the average distance travelled from harvest source to industrial site. Product sale price is dependent on the elasticity of its local and/or global market. Some product prices follow linear trends because the volume delivered is well below market demand. Other product prices fall rapidly with DOI: 10.3303/CET1652183 Please cite this article as: Ong B. H. Y., Walmsley T. G., Atkins M. J., Walmsley M. R. W., Neale J. R., 2016, Approximation of non-linear cost functions in p-graph structures, Chemical Engineering Transactions, 52, 1093-1098 DOI:10.3303/CET1652183 1093 volume due to market saturation, over-supply, or the need to supply to other markets above a threshold production volume. In the context of wood processing, accounting for non-linear cost/price functions in the application of the P-graph methodology is therefore critical. The aim of this paper is to develop a new method to improve P-graph structural solutions by accurately approximating non-linear cost functions for raw materials, processes and products. To achieve the aim, a newly developed spreadsheet tool divides each non-linear cost function into linear cost sub-functions and adds the additional material and operating units, along with the required connections, into a P-graph ready importable structure file. This process was repeated for an increasing number of linearized segments to reduce the degree of error due to the linearization of the cost functions. A simple wood to energy processing example demonstrates the benefits of the new method. 2. Methods 2.1 Approximation of non-linear functions in P-graph structures Approximation of non-linear functions using multiple linear sub-functions requires different approaches for raw materials, operating units and products. Figure 1 presents illustrative examples of how the linearization is programmed into a P-graph structure for operating units (1b), raw materials (1c) and products (1d). (a) (b) (c) (d) Figure 1: (a) Representation of PNS problem with existing P-graph framework (b) approximation of non-linear operating unit costs. (c) approximation of non-linear raw material costs. (d) approximation of non-linear product costs. For operating units with non-linear cost functions, additional operating unit(s) representing each segment are added to the original structure with lower and upper capacity multiplier based on the production interval. Since the correlations of the power law is only applicable over fixed range of production size, a limit of the flow raw material into the operating unit is imposed to ensure that the error is minimized. To limit the flow of raw materials into the processes under consideration, an operating unit (OU1 in Figure 1(b)) with a fixed upper bound capacity multiplier and an intermediate (IM1) are added. Each interval’s linearized fixed and proportional investments cost are assigned to the segment’s corresponding operating unit. To incorporate the non-linear cost functions of raw materials, operating units based on the number of segment and an intermediate material is added. The cost function is segmented and represented by the addition of operating units. The cost for the raw material is added into the proportional operating cost of the operating units. However, in this case, all the lower and upper bounds capacity multiplier are the same throughout the operating units. 1094 For the incorporation of the product cost, the operating units added are dummy operating units. The intermediate material added acts as the output material of the previous operating units that produces the product and distribute them to the different segmented product cost curve. The cost and flows of the product are added in the product material individually. 2.2 Automation tools P-graph Studios v4.0.5.0 (P-graph.com, 2015) is the tool used to solve the case study in this paper. The method presented in this paper uses P-graph framework and a spreadsheet to convert the non-linear cost functions into segments of linear cost functions to solve the case study. The spreadsheet was developed using Excel and VBA in the file format suitable for P-graph input. An automated iterative program was also developed to: (1) increase the number of linearized segment (from 1 to 10) for each non-linear operating unit, raw material and product in the structure, (2) import and solve the new structure, (3) export the detailed results of Feasible Structure 1, and (4) determine the error associated with the linear approximation. The programs also records the time needed to execute these steps and the number of times it iterates. 2.3 Cost functions estimate Order of magnitude capital cost estimates (Gerrard, 2000) are used to forecast the investment costs. The cost functions are estimated are based on previous plant installations that have similar process pathways to the processes under consideration. Power law estimation is then used as an escalation factor for the different scale of productions as shown in Eq(1) bkxC a (1) where C is the cost of plant at size x, a is the scale exponent, k is a constant of the nominal cost of the item at unit scale and b is the fixed cost. These values are derived from previous plant installations data and is only applicable over a limited range. It is important to note that different non-linear functional forms (e.g. polynomial, exponential) can also be used to correlate actual cost data, if available. 2.4 Segmenting non-linear cost functions The non-linear cost functions are segmented using a piecewise linear function. The individual cost functions are divided into multiple segments and sub-functions using equal production intervals within the boundaries of the original cost function. Next, the investment’s fixed and proportional costs are calculated for each sub functions using the Equation of a Line. For the sub-functions of the operating units, a correction is added to the investment fixed cost of each sub-function to reduce the higher percentage errors that occur at the sub- functions of the lower range of the domain of the original cost functions. Eq(2) calculates the correction error. x AAdx c n n n x x UL LL 1 (2) where Δc is the correction error added to each sub-function, Δx is the production interval of the sub-functions, A is the area of under the graph and n is the number of sub-functions. It is important to note that other methods of linearization can be applied in the new method that details the require P-graph structural modifications. 2.5 Error between non-linear cost function and linearized segments A purpose-built spreadsheet analysed the exported detailed result file from P-graph to ascertain the degree of error due to the linearization of the cost functions. The spreadsheet compares the costs of operating units, raw material and product costs with respect to the flow in Feasible Structure 1 with the original non-linear cost functions. If a significant error is found, the process iterates by increasing the number of segments for the units outside the range of error of ± 2.5 %. The maximum error range can be specified by the user in the spreadsheet. Eq(3) calculates the error of each segments, actual linearactual CC CCCC Error (3) where CC is the investment cost. 1095 3. Example The case study considered in this paper is a wood-to-fuel biorefinery with wood chips as the raw material and ethanol, bio-oil and pellets as products. The original structure drawn on P-graph is shown in Figure 2. Cost estimation data was derived based on previous plant installations from various sources with similar process pathways using derived power law cost functions for the individual operating unit as presented in Table 1. The cost function for wood chips may differ for different case studies as it is dependent on the density of the forest, which will in turn decide the distance needed to travel from the source to the processing plant. For the purpose of this study, the cost function of bio-oil is assumed non-linear due different usage. Figure 2: P-graph problem structure of a simple wood-to-fuel biorefinery. Table 1: Derived power law equation for raw material, operating units and product. *The lower bounds and upper bounds are proportional to input flow rate in t/h. The fixed cost, b, is zero for all the functions. Units k ($/[t/h]n) a Lower Multiplier Capacity (t/h) Upper Multiplier Capacity (t/h) Wood Chips 10 1.300 0 900.0 Gasification* 40,312,500 0.425 15.0 95.0 Pyrolysis* 2,830,700 0.706 1.0 6.5 Pellet Plant* 24,000 0.550 2.5 37.5 Bio-Oil 210 0.800 0 6.0 4. Results and Discussion The case study is solved using P-Graph Studio with solutions limit of 10. The result has only one feasible (profitable) solution as shown in Figure 3. Figure 3: P-graph solution of the case study. To improve the approximation of the non-linear cost functions, the spreadsheet tool segmented the cost functions of raw material, operating units and bio-oil into three segments with appropriate modification of the P-graph problem structure as shown in Figure 4. The modified case study is solved with P-graph with 10 solution limits. When the modified method was used, the number of feasible solutions (i.e. profitable structures) went from 1 to 10, indicating that including non-linear functions had a major impact on the results. Figure 4 shows the first feasible structure of the 10 solutions available. Profit = 248.9 NZD/h 1096 The pellet production flow in the original P-graph structure (Figure 3) and the new P-graph structure (Figure 4) remain constant (18.75 t/h). However, bio-oil is now also produced after improved approximation of non-linear cost functions in the new P-graph structure. The error of the bio-oil investment cost in modified structure and the cost function of the pyrolysis is -0.5 %. However, if bio-oil is produced at the same rate in the original P- graph structure, it overestimates pyrolysis cost by 8.8 % causing it to be infeasible. This shows that profitable structures may be overlooked if only linear cost functions are is used in the problem formulation. The cost functions of bio-oil added in the modified case study limits the scale of bio-oil production. The pyrolysis process will be at its maximum if no cost functions are added to the bio-oil price. Figure 4: The modified structure for the case study in P-Graph. Figure 5: Feasible Structure 1 of the modified case study. Figure 6: Graph percentage average errors against the number of segments of the three processes. Profit = 2514.4 NZD/h 1097 4.1 The effect of the number of segments on cost approximation error In the example the selected number of segments was three. The decision was based on the maximum error of ± 2.5 % between the segmented linear cost curves and the actual cost curve within the lower and upper bounds of the original cost function. The probable range of accuracy of order of magnitude cost estimate is ± 30 % to ± 50 % (Gerrard, 2000). Hence, an error with an order of magnitude less is considered negligible. Figure 6 shows the percentage maximum error of the number of segments, n of the three processes in the case study. IT should be noted than n = 1 is the usual method for linearizing cost functions for P-graph problem. 4.2 The effect of the number of segments on time to solve Figure 7 shows the number of segments only marginally increased the time to solve the PNS problem. The error at n = 10 reduces by approximately 80 % from n=1 and approximately 40 % from n=3 with an extra 0.39s and 0.31s to solved, respectively. For every segment, n, the PNS problem has 3n of operating unit vertex in to be solved in P-graph. It is anticipated that for more complex problems the increase in solution time will be more significant, although the increase is unlikely to make solution times impractical. Figure 7: Time needed to solve different number of segments. 5. Conclusion A method to incorporate non-linear cost function has been developed and applied into a wood-to-fuel biorefinery. Improved approximation of non-linear cost functions using multiple linear sub-functions greatly helped to decrease the error between the cost function included in P-graph and actual cost estimation formula. For a simple example, three linear segments as an approximation of the non-linear function were needed to solve the case study to within an error of ± 2.5 %. This structural change to the PNS problem also improved the profitability of Feasible Structure 1 by additional routes that were actually feasible. The time needed to solve the modified problem was 0.78 % longer than the time needed to solve the original problem. References Aviso K.B., Chiu A.S.F., Yu K.D.S., Promentilla M.A.B., Razon L.F., Ubando A.T., Sy C.L., Tan R.R., 2015, P- graph for Optimising Industrial Symbiotic Network, Chemical Engineering Transactions 45, 1345–1350. Friedler F., Tarjan K., Huang Y.W., Fan L.T., 1992, Graph-theoretic approach to process synthesis: axioms and theorems, Chemical Engineering Science, 47, 1973-1988 Gerrard A.M., 2000, Guide to Capital Cost Estimating, Fourth Eds. Institution of Chemical Engineers, Warwickshire, UK. Halasz F., Povoden G., Narodoslawsky M., 2005, Sustainable processes synthesis for renewable resources, Resources, Conservation and Recycling 44 (3), 293–307. Klemeš J.J., Varbanov P.S., 2015. Spreading the Message: P-Graph Enhancements: Implementations and Applications. Chemical Engineering Transactions 45, 1333–1338. Lam H.L., 2013. Extended P-graph Applications in Supply Chain and Process Network Synthesis. Current Opinion in Chemical Engineering 2, 475–486. 0 5 10 15 1 2 3 4 5 6 7 8 9 10 T im e ( s) Number of Segments 1098